Skip to content

Update environment#

The environment is prepared 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

When updating the environment, the default configuration file of the Storages service will be used, containing all the standard settings for connecting to databases, buckets, etc. If you need to use non-default settings or update LUNA PLATFORM deployed on different servers, you need to edit the configuration file before running the environment update command:

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

If necessary, you can first update the environment for the Configurator service, start it, and then update the environment for all other services using the settings from the running Configurator service. See the Storages utility manual for examples and detailed information about Storages.

Update environment command#

Note: If the old Image Store container is not removed, you can omit the bucket locations using the --local-buckets or --s3-buckets arguments and mount the local buckets directory to the Storages container. See "Remove old containers (optional)".

Prepare the environment with 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.4.37 \
bash -c "luna_prepare prepare all_entities \
    --platform_version=v.5.88.0 \
    --profile=common \
    --config=/srv/storages_config.conf \
    --local-buckets=/srv/local_storage"

Here:

  • 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.
  • -v /var/lib/luna/image_store/:/srv/local_storage/ — Command to mount a directory with Image Store buckets.
  • -v /var/lib/luna/current/extras/conf/storages_config.conf:/srv/storages_config.conf — Command to mount the Storages configuration file.
  • -local-buckets=/srv/local_storage — Named argument containing the directory where the Image Store buckets should be created.
  • --config=/srv/storages_config.conf — Named argument containing the address of the configuration file for use by the Storages service.

Note: At this point, you can perform certain steps to encrypt/decrypt/update the encryption of existing descriptors. See "Manage descriptor encryption" for more information.