Deploying the Access#
This section describes how to install and use Docker and Docker Compose to deploy Access.
Docker and Docker Compose are not included in the Service distribution package.
The configuration and installation process must be performed under a superuser account (with root privileges).
The manual provides commands for CentOS.
Preparing for installation#
Create a main directory where all versions of the product will be located in the future and go to it.:
sudo mkdir -p -v /var/lib/vl-access-2/
sudo chown $(whoami) /var/lib/vl-access-2/
cd /var/lib/vl-access-2/
Docker and Docker Compose installation#
Use the official instructions to install Docker Engine and Docker Compose for the OS you are using.
Before starting Access, you need to make sure that Docker is running and active.
1. Start Docker:
systemctl start docker
systemctl enable docker
2. Check Docker status:
systemctl status docker
Response must contain Active (running) status.
3. Check Docker Compose installation:
docker-compose --version
The response should indicate the docker-compose version, for example:
docker-compose version 1.29.2, build 5becea4.
Preparing and unpacking the distribution#
The distribution package is an archive of the form «vl-access-2-v2.19.0».
A link to download the distribution kit must be requested from a VisionLabs representative.
The archive contains the components necessary for the installation and operation of Access.
The archive does not include dependencies that are included in the standard distribution package of OS and can be downloaded from open sources.
The Service is launched from a Docker image.
Follow these steps:
1. Move vl-access-2-v2.19.0.zip to /var/lib/vl-access-2.
2. Install the unzip archiver if it is not installed.
yum install unzip
The installation command may differ depending on the package manager in the OS, for example,
aptis used in Ubuntu/Debian, anddnfin AlmaLinux.
3. Unpack files:
unzip vl-access-2-v2.19.0.zip -d vl-access-2-v2.19.0
The distribution contains (Table 7):
Table 7. Distribution composition
| CHANGELOG.md | Full description of version changes. | | docker-compose.yml | A file containing commands for running Docker containers. | | conf.yml | A file containing configurations for the log-agent service. | | README_FOR_ENGINEERS.md | Quick start guide for implementation engineers. | | /scripts | Directory with useful scripts, see Administrator's Guide. | | vl-access-2-images-v2.19.0.tar.gz | Access distribution, when selecting an archive with an image. | | /tls | Directory for storing certificates for interaction with external systems in .pem format (created automatically when Access starts). |
4. Go to the directory:
cd vl-access-2-v2.19.0
When working with a distribution without an image, you must download the image at startup, see Launching
Setting up Access#
Make the configuration using the .env file (Table 8):
nano .env
Table 8. Description of env parameters
|
Parameter |
Description |
Default values |
|---|---|---|
|
FastAPI and Worker Parameters | |
||
|
DEBUG |
Access debug mode - output in the OS logs and in the interface of information like Debug about the work of Access
|
0 |
|
VL_ACCESS_TAG |
The Access tag is taken from the internal settings. It is not recommended to change this parameter. |
2.19.0 | |
|
LOG_DB_HOST |
The host name for storing logs. |
log-storage |
|
LOG_DB_PORT |
The port for connecting to log-storage. |
27017 |
|
LOG_DB_NAME |
Name of the log database. |
logs |
|
LOG_DB_USER |
DB user name. |
username |
|
LOG_DB_PASSWORD |
DB user's password. |
password |
|
C_FORCE_ROOT |
Force Celery to run as root user. |
true |
|
WORKER_CONCURRENCY |
The maximum number of processes in the Worker component that can be processed in parallel. It is set based on the load on the system. |
16 |
|
WORKERS_AMOUNT |
Number of worker instances (required to increase the number of processed events, used on highly loaded objects). |
1 |
|
Redis parameters |
||
|
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 parameters |
||
|
RABBITMQ |
Name of the message queue broker. Access only supports Rabbit MQ. |
rabbitmq |
|
RABBITMQ_USER |
User login to connect to Rabbit MQ |
guest |
|
RABBITMQ_DEFAULT_PASSWORD |
Password to connect to Rabbit MQ |
guest |
|
RABBITMQ_PROTOCOL |
RabbitMQ protocol type. Only AMQP is supported |
amqp |
|
RABBITMQ_URL |
Address to connect to Rabbit |
|
|
CELERY_BROKER_URL |
Address to connect to Celery |
|
|
FrontEnd Connection Parameters |
||
|
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 |
Launching the Access#
1. Import the image:
1.1. If there is an image in the archive:
docker load -i vl-access-2-images-v2.19.0.tar.gz
1.2. Without image:
docker login dockerhub.visionlabs.ru
docker-compose pull
docker logout dockerhub.visionlabs.ru
2. Add symlink to the directory /var/lib/vl-access-2/, which links to the latest version of the product:
ln -s /var/lib/vl-access-2-v2.19.0 /var/lib/vl-access-2/current
3. Run the Service:
docker-compose up -d
Access containers come with pre-installed utilities needed to work with the image.
4. Check the availability of the GUI at: http://<IP_address>:9092/.
To access the Access interface, create an administrator (see Account Management).