Configuration Overview¶
Configuration files controlling the behaviour of Altair SLC Hub
are found in the [etc directory]/config.d
directory.
Configuration files controlling the behaviour of Altair SLC Hub
are found in the [etc directory]/config.d
directory of the Altair SLC Hub installation.
The files are divided into functional areas, but form a single logical set of configuration properties. Not all of the configuration settings are intended to be modified, some are internal settings.
The files supplied with the installation should not be modified. Uninstalling Altair SLC Hub will remove the installation provided configuration files, even if they have been modified. Instead additional files should be created in this directory that provide overrides for values. The configuration files supplied by the installation include comments that list valid configuration settings and provide documentation on their purpose and valid values.
Note
In a Linux environment, ensure that any configuration files that are created
have appropriate ownership and permissions.
Configuration files should be owned by the admin with permissions to configure
Altair SLC Hub, with the group set to slchub
.
The permissions should be set to 0660
, or --rw-rw----
.
That is, read/write by owner and group, not accessible to others.
This ensures that only the Hub service processes can read the configuration files,
and any workloads that Hub may run cannot read the configuration files.
The files in this directory are loaded in alphabetical order. When customizing
configuration values, create a new configuration file in the [etc directory]/config.d
directory
and ensure that its name is lexicographically greater than the installation supplied configuration file.
Note
When reading the directory, the files are sorted according to the ASCII character set,
and not using a locale specific sort order. The order in which configuration files are
read will not necessarily be the same as the order in which the files are returned
by ls
. To see the order in which the files will be read in, use
LANG=C ls [etc directory]/config.d
Note
When reading the directory, the files are sorted according to the ASCII character set, and not using a locale specific sort order.
The files are merged in the following manner:
- A scalar value in a later file overwrites a scalar value in an earlier file.
- Arrays are appended to.
- Objects are merged recursively.
- In the case of conflict (attempting to merge an object and a scalar for example), a later value replaces an earlier value.
Configuration merging examples¶
Object and scalar value merging¶
Assume that the configuration directory contains a file a.yaml
with the following contents:
section:
setting1: value1
setting2: value2
The configuration directory also contains a file b.yaml
with the following contents:
section:
setting2: value2a
setting3: value3
The resulting effective configuration is:
section:
setting1: value1
setting2: value2a
setting3: value3
Array merging¶
Assume that the configuration directory contains a file a.yaml
with the following contents:
section:
setting1:
- value1
The configuration directory also contains a file b.yaml
with the following contents:
section:
setting1:
- value2
The resulting effective configuration is:
section:
setting1:
- value1
- value2
Hubctl utility¶
The hubctl
command contains a subcommand that can be used to print out the
effective configuration. This can print a single configuration value, a complete
configuration section, or the complete configuration tree.
For example, to print out the effective configuration settings for auth.ldap
, use the following command:
hubctl config print auth.ldap
To print out the complete effective configuration tree, use
hubctl config print