Installation¶
For proper installation you need to clone project from git.
Surroundings¶
The service can be installed on CentOS 8.
Required predefined dependencies:
Python of version 3.11 is required.
It is strongly recommended to create virtual surroundings for python dependencies installation.
Python setuptools module can be installed via pip (pip install setuptools).
LUNA SDK version 5.2.0, environment variable FSDK_ROOT with path to LUNA SDK. Environment variable LD_LIBRARY_PATH must contain the path to the folder with the luna sdk shared libraries.
Dependencies installation¶
After surroundings installation launch pip install with “-r requirements.txt” parameter.
pip install -r requirements.txt
Configuration¶
After dependencies installation configuration file should be set. File is placed in “./luna_handlers/configs/config.conf”.
Database creation¶
Database for the service must be created in accordance with “/configs/config.conf”.
Postgresql (require version 9.5 or higher)
Create all required schemas in postgresql. For that create table with user name from config.conf, then launch base_scripts/db_create.py script. If script was executed without errors, all schemes were created successfully.
If table or user is not created yet, you should execute following commands:
psql -U postgres;
create role luna;
ALTER USER luna WITH PASSWORD 'luna';
CREATE DATABASE luna_handlers;
GRANT ALL PRIVILEGES ON DATABASE luna_handlers TO luna;
ALTER ROLE luna WITH LOGIN;
Luna-Image-Store
For Luna-Image-Store usage you should create bucket from config.conf. To do this, launch script base_scripts/lis_bucket_create.py. Note that this script doesn’t check if bucket already exists or not.
Influx monitoring
For sending monitoring you should create database config.conf. To do this, launch script base_scripts/monitoring_db_create.py. Note that this script doesn’t check if database already exists or not.
First launch and testing¶
If all previous actions are executed successfully, server is ready to work. To start server please launch run.py script. While start you can add arguments: server message port and path to config file if it is not in default location. By default 5090 port is used. Example:
./run.py --port=5091 --config=./configs/devconfig.conf
After server is started, testing is recommended. To perform testing execute command
python -m unittest tests.unittests_main
All tests should perform successfully.