Consul¶
In an on-premise installation, the configuration of Digital Output Factory is kept in a Consul key value store. In a cloud environment, the container-orchestration system is used for this.
Literature - official Consul documentation
Consul Documentation by HashiCorp
Consul Web Interface¶
For Consul, a Web interface is available. To open the Consul Web Interface, enter the following URL into your Web browser:
https://<dpf_server>:8500
Keys and Values¶
The keys in the key value store are structured hierarchically. The settings of a DPF system begin with dc/home/env
, the same as for PLOSSYS Output Engine.
For each service instance, both the service name
and one or more tags
are specified. A tag is any text without blanks. Both specifications can be used for identifying the instance to which the setting applies. Each setting is saved under /service/<service_name>/tag/<tag_name>
.
PLOSSYS Output Engine
Digital Process Factory and PLOSSYS Output Engine share the same directory structure in Consul. Thus, when setting keys for DPF, set them for each DPF service specifically to avoid conflicts.
The setting of a key for a specific service has precedence over the setting of the same key for all (any
) services.
Example - log level for the seal-dpf-process-manager
service
dc/home/env/service/dpf-process-manager/tag/any/LOG_LEVEL
Example - log level for all instances
dc/home/env/service/any/tag/any/LOG_LEVEL
The settings available for Digital Process Factory are listed in the Keys reference.
Change the Value of an Existent Key¶
-
In the Consul Web interface, click
KEY/VALUE
on the top of the page. -
In the tree view on the left, navigate to the level of the key, for example,
dc/home/env/service/any/tag/any
. -
For changing an existent key, select the key, for example,
CONSUL_TOKEN
and specify its new value. -
Click
UPDATE
.
Hint - service restart
After starting a server instance, envconsul
monitors the configuration changes in the key value store. After a setting has been changed, envconsul
restarts the service instances with the updated settings. Changes in the key value store not regarding to the service instance are ignored.
Add a New Key Value Pair¶
-
In the Consul Web interface, click
KEY/VALUE
on the top of the page. -
In the tree view on the left, navigate to the level where the new key is to be created, for example,
dc/home/env/service/any/tag/any/
. -
For adding a new key value pair, extend the level by the key, for example,
LOG_LEVEL
and specify its value, for example,DEBUG
. -
Click
CREATE
.
Hint - service restart
After starting a server instance, envconsul
monitors the configuration changes in the key value store. After a setting has been changed, envconsul
restarts the service instances with the updated settings. Changes in the key value store not regarding to the service instance are ignored.
Export and Import the Complete Configuration¶
With Digital Process Factory, you can export the complete configuration from Consul to a YAML file and import a YAML file into Consul again. For more information, refer to Administrate the System Configuration.
Secure Consul¶
For how to secure Consul, refer to Secure Consul on Windows or Secure Consul on Linux.