Gravity Installation#

Gravity is an open-source, containerized Kubernetes framework that allows containerized applications like Anaconda Enterprised to be delivered in a self-contained installer that includes a special containerized implementation of Kubernetes. Anaconda has shipped Data Science & AI Workbench in a Gravity package since its first release.

Caution

Due to changes in the business model of Teleport, the original developers of Gravity, Anaconda is limiting the use of Gravity-based installers to existing customers and plans to end support for Gravity entirely at some point in the future. Existing Gravity customers are strongly encouraged to migrate their cluster to our new K3s implementation as soon as possible. Anaconda has developed a special process that allows you to migrate from Gravity to K3s without losing any of your existing data!

After you have verified that your environment is prepared for installation by completing the pre-installation checklist, you’re ready to install the cluster!

Note

The Gravity installation process only sets up a single control plane node. Once installation is complete, you can add additional nodes as desired, including GPUs.

  1. Open a terminal on the master node and log in to a service account with sudo access.

  2. Download the installer by running the following command:

    # Replace <INSTALLER_LOCATION> with the provided location of the installer
    curl -O <INSTALLER_LOCATION>
    

    Note

    If you are in an airgapped environment, you must deliver the installer to the master node in an alternate manner.

  3. Decompress the installer and enter the top directory by running the following commands:

    # Replace <INSTALLER> with the installer file you just downloaded
    tar xzvf <INSTALLER>
    cd <INSTALLER>
    
  4. Set up and initialize your conda environment by running the following command:

    ./conda-bootstrap.sh
    
  5. Enter yes to allow the installer to initialize your ae5-conda environment by running conda init when prompted.

  6. Verify your environment successfully created by running the following command:

    conda env list
    

    Note

    This command returns a list of existing conda environments. You should see a base environment present with an asterisk beside the directory to indicate it is currently active.

  7. Perform the Anaconda preflight system check on the master node by running the following command:

    ae-preflight
    

    Note

    You will receive an overall PASS or WARN result from the script. The output is captured in a results.txt file for later reference, if necessary. If something goes wrong, you can view the results to determine the issue and correct it.

  8. Create a file named values.yaml and populate it with the following content:

    # Replace <HOSTNAME> with the fully qualified domain name of the host server
    # Replace <GID> with the group ID with read-write access to the shared network file system (NFS) volume
    # Replace <SERVER_FQDN> with the address of the shared NFS volume
    # Replace <SERVER_PATH> with the path to the shared NFS volume
    apiVersion: v1
    kind: Configmap
    metadata:
      name: anaconda-enterprise-install
    data:
      values: |
        hostname: <HOSTNAME>
        persistence:
          groupID: <GID>
          nfs:
            server: <SERVER_FQDN>
            path: <SERVER_PATH>
    

    If you are installing a single-node cluster and you want to use the /opt/anaconda/storage volume for managed persistence, the persistence: section of the values.yaml can be entered as:

    persistence:
       pvc: anaconda-storage
    

    Note

    The direct use of /opt/anaconda/storage for managed persistence works only for single-node clusters. It must be replaced with a network file system (NFS) configuration before adding additional nodes to the cluster. Otherwise, sessions and deployments launched on the additional nodes will fail to start. For more information, see managed persistence.

  9. Run the gravity installation command:

    # Replace <ADVERTISE-ADDR> with the IP address you want to be visible to the other nodes. If you have a private network and all nodes can communicate on it, use the private IP address for the advertise address
    # Replace <CLUSTERNAME> with the name you're giving to your cluster. Alphanumeric characters and periods only
    # Replace <VALUES_PATH> with the filepath to the values.yaml file you just created
    sudo ./gravity install --advertise-addr=<ADVERTISE-ADDR> --cluster=<CLUSTERNAME> --config <VALUES_PATH> --service-uid=$(id -u) --cloud-provider=generic
    

    Here is an example of what the installation command looks like for a single-node cluster:

    sudo ./gravity install --advertise-addr=192.168.1.1 --cluster=MyCluster --config ./values.yaml --service-uid=$(id -u) --cloud-provider=generic
    

    If you are using an alternate TMPDIR, prepend the command with this new value. For example:

    sudo TMPDIR=/mytmp ./gravity install --advertise-addr=192.168.1.1 --cluster=MyCluster --config=./values.yaml --service-uid=$(id -u) --cloud-provider=generic
    

    Caution

    The --service-uid is the service account UID and cannot be a root user. If you are performing a reinstallation of Workbench, you must delete the previous planet user prior to setting the new --service-uid.

  1. Monitor the progress from the command line. Your output will look like this:

    * [0/100] starting installer
    * [0/100] preparing for installation... please wait
    * [0/100] application: AnacondaEnterprise:5.5.x
    * [0/100] starting non-interactive install
    * [0/100] initializing the operation
    * [20/100] configuring packages
    * [50/100] installing software
    
  2. Allow time for the process to complete (approximately 20-30 minutes).

  3. Create a local user account and password to log in to the Gravity Operations Center. To do so, enter the Gravity environment from any of the nodes by running the following command:

    sudo gravity enter
    
  4. Create a local user account and password by running the following command:

    # Replace <EMAIL> with the email address for the account
    # Replace <PASSWORD> with a password for the account. The password must be six characters long
    gravity --insecure user create --type=admin --email=<EMAIL> --password=<PASSWORD> --ops-url=https://gravity-site.kube-system.svc.cluster.local:3009
    
  5. Inform gravity that you have completed the installation by running the following command from within the Gravity environment:

    gravity site complete
    
  6. Open a web browser and navigate to your instance of Workbench.

    Note

    Your browser may initially refuse to connect due to the use of our generated, self-signed SSL certificates. You should temporarily permit your browser to proceed anyway. You will also have to do the same every time you start a new session or deployment, so it is best to complete the next step as soon as possible.

  7. Update your SSL cerfiticates.

  8. Proceed to the post-install configuration steps.