Configuration (configuration)

Description

A structure that unites the infrastructure, logic, and data layers. The entire cluster of the deployed «Incoplax» system is built and operates on the basis of the active configuration.

Initially, the configuration is deployed together with the master server and stored on disk. It contains only one server with a basic set of roles.
Configuration changes are made in the configuration editor application or via the API; after that the configuration is saved in the domain, validated, and, if validation succeeds, can be applied.

Limitations

  • The collection is available only in the master domain.

  • If any field of the configuration object is changed in the DB, after the domain reload the object will not be loaded; a hash check applies.

  • The active configuration cannot be deleted.

  • If there is no active configuration in the master domain, MIC applies the last active configuration from disk.

  • Only one configuration can be in the "active" state.

  • Validation is performed against the current active configuration; thus an arbitrary configuration loaded from outside is in the overwhelming majority of cases invalid.

Fields

Entity structure
{
  "id": uuid,
  "name": str,
  "state": str,
  "content": object,
  "opts": {
    "title": str,
    "comment": str
  },
  "ext": {
    "ct": date,
    "lwt": date,
    "warnings": str,
    "errormsg": str,
    "activation_time": date,
    "deactivation_time": date,
    "version": str
  }
}
Table 1. Fields
Specification Description

Field: id
Mode: inout
Type: uuid
Default: generated

Identifier. Can be specified at creation, otherwise generated by the system.

Field: name
Mode: in
Type: str
Default: empty

Name

Field: state
Mode: inout
Type: str
Default: "initial"

Field: content
Mode: inout
Type: object
Default: required

Configuration content: sites, servers, domains, roles, their settings and relationships, general settings.

Field: opts
Mode: in
Type: object
Default: empty

Compound field

Field: opts.title
Mode: in
Type: str
Default: empty

Arbitrary title

Field: opts.comment
Mode: in
Type: str
Default: empty

Arbitrary comment

Field: ext
Mode: inout
Type: object
Compound field

Allows extending the compound with arbitrary keys and values.

Field: ext.replaced_by_id
Mode: out
Type: uuid
Default: generated

Identifier of the configuration that replaced the current configuration at activation time, which had been active before.

Field: ext.ct
Mode: out
Type: date
Default: generated

Object creation time in UTC.

Field: ext.lwt
Mode: out
Type: date
Default: generated

Time of last modification of the object in UTC.

Field: ext.warnings
Mode: out
Type: object
Default: — 

List of warnings that occurred during configuration validation.

Field: ext.errormsg
Mode: out
Type: object
Default: — 

Error text that occurred during configuration validation.

Field: ext.activate_time
Mode: out
Type: date
Default: — 

Configuration activation time in UTC.

Field: ext.deactivate_time
Mode: out
Type: date
Default: — 

Configuration deactivation time in UTC.

Field: ext.version
Mode: out
Type: str
Default: — 

Configuration version

States

Table 2. States
State Description Restrictions

"initial"

New configuration

  • available for setting via API;

  • set forcibly automatically at creation.

"valid"

Configuration passed validation and is correct; the warning list is in ext.errormsg

  • set by the system

"error"

Configuration is invalid; the error list is in ext.errormsg

  • set by the system

"activating"

Start the configuration activation process; as a result the configuration moves to active or error

  • available for setting via API

  • only one is allowed;

  • can be set only if the current state is valid;

  • updated and moved to valid or error only by the mic role;

  • on successful activation the previous active configuration becomes valid.

"active"

Current active configuration

  • set by the system;

  • only one is allowed;

  • modification/deletion prohibited;

  • created only by the mic role;

See also

Logical roles

  • mic validates and activates the configuration.

  • mdc manages configuration state changes and loading the active configuration from the DB.

  • ic applies the configuration on the site.