Installing DVT using a single command script

This article describes how to install DVT on a workstation using a single command script. It will automatically prepare the environment, check all the necessary dependencies and launch system services.

Please note that the environment variable DVT_FERNET_KEY is required: without it, containers will not start. Make sure it is set in your environment before upgrading.

DVT is deployed in a Docker environment running Linux. Therefore, before installing DVT, you must install Docker Engine according to instructions.

Important!

To access the distribution kits and the licensing server, access must be provided from the server (virtual machine) where DVT will be deployed at the following Denvik addresses:

lic.denvic.ru:443
lic2.denvic.ru:443
distribution.denvic.tech:443

And also public resources:

get.docker.com
download.docker.com

The video demonstrates an example of deploying DVT in Yandex Cloud:

Installing DVT

Default setting

Run the installation script:

bash <(sudo curl -fsSL https://raw.distribution.denvic.tech/dvt/install.sh)

The script will start and go into interactive configuration mode.

After launch, the following greeting is displayed:

🚀 Добро пожаловать в установщик DVT

Next, the environment parameters will be set sequentially.


🔑 License key

The script will request a license key and check it on the license server:

🔑 Введите лицензионный ключ DVT. > XXXXX-XXXXX-XXXXX

If the check is successful, a confirmation message is displayed.


🗄 Data directory

You must specify the directory where PostgreSQL, Redpanda and environment files will be stored:

🗄 Каталог для данных DVT По умолчанию: /var/lib/dvt > /mnt/dvt

The directory is created automatically.


🌐 Public URL

The address at which you will open the DVT interface is set:

🌐 Публичный URL DVT Например: http://localhost или https://dvt.company.local > http://localhost

The script automatically determines the need to use Secure cookies.


⚙️ Selecting image version

Specify Docker tag:

Введите версию DVT (docker tag) или оставьте latest: > latest

🗄 PostgreSQL Options

The script deploys built-in PostgreSQL and offers to set parameters:

Имя пользователя PostgreSQL: [dvt-user] Имя базы PostgreSQL: [DVT] Пароль PostgreSQL (пусто = сгенерировать случайный): > ******

If you enter blank, a secure random password will be generated.


🔑 Administrator account

The first admin panel user is created:

Имя пользователя администратора: [dvt-admin] Пароль администратора (пусто = сгенерировать случайный): > ******

🔐 Internal service tokens

Keys are generated for Store Service, gRPC Forward Service and Fernet. Each one can be entered manually or left to the script to generate.


⚙️ Formation of .env

The installer automatically creates an environment file .env in the installation directory. It stores database access parameters, service tokens, public URL and container settings.

If there is an existing .env, a backup copy is created.


📋 Final configuration

Before starting services, a short summary of the parameters is displayed:

Сводка конфигурации: Лицензионный ключ: XXXXX... Каталог данных: /var/lib/dvt Публичный URL: http://localhost Версия образов: latest Продолжить установку? [Y/n]

🚀 Launch of services

The script downloads the file docker-compose.yaml, logs in to the Container Registry and starts DVT:

🚀 Запускаем DVT через 'sudo docker compose -f /var/lib/dvt/docker-compose.yaml up -d'

After start the message will appear:

✓ DVT запущен. Откройте в браузере: http://localhost

Non-interactive installation

It is also possible to run the installer in non-interactive mode.
DVT installer flags:

Flag

Description

-n, --non-interactive

launch without interactive questions. All parameters must be passed via flags.

--license

DVT license key.

--dir

directory for storing DVT data. Default: /var/lib/dvt.

--version

DVT version / Docker image tag. Default: latest.

--public-url

DVT public URL. Can be specified multiple times for multiple addresses.

--pg-user

PostgreSQL user.

--pg-db

PostgreSQL database name.

--pg-pass

PostgreSQL password.

--valkey-pass

password Valkey.

--valkey-db

Valkey base number.

--grpc-token

internal gRPC Forward Service token.

--fernet-key

Fernet key for encrypting internal data.

Example:

sudo bash install.sh -n --license XXXXX --version 1.15.0 --public-url https://dvt.example.ru

Useful tips

  • The installer is completely interactive - just answer the questions in order.

  • For advanced scenarios, automation is possible through environment parameters and pre-prepared .env.

  • All data and configurations are located in the directory that you specified during the installation stage.


After installation is complete, the system is ready for use, and all containers can be viewed with the command:

sudo docker ps

Setting up HTTPS for DVT via Angie

Below is an example of configuring HTTPS and reverse proxying requests to DVT using the Angie web server. The configuration is an example only. If necessary, it can be adapted to the infrastructure of your organization.

Prerequisites

Before setting up, you need to prepare:

  • Domain name for DVT;

  • SSL certificate and corresponding private key;

  • Installed and running Angie;

  • Network access from the Angie server to the server on which DVT is deployed;

  • Availability of incoming connections to ports 80 and 443.

The example uses the following variables:

Домен DVT: dvt.your_org.ru Адрес сервера DVT: 192.168.111.111:80 SSL-сертификат: /etc/ssl/private/your_org.ru.crt Приватный ключ: /etc/ssl/private/your_org.ru.key

If using the example, replace these values ​​with your infrastructure settings.

Global Websocket configuration

DVT uses Websocket connections, so to correctly form the Connection header, add the global directive map.

Create a file:

nano /etc/angie/http.d/00-map-websocket.conf

Add to it:

map $http_upgrade $connection_upgrade { default upgrade; '' close; }

This setting is specified only once and can be used by multiple virtual hosts.

To proxy a WebSocket, you need to send the Upgrade and Connection headers, and also use HTTP/1.1 when connecting to the upstream server.

Setting up a DVT virtual host

Create a separate configuration file, for example:

nano /etc/angie/http.d/dvt.conf

Add the following configuration:

server { listen 80; server_name dvt.your_org.ru; return 301 https://$host$request_uri; } server { listen 443 ssl; http2 on; server_name dvt.your_org.ru; # SSL-сертификаты ssl_certificate /etc/ssl/private/your_org.ru.crt; ssl_certificate_key /etc/ssl/private/your_org.ru.key; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4'; ssl_prefer_server_ciphers on; # Логирование access_log /var/log/angie/dvt.your_org.ru-access.log; error_log /var/log/angie/dvt.your_org.ru-error.log; # WebSocket-соединения location /ws { proxy_pass http://192.168.111.111:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; # Таймауты для долгоживущих соединений proxy_read_timeout 86400s; proxy_send_timeout 86400s; # Стандартные прокси-заголовки proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; } # Основной HTTP-трафик DVT location / { proxy_pass http://192.168.111.111:80/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; client_max_body_size 10m; client_body_buffer_size 128k; proxy_read_timeout 300s; proxy_send_timeout 300s; } }

The first block server redirects HTTP requests from port 80 to HTTPS.

Second block:

  • accepts HTTPS requests on port 443;

  • connects an SSL certificate;

  • includes HTTP/2;

  • proxies the main traffic to the DVT server;

  • separately processes Websocket connections along the path /ws;

  • transmits the source domain, client IP address and information about the HTTPS protocol to the upstream server.

The listen 443 ssl setting, as well as the ssl_certificate and ssl_certificate_key directives, follow the standard HTTPS configuration scheme in Angie. HTTP/2 in Angie is enabled by a separate directive http2 on.

What parameters need to be replaced

Before applying the configuration, replace:

  • Domain name server_name dvt.your_org.ru; to the domain name of your DVT instance.

  • DVT address proxy_pass http://158.160.216.111:80; To the IP address and port of the server where DVT is deployed.

  • The address must be replaced in both blocks location.

  • Paths to SSL certificates:

ssl_certificate /etc/ssl/private/your_org.ru.crt; ssl_certificate_key /etc/ssl/private/your_org.ru.key;

Specify the real paths to the certificate and private key of your domain.

Paths to logs

Change if necessary:

access_log /var/log/angie/dvt.your_org.ru-access.log; error_log /var/log/angie/dvt.your_org.ru-error.log;

The user Angie is running as must have write permissions to the appropriate directory.

Applying configuration

After saving the files:

  1. Check your Angie configuration for syntax errors.

  2. If the test is successful, reload the Angie configuration.

  3. Open DVT using the configured HTTPS address.

  4. Check the operation of the interface and WebSocket connections.

If errors occur, check the logs:

/var/log/angie/dvt.your_org.ru-access.log /var/log/angie/dvt.your_org.ru-error.log

Also make sure that the Angie server has network access to the DVT address specified in proxy_pass.

Checking the result

After completing the setup, the following conditions must be met:

  • the request via http://dvt.your_org.ru is redirected to HTTPS;

  • DVT interface opens via https://dvt.your_org.ru;

  • the browser does not report SSL certificate errors;

  • downloading files works correctly;

  • Websocket connection along the path /ws is successfully established;

  • there are no server connection errors in the DVT interface.