Skip to content

Named arguments#

Named arguments are intended for detailed configuration of all commands for the luna_prepare script.

Each command has a specific set of named arguments available. A list of named arguments for each command can be obtained using the reference argument:

docker run \
--rm \
--network=host \
dockerhub.visionlabs.ru/luna/storages:v.0.2.26 \
bash -c "luna_prepare <command> <named_argument> --help"

If the prepare command is used, then named arguments are specified after positional ones (see "Types of passed arguments" section).

The table below provides a description for all named arguments.

Named arguments

Description

Default value/behavior

--help or -h

Show help information.

None

--verbose or -v

Enable debug output.

Not used

--config *

The path to the config.conf configuration file of the Storages utility, which contains the settings necessary for the utility to prepare the environment.

/srv/storages/ storages/config

--luna-config *

The address of the running Configurator service for reading the settings required by the Storages utility to prepare the environment.

127.0.0.1:5070

--profile

Profile:

  • common — Create environment for all LUNA PLATFORM services, with the exception of Backport 3 and Backport 4 services.
  • backports — Create environment for all LUNA PLATFORM services, including Backport 3 and Backport 4 services.

common

--platform_version

LUNA PLATFORM version.

Latest version from the list command

--s3-buckets

Enables you to use direct queries to S3 instead of using local Image Store buckets.

Settings from the configuration

--local-buckets

Path to the local directory with buckets. The directory must be mounted to the Storages container.

Directory from the configuration

--clear-database

Remove all existing settings and restrictions from the Configurator database before adding them from the dump file.

Not used

--entity

Selecting an entity to prepare the environment of a separate service.

All entities

--dump-file

Path to the dump file with settings for Configurator. The dump file must be mounted to the Storages container.

--configs-revision

Revision of settings for performing migration. Accepts the following values:

  • Revision hash
  • head — Latest revision**
  • -1 — Previous revision relative to current

Revision for specified LP version

--db-user

DB user. Required to override the default user in settings.***

Not used

--db-password

DB password. Required to override the default password in settings.***

Not used

--dry

Argument that enables you to avoid modifying data while preparing aggregated InfluxDB buckets.

false

--ignore-integrity or -ii

Argument that determines whether errors in the existence of objects (databases, buckets, etc.) should be ignored. If the argument is disabled, the existence of objects will be treated as an error.

Not used

--save-file

Name of the file where the logs will be saved.

--tail

Number of logs.

10

* to get the Storages utility settings, you can use either the --config argument or the --luna-config argument. See "Setting Storages configuration" for details.

** latest revision does not always mean a revision for the latest version of LUNA PLATFORM. If you need a revision of the latest version of LP, then you don’t have to specify the --configs-revision flag, because the default value means using the revision corresponding to the LUNA PLATFORM version specified in the --platform_version flag.

*** named arguments can be used in the case when you need to create a database from one user and use it from another.

Also, when using the --luna-config argument, you can pass the following named arguments containing the configuration tag in the Configurator service:

  • --LUNA_LAMBDA_DB
  • --LUNA_FACES_DB
  • --LUNA_BACKPORT3_DB
  • --LUNA_ACCOUNTS_DB
  • --LUNA_TASKS_DB
  • --LUNA_HANDLERS_DB
  • --LUNA_EVENTS_DB
  • --DATABASE_NUMBER
  • --LUNA_IMAGE_STORE_FACES_SAMPLES_ADDRESS
  • --LUNA_IMAGE_STORE_TASK_RESULT_ADDRESS
  • --LUNA_IMAGE_STORE_IMAGES_ADDRESS
  • --LUNA_IMAGE_STORE_PORTRAITS_ADDRESS
  • --LUNA_IMAGE_STORE_OBJECTS_ADDRESS
  • --LUNA_IMAGE_STORE_BODIES_SAMPLES_ADDRESS
  • --LAMBDA_S3
  • --INFLUX_MONITORING
  • --ADDITIONAL_SERVICES_USAGE