Skip to content

Update environment#

The environment is updated using the Storages service. Using the command below will execute:

  • Creating buckets in InfluxDB for monitoring work (if not done previously)
  • Creating buckets for the Image Store service (if not done previously)
  • Preparing the Influx database for collecting aggregated statistics using the Admin service (if not done previously)
  • Database migration
  • Migration of settings to the Configurator database

Select services#

Note: Perform the settings in this section only if you need to launch services that are not included in the standard LUNA PLATFORM configuration.

You can update the environment either for each service separately or for all services at once. In this documentation, the environment is updated with the all_entities argument, meaning that all entities for the set of services defined in the Storages configuration will be updated.

However, after updating the environment, you must enable usage of the corresponding services in the LUNA PLATFORM settings.

Thus, selecting services for updating the environment and further launch consists of two stages:

  • selecting services in the "ADDITIONAL_SERVICE_USAGE" setting in the Storages configuration file so that the Storages utility can update all the necessary entities for future services
  • selecting services in the "ADDITIONAL_SERVICE_USAGE" setting in the LUNA PLATFORM settings to tell the system which services to use. You can load the setting either using a dump file or in the Configurator settings after it is launched directly.

Since the standard dump file overwrites the existing settings of the previous version of LUNA PLATFORM during an update, it is recommended to select services in the Configurator settings.

As a result, to select services, you need to:

You can enable or disable environment updates for the following services:

  • Faces
  • Events
  • Image Store
  • Tasks
  • Sender
  • Handlers
  • Remote SDK
  • Python Matcher
  • Python Matcher Proxy (disabled by default)
  • Lambda (disabled by default)
  • Video Manager (disabled by default)
  • Video Agent (disabled by default)
  • Streams Retranslator (disabled by default)

Working with the Lambda service is only possible when deploying LUNA PLATFORM services in Kubernetes. For more information, see the Deploying LP on Kubernetes guide.

Important! Disabling environment updates for core services has implications. For more information, see the "Disableable services" section of the administrator manual.

Setting Storages configuration file#

Note: Skip this section if you want to launch LUNA PLATFORM in a standard configuration.

When updating the environment, the Storages service configuration file is used, which contains:

  • a list of services for which the environment will be updated
  • database connection settings
  • bucket connection settings
  • S3 connection settings
  • monitoring settings
  • other

This file must be mounted to the Storages service container and specified in the --config argument.

As an example, the storages_config.conf file is mounted, containing standard settings for deploying LUNA PLATFORM in a minimal base configuration.

Edit the Storages configuration file to specify custom settings:

vi /var/lib/luna/current/extras/conf/storages_config.conf

Update environment command#

Before performing an environment update, make sure that all services you plan to use are enabled in the "ADDITIONAL_SERVICES_USAGE" setting of the Storages configuration file.

You can update the environment using the following command:

docker run \
--rm \
--network=host \
-v /var/lib/luna/current/extras/conf/storages_config.conf:/srv/storages_config.conf \
-v /var/lib/luna/image_store/:/srv/local_storage/ \
dockerhub.visionlabs.ru/luna/storages:v.0.5.35 \
bash -c "luna_prepare prepare all_entities \
    --platform_version=v.5.98.0 \
    --profile=common \
    --config=/srv/storages_config.conf \
    --local-buckets=/srv/local_storage"

Here:

  • -v /var/lib/luna/current/extras/conf/storages_config.conf:/srv/storages_config.conf — Command to mount the Storages configuration file.
  • -v /var/lib/luna/image_store/:/srv/local_storage/ — Command to mount a directory with Image Store buckets.
  • luna_prepare prepare all_entities — — Command "prepare" to prepare all entities.
  • --platform_version — Named argument containing the LUNA PLATFORM version.
  • --profile — Named argument containing the profile (list of services) backports, which means that the environment will be prepared for all services, including Backport 3 and Backport 4 services.
  • --config=/srv/storages_config.conf — Named argument containing the address of the configuration file for use by the Storages service.
  • -local-buckets=/srv/local_storage — Named argument containing the directory where the Image Store buckets should be created.

If additional services were enabled in the Storages configuration file, you must also enable their use in the "ADDITIONAL_SERVICES_USAGE" setting in the Configurator service (See Selecting services to launch using the Configurator service).