Installation¶
This section describes LUNA Licenses installation and configuration.
Service requirements¶
The service can be installed on AlmaLinux 9 (not tested on other system versions)
Python v.3.13.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.13.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.11 -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
#: send log to stdout
LOG_TO_STDOUT = 1
#: send log to file
LOG_TO_FILE = 0
#: allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1
[LUNA_MONITORING]
#: [string] storage type
STORAGE_TYPE = influx
#: [integer] Whether to send data for monitoring
SEND_DATA_FOR_MONITORING = 1
#: [string] InfluxDB 2.x workspace
ORGANIZATION = luna
#: [string] InfluxDB 2.x authentication token
TOKEN = kofqt4Pfqjn6o0RBtMDQqVoJLgHoxxDUmmhiAZ7JS6VmEnrqZXQhxDhad8AX9tmiJH6CjM7Y1U8p5eSEocGzIA==
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: [string] Monitoring database IP address
HOST = 127.0.0.1
#: [integer] Monitoring database port
PORT = 8086
#: [integer] Whether to use HTTPS to connect to Monitoring database
USE_SSL = 0
#: [integer] frequency of sending monitoring data to the database (in seconds)
FLUSHING_PERIOD = 1
#: [integer] Whether to aggregate monitoring data
USAGE_AGGREGATION = 1
[LUNA_LICENSES_HTTP_SETTINGS]
#: web server http settings
#: [integer] service request timeout (in seconds)
REQUEST_TIMEOUT = 60
#: [integer] service response timeout (in seconds)
RESPONSE_TIMEOUT = 600
#: [integer] max request size (in bytes), default 1gb
REQUEST_MAX_SIZE = 1073741824
#: [integer] service http keep-alive timeout (in seconds)
KEEP_ALIVE_TIMEOUT = 15
[LICENSE_VENDOR]
#: vendor: one of 'hasp' or 'guardant'
VENDOR = hasp
#: server address
SERVER_ADDRESS = 127.0.0.1
[LUNA_SERVICE_METRICS]
#: [int] whether to enable /metrics path and statistics collection
ENABLED = 0
# [string] statistics data format (prometheus is the only option yet)
METRICS_FORMAT = prometheus
#: [dict] Extra labels for request and error metrics
[LUNA_SERVICE_METRICS.EXTRA_LABELS]
[OTHER]
#: list of active plugins
LUNA_LICENSES_ACTIVE_PLUGINS = []
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