Install a Multi-Node Air-Gapped Deployment

This chapter presents instructions on deploying Autonomous Identity in a multi-node air-gapped or offline target machine that has no external Internet connectivity. ForgeRock provides a deployer script that pulls a Docker container image from ForgeRock's Google Cloud Registry ( repository. The image contains the microservices, analytics, and backend databases needed for the system.

The air-gap installation is similar to that of the multi-node deployment with Internet connectivity, except that the image and deployer script must be stored on a portable media, such as USB drive or drive, and copied to the air-gapped target environment.

The deployment depends on how the network is configured. You could have a Docker cluster with multiple Spark nodes and Cassandra or MongoDB nodes. The key is to determine the IP addresses of each node.

Figure 11: A multi-node air-gap deployment.

Autonomous Identity multi-node air-gapped deployment.

Let's deploy Autonomous Identity on a single-node target on CentOS 7. The following are prerequisites:

  • Operating System. The target machine requires CentOS 7, Docker, and Python 2.6 or later. The deployer machine can use any operating system as long as Docker is installed. For this guide, we use CentOS 7 as its base operating system.

  • Memory Requirements. Make sure you have enough free disk space on the deployer machine before running the commands. We recommend at least a 40GB/partition with 14GB used and 27GB free after running the commands.

  • Subnet Requirements. We recommend deploying your multinode instances within the same subnet. Ports must be open for the installation to succeed. Each instance should be able to communicate to the other instances.

  • Deployment Requirements. Autonomous Identity provides a Docker image that creates a script. The script downloads additional images necessary for the installation. To download the deployment images, you must first obtain a registry key to log into the ForgeRock Google Cloud Registry ( The registry key is only available to ForgeRock Autonomous Identity customers. For specific instructions on obtaining the registry key, see How To Configure Service Credentials (Push Auth, Docker) in Backstage.

  • Filesystem Requirements. Autonomous Identity requires a shared filesystem accessible from the Spark master, Spark worker, and analytics hosts. The shared filesystem should be mounted at the same mount directory on all of those hosts. If the mount directory for the shared filesystem is different from the default, /data, update the /autoid-config/vars.yml file to point to the correct directories:

    analytics_data_dir: /data
    analytics_conf_dif: /data/conf
  • Architecture Requirements. Make sure that the analytics server is on the same node as the Spark master.

  • Database Requirements. Decide which database you are using: Apache Cassandra or MongoDB.

Set Up the Deployer Machine

Set up the deployer on an Internet-connect machine.

  1. The install assumes that you have CentOS 7 as your operating system. Check your CentOS 7 version.

    $ sudo cat /etc/centos-release
  2. Check your Python version. Autonomous Identity supports Python 2.6 and higher.

    $ python --version
  3. Set the user for the target machine to a username of your choice. For example, autoid.

    $ sudo adduser autoid
  4. Set the password for the user you created in the previous step.

    $ sudo passwd autoid
  5. Configure the user for passwordless sudo.

    $ echo "autoid  ALL=(ALL)  NOPASSWD:ALL" | sudo tee /etc/sudoers.d/autoid
  6. Add administrator privileges to the user.

    $ sudo usermod -aG wheel autoid
  7. Change to the user account.

    $ su - autoid
  8. Install yum-utils package on the deployer machine. yum-utils is a utilities manager for the Yum RPM package repository. The repository compresses software packages for Linux distributions.

    $ sudo yum install -y yum-utils
  9. Create the installation directory. Note that you can use any install directory for your system as long as your run the script from there. Also, the disk volume where you have the install directory must have at least 8GB free space for the installation.

    $ mkdir ~/autoid-config

Install Docker on the Deployer Machine

  1. On the target machine, set up the Docker-CE repository.

    $ sudo yum-config-manager \
  2. Install the latest version of the Docker CE, the command-line interface, and, a containerized website.

    $ sudo yum install -y docker-ce docker-ce-cli

Set Up SSH on the Deployer

While SSH is not necessary to connect the deployer to the target node as the machines are isolated from one another. You still need SSH on the deployer so that it can communicate with itself.

  1. On the deployer machine, run ssh-keygen to generate an RSA keypair, and then click Enter. You can use the default filename. Enter a password for protecting your private key.

    $ ssh-keygen -t rsa -C "autoid"

    The public and private rsa key pair is stored in home-directory/.ssh/id_rsa and home-directory/.ssh/

  2. Copy the SSH key to the autoid-config directory.

     $ cp ~/.ssh/id_rsa ~/autoid-config
  3. Change the privileges to the file.

    $ chmod 400 ~/autoid-config/id_rsa

Prepare the Tar File

Run the following steps on an Internet-connect host machine:

  1. On the deployer machine, change to the installation directory.

    $ cd ~/autoid-config/
  2. Log in to the ForgeRock Google Cloud Registry ( using the registry key. The registry key is only available to ForgeRock Autonomous Identity customers. For specific instructions on obtaining the registry key, see How To Configure Service Credentials (Push Auth, Docker) in Backstage.

    $ docker login -u _json_key -p "$(cat autoid_registry_key.json)"

    You should see:

    Login Succeeded
  3. Run the create-template command to generate the script wrapper. Note that the command sets the configuration directory on the target node to /config. Note that the --user parameter eliminates the need to use sudo while editing the hosts file and other configuration files.

    $ docker run --user=`id -u` -v ~/autoid-config:/config -it create-template
  4. Make the script executable.

    $ chmod +x
  5. Download the Docker images. This step downloads software dependencies needed for the deployment and places them in the autoid-packages directory.

    $ sudo ./ download-images
  6. Create a tar file containing all of the Autonomous Identity binaries.

    $ tar czf autoid-packages.tgz autoid-packages/*
  7. Copy the autoid-packages.tgz to a USB drive or portable hard drive.

Install from the Air-Gap Target

Before you begin, make sure you have CentOS 7 installed on your air-gapped target machine.

  1. Create the ~/autoid-config directory if you haven't already.

    $ mkdir ~/autoid-config
  2. Unpack the tar file.

    $ tar xf autoid-packages.tgz -C ~/autoid-config
  3. On the air-gap host node, copy the SSH key to the ~/autoid-config directory.

     $ cp ~/.ssh/id_rsa ~/autoid-config
  4. Change the privileges to the file.

    $ chmod 400 ~/autoid-config/id_rsa
  5. Change to the configuration directory.

    $ cd ~/autoid-config
  6. Install Docker.

    $ sudo ./ install-docker
  7. Log out and back in.

  8. Change to the configuration directory.

    $ cd ~/autoid-config
  9. Import the deployer image.

    $ ./ import-deployer
  10. Create the configuration template using he create-template command. This command creates a configuration file, ansible.cfg.

    $ ./ create-template
  11. Make the script executable.

    $ chmod +x
  12. To see the list of commands, enter

    $ ./
         Usage: deployer <command>

Configure Autonomous Identity

The create-template command from the previous section creates a number of configuration files, required for the deployment.

  1. Open a text editor and edit the ansible.cfg to set up the remote user and SSH private key file location on the target node. Make sure that the remote_user exists on the target node and that the deployer machine can ssh to the target node as the user specified in the id_rsa file.

    host_key_checking = False
    remote_user = autoid
    private_key_file = id_rsa
  2. On the deployer machine, open a text editor and edit the ~/autoid-config/vars.yml file to configure specific settings for your deployment:

    1. Domain and Target Environment. Set the domain name and target environment specific to your deployment by editing the /autoid-config/vars.xml file. By default, the domain name is set to and the target environment is set to autoid. The default Autonomous Identity URL will be: For this example, we use the default values.

      target_environment: autoid

      If you change the domain name and target environment, you need to also change the certificates to reflect the new changes. For more information, see Customize the Domain and Namespace.

    2. Analytics Data Directory and Analytics Configuration Direction. For a multi-node Spark deployment, Autonomous Identity requires a shared filesystem accessible from Spark Master, Spark Worker(s), and Analytics hosts. The shared filesystem should be mounted at same mount directory on all of the above hosts. If the mount directory for shared filesystem is different than /data, update the following properties in the vars.yaml file to point to the correct location:

      analytics_data_dir: /data
      analytics_conf_dif: /data/conf

    3. Dark Theme Mode. Optional. By default, the Autonomous Identity UI displays its pages with a light background. You can set a dark theme mode by setting the enable_dark_theme property to true.

    4. Database Type. By default, Apache Cassandra is set as the default database for Autonomous Identity. For MongoDB, set the db_driver_type: to mongo.

      db_driver_type: mongo

    5. Private IP Address Mapping. An air-gap deployment has no external IP addresses, but you may still need to define a mapping if your internal IP address differs from an external IP, say in a virtual air-gapped configuration.

      If the IP addresses are the same, you can skip this step.

      On the target machine, add the private_ip_address_mapping property in the /inventory/vars.yml file. Make sure the values are within double quotes. The key should not be in double quotes and should have two spaces preceding the IP address.

        external_ip:  "internal_ip"

      For example:

      private_ip_address_mapping:  ""  ""  ""
    6. Authentication Option. Autonomous Identity provides a single sign-on (SSO) feature that you can configure with an OIDC identity provider.

    7. JWT Expiry and Secret File. Optional. By default, the session JWT is set at 30 minutes. To change this value, set the jwt_expiry property to a different value.

      jwt_expiry: "30 minutes"

    8. MongoDB Configuration. For MongoDB clusters, enable replication by uncommenting the mongodb_replication_replset property.

      # uncomment below for mongo with replication enabled. Not needed for single node deployments
      mongodb_replication_replset: mongors

      Also, enable a custom key for inter-machine authentication in the clustered nodes.

      # custom key
      # password for inter-process authentication
      # please regenerate this file on production environment with
      # command 'openssl rand -base64 741'
      mongodb_keyfile_content: |

      On production deployments, you can regenerate this file by running the following command:

      $ openssl rand -base64 741
    9. Elasticsearch Heap Size. Optional. The default heap size for Elasticsearch is 1GB, which may be small for production. For production deployments, uncomment the option and specify 2G or 3G.

      #elastic_heap_size: 1g   # sets the heap size (1g|2g|3g) for the Elastic Servers

    10. OpenLDAP. Optional. Autonomous Identity installs an OpenLDAP Docker image on the target server to hold user data. Administrators can add or remove users or change their group privileges using the phpldapadmin command. You can customize your OpenLDAP domain, base DN, and URL to match your company's environment. For more information, see Configuring LDAP.

  3. Open a text editor and enter the public IP addresses of the target machines in the ~/autoid-config/hosts file. Make sure the target host IP addresses are accessible from the deployer machine. The following is an example of the ~/autoid-config/hosts file:

    If you configured Cassandra as your database, the ~/autoid-config/hosts file is as follows for single-node target deployments:

    # ELastic Nodes

    If you configured MongoDB as your database, the ~/autoid-config/hosts file is as follows for single-node target deployments:

    [mongo_master]  mongodb_master=True
    # ELastic Nodes
  4. Set the Autonomous Identity passwords, located at ~/autoid-config/vault.yml.

      basic_auth_password: Welcome123
      openldap_password: Welcome123
      cassandra_password: Welcome123
      cassandra_admin_password: Welcome123
      mongo_admin_password: Welcome123
      mongo_root_password: Welcome123
      elastic_admin_password: Welcome123
      elasticsearch_password: Welcome123
  5. Encrypt the vault file that stores the Autonomous Identity passwords, located at ~/autoid-config/vault.yml. The encrypted passwords will be saved to /config/.autoid_vault_password. The /config/ mount is internal to the deployer container.

    $ ./ encrypt-vault
  6. Download the images. This step downloads software dependencies needed for the deployment and places them in the autoid-packages directory.

    $ ./ download-images
  7. Run the deployment.

    $ ./ run

Access the Dashboard

Access the Autonomous Identity console UI:

  1. Open a browser, and point it to (or your customized URL:

  2. Log in as a test user: Enter the password: Welcome123.

Check Apache Cassandra

Check Cassandra:

  1. On the target node, check the status of Apache Cassandra.

    $ /opt/autoid/apache-cassandra-3.11.2/bin/nodetool status
  2. An example output is as follows:

    Datacenter: datacenter1
    |/ State=Normal/Leaving/Joining/Moving
    --  Address       Load       Tokens       Owns (effective)  Host ID                               Rack
    UN 1.33 MiB   256          100.0%            a10a91a4-96e83dd-85a2-4f90d19224d9  rack1

Check MongoDB

Check the status of MongoDB:

  • On the target node, check the status of MongoDB.

    $ mongo <IP Address> --username "autoidmongo" --password <MongoDB Vault Password>

Check Apache Spark

Check Spark:

  • SSH to the target node and open Spark dashboard using the bundled text-mode web browser

    $ elinks http://localhost:8080

    You should see Spark Master status as ALIVE and worker(s) with State ALIVE.

    An image showing the Spark Dashboard.

Access Self-Service

The self-service feature lets Autonomous Identity users change their own passwords.

Access self-service:

Start the Analytics

If the previous steps all check out successfully, you can start an analytics pipeline run, where association rules, confidence scores, predications, and recommendations are generated. Autonomous Identity provides a small demo data set that lets you run the analytics pipeline on. Note for production runs, prepare your company's dataset as outlined in Data Preparation.

Start the analytics service:

  1. On the deployer node, SSH to the target node.

    $ ssh autoid@<IP-Address>
  2. Check if the analytics service is running. The ./ run command should have started the analytics service.

    $ docker ps | grep analytics
  3. If the previous step returns blank, start the analytics service.

    $ docker start analytics
  4. Once you have verified that the analytics service has started, run the analytics pipeline commands. This may take a bit longer than the install, depending on the size of your dataset. For specific information, see Run the Analytics Pipeline.

Read a different version of :