This topic provides guidance for installing Anaconda Server in an air-gapped environment.
To successfully install Anaconda Server in an air-gapped environment, you must have already prepared your environment according to the Air gap environment preparation instructions.
Installing Anaconda Server
Obtain the Anaconda Server installer location and your Anaconda Server license from your Anaconda representative before proceeding.
-
Download Anaconda Server:
# Replace <INSTALLER_LOCATION> with the provided installer URL
curl -O <INSTALLER_LOCATION>
-
Make it executable:
# Replace <INSTALLER> with the installer you just downloaded
chmod +x <INSTALLER>
-
Run one of the following installation commands. Choose the command that corresponds with your setup.
# Replace <INSTALLER> with the installer you just downloaded
# Replace <FQDN> with the fully qualified domain name of your Anaconda Server instance
sudo bash <INSTALLER> --keep -- --domain <FQDN> --default-user anaconda 2>&1 | tee as.install.output
If you are using TLS/SSL certificates, run this command to install Anaconda Server:# Replace <INSTALLER> with the installer you just downloaded
# Replace <FQDN> with the fully qualified domain name of your Anaconda Server instance
# Replace <PATH_TO_CERT> with the path to your TLS/SSL cert
# Replace <PATH_TO_KEY> with the path to your TLS/SSL key
sudo bash <INSTALLER> --keep -- --domain <FQDN> --tls-cert <PATH_TO_CERT> --tls-key <PATH_TO_KEY> --default-user anaconda 2>&1 | tee as.install.output
To include Grafana monitoring dashboards in your installation of Anaconda Server, add the following argument to your installation command:For example:sudo bash <INSTALLER> --keep -- --domain <FQDN> --grafana-monitor-stack --default-user anaconda 2>&1 | tee as.install.output
You must be using Postgres version 9.6 or later and Redis version 6.0 or later.
# Replace <INSTALLER> with the installer file you just downloaded
# Replace <FQDN> with the fully qualified domain name of your Anaconda Server instance
# Replace <PATH_TO_CERT> with the path to your TLS/SSL cert
# Replace <PATH_TO_KEY> with the path to your TLS/SSL key
# Replace <EXTERNAL_PS/RD_INSTANCE_IP4> with your external instance IP4 address (in both locations)
# Replace <ASSIGNED_PORT> with the port used for communication
# Replace <POSTGRES_USERID> with your postgres user ID
# Replace <POSTGRES_PASSWORD> with your postgres password
chmod +x <INSTALLER>
bash <INSTALLER> --keep -- --domain <FQDN> --tls-cert <PATH_TO_CERT> --tls-key <PATH_TO_KEY> -e redis://<EXTERNAL_PS/RD_INSTANCE_IP4> -h <EXTERNAL_PS/RD_INSTANCE_IP4> -p <ASSIGNED_PORT> -u <POSTGRES_USERID> -pw <POSTGRES_PASSWORD> --default-user anaconda -y 2>&1 | tee as.install.output
Installing packages and CVEs
In a standard installation, Anaconda Server would be pointed to a web URL that contains artifacts for your users to view or download. However, on an air-gapped network, you’ll need to provide network directory folder locations for Anaconda Server to look in when searching for artifacts, and populate those folders with artifacts.
The .zip files you downloaded during environment preparation will be the source of your packages for Anaconda Server. Move these files to the correct folders by running the following commands:
mv conda_main.zip /opt/anaconda/repo/airgap/
mv conda_msys2.zip /opt/anaconda/repo/airgap/
mv conda_r.zip /opt/anaconda/repo/airgap/
mv cve.zip /opt/anaconda/repo/airgap/
Moving the conda_msys2.zip and conda_r.zip files is optional.
With the files in place, you’ll now need to instruct Anaconda Server to create a mirror using the cve.zip file as a source of data.
-
Open your Anaconda Server installer directory.
# Replace <INSTALLER> with your installer directory
cd <INSTALLER>
You can run the command ls -la to show a list of files contained in your installer file directory. The docker-compose.yml and .env files are stored here.
-
Open your
.env file using your preferred file editor and add the following line:
REPO_CVE_DEFAULT_MIRROR=file://opt/anaconda/repo/airgap/cve.zip
-
Save your work and close the file, then apply your changes to Anaconda Server by running the following:
-
Monitor the status of your instance by running the following command:
Adding hosted miniconda installers
Because air-gapped users do not have access to the internet, Anaconda provides Miniconda installers for your company’s use through Anaconda Server.
-
Download a valid
installers.zip file from the s3 bucket:
curl -O https://anaconda-airgap-te.s3.amazonaws.com/installers.zip
-
Move the
installers.zip file to the airgap folder of the Anaconda Server repository by running the following command:
mv /installers.zip /opt/anaconda/repo/airgap/
-
If necessary, open your Anaconda Server installer directory.
-
Using your preferred file viewer, open the
docker-compose.yml file.
-
Verify that the following line is present in the
volumes section for both the repo_api and repo_worker objects:
${BASE_INSTALL_DIR}/airgap:${BASE_INSTALL_DIR}/airgap
If the above line is not present, add it to both locations. This allows docker to have access to the /opt/anaconda/repo/airgap directory.
-
Add the following line to the
environment section for both the repo_api and repo_worker objects:
REPO_MINICONDA_INSTALLERS_ZIP_PATH=/opt/anaconda/repo/airgap/installers.zip
-
Save your work and close the file, then apply your changes to Anaconda Server by running the following command:
Miniconda installers will now be available for your end users to download from the login page of Anaconda Server.