Installation

This section describes LUNA Licenses installation and configuration.

Service requirements

  • The service can be installed on CentOS 7 (not tested on other system versions)

  • Python v.3.10.0 or higher is required

  • It is strongly recommended to create virtual surroundings for the Python dependencies installation

Install Python

The recommended version is 3.10.0.

Install Python libraries

Note: The virtual environment is strongly recommended for the installation of the service.

  • Go to the project source directory:

cd ./luna-licenses/
  • Create a virtual environment:

python3.10 -m venv venv
  • Activate the virtual environment by the command:

source ./venv/bin/activate
  • Install dependencies by the command:

pip install -r requirements.txt
  • Use the following command for the virtual environment deactivation:

deactivate

Check configs

Check and change the service settings in the configuration file ./luna-licenses/luna_licenses/configs/config.conf (if necessary):


[LUNA_CONFIGURATOR]
#: load configs from LUNA Configurator
USE_CONFIGURATOR = 0
#: LUNA Configurator protocol, IP address, and port
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: API version of the LUNA Configurator
LUNA_CONFIGURATOR_API  = 1


[LUNA_LICENSES_LOGGER]

#: folder, where logs are saved
FOLDER_WITH_LOGS = ./
#: level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024


[INFLUX_MONITORING]

#: send data for monitoring to InfluxDB
SEND_DATA_FOR_MONITORING = 1
#: [string] InfluxDB 2.x workspace
ORGANIZATION =
#: [string] InfluxDB 2.x authentication token
TOKEN =
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: InfluxDB IP address
HOST = 127.0.0.1
#: InfluxDB port
PORT = 8086
#: use HTTPS to connect to InfluxDB
USE_SSL = 0
#: frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1

Run service

See the instruction launch service

Test service

See the instruction test service

Deploy service

See the information about different ways to deploy the service deploy service