Additional features#
The use of additional features is available both at the installation stage and after the installation of the System. If changes are made after the System is fully installed, the System must be completely restarted in order to apply them.
Additional licensing for pedestrians and animals detection#
Human and animal detectors require additional licensing. This license can be activated at any time – during the installation of the system or after.
Ask VisionLabs technical support to provide the additional license. VL tech support will send you an email containing a license file.
This file must be uploaded to the /cars-installer_v.*.*.*/extras/license_files
directory.
After that, you need to open the «.env» file and specify the updated license file name in the STREAM_LICENSE_FILE
parameter.
If uploading a license file to any other directory, the entire path to the file in this parameter must be changed.
After adding the license, this functionality should be activated. In the «.env» file, the values «1» should be set for the ENABLE_BODY_DETECTOR
and ENABLE_ANIMAL_DETECTOR
parameters.
Running CARS Stream with GPU#
For each CARS Stream, it is possible to select the launch mode: with or without GPU support (i.e. using CPU). By default, CARS Stream is started using CPU.
In order to change this setting, you need to perform the following steps.
Go to the root of the installer:
cd /cars-installer_v.*.*.*
Open file «.env»:
nano .env
And change the value for the STREAM_PLATFORM
parameter to «gpu».
After that, save the changes, close «.env» file and open the «docker-compose.yml» file:
nano docker-compose.yml
And uncomment the following lines in the Stream section:
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# #count: all
# device_ids: ['${STREAM_GPU1}']
# capabilities: [gpu]
Where:
- The
#count: all
parameter activates startup on all video cards. Commented out by default; - The parameter
device_ids: ['${STREAM_GPU1}']
is passed from the file «.env», where it is necessary to specify the video card used.
If multiple instances of CARS Stream are used, the launch mode should be selected for each copy. To do this, you need to change the STREAM_PLATFORM
parameter for each copy of CARS Stream, and also specify the number of the video card used in the STREAM_GPU
parameter.
Similar settings can be reproduced for the CARS API subsystem.
HTTPS protocol and generation of encryption keys#
LUNA CARS enables to use an encrypted connection using an SSL certificate and the HTTPS protocol.
To do this, you need to open the system interface using the port specified in the parameter value ANALYTICS_FRONTEND_SSL_PORT
.
By default, the value of this parameter is 443. Thus, the system is available at:
https://<IP_address>:443
The parameter value can be changed if necessary, in this case the port number set manually should be used.
By default, a file containing the SSL private key is added to the system.
To generate a new encryption key, follow these steps:
1․ Go to /extras directory:
cd cars-installer_v.*.*.*/extras
2․ Run the encryption key generation script:
./nginx_cert_gen.sh
Perform the actions required as part of the script execution.
After execution, a new encryption key will be generated.
Grafana monitoring service#
The LUNA CARS package includes the Grafana service, which is not mandatory for installation and is used for visualization, monitoring and analysis of data from LUNA CARS subsystems.
The Grafana service works in conjunction with the following additional components:
- cAdvisor — analyzes and provides data on resource usage and performance of running containers (see https://github.com/google/cadvisor for more details);
- prometheus — writes metrics to the database (see https://prometheus.io/ for more details);
- nodeexporter — measures various machine resources such as memory, disk and CPU load (see https://github.com/prometheus/node_exporter for more details).
Installation#
Before starting the installation, make sure that docker
and docker-compose
are installed, see Installing Docker and Docker-compose.
Make sure that the ports used by the service are not occupied on the target server:
ss -ltn
Table 1. List of used ports
Port | Service | The port uses.. |
---|---|---|
3000 | grafana | User(UI) |
9090 | prometheus | grafana |
9080 | cadvisor | prometheus |
9100 | nodeexporter | prometheus |
If there are occupied ports in the list, edit the «.env» file to specify the available ports. To do this, navigate to the working directory
cd cars-installer_v.*.*.*/extras/monitor
Open the «.env» file and edit the required ports
nano .env docker-compose.yml
To install the Grafana service, follow these steps:
1․ Open working directory
cd cars-installer_v.*.*.*/extras/monitor
1․ Run the start_all.sh
script and wait for it to complete
./start_all.sh
Additional information on Grafana service configuration is described in the README.md file
Launch#
After complete installation, to enter the web interface, you need to open the following address in browser:
http://ip_adress:3000
The default port is specified, the port is set in the
GRAFANA_PORT
variable in the «.env» configuration file.
The system will prompt you to log in to your account (Figure 11).
To log in to Grafana, use the following data:
- Login – admin;
- Password – PASSWORD.
The default password is given, the password is set in the
GRAFANA_PASSWORD
variable in the «.env» configuration file.
To change the default password, open the «.env» file in your working directory and edit the GRAFANA_PASSWORD
variable
nano .env docker-compose.yml
Working with Grafana#
Adding a dashboard#
To monitor data, you need to add a dashboard and configure it.
Let's use an existing dashboard specially prepared for LUNA CARS resource monitoring. To do this, import the json file of settings.
1․ In the Grafana interface, go to the "Import" section in the "Create" tab (Figure 12).
2․ Copy the contents of the settings file "/cars-installer_v.*.*.*/extras/monitor/dashboards/
new.json
" and paste it into the Import via panel json
field on the "Import" page (Figure 13).
3․ Click the "Load" button at the bottom of the window. If necessary, change the name of the dashboard in the Name
field and click the "Import" button (Figure 14).
The dashboard page opens (Figure 15).
For detailed information about Grafana administration, please refer to the documentation at: https://grafana.com/docs/grafana/latest/
Editing the dashboard#
Editing existing panels:
1․ To edit existing panels on the general dashboard, you must select the “Edit” item in the drop-down menu for the desired element (Figure 16).
2․ Change an existing or add a new query in the "Query" tab in PromQL format (Figure 17).
Adding new panels:
1․ To add new panels to the general dashboard, click the "Add panel" button at the top of the service (Figure 18).
2․ In the window that appears, click the "Add a new panel" button.
3․ Enter the query in the "Query" tab in PromQL format (Figure 19).
Query is formed using the Prometheus query language called PromQL. For detailed information please refer to the documentation on the page: https://prometheus.io/docs/prometheus/latest/querying/basics/.