Deploying the Service using Docker#
This section describes how to install and use Docker Compose to deploy the Service.
The configuration and installation process must be performed under a superuser account (with root rights).
Docker and Docker Compose are not included in the Service distribution package.
The commands for CentOS are given below.
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.
Install the yum-utils package (which provides the yum-config-manager utility):
yum install -y yum-utils
Set up the stable repository:
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
Install the latest version of Docker Engine and containerd:
yum install docker-ce docker-ce-cli containerd.io
Check that the installation was done correctly:
docker -v
Download the current stable release of Docker Compose:
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Set permissions (allow execution):
chmod +x /usr/local/bin/docker-compose
Start Docker:
systemctl start docker
systemctl enable docker
Check Docker status:
systemctl status docker
Registry authorization#
To start services, you need to get their images from dockerhub.visionlabs.ru (VisionLabs registry). Authorization is required:
docker login dockerhub.visionlabs.ru --username <username> --password <password>
Enter login
You can get them by contacting VisionLabs specialists.
Preparing and unpacking the distribution#
The distribution package is an archive of the form "luna_point_1.2.0".
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 repository and can be downloaded from open sources.
Place the distribution files in a directory on the server before the installation process. For example, to the /root
directory. This directory should not contain other distribution files other than the target files used to install the final product.
Follow these steps.
Switch to the super user:
sudo su
Create a directory for unpacking the distribution package:
mkdir -p /var/lib/point
Move the distribution package to the created directory:
mv /root/luna_point_1.2.0 /var/lib/point
Install the unzip archiver if it is not installed:
yum install unzip
Go to the distribution package folder:
cd /var/lib/point
Unpack files:
unzip luna_point_1.2.0.zip
Create a symbolic link. The link indicates that it is the current version of the distribution package that is used to run:
ln -s luna_point_1.2.0 current
Service configuration#
Selinux and Firewall must be configured so that they do not block the operation of the Service.
Selinux and Firewall configuration is not described in this manual.
The “luna_point_1.2.0” archive contains an example of Docker deployment in the /example-docker directory (.env and docker-compose.yml files).
Service configuration is performed in the .env configuration file:
### GLOBAL ###
# Where to preserve persistent data
DATA=./
DOCKER_URL=dockerhub.visionlabs.ru/clementine
# username for databases
POINT_USERNAME=point
# Password for services
POINT_PASSWORD=point
# POINT tags
CLEMENTINE_AUTH_VER: "v1.1.8"
CLEMENTINE_API_VER: "v1.9.0"
VL_NOTIFIER_VER: "0.1.15"
LUNA_POINT_API_VER: "v1.0.5"
LUNA_POINT_UI_VER: "v1.13.3"
# 3rd party services tags
POSTGRESQL_VER=12
### Configs ###
# point-ui
POINT_UI_HOST=point_ui
POINT_UI_PORT=8080
# point-api
POINT_API_HOST=point_api
POINT_API_PORT=9010
# clementine-auth
CLEMENTINE_AUTH_HOST=clementine_auth
CLEMENTINE_AUTH_PORT=9000
CLEMENTINE_AUTH_DOMAIN=127.0.0.1
CLEMENTINE_AUTH_PROTOCOL=HTTP
CLEMENTINE_AUTH_DSN=postgresql://clementine:clementine@clementine_db/clementine_auth
# luna
LUNA_API_HOST=127.0.0.1
LUNA_API_PORT=5000
LUNA_LICENSES_HOST=127.0.0.1
LUNA_LICENSES_PORT=5120
LUNA_ACCOUNT_ID=a0000000-0000-4000-a000-000000000000
# lunastreams
LUNA_STREAMS_HOST=127.0.0.1
LUNA_STREAMS_PORT=5160
# vl-notifier API
VLNOTIFIER_HOST=vlnotifier
VLNOTIFIER_PORT=9200
VLNOTIFIER_SUBJECT=«Clementine VL Notifier»
# vl-timetracker
VLTIMETRACKER_HOST=127.0.0.1
VLTIMETRACKER_PORT=8003
# vl-access
VLACCESS_HOST=127.0.0.1
VLACCESS_PORT=9091
# OTHER
LOG_LEVEL=1
TELEGRAM_BOT_TOKEN=
SMTP_SERVER=
SMTP_PORT=
SMTP_SENDER=
SMTP_LOGIN=
SMTP_PASSWORD=
Enter the necessary settings in the .env configuration file, as shown in Table 2.
Table 2. Configuration parameters
Parameter | Description |
---|---|
LUNA POINT database configuration parameters | |
DATA=./ |
Mount point for container data (optional) |
DOCKER_ url= |
By default: dockerhub.visionlabs.ru/point |
CLEMENTINE_USERNAME= |
Name of the database |
By default: point |
|
CLEMENTINE_PASSWORD= |
Database password |
By default: point |
|
Tags | |
Clementine tags: | |
CLEMENTINE_AUTH_VER= |
CLEMENTINE_AUTH_VER=v1.1.8 ; |
CLEMENTINE_API_VER= |
CLEMENTINE_API_VER=v1.9.0 |
LUNA_POINT_UI_VER= |
POINT_UI_VER=v1.12.4 ; |
LUNA_POINT_API_VER= |
POINT_API_VER=v1.0.5 ; |
Third party service tags: | |
VL_NOTIFIER_VER= |
VL_NOTIFIER_VER=0.1.15 ; |
POSTGRESQL_VER= |
POSTGRESQL_VER=12 |
CLEMENTINE UI configuration parameters | |
POINT_UI_HOST= |
POINT UI server address |
By default: point_ui |
|
POINT_UI_PORT= |
POINT UI port |
By default: 8080 |
|
POINT API configuration parameters | |
POINT_API_HOST= |
POINT API server address |
By default: point_api |
|
POINT_API_PORT= |
POINT UI port |
By default: 9010 |
|
CLEMENTINE AUTH configuration parameters | |
CLEMENTINE_AUTH_HOST= |
CLEMENTINE AUTH server address |
By default: clementine_auth |
|
CLEMENTINE_AUTH_PORT= |
CLEMENTINE UI port |
By default: 9000 |
|
CLEMENTINE_AUTH_DOMAIN= |
Application domain used to generate links on email |
Depending on the configuration of the network environment, this can be a name domain, for example, point.local or the IP address of a service available on the network |
|
This parameter is not critical and is only required if you use an email address to register new users and reset passwords | |
By default: 127.0.0.1 |
|
CLEMENTINE_AUTH_PROTOCOL= |
Protocol for working in a web environment. Depends on current infrastructure settings and security requirements |
Possible values: | |
- HTTP — protocol without encryption; |
|
- HTTPS — protocol with SSL encryption |
|
By default: HTTP |
|
CLEMENTINE_AUTH_DSN= |
Connecting CLEMENTINE AUTH to the database |
By default: postgresql://clementine:clementine@clementine_db/clementine_auth |
|
LUNA PLATFORM 5 configuration parameters | |
LUNA_API_HOST= |
LP5 host. IP address of the server on which the LP5 is deployed |
By default: 127.0.0.1 |
|
LUNA_API_PORT= |
LP5 API port |
By default: 5000 |
|
LUNA_LICENSES_HOST= |
LUNA Licenses host |
By default: 127.0.0.1 |
|
LUNA_LICENSES_PORT= |
LUNA Licenses port |
By default: 5120 |
|
LUNA_ACCOUNT_ID= |
User account ID in LP5 |
By default: a0000000-0000-4000-a000-000000000000 1 |
|
LUNA Streams configuration parameters | |
LUNA_STREAMS_HOST= |
LUNA Streams server address |
By default: 127.0.0.1 |
|
LUNA_STREAMS_PORT= |
LUNA Streams port |
By default: 5160 |
|
VL NOTIFIER configuration and notification parameters | |
VLNOTIFIER_HOST= |
Notification component server address |
By default: vlnotifier |
|
VLNOTIFIER_PORT= |
Notification component port |
By default: 9200 |
|
VLNOTIFIER_SUBJECT |
The text in the header of the sent email with notification |
By default: Clementine VL Notifier |
|
Time tracking module configuration parameters | |
VLTIMETRACKER_HOST= |
Time tracking component server address |
By default: 127.0.0.1 |
|
VLTIMETRACKER_PORT= |
Time tracking component port |
By default: 8003 |
|
VL Access configuration parameters | |
VLACCESS_HOST= |
Time tracking component server address |
By default: 127.0.0.1 |
|
VLACCESS_PORT= |
Time tracking component port |
By default: 9091 |
|
SMTP configuration parameters | |
LOG_LEVEL= |
Logging level. Available Values: |
0 — recording only errors; |
|
1 — recording errors and informational messages; |
|
2 — recording errors, informational messages and debugging information |
|
By default: 1 |
|
TELEGRAM_BOT_TOKEN= |
Telegram bot token where notifications will be sent |
SMTP_SERVER= |
SMTP server address |
SMTP_PORT= |
SMTP server port. Available Values: |
25 — no encryption; |
|
465 — SSL ; |
|
587 — TLS |
|
SMTP_SENDER= |
Email of the sender to send notifications to users. For example, robot@point.local |
SMTP_LOGIN= |
Login to connect to SMTP server |
SMTP_PASSWORD= |
Password for connecting to SMTP server |
The configuration parameters for the SMTP email server are optional and only required if you are using an email address to register new users and reset passwords.
The SMTP configuration parameters are also used for the notification component.
Data loading errors are written to the system log through the logging subsystem with three logging levels.
Internal errors are written to the system log using the logging subsystem:
- with error severity level if the further execution of the program is impossible;
- with warning severity level if the program remains functional.
Configuring the web interface#
The Service web interface is configured in the example-docker/config/ui/
directory, config.json
file:
{
"auth": {
"allowPasswordChange": {
"ui": true,
"email": true
}
},
"similarityThresholds": {
"low": 0.75,
"medium": 0.95
},
"maxImageSize": "2G"
}
Table 3. Web interface configuration parameters
Parameter | Description |
---|---|
allowPasswordChange | Configuring the registration type in the Service. |
All users in the Service interface are created by the administrator. The new user receives a link to his email address to continue registration (for details, see “VISIONLABS LUNA POINT. User Manual”). | |
It is also possible to create a new user with an explicit password in the Service. | |
To do this, you need to configure the ability to set passwords in the web interface of the Service. | |
By default: “ui”: true, “email”: true |
|
similarityThresholds | The color coding of similarity thresholds: |
- similarity values below “low” will be marked in red; | |
- similarity values between “low” and “medium” will be marked in yellow; | |
- similarity values above “medium” will be marked in green. | |
By default: low: 0.75 , medium": 0.95 |
|
maxImageSize | The maximum image size. |
Changing this parameter should set CLIENT_MAX_BODY_SIZE for the point-ui container indocker-compose.yml . |
|
By default: 2G |
Setting up a logo in the interface#
Users can set their own logo for the interface, which will be displayed in the left corner of the top menu. To do this:
1․ Go to the media folder.
2․ Move the files with logo images in .svg format to the folder.
3․ Name the file "logo.svg" for the light theme and "dark-logo.svg" for the dark theme.
3․ In the config.json file, specify the paths for the files (Figure 2):
"logoUrl": "/static/media/logo.svg",
"darkLogoUrl": "/static/media/dark-logo.svg"
Setting up an alarm button in the "Operator panel"#
LUNA POINT can integrate with the the security system service. When an event with video analytics occurs (for more details, see "LUNA POINT. User Guide", "Operator Panel" section), the user can send a notification to the service to activate the response team by pressing the "Alarm" button. To make the button appear in the interface, add the following settings to the config.json
file in the example-docker/config/ui/
directory and fill in all the fields:
"gulfstream": {
"url": "",
"token": "",
"object_id": "",
"object_name": "",
"addres": "",
"lat": "",
"lng": "",
"inn": "",
"partner_name": "",
"alarm_type": ""
}
The LUNA POINT interface must be deployed with https for work with the security system service.
Launching the Service#
Go to Docker directory:
cd /var/lib/point/current/example-docker
To start the Service, enter the command:
./start_point.sh
Check the status of all running Docker-containers:
docker-compose ps
Adding an administrator account#
After the Service starts, create a new account, and follow the instructions:
docker-compose exec point_auth python3 cli.py createaccount
Specify the login (email address) and password of the account, set the user role.
To log into the Service, you must use the specified email address as a login.
Create a new authorization for the account and follow the instructions:
docker-compose exec point_auth python3 cli.py createauth
Run the account role change and follow the instructions:
docker-compose exec point_auth python3 cli.py setaccountrole
-
Is an example of an identifier, not a real parameter. It is necessary to substitute ID from LP5. ↩