Configuration

Options

The service allowed two variant of configuration:

  1. use the Configurator service

  2. use the configuration file

The service reads settings from the configuration file by default.

You can specify the luna-config option in run command for pulling settings from the Luna Configurator service.

The service supports an auto-reload of configurations. You can enable this feature by specifying a config-reload option in the command line. The service periodically checks new settings. If current settings and new pulled settings are the same the service will not perform any actions. You can specify the check period in the pulling-time command line argument (10 seconds by default).

If a configuration pulling has failed, the service will work without applying any changes to the existing configurations.

If check connections with new settings have failed, the service will retry pulling new configurations after 5 seconds. The service will shut down after 5 failed attempts.

Warning

Service can work incorrectly while the new settings are being applied. It is strongly recommended not to send requests to the service when you change important settings (LIM_MANAGER_DB, LUNA_FACES_ADDRESS and other).

Configuration files for administrator

# LIM Indexer configuration 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


[LIM_INDEXER_LOGGER]

#: [string] folder, where logs are saved (relative path begins in directory with application)
FOLDER_WITH_LOGS = ./
#: [string] level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: [string] time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: [integer] maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: [integer] send log to stdout
LOG_TO_STDOUT = 1
#: [integer] send log to file
LOG_TO_FILE = 1
#: [integer] allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1


[INFLUX_MONITORING]

#: [integer] send data for monitoring to InfluxDB
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] InfluxDB IP address
HOST = 127.0.0.1
#: [integer] InfluxDB port
PORT = 8086
#: [integer] use HTTPS to connect to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1


[LUNA_FACES_ADDRESS]

#: [string] LUNA Faces protocol, IP address, and port
ORIGIN = http://127.0.0.1:5030
#: [integer] API version of the LUNA Faces
API_VERSION = 3


[LUNA_FACES_TIMEOUTS]

#: [integer] HTTP connection timeout
CONNECT = 30
#: [integer] HTTP request timeout (total)
REQUEST = 60


[OTHER]

#: [string] type of storage: "S3" or "LOCAL", where "LOCAL" is local filesystem
INDEX_STORAGE_TYPE = LOCAL
#: [string] folder, where images are stored (relative path begins in directory with application)
INDEX_STORAGE_LOCAL = ./local_storage
#: [string] default face descriptor version
DEFAULT_FACE_DESCRIPTOR_VERSION = 59
#: [list(string)] list of active plugins
LIM_INDEXER_ACTIVE_PLUGINS = []
# LIM Manager configuration 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


[LIM_MANAGER_LOGGER]

#: [string] folder, where logs are saved (relative path begins in directory with application)
FOLDER_WITH_LOGS = ./
#: [string] level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: [string] time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: [integer] maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: [integer] send log to stdout
LOG_TO_STDOUT = 1
#: [integer] send log to file
LOG_TO_FILE = 1
#: [integer] allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1


[LIM_MANAGER_DB]

#: [string] database username
DB_USER =
#: [string] database password
DB_PASSWORD =
#: [string] database IP address
DB_HOST = 127.0.0.1
#: [integer] database listener port
DB_PORT = 6379


[LIM_MANAGER_DB.DB_SETTINGS]

#: [integer] database connection pool size
CONNECTION_POOL_SIZE = 5


[INFLUX_MONITORING]

#: [integer] send data for monitoring to InfluxDB
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] InfluxDB IP address
HOST = 127.0.0.1
#: [integer] InfluxDB port
PORT = 8086
#: [integer] use HTTPS to connect to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1


[LUNA_FACES_ADDRESS]

#: [string] LUNA Faces protocol, IP address, and port
ORIGIN = http://127.0.0.1:5030
#: [integer] API version of the LUNA Faces
API_VERSION = 3


[LUNA_FACES_TIMEOUTS]

#: [integer] HTTP connection timeout
CONNECT = 30
#: [integer] HTTP request timeout (total)
REQUEST = 60


[LIM_MANAGER_INDEXING]

#: [list(string)] list of lim-indexer origins
INDEXER_ORIGINS = [http://127.0.0.1:5180]
#: [integer] LUNA Faces polling period, in seconds
PLANNING_PERIOD = 600
#: [integer] LIM Indexer lookup period, in seconds
LOOKUP_PERIOD = 5
#: [integer] index construction parameter
EF_CONSTRUCTION = 1600


[LIM_MANAGER_INDEXING.FACE_LISTS]

#: [integer] min face count in LUNA Faces list for indexing
MIN_INDEXING_LIST_SIZE = 50000
#: [list(string)] lists for indexation, for value [dynamic] all the lists with attribute count > MIN_INDEXING_LIST_SIZE will be indexed
INDEXING_LISTS = [dynamic]


[OTHER]

#: type of storage: "S3" or "LOCAL", where "LOCAL" is local filesystem
INDEX_STORAGE_TYPE = LOCAL
#: folder, where images are stored (relative path begins in directory with application)
INDEX_STORAGE_LOCAL = ./local_storage
#: [list(string)] list of active plugins
LIM_MANAGER_ACTIVE_PLUGINS = []
#: [string] time format used in DB entries: LOCAL or UTC
STORAGE_TIME = LOCAL
# LIM Matcher configuration 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


[LIM_MATCHER_LOGGER]

#: [string] folder, where logs are saved (relative path begins in directory with application)
FOLDER_WITH_LOGS = ./
#: [string] level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: [string] time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: [integer] maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: [integer] send log to stdout
LOG_TO_STDOUT = 1
#: [integer] send log to file
LOG_TO_FILE = 1
#: [integer] allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1


[LIM_MATCHER_DB]

#: [string] database username
DB_USER =
#: [string] database password
DB_PASSWORD =
#: [string] database IP address
DB_HOST = 127.0.0.1
#: [integer] database listener port
DB_PORT = 6379


[LIM_MATCHER_DB.DB_SETTINGS]

#: [integer] database connection pool size
CONNECTION_POOL_SIZE = 5


[INFLUX_MONITORING]

#: [integer] send data for monitoring to InfluxDB
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] InfluxDB IP address
HOST = 127.0.0.1
#: [integer] InfluxDB port
PORT = 8086
#: [integer] use HTTPS to connect to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1


[LUNA_LICENSES_ADDRESS]

#: [string] LUNA Licenses protocol, IP address, and port
ORIGIN = http://127.0.0.1:5120
#: [integer] API version of the LUNA Licenses
API_VERSION = 1


[LIM_MATCHING]

#: [integer] index search parameter
EF_SEARCH = 1600


[OTHER]

#: [string] type of storage: "S3" or "LOCAL", where "LOCAL" is local filesystem
INDEX_STORAGE_TYPE = LOCAL
#: [string] folder, where images are stored (relative path begins in directory with application)
INDEX_STORAGE_LOCAL = ./local_storage
#: [list(string)] list of active plugins
LIM_MATCHER_ACTIVE_PLUGINS = []
#: [string] path to the dir with cache (omit to disable)
LIM_MATCHER_CACHE =

Extended administrator configuration

Application config with global variables.

manager.lim_manager.config.config.MASTER_KEY = 'master_key'

Index manager master lock name (redis)

Application config with global variables.

matcher.lim_matcher.config.config.CONSUMER_GROUP = 'indexed_matcher'

Redis consumer group for matching requests

matcher.lim_matcher.config.config.LISTENER_COUNT = 5

Matcher listener count

matcher.lim_matcher.config.config.MEMORY_USAGE_LIMIT = 80

Memory utilization limit, in percent

class matcher.lim_matcher.config.config.MatcherConfig

Indexed matcher configuration parameters.

matcher.lim_matcher.config.config.RELOAD_INTERVAL = 600

Index reload interval, in seconds