-
Notifications
You must be signed in to change notification settings - Fork 1
Parameters
DISCO uses a section of the filesystem to layout a tree of pathable, walkable parameters. This part of the filesystem is available to the client at execution time, so these variables can be used in scripts, templates, and definition files, to further customize execution based off of parameters. This lives on the SERVER, not the client.
From the server perspective, the parameters tree looks like:
/var/disco/parameters
___ ___ disco
___ ___ ___ client
___ ___ ___ ___ cmds
___ ___ ___ ___ ___ rsync
___ ___ disco
___ ___ ___ server
___ ___ ___ ___ uri
___ ___ NODE_NAME
___ ___ ___ modules
___ ___ ___ ___ ...
___ ___ ___ parameters
___ ___ ___ ___ ...
Think of it like a large JSON document expressed as a filesystem, with the document keys the filenames, and the values being their contents. This format was chosen because it can be easily created from any number of other existing datasources, and doesn't tie DISCO to any one particular tool (cobbler, etc). The admin is free to create this structure on the server however they please.
Given this, disco does not use a config file, all configuration parameters are present in this tree.
There are only two possible toplevel paths, /disco and /NODE_NAME. NODE_NAME is equal to the FQDN of the client making a request, and /disco is the internal client/server configuration. The parameter tree is transmitted from the server to the client via (yet another) rsync operation, and is accessible as a filesystem tree (or the disco-param command which is just a bash wrapper). These parameters appear in /var/disco/parameters on the client and server, and default values can be found there in the client/server install before the first run of the client.
disco/client/cmds/rsync : The rsync command to use when synching
files.
disco/server/uri : The rsync URI from which to fetch module definitions.
disco/NODE_NAME/modules : This list defines the modules to install
on a given node.
disco/NODE_NAME/parameters : This tree defines all configuration
parameters for the node not related to any module in particular.
Some special parameters are provided to the client, that do not exist on the paramters tree until runtime:
disco/NODE_NAME/current_module : This parameter defines the full
name of the current module, such that a module definition file
can access its personal parameters via without knowing its name, e.g.:
$(disco-param get $(hostname)/classes/$(disco-param get $(hostname)/current_module)/some/module/specific/path)