49 lines
7.5 KiB
HTML
49 lines
7.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>cdist-stages(7)</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /></head><body><div xml:lang="en" class="article" title="cdist-stages(7)" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id525164"></a>cdist-stages(7)</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Nico</span> <span class="surname">Schottelius</span></h3><code class="email"><<a class="email" href="mailto:nico-cdist--@--schottelius.org">nico-cdist--@--schottelius.org</a>></code></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="#_name">1. NAME</a></span></dt><dt><span class="section"><a href="#_description">2. DESCRIPTION</a></span></dt><dt><span class="section"><a href="#_stage_0_internal_preperation">3. STAGE 0: INTERNAL PREPERATION</a></span></dt><dt><span class="section"><a href="#_stage_1_target_information_retrieval">4. STAGE 1: TARGET INFORMATION RETRIEVAL</a></span></dt><dt><span class="section"><a href="#_stage_2_run_the_initial_manifest">5. STAGE 2: RUN THE INITIAL MANIFEST</a></span></dt><dt><span class="section"><a href="#_stage_3_execution_of_types">6. STAGE 3: EXECUTION OF TYPES</a></span></dt><dt><span class="section"><a href="#_stage_4_code_generation">7. STAGE 4: CODE GENERATION</a></span></dt><dt><span class="section"><a href="#_stage_5_code_execution">8. STAGE 5: CODE EXECUTION</a></span></dt><dt><span class="section"><a href="#_summary">9. SUMMARY</a></span></dt><dt><span class="section"><a href="#_see_also">10. SEE ALSO</a></span></dt><dt><span class="section"><a href="#_copying">11. COPYING</a></span></dt></dl></div><div class="section" title="1. NAME"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cdist-stages - Stages used during configuration deployment</p></div><div class="section" title="2. DESCRIPTION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_description"></a>2. DESCRIPTION</h2></div></div></div><p>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.</p></div><div class="section" title="3. STAGE 0: INTERNAL PREPERATION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_0_internal_preperation"></a>3. STAGE 0: INTERNAL PREPERATION</h2></div></div></div><p>Before running the user facing stages, cdist prepares the target host
|
||
to contain cdist binaries and creates a clean environment for the
|
||
configuration run.</p><p>Related manpages:
|
||
- cdist-bin-transfer(1)</p></div><div class="section" title="4. STAGE 1: TARGET INFORMATION RETRIEVAL"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_1_target_information_retrieval"></a>4. STAGE 1: TARGET INFORMATION RETRIEVAL</h2></div></div></div><p>In this stage information is collected about the target host 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.</p><p>Related manpages:
|
||
- cdist-explorer(7)</p></div><div class="section" title="5. STAGE 2: RUN THE INITIAL MANIFEST"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_2_run_the_initial_manifest"></a>5. STAGE 2: RUN THE INITIAL MANIFEST</h2></div></div></div><p>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.</p><p>Related manpages:
|
||
- cdist-manifest(7)
|
||
- cdist-manifest-run(1)
|
||
- cdist-manifest-run-init(1)</p></div><div class="section" title="6. STAGE 3: EXECUTION OF TYPES"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_3_execution_of_types"></a>6. STAGE 3: EXECUTION OF TYPES</h2></div></div></div><p>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.</p><p>For instance the object <span class="emphasis"><em>apache/www.test.ch is of type </em></span>apache, which may
|
||
contain a manifest script, which creates new objects of type __file.</p><p>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.</p><p>Related manpages:
|
||
- cdist-manifest-run(1)
|
||
- cdist-manifest-run-all(1)
|
||
- cdist-type(7)</p></div><div class="section" title="7. STAGE 4: CODE GENERATION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_4_code_generation"></a>7. STAGE 4: CODE GENERATION</h2></div></div></div><p>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.</p><p>Related manpages:
|
||
- cdist-gencode(1)
|
||
- cdist-gencode-all(1)
|
||
- cdist-type(7)</p></div><div class="section" title="8. STAGE 5: CODE EXECUTION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_stage_5_code_execution"></a>8. STAGE 5: CODE EXECUTION</h2></div></div></div><p>The resulting code from the previous stage is transferred to the target host
|
||
and executed there to apply the configuration changes,</p><p>Related manpages:
|
||
- cdist-exec-run(1)
|
||
- cdist-exec-transfer(1)</p></div><div class="section" title="9. SUMMARY"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_summary"></a>9. SUMMARY</h2></div></div></div><p>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.</p></div><div class="section" title="10. SEE ALSO"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>10. SEE ALSO</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
|
||
cdist(7)
|
||
</li><li class="listitem">
|
||
cdist-deploy-to(1)
|
||
</li><li class="listitem">
|
||
cdist-reference(7)
|
||
</li></ul></div></div><div class="section" title="11. COPYING"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_copying"></a>11. COPYING</h2></div></div></div><p>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).</p></div></div></body></html>
|