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.

Before you begin:

  • Configure your A record in DNS for the master node with the actual domain name you will use for your Anaconda Enterprise installation.

  • By default, Anaconda Enterprise installs using a service account with the user ID (UID) 1000. You can change the UID of the service account by using the --service-uid option or the GRAVITY_SERVICE_USER environment variable at installation time. To do so, you need to have first created a group for that user with the UID.

    For example, to use UID 1001, run the following commands on each node of the cluster:

    root$ groupadd mygroup -g 1001
    root$ useradd --no-create-home -u 1001 -g mygroup myuser
    
  • The installer uses the TMPDIR directory that’s configured on the master node, so be sure the default directory contains sufficient space or create an alternate directory 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.

  • If you are using a firewall for network security, we recommend you temporarily disable it while you install Anaconda Enterprise.

  • When installing Anaconda Enterprise on a system with multiple nodes, verify that the clock of each node is in sync with the others prior to starting the installation process, to avoid potential issues. We recommed using the Network Time Protocol (NTP) to synchronize computer system clocks automatically over a network. See instructions here.

  • Existing installations of Docker (and dockerd), dnsmasq, and lxd will conflict with Anaconda Enterprise. If any of these are installed on the master node or any worker nodes, remove them from all nodes before installing Anaconda Enterprise.


Determine your install method

The method you use to install the cluster will vary, depending on your ability to access the target machine. If you have network access to the target machine, we recommend you install Anaconda Enterprise using a web browser. Otherwise, you’ll need to use a command line.

With both methods, you can create any number of nodes from one to five nodes. You can also add or remove nodes at any time after installation. For more information, see Adding and removing nodes.

If the cluster where you will install AE cannot connect to the internet, follow the instructions for Installing in an air-gapped environment.


Using a web browser (recommended)

  1. On the master node, download and decompress the installer, replacing <location_of_installer> with the location of the installer, and <version> with your installer version:

    curl -O <location_of_installer>.tar.gz
    tar xvzf anaconda-enterprise-<version>.tar.gz
    cd anaconda-enterprise-<version>
    

NOTE: The tarball file is large (~7GB), so it may take some time to download.

  1. On the master node, run the pre-installation system checks as sudo or root user before proceeding with the installation:

    sudo ./gravity check --profile ae-master
    
  2. To perform system checks on a worker node, run the following command as sudo or root user:

    sudo ./gravity check --profile ae-worker
    

If all of 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.

  1. After doing the pre-installation system checks, run the installer on the master node as sudo or root user:

    sudo ./gravity wizard
    

NOTES:

  • If you’re using a service account UID that’s different than the default 1000, append the command with the actual UID. For example, to use UID 1001, run:

    sudo ./gravity wizard --service-uid=1001
    
  • If you’re using an alternate TMPDIR, pre-pend the command with the directory. For example:

    sudo TMPDIR=/mytmp ./gravity wizard
    
* [0/100] starting installer
confirm the config:

* IP address: 1.1.1.1

confirm (yes/no):
yes
* [0/100] starting installer
* [0/100] preparing for installation... please wait
* [0/100] application: AnacondaEnterprise:5.2.x
---------------------------------------------------------------------------------------------
OPEN THIS IN BROWSER: https://1.1.1.1:61009/web/installer/new/gravitational.io/AnacondaEnterprise/5.2.x-x.x?install_token=0a39d9a2f16036fc6583e78b502e7cae
---------------------------------------------------------------------------------------------
  1. To start the browser-based install, copy the full URL that is generated into your browser. Ensure that you are connecting to the public network interface.

NOTES:

  • If you’re using an alternate TMPDIR and DID NOT add it to /etc/environment, edit the copied URL to include the directory in the sudo bash command. For example, sudo TMPDIR=/mytmp bash.
  • If you’re unable to connect to the URL due to security measures in place at your organization, select File > New Incognito Window to launch the installer.
  1. The installer will install a self-signed TLS/SSL certificate, so you can click the link at the bottom of this warning message to proceed:
../_images/ae50-guiinstall1.png

  1. After reviewing the License Agreement, check I Agree To The Terms and click Accept.
  2. Enter the name to use for your deployment in the Cluster Name field. The Bare Metal option is already selected, so you can click Continue.
../_images/ae50-installcluster.png

  1. Select the number of nodes—between one and five—that you want to install in the cluster. One node will act as the master node, and any remaining nodes will be worker nodes. See Fault tolerance for more information on how to size your cluster.
../_images/install-nodes3.png

  1. On each node you plan to install Anaconda Enterprise, copy and run the command that’s provided as it applies to the master node and any worker nodes. As you run the command on each node, the host name of the node is listed below the nodes.
../_images/install-nodes.png

  1. Use the IP Address drop-down to select the IP address for each node.
  2. Accept the default directory for installing application data (/opt/anaconda/) or enter another location.
  3. After all nodes are listed, click Start Installation. This process can take approximately 20 minutes to complete.

NOTE: To view the install logs, click the option at the bottom of the panel.

../_images/install-logs.png

When the installation is complete, the following screen is displayed:

../_images/ae50-guiinstaller3.png

  1. Click Continue to proceed to Post-install configuration.

NOTE: The installer running in the terminal will note that installation is complete and that you can stop the installer process. Do not do so until you have completed the post-install configuration.


Using a command line

If you cannot connect to the server from a browser—because you’re installing from a different network, for example—you can install Anaconda Enterprise using a command line.

On each node in the cluster, download and decompress the installer, replacing <location_of_installer> with the location of the installer, and <version> with your installer version:

curl -O <location_of_installer>.tar.gz
tar xvzf anaconda-enterprise-<version>.tar.gz
cd anaconda-enterprise-<version>

On the master node, run the pre-installation system checks—as sudo or root user—before proceeding with the installation:

sudo ./gravity check --profile ae-master

Create a file named values.yaml with the following values, 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
    generateCerts: true
    keycloak:
      includeMasterRealm: true

After running the pre-installation system checks and creating the YAML file, run the following command on the master node as sudo or root user, where you replace:

  • The advertise-addr IP address with the address you want to be visible to the other nodes
  • CLUSTERNAME with a name, otherwise a random cluster name will be assigned
  • /path/to/values.yaml with the path to the values.yaml file you created

For flavor, choose from the following options the one that represents the number and type of nodes you want to install in the cluster:

  • small: installs a single-node cluster (one ae-master node). This is the default flavor.

  • medium: installs three nodes (one ae-master node and two ae-worker nodes)

  • large: installs five nodes (one ae-master node, two k8s-master nodes and two ae-worker nodes):

    sudo ./gravity install --advertise-addr=192.168.1.1 --token=anaconda-enterprise --cluster=CLUSTERNAME --flavor=small --config /path/to/values.yaml
    

NOTES:

If you’re using a service account UID that’s different than the default 1000, append the command with the actual UID. For example, to use UID 1001, run:

  sudo ./gravity install --advertise-addr=192.168.1.1 --token=anaconda-enterprise --cluster=CLUSTERNAME --flavor=small --config /path/to/values.yaml --service-uid=1001

-or-

  sudo GRAVITY_SERVICE_USER=1001 ./gravity install --advertise-addr=192.168.1.1 --token=anaconda-enterprise --cluster=CLUSTERNAME --flavor=small --config /path/to/values.yaml

If you’re using an alternate TMPDIR, pre-pend the command with the directory. For example:

sudo TMPDIR=/mytmp ./gravity install --advertise-addr=192.168.1.1 --token=anaconda-enterprise --cluster=CLUSTERNAME --flavor=small --config=/path/to/values.yaml

The command line displays the installer’s progress:

* [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] still waiting for 1 nodes of role "worker" to join
* [0/100] still waiting for 1 nodes of role "worker" to join
* [0/100] still waiting for 1 nodes of role "worker" to join
* [0/100] initializing the operation
* [20/100] configuring packages
* [50/100] installing software

On each worker node, run the following command, replacing the advertise-addr IP address with the address you want to be visible to the other nodes:

sudo ./gravity join 192.168.1.1 --advertise-addr=192.168.1.2 --token=anaconda-enterprise --role=ae-worker

The command line displays the installer’s progress:

* [0/100] joining cluster
* [0/100] connecting to cluster
* [0/100] connected to installer at 192.168.1.1
* [0/100] initializing the operation
* [20/100] configuring packages
* [50/100] installing software

This process takes approximately 20 minutes.

After you’ve finished installing Anaconda Enterprise, you’ll need to create a local user account and password to log into the Anaconda Enterprise Operations Center.

First, enter the Anaconda Enterprise environment on any of the master or worker nodes:

sudo gravity enter

Then, run the following command to create a local user account and password for the Anaconda Enterprise Operations Center, replacing <your-email> and <your-password> with the email address and password you want to use.

NOTE: Passwords must be at least six characters long.

gravity --insecure user create --type=admin --email=<your-email> --password=<your-password> --ops-url=https://gravity-site.kube-system.svc.cluster.local:3009

Installing in an air-gapped environment

If the cluster where you will install Anaconda Enterprise cannot connect to the internet, follow these instructions:

  1. Download the installer tarball file to a jumpbox or USB key.
  2. Move the installer tarball file to a designated head node in the cluster.
  3. Untar the installer file and run sudo ./gravity wizard for browser-based installation or sudo ./gravity install for CLI-based installation.

Installation and post-install configuration steps are the same for air-gapped and internet-connected installations, so you can continue the installation process from this point, choosing your preferred method:


Post-install configuration

After completing either installation path, complete the post-install configuration steps.