Configuration (configuration)

Description

A structure that connects the infrastructure, logic, and data layers to each other. Based on the active configuration, the entire cluster of the deployed system is built and operates «Incoplax».

The configuration is initially deployed with the master server and is contained on disk. It contains only one server with a basic set of roles.
Configuration changes are performed in the configuration editor application or via API, after which the configuration is saved in the domain, validated, and, if validation is successful, can be applied.

Limitations

  • The collection is only available in the master domain.

  • If you change any field of the configuration object in the database after a domain reload, the object will not be loaded, the check by hash.

  • Unable to delete the active configuration.

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

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

  • Validation is performed relative to the currently active configuration, so an arbitrary configuration loaded externally is invalid in the vast majority of cases.

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

Title

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

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

Configuration contents: 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 header

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

Arbitrary comment

Field: ext
Mode: inout
Type: object
Compound field

Allows you to extend the compound with arbitrary keys and values.

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

The identifier of the configuration that the current configuration that was previously active is replaced with at the time of activation.

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

Time of object creation in UTC.

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

Time of the last modification of the object in the 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: — 

Text about an error 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
Status Description Limitations

"initial"

New configuration

  • available for installation via api;

  • is set forcibly automatically upon creation.

"valid"

The configuration has been validated and is correct, the list of warnings is specified in the ext.errormsg" field, " * is set by the system

"error"

Configuration is invalid, error list is specified in ext.errormsg

* is set by the system

"activating"

Start the process of activating the configuration, as a result the configuration will enter the active or error state

* available for installation via api
* there can only be one;
* can only be set if the current state valid;
* updates and sets only the role to valid or error mic;
* on successful activation, the previous active one becomes valid.

"active"

See also

Logical roles

  • mic validates and activates the configuration.

  • mdc controls the change of configuration states, as well as the loading of the active configuration from the database.

  • ic performs the application of the configuration on the site.