10. Initialization

10.1. What is initialization?

Before ArmoniK can serve requests, its backing stores must be set up: database collections must exist and be indexed, queue infrastructure must be ready, and initial data such as partitions and authentication entries must be present. This setup phase is called initialization.

Initialization is performed by the control plane at startup. Four flags in the InitServices configuration section control which parts are initialized and whether the control plane exits once initialization is complete.

10.2. Initialization flags

Flag

Default

Description

InitDatabase

true

Creates database collections and indexes, then inserts the configured partitions and authentication data.

InitObjectStorage

true

Initializes the object storage backend (buckets, paths, or equivalent).

InitQueue

true

Initializes the queue infrastructure (queues, channels, or equivalent).

StopAfterInit

false

When true, the control plane exits as soon as initialization completes instead of continuing to serve requests.

Each flag can be set independently via environment variables:

InitServices__InitDatabase=true
InitServices__InitObjectStorage=true
InitServices__InitQueue=true
InitServices__StopAfterInit=false

10.3. What gets initialized

10.3.1. Database

When InitDatabase is enabled, the control plane:

  1. Creates the necessary collections if they do not already exist.

  2. Creates indexes on those collections.

  3. Upserts the initial data provided in the configuration: partitions and authentication entries (users, roles, and certificates).

Refer to Partitions and Authentication for details on how to supply this data via environment variables.

10.3.2. Object storage and queue

When InitObjectStorage or InitQueue are enabled, the control plane prepares the respective backends according to the adaptor in use. The exact operations depend on the adaptor (e.g. creating S3 buckets, AMQP queues, etc.).