Workbench CLI#

The Data Science & AI Workbench CLI is a collection of tools that you can use to interact with your instance of Workbench at the operating system (OS) level. Everything you need to use the CLI is contained in the ae5-conda-latest-Linux-x86_64.sh script, which is included with the Gravity installation tarball, but is also made available for air-gapped and BYOK8s implementations. If necessary, follow the steps to install the CLI tools. Otherwise, start at Configuring the Workbench CLI.

Installing the Workbench CLI tools#

  1. Open a terminal and download the script by running the following command (skip this step if you’ve downloaded the Gravity tarball):

    curl -O https://airgap.svc.anaconda.com/misc/ae5-conda-latest-Linux-x86_64.sh
    
  2. Make the script you just downloaded executable by running the following command:

    chmod +x ae5-conda-latest-Linux-x86_64.sh
    
  3. Execute the script by running the following command:

    bash ae5-conda-latest-Linux-x86_64.sh
    

Configuring the Workbench CLI#

Before you can log in to your instance of Workbench, you’ll need to tell the CLI which site to reach out to and interact with. To configure your CLI, complete the following steps:

  1. Add your Workbench Repository URL to the set of available sites by running the following command:

    # Replace <FQDN> with the fully qualified domain name of your Workbench instance
    anaconda-enterprise-cli config set sites.main.url https://<FQDN>/repository/api
    
  2. Run the following command to configure your instance of Workbench as the default site:

    anaconda-enterprise-cli config set default_site main
    
  3. Verify your configuration was successful by running the following command:

    anaconda-enterprise-cli config view
    

Updating SSL certificates using the CLI#

If you updated the platform’s TLS/SSL certificate, you can use the Workbench CLI to configure the certificates for the repository using the following commands:

$ anaconda-enterprise-cli config set ssl_verify true

# On Ubuntu
$ anaconda-enterprise-cli config set sites.master.ssl_verify /etc/ssl/certs/ca-certificates.crt

# On RHEL/CentOS
$ anaconda-enterprise-cli config set sites.master.ssl_verify /etc/pki/tls/certs/ca-bundle.crt

Logging in to the Workbench CLI#

  1. Access the CLI by running the following command:

    anaconda-enterprise-cli login
    
  2. Use your Workbench username and password to log in when prompted:

    Username: <YOUR_USERNAME>
    Password: <YOUR_PASSWORD>
    

Next Steps:

You can now configure access to your packages’ source mirror.

Once access is configured, you can begin mirroring channels and packages.

Configuration file locations#

The Workbench CLI reads configuration information from the following places:

System-level configuration: /etc/anaconda-platform/cli.yml

User-level configuration: $INSTALL_PREFIX/anaconda-platform/cli.yml and $HOME/.anaconda/anaconda-platform/cli.yml

To change how the CLI is configured, modify the appropriate cli.yml files based on your needs.

Note

Changing configuration settings at the user level overrides any system-level configuration.

Included CLI tools#

As stated before, the Workbench CLI uses multiple tools to interact with your instance and your repositories, and these tools are provided via the ae5-conda-latest-Linux-x86_64.sh script.

The script contains the following tools:

Package

Version

Build

Channel

Documentation

ae5-tools

0.4.1

pypi_0

ae5-admin

ae5-tools github

ae5_backup_restore

0.3.2

0

ae5-admin

ae5_backup_restore github

ae_preflight

0.1.9

py_0

ae5-admin

ae_preflight github

anaconda-enterprise-cli

5.5.2

pypi_0

ae5-admin

cas-mirror

5.4.0

pypi_0

pypi

Mirroring channels and packages

python

3.11.2

h7a1cb2a_0