configuration domain (general)¶
This is the runtime configuration for a casual domain.
The sections can be splitted in arbitrary ways, and aggregated to one configuration model casual
uses.
Same sections can be defined in different files, hence, give more or less unlimited configuration setup.
Most of the sections has a property note
for the user to provide descriptions of the documentation.
The examples further down uses this to make it easier to understand the examples by them self. But can of
course be used as a mean to help document actual production configuration.
structures¶
General “structures” that other parts of the configuration refers to.
Duration : string
¶
A string representation of a duration. SI units can be used. Example: 30ms
, 1h
, 3min
, 40s
. if no SI unit s
is used
domain::service::Visibility : string
¶
A string representation that defines the visibility of a service
value |
description |
---|---|
discoverable |
service is discoverable from other domains |
undiscoverable |
service is not discoverable from other domains |
domain::service::timeout::Contract : string
¶
A string representation that defines the timeout contract. Can be one of the following:
value |
severity |
description |
---|---|---|
linger |
non-lethal |
no action, let the server be |
interrupt |
non-lethal |
send |
kill |
lethal |
send |
abort |
lethal |
send ‘abort’ signal |
domain::service::Timeout (structure)¶
property |
description |
default |
---|---|---|
[duration : |
timeout duration for a service. |
no duration |
[contract : |
action to take if timeout is passed |
|
domain::environment::Variable (structure)¶
property |
description |
---|---|
key : |
environment variable name |
value : |
the value to associate with the environment variable |
domain::Environment (structure)¶
property |
description |
---|---|
[variables : |
environment variables |
[files : |
paths to files that contains |
Note: a file referred from files
must contain the structure.
environment:
variables:
- key: "SOME_VARIABLE"
value: "foo"
files:
- "another-file.json"
And has corresponding extension as the format (my-environment.json, env.yaml and so on).
domain.global¶
Defines domain global configuration.
domain.global.service¶
domain global settings for services. This will effect services that are not otherwise configured explicitly,
property |
description |
---|---|
[execution.timeout : |
global default timeout |
domain.default¶
‘default’ configuration. Will be used as fallback within a configuration. Will not aggregate ‘between’ configurations. Only used to help user minimize common configuration.
domain.default.server¶
property |
description |
default |
---|---|---|
[instances : |
default number of instances. |
|
[memberships : |
default group memberships. |
|
[environment : |
default server environment |
|
[restart : |
default restart directive |
|
domain.default.executable¶
property |
description |
default |
---|---|---|
[instances : |
default number of instances. |
|
[memberships : |
default group memberships. |
|
[environment : |
default server environment |
|
[restart : |
default restart directive |
|
domain.default.service¶
property |
description |
default |
---|---|---|
[execution.timeout : |
default service timeout |
|
[visibility : Visibility] |
visibility from other domains |
|
domain.groups (list)¶
Defines the groups in the configuration. Groups are used define dependency order, which is
used during boot and shutdown. Arbitrary number of groups and group hierarchies can be
defined.
Groups can be used to associate resources
to servers/executables.
property |
description |
default |
---|---|---|
name : |
the name (unique key) of the group. |
|
[dependencies : |
name of groups this group has dependency to. |
|
[resources : |
names of resources this group is associated with |
|
[enabled : |
if the group is enabled or not see below |
|
[enabled : boolean
]
This property enables or disables the group. This could enable/disable entities that has membership to the group.
For an entity to be enabled: ALL explicit and implicit membership groups has enabled: true
For an entity to be disabled: ANY explicit and implicit membership groups has enabled: false
Entities effected:
domain.executables
domain.servers
queue.forward.groups
domain.servers (list)¶
Defines all servers of the configuration (and domain)
property |
description |
default |
---|---|---|
path : |
the path to the binary (if not absolute, |
|
[alias : |
the logical (unique) name of the server. |
|
[arguments : |
arguments to |
|
[instances : |
number of instances to start of the server. |
|
[memberships : |
groups that the server is member of |
|
[environment : |
explicit environments for instances of this server |
|
[restrictions : |
regex patterns, only services that matches are advertised. |
|
[resources : |
explicit resource associations (resource names) |
|
[restart : |
if the server should be restarted, if exit. |
|
domain.executables (list)¶
Defines all ordinary executables of the configuration. Could be any executable with a main
function
property |
description |
default |
---|---|---|
path : |
the path to the binary (if not absolute, |
|
[alias : |
the logical (unique) name of the executable. |
|
[arguments : |
arguments to main during startup. |
|
[instances : |
number of instances to start of the server. |
|
[memberships : |
groups that the executable is member of |
|
[environment : |
explicit environments for instances of this executable |
|
[restart : |
if the executable should be restarted, if exit. |
|
domain.services (list)¶
Defines service related configuration.
Note: This configuration is tied to the service, regardless who has advertised the service.
property |
description |
default |
---|---|---|
name : |
name of the service |
|
[routes : |
names to use instead of |
|
[execution.timeout : |
timeout of the service |
|
[visibility : |
visibility from other domains |
|
Note: For service aliases, it’s important to include the original name in routes