Configuration variables in clusters¶
To use different configuration variables on each cluster host while sharing the same isardvdi.cfg file, IsardVDI uses a shell-environment file mechanism.
-
/opt/isard-local/environmentis a file that loads variables when the shell starts. Because the shell loads afterdocker-compose, the variables in this file override those inisardvdi.cfg.-
Container entrypoints load the
$ENVfile. -
The
ENVenvironment variable is set to/usr/local/etc/environment. -
/opt/isard-local/environmentis mounted to/usr/local/etc/environment.
-
Two mechanisms, and the precedence is what surprises people
Pacemaker-managed deployments may ALSO receive per-host values from the resource agent that
starts the stack: before calling docker compose up, it reads one file per variable from a
per-host directory (named after the node's hostname) and exports them. The set is small on
purpose: the node's domain, its hypervisor id, its video domain, its storage endpoint and its
two viewer ports.
The precedence is:
- a value written literally in the compose file wins;
- a key left empty in the compose file inherits the exported value;
- if it is in neither, the product default applies.
Three consequences worth knowing before you rely on it:
- the variables are exported for every stack started on that node, not only the one that needs them;
- regenerating the compose file so that a literal becomes empty (or the other way round) silently changes the behaviour of that node;
- if the per-host directory is not named exactly like the node's hostname, nothing is read and nothing complains.
Prefer /opt/isard-local/environment above for per-host overrides: it is the product-level
mechanism and it does not depend on how the stack is started.