Configuration¶
The service allowed two variant of configuration:
use the Configurator service
use the configuration file
The service reads settings from the configuration file by default.
You can specify the –luna-config option for pulling settings from the Configurator service, see configurator.
Auto reload configuration¶
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 fetching has failed, the service will work without applying any changes to the existing configurations.
If check connections with the new configuration have failed, the service will retry pulling new configuration after pulling-time seconds. The service will shut down after 10 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 (database configuration, work plugins list, and others).
During configuration reload any existing HTTP connections to the service will be closed.
Configuration file for administrator¶
# Luna-admin configuration file
[LUNA_CONFIGURATOR]
#: load configs from configurator
USE_CONFIGURATOR = 0
#: luna-configurator origin
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: luna-configurator api version
LUNA_CONFIGURATOR_API = 1
[LUNA_ADMIN_DB]
#: type of database: postgres, oracle, default postgres
DB_TYPE = postgres
#: database login
DB_USER = luna
#: database password
DB_PASSWORD = luna
#: name of database for postgres, sid name for oracle
DB_NAME = luna_admin
#: ip-address of database
DB_HOST = 127.0.0.1
#: database listener port, 5432 - default port of postgres, 1521 - default port of oracle
DB_PORT = 5432
[INFLUX_MONITORING]
#: [integer] whether to send data for monitoring to InfluxDB
SEND_DATA_FOR_MONITORING = 0
#: [integer] InfluxDB version (1 for InfluxDB 1.x, or 2 for InfluxDB 2.x)
VERSION = 2
#: [string] InfluxDB 2.x workspace
ORGANIZATION =
#: [string] InfluxDB 2.x authentication token
TOKEN =
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: [string] ip-address of InfluxDB
HOST = 127.0.0.1
#: [integer] port of InfluxDB
PORT = 8086
#: [integer] whether HTTPS should be used for connection to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1
[LUNA_ADMIN_LOGGER]
#: folder, where logs are saved
FOLDER_WITH_LOGS = ./
#: level of debug print, by priority: ERROR, WARNING, INFO, DEBUG
LOG_LEVEL = INFO
#: time for records in logs: LOCAL or UTC
LOG_TIME = LOCAL
#: Maximum log file size in megabytes for rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: send log to stdout
LOG_TO_STDOUT = 1
#: send log to file
LOG_TO_FILE = 1
#: allow a multiline line stack trace message
MULTILINE_STACK_TRACE = 1
[LUNA_API_ADDRESS]
#: LUNA API origin
ORIGIN = http://127.0.0.1:5000
#: LUNA API api version
API_VERSION = 6
[LUNA_FACES_ADDRESS]
#: LUNA Faces origin
ORIGIN = http://127.0.0.1:5030
#: LUNA Faces api version
API_VERSION = 3
[LUNA_IMAGE_STORE_FACES_SAMPLES_ADDRESS]
#: LUNA Image-Store samples origin
ORIGIN = http://127.0.0.1:5020
#: LUNA Image-Store samples api version
API_VERSION = 1
#: *bucket* name, where samples will be stored
BUCKET = visionlabs-samples
[LUNA_IMAGE_STORE_BODIES_SAMPLES_ADDRESS]
#: LUNA Image-Store samples origin
ORIGIN = http://127.0.0.1:5020
#: LUNA Image-Store samples api version
API_VERSION = 1
#: *bucket* name, where samples will be stored
BUCKET = visionlabs-bodies-samples
[LUNA_IMAGE_STORE_IMAGES_ADDRESS]
#: LUNA Image-Store images origin
ORIGIN = http://127.0.0.1:5020
#: LUNA Image-Store images api version
API_VERSION = 1
#: *bucket* name, where images will be stored
BUCKET = visionlabs-image-origin
[LUNA_IMAGE_STORE_TASK_RESULT_ADDRESS]
#: LUNA Image-Store task result origin
ORIGIN = http://127.0.0.1:5020
#: LUNA Image-Store task result api version
API_VERSION = 1
#: *bucket* name, where task result will be stored
BUCKET = task-result
[LUNA_SENDER_ADDRESS]
#: LUNA Sender origin
ORIGIN = http://127.0.0.1:5080
#: LUNA Sender api version
API_VERSION = 2
[LUNA_INDEX_MANAGER_ADDRESS]
#: LUNA Index Manager origin
ORIGIN = http://127.0.0.1:5060
#: LUNA Index Manager api version
API_VERSION = 1
[LUNA_EVENTS_ADDRESS]
#: LUNA Events origin
ORIGIN = http://127.0.0.1:5040
#: LUNA Events api version
API_VERSION = 2
[LUNA_TASKS_ADDRESS]
#: LUNA Tasks origin
ORIGIN = http://127.0.0.1:5050
#: LUNA Tasks api version
API_VERSION = 2
[LUNA_HANDLERS_ADDRESS]
#: LUNA Handlers origin
ORIGIN = http://127.0.0.1:5090
#: LUNA Handlers api version
API_VERSION = 1
[LUNA_PYTHON_MATCHER_ADDRESS]
#: LUNA Python Matcher origin
ORIGIN = http://127.0.0.1:5100
#: LUNA Python Matcher api version
API_VERSION = 1
[LUNA_MATCHER_PROXY_ADDRESS]
#: LUNA Matcher Proxy origin
ORIGIN = http://127.0.0.1:5110
#: LUNA Matcher Proxy api version
API_VERSION = 1
[LUNA_LICENSES_ADDRESS]
#: LUNA Licenses origin
ORIGIN = http://127.0.0.1:5120
#: LUNA Licenses api version
API_VERSION = 1
[LIVENESS_ADDRESS]
#: Liveness service
ORIGIN = http://127.0.0.1:8080
[QUEUE_SETTINGS]
#: COMMON QUEUE SETTINGS:
#: max count of retry message
MAX_RETRIES = 5
#: delay step for retry
DELAY_STEP = 10
#: current Luna Core api version
api_version = 14
#: total request timeout
REQUEST_TIMEOUT = 30
#: RABBIT MQ SETTINGS
#: queue type: "rabbit"
QUEUE_TYPE = rabbit
#: queue host
HOST = 127.0.0.1
#: queue port, default: 5672 for rabbit
PORT = 5672
#: queue user
USER = luna
#: queue password
PASSWORD = luna
# #: IBM MQ SETTINGS
# #: queue type: "ibmmq"
# QUEUE_TYPE = ibmmq
# #: queue host
# HOST = 127.0.0.1
# #: queue port, default: 1414 for ibmmq
# PORT = 1414
# #: queue user
# USER = luna
# #: queue password
# PASSWORD = luna
# #: IBM MQ manager
# IBM_MANAGER = SATURN.QUEUE.MANAGER
# #: IBM MQ channel
# IBM_CHANNEL = PASSWORD.SVRCONN
# #: SQS SETTINGS
# #: queue type: "sqs"
# QUEUE_TYPE = sqs
# #: AWS public access key
# AWS_PUBLIC_ACCESS_KEY =
# #: AWS secret access key
# AWS_SECRET_ACCESS_KEY =
# #: AWS scheme, one of: "http", "https" or "mqtt"
# AWS_SCHEME = https
# #: AWS authorization signature, one of: "s3v2" or "s3v4"
# AWS_AUTHORIZATION_SIGNATURE = s3v4
# #: AWS endpoint region
# AWS_REGION =
# #: AWS request connect timeout
# AWS_CONNECT_TIMEOUT = 20
[INDEXED_MATCHER_QUEUE]
#: rabbit indexed matcher exchange
RABBIT_EXCHANGE = luna.match
#: routing key for indexed matcher queue
ROUTING_KEY = indexed_matcher
[INDEXER_QUEUE]
#: rabbit indexer exchange
RABBIT_EXCHANGE = luna.index
#: routing key for indexer queue
ROUTING_KEY = indexer
[LUNA_ADMIN_TIMEOUTS]
#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST = 60
[ADDITIONAL_SERVICES_USAGE]
#: support luna-events service as a data source for tasks (0 - disable, 1 - enable)
LUNA_EVENTS = 1
#: support luna-task service for executing long tasks
LUNA_TASKS = 1
#: support luna-sender service, subscription on events by web sockets
LUNA_SENDER = 0
#: support matching by indexed lists
INDEXED_MATCHER = 0
#: support sharded matching
LUNA_MATCHER_PROXY = 1
#: Whether to use liveness
LIVENESS = 0
[OTHER]
#: list active plugins for luna-admin
LUNA_ADMIN_ACTIVE_PLUGINS = []
#: Time in which records are stored in the database
STORAGE_TIME = LOCAL
Extended administrator configuration¶
Module sets values in the global variables.
- configs.config.ADMIN_ID = '00000000-0000-4000-b000-000000000146'¶
admin id for creating tasks
- configs.config.DATABASE_CONNECTION_POOL_COUNT = 1¶
size of a connection pool to the database