Skip to content

Deploying the Access#

This section describes how to install and use Docker Compose to deploy the Service.

Docker and Docker Compose are not included in the Service distribution package.

Docker allows you to create a container that already has the required Service, the software environment for it and the minimum set of necessary tools. Docker Compose is used to automatically deploy containers.

Preparing for installation#

To install and run VL Access, the following components are required:

Component Version
Docker Engine 1.13.0 and higher
Docker Compose 1.21.0 and higher
unzip 6.0-21

Create a main directory where all versions of the product will be contained:

sudo mkdir /var/lib/vl-access-2/
sudo chown $(whoami) /var/lib/vl-access-2/

Docker and Docker Compose installation#

Use the official instructions to install Docker Engine and Docker Compose for CentOS. The current installation instructions are presented below.

1․ Install the yum-utils package (which provides the yum-config-manager utility):

sudo yum install -y yum-utils

2․ Set up the stable repository:

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3․ Install the latest version of Docker Engine and containerd:

sudo yum install docker-ce docker-ce-cli containerd.io

4․ Check that the installation was done correctly:

docker -v

5․ Download the current stable release of Docker Compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

6․ Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

7․ Start Docker:

systemctl start docker
systemctl enable docker

8․ Check Docker status:

systemctl status docker

Response must contain Active (running) status.

Preparing and unpacking the distribution#

The distribution package is an archive of the form «vl-access-2-v2.13.0».

A link to download the distribution kit must be requested from a VisionLabs representative.

The archive contains all the components necessary for the installation and operation of the Service.

The archive does not include dependencies that are included in the standard distribution package of the CentOS 7.4 x86_64 repository and can be downloaded from open sources.

The Service is launched from a Docker image.

Follow these steps:

1․ Переместите скачанный архив vl-access-2-v2.13.0.zip в директорию /var/lib/vl-access-2.

2․ Install the unzip archiver if it is not installed. Version 6.0-21 is specified in the command, errors were noticed in the work of later versions:

yum install unzip-6.0-21.el7

3․ Unpack files:

unzip vl-access-2-v2.13.0.zip -d vl-access

4․ After unpacking, a directory will appear containing:

  • README_FOR_ENGINEERS.md file with description of quick start;
  • .env configuration file.
  • docker-compose.yml configuration file;
  • CHANGELOG.md changelog;
  • vl_access_2_v2.13.0.tar.gz image archive

5․ Добавьте symlink в директорию /var/lib/vl-access-2/, которая ссылается на последнюю версию продукта:

ln -s /var/lib/vl-access-2-v2.13.0 /var/lib/vl-access-2/current

6․ In case of changing the location of the database firmware in docker-compose, run the command to access the PostgreSQL data storage from the container (execute one time for the image):

docker volume create --name=db_data

Setting Up Access#

Произведите настройку с помощью файла .env:

nano .env
Parameter Description Default values
FastAPI Settings
DEBUG Access debug mode - output in the OS logs and in the interface of information like Debug about the work of Access 0
1 — debugging;
0 — without debugging
DB_DEBUG DB debug mode - output in the OS logs and in the interface of information like Debug about the work of DB 0
1 — debugging;
0 — without debugging
VL_ACCESS_TAG The Access tag is taken from the internal settings. Changing this parameter is not recommended 2.13.0
DB_USER DB admin login. postgres
DB_HOST Host name where DB is running. postgres
DB_PORT DB port 5432
DB_NAME DB name postgres_base
DB_PASSWORD DB admin password postgres_password
LOG_DB_HOST Host name of DB logger elasticsearch
LOG_DB_PORT DB port 9200
C_FORCE_ROOT Forced start of Celery as the root user true
MAX_CONCURRENCY The maximum number of processes for the Worker component that can be processed in parallel. It is set based on the load on the system. 20
PostgreSQL settings
POSTGRES_USER Database user login postgres
POSTGRES_PASSWORD Database user password postgres_password
POSTGRES_HOST Host where the database is deployed. By default, the database is deployed in the same place as the Access postgres
Redis Settings
REDIS_HOST Redis host name. redis
REDIS_PORT Redis port. 6379
REDIS_DB_BASE The number of the primary Redis database. 0
REDIS_DB_PERSONS The number of the Redis database that stores information about people. 1
REDIS_DB_CELERY_BEAT Redis database number for storing information about periodic worker-beat service tasks. 2
Rabbit Settings
RABBITMQ Name of the message queue broker. Only Rabbit MQ is supported in this version rabbit
RABBITMQ_USER User login to connect to Rabbit MQ guest
RABBITMQ_PASSWORD Password to connect to Rabbit MQ guest
RABBITMQ_PROTOCOL RabbitMQ protocol type. Only AMQP is supported amqp
FrontEnd Settings
BACKEND_HOST Host of fastapi service. Specify IP address if frontend and fastapi are running on different machines fastapi
BACKEND_PORT Port to connect to the Access backend 9091
Celery Settings
CELERY_BROKER_URL Celery path CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672/

Launching the Access#

1․ Import the image:

docker load -i vl-access-2-images-v2.13.0.tar.gz

2․ Run the Service:

docker-compose up -d

3․ Check the availability of the GUI at: http://<IP_address>:9092/.

To enable VL Access administrator functions, create an administrator account (see Account Management).