Jobbergate-cli Setup and Installation

This post is part 1 of getting started using Jobbergate CLI and details the initial install and setup. In part 2 we walk you through creating a simple Hello World application.

Setup and Install Steps

  1. Virtual Environment

    It is recommended that the user start with a python virtual environment as a workspace for these operations. Details on how to set up a virtual environment can be found here.

  2. Install CLI

    Install the jobbergate-cli as a python package from the Omnivector github repo with:

    $ pip install git+https://github.com/omnivector-solutions/jobbergate-cli.git

    • If jobbergate-cli returns command not found:
      • Get Location with: $ pip show jobbergate-cli
      • Add Location to PATH
  3. Confirm install

    Confirm jobbergate-cli install was successful with:

    $ jobbergate-cli

    You should see an output of:

    Usage: jobbergate-cli [OPTIONS] COMMAND [ARGS]...
    
      ctx --> context @click.pass_context makes username, password, token and
      user_id available to the other cmd
    
    Options:
      -u, --username TEXT  Your Jobbergate API Username
      -p, --password TEXT  Your Jobbergate API password
      --help               Show this message and exit.
    
    Commands:
      create-application
      create-job-script
      create-job-submission
      delete-application
      delete-job-script
      delete-job-submission
      get-application
      get-job-script
      get-job-submission
      list-applications
      list-job-scripts
      list-job-submissions
      update-application
      update-job-script
      update-job-submission
    
  4. Authentication

    User will need API credentials to perform operations - process to automate set up and manage users is TBD

  5. Confirm setup and authentication was successful with

    $ jobbergate-cli list-applications

Output should be a list of applications created similar to:


 id  application_name           application_description    application_location                                                                            application_dir_listing    application_dir_listing_acquired      application_owner  created_at                   updated_at
----  -------------------------  -------------------------  ----------------------------------------------------------------------------------------------  -------------------------  ----------------------------------  -------------------  ---------------------------  ---------------------------
  35  hello_world                TEST_DESC                  jobbergate-resources/2/11b76a7f-16ee-4aaa-be57-3c9677635f2c/application.tar.gz                  TEST_DIR_LISTING           True                                                  2  2020-08-05T20:53:48.651464Z  2020-08-05T20:53:48.651492Z
  36  hello_world                TEST_DESC                  jobbergate-resources/2/a311bcfc-f9ca-4d78-a03d-d2e8ff3b7efd/application.tar.gz                  TEST_DIR_LISTING           True                                                  2  2020-08-05T21:04:20.234166Z  2020-08-05T21:04:20.234191Z
  37  hello_world                TEST_DESC                  jobbergate-resources/2/ffd92e16-5a40-4baa-a3c0-b474e640b3d9/application.tar.gz                  TEST_DIR_LISTING           True                                                  2

Now that the CLI is installed, you can create your first application. Read more about it in part 2 of this post.

2 Likes