Skip to content

Before launch#

Make sure that you are the root user before starting installation!

Distribution unpacking#

The distribution package is an archive lim_v.5.34.0, where v.5.34.0 is a numerical identifier, describing the current LUNA Index Module version.

The archive includes configuration files, required for installation and exploitation. It does not include Docker images for the services. They should be downloaded from the Internet.

Move the distribution package to the directory on your server before the installation. For example, move the files to /root/ directory. The directory should not contain any other distribution or license files except the target ones.

Move the distribution to the /var/lib/luna/ directory.

mv /root/lim_v.5.34.0.zip /var/lib/luna

Install the unzip archiver if it is necessary

yum install -y unzip

Go to the folder with distribution

cd /var/lib/luna

Unzip files

unzip lim_v.5.34.0.zip

Create a symbolic link. The link indicates that the current version of the distribution file is used to run LIM.

ln -s lim_v.5.34.0 lim-current

Create directory to store indexes#

To store indexes and interact with them on the server, you need to create an appropriate directory. This directory will be mounted when the LIM services are launched.

Create folder to store indexes:

mkdir -p /var/lib/luna/lim_storage

Set appropriate permissions to read/write this folder:

chown -R 1001:0 /var/lib/luna/lim_storage

Create logs directory#

This step is preparation before enabling logging to a file. Skip this section if it is not required to save logs to the server.

To save logs on the server, you need to create an appropriate directory, if it has not been created yet.

All the service logs will be copied to this directory.

mkdir -p /tmp/logs
chown -R 1001:0 /tmp/logs

If the necessary directories for logs have not been created yet, then you need to create them manually and set permissions.

mkdir -p /tmp/logs/lim-manager /tmp/logs/lim-indexer /tmp/logs/lim-matcher /tmp/logs/python-matcher-proxy
chown -R 1001:0 /tmp/logs/lim-manager /tmp/logs/lim-indexer /tmp/logs/lim-matcher /tmp/logs/python-matcher-proxy

SELinux and Firewall#

You must configure SELinux and Firewall so that they do not block LUNA PLATFORM services.

SELinux and Firewall configurations are not described in this guide.

If SELinux and Firewall are not configured, the installation cannot be performed

Login to registry#

When launching containers, you should specify a link to the image required for the container launching. This image will be downloaded from the VisionLabs registry. Before that, you should login to the registry.

Enter login .

After running the command, you will be prompted for a password. Enter password.

The login and password are received from VisionLabs.

In the docker login command, you can enter the login and password at the same time, but this does not guarantee security because the password can be seen in the command history.

Upload LIM settings to Configurator#

To use LIM services with LP 5, you need to upload their settings to the Configurator service using the configuration migration mechanism.

docker run \
-v /etc/localtime:/etc/localtime:ro \
--rm \
--entrypoint='' \
--network=host \
dockerhub.visionlabs.ru/luna/lim-configs:v.0.1.0 python3 -m configs.migrate head --config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator

--config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator - flag for specifying the luna_configurator database address

Update settings in the Configurator#

Next, you need to enable the use of the Python Matcher Proxy service and add the matching plugin to the list of plugins used by the Python Matcher Proxy service.

Copy the file with the necessary settings to the Configurator container:

docker cp /var/lib/luna/lim-current/example-docker/configs/lim_settings.json luna-configurator:/srv/lim_settings.json

Update the settings in the Configurator service:

docker exec -it luna-configurator python3 ./base_scripts/db_create.py --dump-file /srv/lim_settings.json

As a result, the following settings will be updated in the Configurator service:

LUNA_MATCHER_PROXY_ACTIVE_PLUGINS = ["indexed_matcher"]
ADDITIONAL_SERVICES_USAGE = "luna_matcher_proxy":true

Enable logging to server directory#

LP does not save logs to your server by default. To enable logs saving to the server you should:

  • create a directory for logs (see Create logs directory)
  • enable logs saving and change logs directory in the Configurator service

Change logs directory manually#

Specify "folder_with_logs" parameter value to "/srv/logs" for all the services where you want to write logs. The docker run commands are already configured for saving logs to your server to this directory. After launching the service container, the service will write logs to the "/srv/logs"directory.

Set the "log_to_file" parameter to "True" to enable logging to files.

Change logs directory using dump file#

The dump file includes settings for logging to the specified directory.

Copy the dump file provided in the distribution package to the Configurator container.

docker cp /var/lib/luna/lim-current/example-docker/configs/logging.json luna-configurator:/srv/luna_configurator/logging.json

Update logging setting using the copied file.

docker exec -it luna-configurator python3 ./base_scripts/db_create.py --dump-file /srv/luna_configurator/logging.json