Installing the cluster

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

Note

If you haven’t already, please complete our pre-install checklist to ensure that you have accounted for all implementation prerequisites before you begin.

Additional installation notes:

  • These instructions should be executed by a non-root user, configured with sudo access. You may wish to create a separate account for this purpose, as the instructions below configure Gravity to execute its system processes under this UID.
  • The installer uses the directory that is specified by the environment variable TMPDIR on the master node to store working files. Be sure this directory contains sufficient space, or create an alternate directory (with sufficient space) for the installer to use. If you choose to use an alternate directory, ensure it has the correct permissions enabled (drwxrwxrwx), and either add it to /etc/environment or explicitly specify the directory during installation.

Basic installation

To complete the basic installation, you will need a single open terminal on the master node, logged into the service account.

  1. Download and decompress the installer, replacing <INSTALLER_LOCATION> with the location of the installer, and <VERSION> with your installer version:

    curl -O <INSTALLER_LOCATION>.tar.gz
    tar xvf anaconda-enterprise-<VERSION>.tar.gz
    cd anaconda-enterprise-<VERSION>
    

    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.

  2. Run the Gravity pre-installation system check for the master node:

    sudo ./gravity check --profile ae-master
    

    If the system checks pass and all requirements are met, the output from the above commands will be empty. If the system checks fail and some requirements are not met, the output will indicate which system checks failed.

    Note

    These checks are not fully comprehensive, and are not intended to serve as a substitute for completing our pre-install checklist and otherwise verifying that your nodes meet the installation requirements.

  3. Create a file named values.yaml with the following content, replacing <HOSTNAME> with the fully-qualified domain name (FQDN) of the host server:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: anaconda-enterprise-install
    data:
      values: |
        hostname: <HOSTNAME>
    

    If you wish to enable Managed Persistence with your initial installation, please review the managed persistence section of the AE5 system requirements. Then add a new section to your values field, called persistence:, indented identically to the hostname field. Replace <SERVER_FQDN> and <SERVER_PATH> with the server address and path, respectively, of the shared NFS volume; and <GID> with the group ID to use to enable read-write access to that volume:

    ...
        hostname: <HOSTNAME>
        persistence:
          groupID: <GID>
          nfs:
            server: <SERVER_FQDN>
            path: <SERVER_PATH>
    

    For single-node clusters only, you may re-use the /opt/anaconda/storage volume for managed persistence. In this case, the persistence: section can be significantly simplified:

    ...
        hostname: <HOSTNAME>
        persistence:
          pvc: anaconda-storage
    

    Note

    The direct use of /opt/anaconda/storage for managed persistence works only for single-node installations. It must be replaced with an NFS configuration before adding additional nodes to the cluster. Otherwise, sessions and deployments launched on the additional nodes will fail to start.

  4. Run the gravity installation command. The typical command will look like this:

    sudo ./gravity install --advertise-addr=<ADVERTISE-ADDR> --cluster=<CLUSTERNAME> \
       --config <VALUES_PATH> --service-uid=$(id -u) --cloud-provider=generic
    

    Before running this command, replace the bracketed values as follows:

    • <ADVERTISE-ADDR>: the IP address with the address you want to be visible to the other nodes. If your cluster has both a private and public network, and all nodes can speak to each other over that private network, use the private network address.
    • <CLUSTERNAME>: a name of your choosing; e.g., AnacondaEnterprise. The name must consist of alphanumeric characters or periods; e.g., test.cluster1.
    • <VALUES_PATH>: the path to the values.yaml file you created above.

    Here is an example 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
    
  5. Monitor the progress from the command line. You should see something 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
    

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

  6. 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> and <PASSWORD> with the email address and password that you wish to use. Your 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
    
  7. Finally, run the following command, also within the Gravity environment, to tell Gravity that you have completed the installation:

    gravity site complete
    
  8. 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.