Use ADCM Installer

ADCM Installer is a tool written in Go to help simplify the processes of installation, upgrade, and configuration of ADCM. It also allows you to extend the Docker Compose functionality by secret storage.

ADCM Installer consists of the following packages:

  • Docker Compose — controls the life cycle of Docker containers.

  • age-encryption — encodes and decodes sensitive data (such as username and password to connect to the database).

For details of possible ADCM Installer use cases, see Use cases.

Quick start with ADCM Installer

NOTE
If you use CentOS, the operating system version must be at least version 8.

Follow the instructions below to install ADCM Installer:

  1. Install Docker (for details, see the Prerequisites article).

  2. Download the adi utility file to the /usr/local/bin directory and grant execute permissions:

    $ sudo wget -O /usr/local/bin/adi https://github.com/arenadata/adcm-installer/releases/latest/download/adi
    $ sudo chmod +x /usr/local/bin/adi

    Wait for the file download to complete before proceeding to the next steps.

IMPORTANT

For offline installation, it is recommended to use the URL of a local Container Registry service that hosts ADCM, ADP, and other containers used by ADCM Installer.

To get a brief background on the ADCM Installer commands, use the following command:

$ adi --help

The expected command execution result:

Command line tool for installing Arenadata products

Usage:
  adcm-installer [flags]
  adcm-installer [command]

Available Commands:
  adcm-versions List versions of Arenadata products
  apply         Apply a configuration by file name
  completion    Generate the autocompletion script for the specified shell
  components    Manage installed components
  delete        Delete resources by file name or installation name
  help          Help about any command
  init          Initialize a new configuration
  list          List running ADCM installation
  secrets       Manage secrets

Flags:
  -h, --help      help for adcm-installer
      --version   Print the version and exit

Use cases

ADCM Installer supports the following commands:

  • init

  • apply

  • completion

  • list

  • adcm-versions

  • components

  • secrets

  • delete

The command descriptions and examples of their usage are given below.

Initialize a configuration file

The init command generates the configuration file described below, which is necessary for the ADCM deployment.

For example, to initialize the configuration file of ADCM using PostgreSQL as a database, use the following command with the --adpg flag:

$ adi init <installation_name> --adpg

where <installation_name> is the name of the ADCM instance, for example, my-adcm. The instance groups Docker containers, volumes, and a network of a single ADCM deployment. Container names are generated based on the instance name, for example, my-adcm-adpg and my-adcm-adcm.

To specify the database credentials and configure the database connection settings, use the interactive mode by specifying the -i or --interactive flag:

$ adi init <installation_name> --adpg -i
NOTE
Without the --adpg flag, additional settings for connection to an external PostgreSQL database (address, port, and TLS connection parameters) will be requested.

You can also specify database connection parameters in a file using the --from-config flag.

The table below lists the ADCM Installer parameters used to generate the adcm.yaml configuration file.

ADCM Installer parameters
Category Parameter Interactive Mode Description Default Value

Secret storage

secret-storage

Select Secret Storage

Choice of ADCM secret storage. Possible values:

  • FileSystem — storing secrets in the filesystem inside the ADCM container (FileSystemBackend).

  • Vault — storing secrets in Vault or a compatible OpenBao solution. This can be OpenBao deployed by ADCM Installer in a separate Docker container, or an external Vault or OpenBao server.

FileSystem

vault-type

Select Vault Secret Storage type

Type of connection to Vault or OpenBao. Possible values:

  • embedded — deployment of a separate OpenBao Docker container and configuring ADCM to connect to it using ADCM Installer.

  • external — connection to an existing Vault or OpenBao server.

embedded

Job execution environment

job-execution-environment

Select Job Execution Environment

ADCM job execution environment. Possible values:

  • local — tasks are executed directly inside the ADCM container (for details, see Local Executor).

  • celery — tasks are delegated to separate Celery Worker instances (available starting from ADCM 3.0.0).

local

adcm-worker-count

Number of ADCM worker instances

Number of independent Celery Worker instances for executing ADCM tasks. The behavior of the parameter depends on the selected value of the job-execution-environment parameter:

  • celery — specified by the user.

  • local — not used and not prompted during initialization (automatically defaults to 0).

1 (when celery is selected)

ADCM

adcm-count

Number of ADCM instances

Number of ADCM instances. This parameter is available starting from ADCM Installer 1.1.0

1

adcm-image

ADCM image

ADCM Docker image repository

hub.arenadata.io/adcm/adcm

adcm-tag

ADCM image tag

ADCM Docker image tag

The latest version from the registry. If fetching the version from the registry fails, it defaults to 3.0.0

adcm-publish-port

<instance_name>: ADCM publish port

Host port where the ADCM web interface is published

For a single ADCM instance — 8000. For each subsequent instance, the value is incremented by 1

adcm-publish-ssl-port

<instance_name>: ADCM publish SSL port

Host port where the ADCM web interface is published via HTTPS. Prompted only when the adcm-ssl-key-file parameter is specified

For a single ADCM instance — 8443. For each subsequent instance, the value is incremented by 1

adcm-url

<instance_name>: ADCM url

URL used to access ADCM

For a single ADCM instance — http://<ip_address>:8000/. For multiple ADCM instances, the port number increases by 1 for each subsequent instance. For example, the default value for the second instance is http://<ip_address>:8001/

adcm-volume

ADCM volume name or path

Name or path of the ADCM data volume

<installation_name>-adcm

adcm-ssl-key-file

ADCM SSL Private Key file path

Path to the private key file in PEM format for configuring a secure TLS connection with ADCM. If left blank, TLS is not used

 — 

adcm-ssl-cert-file

ADCM SSL Certificate file path

Path to the certificate file in PEM format for configuring a TLS connection with ADCM. Prompted only when the adcm-ssl-key-file parameter is specified

 — 

adcm-vault-mount-point

ADCM Vault mount point

Mount point of the KV v2 secrets engine in Vault for storing ADCM secrets. The value is common to all ADCM instances. This parameter is prompted when the Vault secret storage is selected, regardless of the vault-type parameter value (embedded or external)

adcm

ADCM database connection

adcm-db-host

ADCM database host

Name or IP address of the ADCM database host. Prompted only if the --adpg flag is not specified

 — 

adcm-db-port

ADCM database port

TCP port number used to connect to the ADCM database. Prompted only if the --adpg flag is not specified

5432

adcm-db-name

ADCM database name

ADCM database name

adcm

adcm-db-user

ADCM database user

Username for connecting to the ADCM database

adcm

adcm-db-pass

ADCM database password

Password for connecting to the ADCM database

Generated automatically (a random string of 16 characters) if no value is specified

adcm-db-ssl-mode

Select Postgres SSL mode

Postgres SSL mode for the ADCM database connection. Prompted only if the --adpg flag is not specified. Possible values:

  • disable — disables TLS.

  • allow — attempts an unencrypted connection first, then a TLS connection.

  • prefer — attempts a TLS connection first, falling back to an unencrypted connection if the server does not support TLS.

  • require — requires a TLS connection. The server certificate is verified only if the adcm-db-ssl-ca-file parameter is specified. In this case, verification is performed in the same way as for verify-ca. If the parameter is not specified, the connection is encrypted, but the server certificate is not verified.

  • verify-ca — requires a TLS connection and verifies that the server certificate is issued by a trusted Certificate Authority (CA).

  • verify-full — requires a TLS connection, verifies that the server certificate is issued by a trusted Certificate Authority (CA), and also checks that the server hostname matches the one specified in the certificate.

disable

adcm-db-ssl-ca-file

ADCM database SSL CA file path

Path to the Certificate Authority (CA) certificate file for configuring a TLS connection with the ADCM database. Prompted if the adcm-db-ssl-mode parameter value is other than disable

 — 

adcm-db-ssl-cert-file

ADCM database SSL certificate file path

Path to the certificate file in PEM format for configuring a TLS connection with the ADCM database. Prompted if the adcm-db-ssl-mode parameter value is other than disable

 — 

adcm-db-ssl-key-file

ADCM database SSL private key file path

Path to the private key file in PEM format for configuring a TLS connection with the ADCM database. Prompted if the adcm-db-ssl-mode parameter value is other than disable

 — 

Embedded OpenBao. Parameters are available starting from ADCM Installer 1.1.0

vault-mode

Select Vault Deployment mode

OpenBao run mode. Possible values:

  • non-ha — standard single-server mode with data persistence.

  • ha — high-availability multi-server mode.

  • dev — development mode without data persistence after a restart.

non-ha

vault-ui

Vault enable UI

Flag used to enable access to the OpenBao web interface (for example, to create or manage secrets). Possible values:

  • true — enables access to the web interface.

  • false — disables access to the web interface.

true

vault-image

Vault image

OpenBao Docker image repository

openbao/openbao

vault-tag

Vault image tag

OpenBao Docker image tag

2.2.0

vault-publish-port

Vault publish port

Host port where OpenBao is published

8200

vault-ssl-key-file

Vault SSL Private Key file path

Path to the private key file in PEM format for configuring a TLS connection with OpenBao. Prompted if the vault-mode parameter value is other than dev

 — 

vault-ssl-cert-file

Vault SSL Certificate file path

Path to the certificate file in PEM format for configuring a TLS connection with OpenBao. Prompted only when the vault-ssl-key-file parameter is specified

 — 

OpenBao database (PostgreSQL) — prompted if the vault-mode parameter value is other than dev. Parameters are available starting from ADCM Installer 1.1.0

vault-db-host

Vault database host

Name or IP address of the OpenBao database host. Prompted only if the --adpg flag is not specified

ADP service name (adpg) if embedded ADP is used

vault-db-port

Vault database port

Port for connecting to the OpenBao database. Prompted only if the --adpg flag is not specified

5432

vault-db-name

Vault database name

Name of the OpenBao database

vault

vault-db-user

Vault database user

Username for connecting to the OpenBao database

vault

vault-db-pass

Vault database password

Password for connecting to the OpenBao database

Generated automatically (a random string of 16 characters) if no value is specified

vault-db-ssl-mode

Select Postgres SSL mode

Postgres SSL mode for the OpenBao database connection. Prompted only if the --adpg flag is not specified. Uses the same possible values as the adcm-db-ssl-mode parameter

disable

vault-db-ssl-ca-file

Vault database SSL CA file path

Path to the Certificate Authority (CA) certificate file for configuring a TLS connection with the OpenBao database. Prompted if the vault-db-ssl-mode parameter value is other than disable

 — 

vault-db-ssl-cert-file

Vault database SSL certificate file path

Path to the certificate file in PEM format for configuring a TLS connection with the OpenBao database. Prompted if the vault-db-ssl-mode parameter value is other than disable

 — 

vault-db-ssl-key-file

Vault database SSL private key file path

Path to the private key file in PEM format for configuring a TLS connection with the OpenBao database. Prompted if the vault-db-ssl-mode parameter value is other than disable

 — 

External Vault or OpenBao — prompted when vault-type is set to external. Parameters are available starting from ADCM Installer 1.1.0

adcm-vault-url

Vault url

URL of the Vault or OpenBao server, for example https://<ip_address>:8200

 — 

adcm-vault-token-file

Vault token file path

Path to the local file containing the Vault access token to be used by ADCM

 — 

adcm-vault-ca-file

Vault CA file path

Path to the local Certificate Authority (CA) certificate file for configuring a TLS connection with Vault. Leave blank if the certificate is signed by a trusted Certificate Authority or if TLS is not used

 — 

adcm-vault-client-cert-file

Vault client certificate file path

Path to the local certificate file in PEM format for client authentication when connecting to Vault. Leave blank if client TLS authentication is not required

 — 

adcm-vault-client-key-file

Vault client private key file path

Path to the local private key file in PEM format for client authentication when connecting to Vault. Prompted only when the adcm-vault-client-cert-file parameter is specified

 — 

ADP (embedded PostgreSQL)

adpg-pass

ADPG superuser password

Password for the superuser role set during ADP database initialization

Generated automatically (a random string of 16 characters) if no value is specified

adpg-image

ADPG image

ADP Docker image repository

hub.arenadata.io/adcm/postgres

adpg-tag

ADPG image tag

ADP Docker image tag

v16.3.1

adpg-publish-port

ADPG publish port

Host port on which ADP is published

0 (port is not published to the host)

adpg-volume

ADPG volume name or path

Name or path of the ADP data volume

<installation_name>-adpg

Consul

consul-image

Consul image

HashiCorp Consul Docker image repository

hub.arenadata.io/adcm/consul

consul-tag

Consul image tag

HashiCorp Consul Docker image tag

v1.0.0

consul-publish-port

Consul publish port

Host port on which HashiCorp Consul is published

8500

If parameter values are not specified, default values are used for Docker container names and configuration parameters, and passwords are generated automatically.

After the init command is executed, the following files will be created:

  • adcm.yaml (or adcm.yml) is the ADCM configuration file in the YAML format;

  • age.key is the file with the private key in the AGE-SECRET-KEY-1… format to access sensitive data (secrets) stored in the adcm.yaml (or adcm.yml) file.

To take advantage of additional command options, use the following flags:

  • --force — allows you to overwrite the existing configuration file;

  • -o or --output — allows you to save the configuration file with the given name, for example: --output <file_path>, where <file_path> is the path to the configuration file in the YAML format including the file name;

  • --age-key-file — determines the location of the file with the private key (by default — age.key);

  • --age-key — determines the private key, for example:

    $ adi init <installation_name> --age-key AGE-SECRET-KEY-1...
    NOTE
    The private key can also be passed via the AGE_KEY variable, for example: export AGE_KEY=AGE-SECRET-KEY-1…​.
Example of the configuration file for deploying ADCM with Vault and a PostgreSQL database
# Instance name
name: my-adcm

# Configurations of the my-adcm-adcm, my-adcm-adpg, and my-adcm-worker Docker containers
services:
  adcm:
    # Disable specific Linux kernel capabilities
    cap_drop:
      - ALL
    # Order in which the Docker containers are started. In this case, the my-adcm-adcm container is started after the my-adcm-adpg container
    depends_on:
      adpg:
        # Condition under which the my-adcm-adcm container is started. In this case -- wait until the my-adcm-adpg container is healthy
        condition: service_healthy
        required: true
    # Environment variables for configuring ADCM, including Vault connection parameters
    environment:
      DEFAULT_ADCM_URL: http://192.168.1.50:8000
      SCHEDULER_JOB_EXECUTION_ENVIRONMENT: celery
      SECRET_BACKEND: VaultBackend
      VAULT_MOUNT_POINT: adcm
      VAULT_TOKEN_FILE: /run/adi_secrets/vault-token
      VAULT_URL: http://192.168.1.50:8200
    # Custom hostname for the Docker container
    hostname: my-adcm-adcm
    # Docker container health check
    healthcheck:
      test:
        - CMD-SHELL
        - wget -q -O - http://127.0.0.1:8000/api/health/live
      timeout: 5s
      interval: 10s
      retries: 5
      start_period: 30s
    # Image name used to create the Docker container
    image: hub.arenadata.io/adcm/adcm:3.0.0
    # Metadata to add to the Docker container
    labels:
      app.arenadata.io/type: adcm
    # Create a dedicated network for the Docker container on the host
    networks:
      default: null
    # Map ports between the host and the Docker container
    ports:
      - mode: ingress
        # Port of the Docker container
        target: 8000
        # Published port of the host
        published: "8000"
        # Port protocol
        protocol: tcp
    # Restart policy of the Docker container. In this case, the container is restarted in all cases except for a deliberate container stop
    restart: unless-stopped
    # Grant the Docker container access to sensitive data defined by the top-level x-secrets element
    secrets:
      - source: vault-token
        target: /run/adi_secrets/vault-token
        mode: "0400"
    # Prevent privilege escalation inside the Docker container
    security_opt:
      - no-new-privileges
    # Named volumes accessible to the Docker container
    volumes:
      - type: volume
        source: my-adcm-adcm
        target: /adcm/data
        volume: {}
    x-secrets:
      data:
        db-name: "********"
        db-pass: "********"
        db-user: "********"
        vault-token: "********"
  adpg:
    cap_drop:
      - ALL
    hostname: my-adcm-adpg
    # Docker container health check using the pg_isready utility
    healthcheck:
      test:
        - CMD-SHELL
        - pg-entrypoint isready postgres
      timeout: 3s
      interval: 3s
      retries: 3
    image: hub.arenadata.io/adcm/postgres:v16.3.1
    labels:
      app.arenadata.io/type: adpg
    networks:
      default: null
    restart: unless-stopped
    security_opt:
      - no-new-privileges
    # User under which the Docker container runs
    user: 10001:10001
    volumes:
      - type: volume
        source: my-adcm-adpg
        target: /data
        volume: {}
    x-secrets:
      data:
        password: "********"
  worker:
    cap_drop:
      - ALL
    command:
      - /etc/worker.sh
    depends_on:
      adcm:
        condition: service_healthy
        required: true
      adpg:
        condition: service_healthy
        required: true
    environment:
      DEFAULT_ADCM_URL: http://192.168.1.50:8000
      SCHEDULER_JOB_EXECUTION_ENVIRONMENT: celery
      SECRET_BACKEND: VaultBackend
      VAULT_MOUNT_POINT: adcm
      VAULT_TOKEN_FILE: /run/adi_secrets/vault-token
      VAULT_URL: http://192.168.1.50:8200
    hostname: my-adcm-worker
    image: hub.arenadata.io/adcm/adcm:3.0.0
    labels:
      app.arenadata.io/adcm: adcm
      app.arenadata.io/type: worker
    networks:
      default: null
    restart: unless-stopped
    secrets:
      - source: vault-token
        target: /run/adi_secrets/vault-token
        mode: "0400"
    security_opt:
      - no-new-privileges
    volumes:
      - type: volume
        source: my-adcm-adcm
        target: /adcm/data
        volume: {}
# Named network that allows the Docker containers to communicate with each other
networks:
  default:
    name: my-adcm_default
# Volumes that are created on the first startup of the Docker containers
volumes:
  my-adcm-adcm:
    name: my-adcm-adcm
  my-adcm-adpg:
    name: my-adcm-adpg
# Sensitive data used by the Docker containers
x-secrets:
  age_recipient: age1****************************************************
  key: |
    -----BEGIN AGE ENCRYPTED FILE-----
    YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFeGFtcGxlS2V5Rm9yRG9j
    ...
    -----END AGE ENCRYPTED FILE-----

Run ADCM tasks using Celery Worker

Starting from ADCM 3.0.0, you can use the Celery Worker instead of the Local Executor to execute tasks (this feature is experimental and not recommended for production environments). The ADCM Installer allows you to deploy one or more independent Celery Worker instances that process tasks in a distributed manner. These instances use the same data volume as ADCM.

NOTE
If there are multiple ADCM instances (adcm-count is greater than 1), Celery Worker instances are created exclusively from the first ADCM instance: they inherit its image, environment variables, and data volume. In addition, before starting Celery Worker instances, Docker Compose waits for the readiness (health check) of only this single ADCM instance, not all of them.
IMPORTANT
  • For Celery Worker to function correctly, you must deploy HashiCorp Consul (see Architecture overview). Specify the --consul flag during initialization if you plan to set job-execution-environment to celery. For more information on deploying HashiCorp Consul, see below.

  • If the adcm-tag parameter explicitly sets an ADCM version lower than 3.0.0 while the job-execution-environment parameter is set to celery, the init command will fail with an error.

To create a configuration file for deploying ADCM using Celery Worker as the task execution environment, perform the following steps:

  1. Run the init command in interactive mode by specifying --adpg, --consul, and -i (or --interactive):

    $ adi init <installation_name> --adpg --consul -i
  2. In interactive mode, sequentially specify the following parameters:

    • Select Job Execution Environment — select celery.

    • Number of ADCM worker instances — specify the number of independent Celery Worker instances (by default — 1).

  3. Specify the remaining parameter values required to complete the initialization. The description of all parameters is provided in the table.

NOTE

You can switch the task execution environment to celery without using the interactive mode. The --adcm-worker-count flag automatically sets job-execution-environment to celery, for example:

$ adi init <installation_name> --adpg --consul --adcm-worker-count 2

HashiCorp Consul

Starting with ADCM Installer 1.1.0, it is possible to configure and deploy HashiCorp Consul in the dev mode. HashiCorp Consul is a solution for network services that allows you to coordinate secure communication between services and check their availability. HashiCorp Consul can be used instead of the status-checker in all products (ADB Control, ADH, and so on).

NOTE
HashiCorp Consul provides the ability to register services, but it does not automatically do it. Products should register their services in HashiCorp Consul on their own.

To create a configuration file for deploying ADCM with a PostgreSQL database and installing HashiCorp Consul, perform the following steps:

  1. Run the init command by specifying the --consul flag:

    $ adi init <installation_name> --adpg --consul -i
  2. In interactive mode, specify the following parameters:

    • Consul image — HashiCorp Consul Docker image.

    • Consul image tag — HashiCorp Consul Docker image tag.

    • Consul publish port — host port on which HashiCorp Consul is published.

  3. Specify the remaining parameter values required to complete the initialization. The description of all parameters is provided in the table.

Configure ADCM secret storage

By default, ADCM stores secrets in the filesystem inside the ADCM container (FileSystem), which requires no additional configuration. Below is a description of how to configure secret storage in Vault or OpenBao.

Starting from version 1.2.0, ADCM Installer supports configuring ADCM secret storage in interactive mode. The following options are available for storing secrets in Vault or OpenBao:

  • Embedded OpenBao — ADCM Installer automatically deploys a separate OpenBao Docker container and configures the ADCM connection to it.

  • External Vault or OpenBao — ADCM Installer connects ADCM to an existing Vault or OpenBao server.

IMPORTANT
Vault is supported by ADCM starting from version 2.12.0. If an earlier version is specified for the adcm-tag parameter, ADCM Installer will automatically switch to the filesystem (FileSystem) and display a warning, even if the secret-storage parameter is set to Vault.
NOTE

The --vault flag only affects the default value for the secret storage:

  • In interactive mode, the flag is optional. You can manually select Vault for the Select Secret Storage parameter regardless of whether the flag is specified.

  • In non-interactive mode (without the -i or --interactive flag and the --from-config file), the --vault flag is required to use Vault, as without it, FileSystem will be the default secret storage.

Embedded OpenBao

To create a configuration file for deploying ADCM with embedded OpenBao, follow these steps:

  1. Run the init command in interactive mode by specifying the --adpg, --vault, and -i (or --interactive) flags:

    $ adi init <installation_name> --adpg --vault -i
  2. In interactive mode, specify the following parameters:

    • Select Vault Secret Storage type — select embedded.

    • Select Vault Deployment mode — select the OpenBao run mode. For more information on OpenBao run modes, see the section below.

  3. Specify the remaining parameter values required to complete the initialization. The description of all parameters is provided in the table.

Embedded OpenBao run modes

ADCM Installer allows you to run OpenBao in the following modes:

  • Dev mode (dev) — enables the following options:

    • automatically initialize and unseal the OpenBao server;

    • store data (in an encrypted form) in memory without requiring access rights;

    • store an OpenBao root token that can be used to access the OpenBao command line interface (CLI).

    IMPORTANT
    It is not recommended to use the development mode in a production environment, as data will be lost after restarting the OpenBao server. Use this mode only for testing purposes.
  • Persistent mode (non-ha) — the exact opposite of the dev mode which allows you to use the PostgreSQL storage backend to persist data after restarting the OpenBao server (used by default).

  • High availability mode (ha) — protects from failures by running several OpenBao servers using the PostgreSQL storage backend.

    NOTE
    You can run OpenBao in the high availability mode by running ADCM Installer on the required hosts.

For more information on OpenBao features and functions, please refer to the OpenBao documentation.

External Vault or OpenBao

When using external Vault or OpenBao, ADCM connects to an existing Vault or OpenBao server.

IMPORTANT

Before starting the initialization, perform the following prerequisite steps on the Vault or OpenBao side:

  1. Create a token with read and write permissions for secrets and save it to a local file. You will need to specify the path to this file in the adcm-vault-token-file parameter.

  2. Ensure that a mount point for storing ADCM secrets is created and used in Vault. The mount point name must match the value of the adcm-vault-mount-point parameter or the VAULT_MOUNT_POINT environment variable in the adcm.yaml file (by default — adcm). To do this, the KV v2 secrets engine must be enabled on the mount point.

To create a configuration file for deploying ADCM with a connection to external Vault or OpenBao, follow these steps:

  1. Run the init command in interactive mode by specifying the --adpg, --vault, and -i (or --interactive) flags:

    $ adi init <installation_name> --adpg --vault -i
  2. In interactive mode, select external for the Select Vault Secret Storage type parameter, and then sequentially specify the Vault parameters:

    • Vault url — Vault URL.

    • Vault token file path — path to the access token file.

    • Vault CA file path — path to the CA certificate.

    • Vault client certificate file path — path to the client certificate.

    • Vault client private key file path — path to the client certificate private key. This parameter is displayed when you specify a value for the Vault client certificate file path parameter.

  3. Specify the remaining parameter values required to complete the initialization, including ADCM Vault mount point. The description of all parameters is provided in the table.

Deploy ADCM

IMPORTANT
Regularly back up ADCM and ADP data and databases. For more details, see Backup and restore.

The apply command allows you to deploy ADCM when the adcm.yaml (or adcm.yml) and age.key files are present:

$ sudo adi apply

When you run the command, the docker-compose.yaml file is generated to perform the following actions:

  1. Create and run the my-adcm-adpg database container (when using PostgreSQL).

  2. Initialize the database.

  3. Start and initialize the OpenBao container (when using embedded OpenBao).

  4. Create and run the my-adcm-adcm container.

  5. Start other containers (such as Celery Worker and HashiCorp Consul).

To verify that ADCM was deployed successfully, run the commands described in Installation.

NOTE

If you use ADCM 3.0.0 or higher to manage ADB 6.31 and 6.32 (before 6.32.1), execute the script from the ADB 6 known issues article once inside each running ADCM container. In ADCM 3.0.0 and higher, container processes run as a non-privileged user, and the ADCM image does not include sudo. Therefore, without this script, ADB actions that use sudo fail.

To generate the docker-compose.yaml file without creating and starting containers (for example, to preview the configuration), specify the --dry-run flag.

For more information on other flags that can be specified when running the apply command, use the following command:

$ adi apply --help
NOTE
With the --help flag, you can also get a brief description of other commands described below.

Create scripts with auto-complete

The completion command allows you to generate scripts with auto-complete for the ADCM Installer commands using the Tab key for the following shells:

  • Bash

  • fish

  • PowerShell

  • Zsh

NOTE
For Bash, first install the bash-completion package required for the script.

For more detailed instructions on how to use a generated script, run the following command:

$ adi completion <shell> --help

where <shell> is the shell name.

View ADCM instances

The list command allows you to obtain the following information about ADCM instances deployed on the host:

  • NAMES — the ADCM instance name (the <installation_name> value specified during initialization);

  • STATUS — the status and the number of the Docker containers;

  • CONFIG FILES — the path to the configuration file.

Command example:

$ sudo adi list

The example of the command execution result:

NAMES               STATUS              CONFIG FILES
my-adcm             running(3)          /home/adelya/adcm-installer/adcm.yaml

To display information about stopped ADCM instances, specify the --all flag.

Check available ADCM versions

The adcm-versions command allows you to check for the new ADCM image versions available for download from Arenadata Docker Registry:

$ adi adcm-versions --all

The example of the command execution result:

2.5.1
2.5.0
2.4.0
2.3.0
2.2.0
2.1.2
2.1.1
2.1.0
2.0.0

To display the last five versions, run the adcm-versions command without specifying the --all flag.

Check ADCM Installer updates

The components command is designed to manage installed ADCM Installer components. Currently, the components update command is available, which checks for a newer version of ADCM Installer on GitHub and displays information about it.

NOTE
This command exclusively checks for updates and provides a download link. Automatic installation of a new version is not supported.

Command example:

$ adi components update

The example of the command execution result if a newer version is available:

There is a new version of adcm-installer "1.2.0" available. Current version: "1.1.1".
You can download the latest version: https://github.com/arenadata/adcm-installer/releases/latest

If you are using the latest version of ADCM Installer, the message Already up to date will be displayed.

Manage secrets

The secrets command allows you to manage secrets specified in the configuration file as follows:

  • secrets new-key — generates a new private key, which is saved by default in the age.key file;

  • secrets show — shows secrets defined during initialization;

  • secrets set — determines new secret values in the <service_name>.<key> format, for example:

    $ adi secrets set adcm.db-pass 1234

Stop and delete ADCM

The delete command is designed to stop an ADCM container using the specified configuration file or instance name.

If the adcm.yaml (or adcm.yml) and age.key files are located in the directory where the command is executed, the command runs automatically without the need to explicitly specify the configuration file or instance name:

$ sudo adi delete

As a result, the ADCM containers will be deleted, while the data (volumes containing the information specified during configuration file initialization) will remain.

To delete the containers along with created data volumes, specify the --volumes flag. When executing the command, you will need to confirm the volume deletion. To delete volumes without a confirmation prompt (for example, in automation scripts), additionally specify the --yes flag.

IMPORTANT
Deleting volumes leads to permanent loss of all ADCM data.
Found a mistake? Seleсt text and press Ctrl+Enter to report it