layout | title | tagline |
---|---|---|
page |
Install and Configure the SD2E CLI |
The primary method for interacting with the SD2E platform is the SD2E command line interface (CLI). The SD2E CLI is a collection of several other CLIs including Agave, Abaco, TACCLab, and TACCReg. In total, they comprise ~150 shell scripts and other resources for managing authorization, files, systems, applications, jobs, and more.
There are three methods to install the CLI, choose whichever fits your preferred working environment:
- Run an installer script to install in ~/sd2e-cloud-cli/bin/
- Manual install to a location of your choosing
- Pull a CLI Docker image
#### Requirements
Make sure in your environment, you have:
#### Install method 1: Run an installer script to install in `~/sd2e-cloud-cli/bin/`
Open a terminal window and run the installer script:
% curl -L https://raw.githubusercontent.com/sd2e/sd2e-cli/master/install/install.sh | sh
This will install the executables and write an export PATH
command to your
~/.bashrc
. To make the changes take effect immediately:
% source ~/.bashrc
Finally, verify that the CLI has been installed by issuing the following:
% sd2e info
DARPA SD2E version: 1.0.6
TACC Cloud API tenant: sd2e.org
TACC Cloud API versions:
Science APIs: 2.2.5
Reactors API: dev
TACC Accounting API: v1
#### Install method 2: Manual install to a location of your choosing
Open a terminal window and navigate to your preferred location for installation:
% mkdir sd2e-project && cd sd2e-project
Download and unpack the CLI:
% curl -L https://raw.githubusercontent.com/sd2e/sd2e-cli/master/sd2e-cloud-cli.tgz \
-o sd2e-cloud-cli.tgz
% tar -xvzf sd2e-cloud-cli.tgz
Then add the CLI executables to your PATH
:
% echo "PATH=\$PATH:$PWD/sd2e-cloud-cli/bin" >> ~/.bashrc
% source ~/.bashrc
Finally, verify that the CLI has been installed by issuing the following:
% sd2e info
DARPA SD2E version: 1.0.6
TACC Cloud API tenant: sd2e.org
TACC Cloud API versions:
Science APIs: 2.2.5
Reactors API: dev
TACC Accounting API: v1
#### Install method 3: Pull a CLI Docker image *(outdated)*
The CLI is also available as a Docker image. For this to work, it is assumed you have a reasonably recent version of Docker installed. Pull the latest image and verify CLI availability by performing:
% docker pull sd2e/cloud-cli:latest
% docker run -it -v $HOME/.agave:/root/.agave sd2e/cloud-cli bash
Then from within Docker, verify that the CLI is available:
/home$ sd2e info
DARPA SD2E version 1.0.1
TACC Cloud API tenant: sd2e
TACC Cloud API versions:
Science APIs: 2.2.5
Reactors API: dev
TACC Accounting API: v1
#### Influential environment variables
When working with the SD2E platform, you may optionally set some of the following environment variables. In bash, it will take the form:
% export VAR_NAME=option
e.g.
% export AGAVE_JSON_PARSER=jq
Environment variable | Options | Description |
---|---|---|
AGAVE_JSON_PARSER | jq, json_mirror, json, python, native | Set this to your favorite json parser (if installed) |
AGAVE_DISABLE_AUTO_REFRESH | 1, 0 | Set this to `1` to disable auto refresh of the OAuth2 token |
Return to the API Documentation Overview