Installing the cluster

After you have determined the initial topology for your Anaconda Enterprise cluster, verified that your system meets all of the installation requirements, and you have completed the pre-install checklist, you’re ready to install the cluster.

Basic installation

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

  2. Download and decompress the installer:

    # Replace <INSTALLER_LOCATION> with the provided location of the installer
    # Replace <INSTALLER> with the installer file you just downloaded
    curl -O <INSTALLER_LOCATION>
    tar xzvf <INSTALLER>
    cd <INSTALLER>
    

    If you are in an airgapped environment, deliver the installer to the master node in an alternate manner, and proceed with the tar / cd steps in the same fashion.

  3. Set up and initialize your conda environment by running the following command:

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

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

    conda env list
    

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

  6. Run the Anaconda preflight system check on the master node:

    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 cause and course of correction.

  7. 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 netowrk 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 about managed persistence, see managed persistence.

  8. 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
    

    Note

    The --service-uid is the service account UID and cannot be a root user.

  9. 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.2.x
    * [0/100] starting non-interactive install
    * [0/100] initializing the operation
    * [20/100] configuring packages
    * [50/100] installing software
    

    Allow time for the process to complete, approximately 20-30 minutes.

  10. 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:

    sudo gravity enter
    

    Then run the following command to create a local user account and password.

    # 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
    
  11. Finally, run the following command within the Gravity environment to tell Gravity that you have completed the installation:

    gravity site complete
    
  12. Proceed to the post-install configuration steps.

Note

The AE5 application itself will likely require another 30 minutes or so to fully load. The post-install configuration steps describe how to confirm that this process is fully complete.

Wizard installation (deprecated)

Prior versions of this documentation recommended the use of Gravity’s web-based wizard. We now strongly recommend the command-line approach offered above, as it is simpler, more reliable, and more flexible. If you prefer the web-based approach, we have moved those instructions to a separate page.