Configurator

It is possible to run service with config received from luna-configurator: To use luna-configurator for service launching, do not pass config param to run service.

Simple service launching with luna-configurator: (It will works if luna-configurator has been launched at localhost on 5070 port)

python run.py

To specify luna-configurator address and port, use:

python run.py --luna-config http://127.0.0.1:5071/1

Where http://127.0.0.1:5071 is available luna-configurator service address and 1 is available configurator api version.

If one does not pass –luna-config command-line argument, it can be specified in the luna-configurator section of a config file. While the value of USE_CONFIGURATOR is 0, config file settings are used, otherwise, the settings from the configurator specified in the config file will be used.

Also it is possible to specify tag for every possible setting to get non-default setting. (see luna-configurator documentation for more information). Example:

python run.py --INFLUX_MONITORING TAG_1

Where INFLUX_MONITORING is setting name and TAG_1 is desired tag for this setting.

To see all possible settings and its description, execute:

python run.py --help

or

python run.py -h

Authorization

The configurator can be configured using authorization. In this case, you must specify the login|password in the LUNA_CONFIGURATOR section of the config file:

[LUNA_CONFIGURATOR]
#: [integer] load configs from LUNA Configurator
USE_CONFIGURATOR = 0
#: [string] LUNA Configurator protocol, IP address, and port
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: [integer] API version of the LUNA Configurator
LUNA_CONFIGURATOR_API = 1
#: [string] login for authorization in the LUNA Configurator
LUNA_CONFIGURATOR_USER =
#: [string] password for authorization in the LUNA Configurator
LUNA_CONFIGURATOR_PASS =

Where:

  • LUNA_CONFIGURATOR_USER - login specified in the configurator service

  • LUNA_CONFIGURATOR_PASS - password specified in the configurator service

Additionally, you can override the settings using the environment:

env "VL_SETTINGS.LUNA_CONFIGURATOR.LUNA_CONFIGURATOR_USER=your_username" bash
env "VL_SETTINGS.LUNA_CONFIGURATOR.LUNA_CONFIGURATOR_PASS=your_password" bash

If you run services via docker compose you can specify environment variables in docker-compose.yml:

api:
    environment:
        VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_USER: your_username
        VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_PASS: your_password

Warning

Bash does not support using environments containing dot-type separators in variable names. Therefore, we cannot use syntax like this: export VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.USE_AUTHORIZATION=1