more readme

This commit is contained in:
2012-08-05 21:54:20 -04:00
parent e95fb5a461
commit 934d6fae18

View File

@@ -64,18 +64,18 @@ off of parameters. This lives on the SERVER, not the client.
From the server perspective, the parameters tree looks like: From the server perspective, the parameters tree looks like:
/var/disco/parameters /var/disco/parameters
___ ___ disco ___ ___ disco
___ ___ ___ client ___ ___ ___ client
___ ___ ___ ___ cmds ___ ___ ___ ___ cmds
___ ___ ___ ___ ___ rsync ___ ___ ___ ___ ___ rsync
___ ___ server ___ ___ server
___ ___ ___ uri ___ ___ ___ uri
___ ___ NODE_NAME ___ ___ NODE_NAME
___ ___ ___ modules ___ ___ ___ modules
___ ___ ___ ___ ... ___ ___ ___ ___ ...
___ ___ ___ parameters ___ ___ ___ parameters
___ ___ ___ ___ ... ___ ___ ___ ___ ...
Think of it like a large JSON document expressed as a filesystem, with the document keys the 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 filenames, and the values being their contents. This format was chosen because it can be easily
@@ -92,18 +92,20 @@ operation, and is accessible as a filesystem tree (or the disco-param command wh
bash wrapper). These parameters appear in /var/disco/parameters on the client and server, and 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. 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. The source and destination /disco/client/cmds/rsync : The rsync command to use when synching
paths will be appended directly to this string. files.
/disco/server/uri : The rsync URI from which to fetch module definitions. /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/modules : This list defines the modules to install
/disco/NODE_NAME/parameters : This tree defines all configuration parameters for the node not related to on a given node.
any module in particular. /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 Some special parameters are provided to the client, that do not exist on the paramters tree until
runtime: runtime:
/disco/NODE_NAME/current_module : This parameter defines the full name of the current module, such that /disco/NODE_NAME/current_module : This parameter defines the full
a module definition file can access its personal parameters via without knowing its name, e.g.: 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 /classes/$(disco-param get /current_module)/some/module/specific/path) $(disco-param get /classes/$(disco-param get /current_module)/some/module/specific/path)
How to deploy stuff How to deploy stuff
@@ -154,15 +156,15 @@ Module Layout
A disco module (also called a "disco ball" for fun) looks like this: A disco module (also called a "disco ball" for fun) looks like this:
MODULE MODULE
├── defs ├__ defs
│__ ├── files │__ ├── files
│__ ├── scripts │__ ├── scripts
│__ └── templates │__ └── templates
___ ___ parameters ___ ___ parameters
├── files ├── files
├── scripts ├── scripts
└── templates └── templates
Your module can theoretically pull files, scripts, and templates from any location that can be Your module can theoretically pull files, scripts, and templates from any location that can be
reached via rsync; however, it is generally considerd good form to include all things relevant reached via rsync; however, it is generally considerd good form to include all things relevant
@@ -175,7 +177,7 @@ MODULE/defs/files
Consists of a number of rsync locations to pull files from. For each line of the file, the format is: Consists of a number of rsync locations to pull files from. For each line of the file, the format is:
SOURCE_PATH[:DEST_ROOT] SOURCE_PATH[:DEST_ROOT]
... SOURCE_PATH is a rsync+ssh URI passed directly to the rsync command (as defined in parameter ... SOURCE_PATH is a rsync+ssh URI passed directly to the rsync command (as defined in parameter
disco/client/cmds/rsync). DEST_ROOT is optional; if not present, all files retrieved are rooted into /. disco/client/cmds/rsync). DEST_ROOT is optional; if not present, all files retrieved are rooted into /.
@@ -193,10 +195,10 @@ MODULE/defs/scripts
===== =====
This file simply lists the (local) location of commands to execute, for this module, once all scripts have This file simply lists the (local) location of commands to execute, for this module, once all scripts have
been fetched, and all templates have been interpolated. They are executed, in order. One script failing been fetched, and all templates have been interpolated. The scripts cannot accept arguments. They are
will not stop other scripts from failing unless told to do so in the MODULE/defs/options parameters tree executed, in order. One script failing will not stop other scripts from failing unless told to do so in the
via the "disco/client/module/halt_on_failure" option. Otherwise, errors are reported, but all scripts will /MODULE_NAME/halt_on_failure parameter. Otherwise, errors are reported, but all scripts will be executed
be executed regardless. regardless.
MODULE/defs/parameters MODULE/defs/parameters
===== =====