2011-02-07 22:07:43 +00:00
|
|
|
cdist-stages(7)
|
2011-02-07 21:46:47 +00:00
|
|
|
===============
|
|
|
|
Nico Schottelius <nico-cdist--@--schottelius.org>
|
|
|
|
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2011-02-19 11:48:26 +00:00
|
|
|
cdist-stages - Stages used during configuration deployment
|
2011-02-07 21:46:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2011-02-19 11:48:26 +00:00
|
|
|
Starting the execution of deployment with cdist-deploy-to(1), cdist passes
|
|
|
|
through different stages, each can be triggered and debugged on its own.
|
|
|
|
Reading the source of the cdist-deploy-to executable shous the scripts
|
|
|
|
responsible for each stage.
|
|
|
|
|
2011-02-19 00:53:06 +00:00
|
|
|
|
|
|
|
STAGE 1: TARGET INFORMATION RETRIEVAL
|
|
|
|
--------------------------------------
|
2011-02-19 11:48:26 +00:00
|
|
|
In this stage information is collected about target using so called explorers.
|
|
|
|
Every existing explorer is run on the target and the output of all explorers
|
|
|
|
are copied back into the local cache. The results can be used by manifests and
|
|
|
|
types.
|
2011-02-19 01:00:32 +00:00
|
|
|
|
|
|
|
Related manpages are cdist-explorers(7) and cdist-cache(7).
|
|
|
|
|
|
|
|
|
|
|
|
STAGE 2: RUN THE INITIAL MANIFEST
|
|
|
|
---------------------------------
|
2011-02-19 11:48:26 +00:00
|
|
|
The initial manifest, which should be used for mappings of hosts to types,
|
|
|
|
is executed. This stage creates objects in a cconfig database that contains
|
|
|
|
the objects as defined in the manifest for the specific host. In this stage,
|
|
|
|
no conflicts may occur, i.e. no object of the same type with the same id may
|
|
|
|
be created.
|
2011-02-19 01:00:32 +00:00
|
|
|
|
|
|
|
Related manpages are cdist-manifest-init(1), cdist-manifests(7) and
|
|
|
|
cdist-config-layout(7).
|
|
|
|
|
2011-02-19 11:48:26 +00:00
|
|
|
|
2011-02-19 01:00:32 +00:00
|
|
|
STAGE 3: EXECUTION OF TYPES
|
|
|
|
---------------------------
|
2011-02-19 11:48:26 +00:00
|
|
|
Every object is checked whether its type has a manifest file. If the type has
|
|
|
|
a manifest file and it is executable, it will be executed. The manifest script
|
|
|
|
may generate and change the created objects. In other words, one type can reuse
|
|
|
|
other types.
|
|
|
|
|
|
|
|
For instance the object __apache/www.test.ch is of type __apache, which may
|
|
|
|
contain an manifest script, which creates new objects of type __file.
|
2011-02-07 22:07:43 +00:00
|
|
|
|
2011-02-19 11:48:26 +00:00
|
|
|
The newly created objects are merged back into the existing tree. No conflicts
|
|
|
|
may occur during the merge. A conflict would mean that two different objects
|
|
|
|
try to create the same object, which indicates a broken configuration.
|
|
|
|
|
|
|
|
Related manpage are cdist-types(7) and cdist-manifest-run-all(1).
|
2011-02-07 22:07:43 +00:00
|
|
|
|
|
|
|
|
2011-02-19 01:00:32 +00:00
|
|
|
STAGE 4: CODE GENERATION
|
|
|
|
------------------------
|
2011-02-19 11:48:26 +00:00
|
|
|
In this stage for every created objects its type is checked whether it has a
|
|
|
|
gencode script. If the type has a gencode script and it is executable it will
|
|
|
|
be executed. This executable should create code to be executed on the target
|
|
|
|
on stdout. If the gencode executable fails, it must print diagnostic messages
|
|
|
|
on stderr and exit non-zero.
|
2011-02-07 22:07:43 +00:00
|
|
|
|
2011-02-19 11:48:26 +00:00
|
|
|
Related manpages are cdist-types-gencode(7), cdist-gencode(1) and
|
|
|
|
cdist-gencode-all(1).
|
2011-02-07 22:07:43 +00:00
|
|
|
|
|
|
|
|
2011-02-19 01:00:32 +00:00
|
|
|
STAGE 5: CODE EXECUTION
|
|
|
|
-----------------------
|
2011-02-19 11:48:26 +00:00
|
|
|
The resulting code from the previous stage is transferred to the target host
|
|
|
|
and executed there to apply the configuration changes,
|
|
|
|
|
|
|
|
Related manpages are cdist-exec-transfer(1) and cdist-exec-run(1).
|
2011-02-19 01:02:21 +00:00
|
|
|
|
2011-02-19 11:48:26 +00:00
|
|
|
|
|
|
|
SUMMARY
|
|
|
|
-------
|
|
|
|
If, and only if, all the stages complete without an errors, the configuration
|
|
|
|
will be applied to the target. Each stage can also be run individually, though
|
|
|
|
dependencies for each stage must be fulfilled and thus the stages must be run
|
|
|
|
in correct order.
|
2011-02-07 22:07:43 +00:00
|
|
|
|
2011-02-07 21:46:47 +00:00
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2011-02-07 22:07:43 +00:00
|
|
|
cdist(7), cdist-deploy-to(1), cdist-config-layout(7), cdist-manifest-init(1)
|
2011-02-07 21:46:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
|
|
|
Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is
|
|
|
|
granted under the terms of the GNU General Public License version 3 (GPLv3).
|