Update cdist beta docs

This commit is contained in:
Darko Poljak 2021-04-20 07:50:28 +02:00
parent ca3bd79543
commit 5f5afffaac
215 changed files with 6450 additions and 4412 deletions

View file

@ -61,6 +61,14 @@ Object cache overview
~~~~~~~~~~~~~~~~~~~~~
Each object under :strong:`object` directory has its own structure.
autorequire
file containing a list of object auto requirements
children
file containing a list of object children, i.e. objects of types that this
type reuses (along with 'parents' it is used for maintaining parent-child
relationship graph)
code-local
code generated from gencode-local, present only if something is
generated
@ -80,6 +88,15 @@ parameter
directory containing type parameter named files containing parameter
values
parents
file containing a list of object parents, i.e. objects of types that reuse
this type (along with 'children' it is used for maintaining parent-child
relationship graph); objects without parents are objects specified in init
manifest
require
file containing a list of object requirements
source
this type's source (init manifest)

View file

@ -8,9 +8,6 @@ cdist-type__download - Download a file
DESCRIPTION
-----------
Destination (``$__object_id``) in target host must be persistent storage
in order to calculate checksum and decide if file must be (re-)downloaded.
By default type will try to use ``wget``, ``curl`` or ``fetch``.
If download happens in target (see ``--download``) then type will
fallback to (and install) ``wget``.
@ -25,14 +22,14 @@ REQUIRED PARAMETERS
url
File's URL.
sum
Checksum of file going to be downloaded.
By default output of ``cksum`` without filename is expected.
Other hash formats supported with prefixes: ``md5:``, ``sha1:`` and ``sha256:``.
OPTIONAL PARAMETERS
-------------------
sum
Checksum is used to decide if existing destination file must be redownloaded.
By default output of ``cksum`` without filename is expected.
Other hash formats supported with prefixes: ``md5:``, ``sha1:`` and ``sha256:``.
download
If ``local`` (default), then download file to local storage and copy
it to target host. If ``remote``, then download happens in target.
@ -81,7 +78,7 @@ Ander Punnar <ander-at-kvlt-dot-ee>
COPYING
-------
Copyright \(C) 2020 Ander Punnar. You can redistribute it
Copyright \(C) 2021 Ander Punnar. You can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

View file

@ -61,7 +61,7 @@ EXAMPLES
__pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4
# Create python virtualenv for user foo.
__pyvenv /home/foo/fooenv --group foo --user foo
__pyvenv /home/foo/fooenv --group foo --owner foo
# Create python virtualenv with specific parameters.
__pyvenv /home/services/djangoenv --venvparams "--copies --system-site-packages"

View file

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View file

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**

View file

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '6.9.5',
VERSION: '6.9.6',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

View file

@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -13,7 +13,8 @@
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
/* Non-minified version JS is _stemmer.js if file is provided */
/* Non-minified version is copied as a separate JS file, is available */
/**
* Porter Stemmer
*/
@ -199,7 +200,6 @@ var Stemmer = function() {
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,

View file

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -248,7 +248,7 @@ var Search = {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var listItem = $('<li></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
@ -273,9 +273,9 @@ var Search = {
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
setTimeout(function() {
displayNextItem();
});
}, 5);
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
@ -285,16 +285,16 @@ var Search = {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
listItem.slideDown(5, function() {
setTimeout(function() {
displayNextItem();
});
}, 5);
}});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
setTimeout(function() {
displayNextItem();
});
}, 5);
}
}
// search finished, update title and status message
@ -379,6 +379,13 @@ var Search = {
return results;
},
/**
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
*/
escapeRegExp : function(string) {
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
},
/**
* search for full-text terms in the index
*/
@ -402,13 +409,14 @@ var Search = {
];
// add support for partial matches
if (word.length > 2) {
var word_regex = this.escapeRegExp(word);
for (var w in terms) {
if (w.match(word) && !terms[word]) {
if (w.match(word_regex) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
if (w.match(word_regex) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>25. Best practice &mdash; cdist 6.9.5 documentation</title>
<title>25. Best practice &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -199,17 +199,17 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="best-practice">
<section id="best-practice">
<h1><span class="section-number">25. </span>Best practice<a class="headerlink" href="#best-practice" title="Permalink to this headline"></a></h1>
<p>Practices used in real environments</p>
<div class="section" id="passwordless-connections">
<section id="passwordless-connections">
<h2><span class="section-number">25.1. </span>Passwordless connections<a class="headerlink" href="#passwordless-connections" title="Permalink to this headline"></a></h2>
<p>It is recommended to run cdist with public key authentication.
This requires a private/public key pair and the entry
&quot;PermitRootLogin without-password&quot; in the sshd server.
See sshd_config(5) and ssh-keygen(1).</p>
</div>
<div class="section" id="speeding-up-ssh-connections">
</section>
<section id="speeding-up-ssh-connections">
<h2><span class="section-number">25.2. </span>Speeding up ssh connections<a class="headerlink" href="#speeding-up-ssh-connections" title="Permalink to this headline"></a></h2>
<p>When connecting to a new host, the initial delay with ssh connections
is pretty big. As cdist makes many connections to each host successive
@ -222,16 +222,16 @@ ControlPersist=2h</cite>).</p>
<p>Note that the sshd_config on the server can configure the maximum number of
parallel multiplexed connections this with <cite>MaxSessions N</cite> (N defaults to 10
for OpenSSH v7.4).</p>
</div>
<div class="section" id="speeding-up-shell-execution">
</section>
<section id="speeding-up-shell-execution">
<h2><span class="section-number">25.3. </span>Speeding up shell execution<a class="headerlink" href="#speeding-up-shell-execution" title="Permalink to this headline"></a></h2>
<p>On the source host, ensure that /bin/sh is <em>not</em> bash: bash is quite slow for
script execution. Instead, you could use dash after installing it:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ln</span> <span class="o">-</span><span class="n">sf</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">dash</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">sh</span>
</pre></div>
</div>
</div>
<div class="section" id="multi-master-or-environment-setups">
</section>
<section id="multi-master-or-environment-setups">
<h2><span class="section-number">25.4. </span>Multi master or environment setups<a class="headerlink" href="#multi-master-or-environment-setups" title="Permalink to this headline"></a></h2>
<p>If you plan to distribute cdist among servers or use different
environments, you can do so easily with the included version
@ -256,8 +256,8 @@ you can clone it multiple times:</p>
<span class="n">machine</span><span class="o">-</span><span class="n">b</span> <span class="o">%</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">git</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">-</span><span class="n">git</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">cdist</span>
</pre></div>
</div>
</div>
<div class="section" id="separating-work-by-groups">
</section>
<section id="separating-work-by-groups">
<h2><span class="section-number">25.5. </span>Separating work by groups<a class="headerlink" href="#separating-work-by-groups" title="Permalink to this headline"></a></h2>
<p>If you are working with different groups on one cdist-configuration,
you can delegate to other manifests and have the groups edit only
@ -269,8 +269,8 @@ their manifests. You can use the following snippet in
<span class="n">sh</span> <span class="o">-</span><span class="n">e</span> <span class="s2">&quot;$__manifest/cbrg&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="maintaining-multiple-configurations">
</section>
<section id="maintaining-multiple-configurations">
<h2><span class="section-number">25.6. </span>Maintaining multiple configurations<a class="headerlink" href="#maintaining-multiple-configurations" title="Permalink to this headline"></a></h2>
<p>When you need to manage multiple sites with cdist, like company_a, company_b
and private for instance, you can easily use git for this purpose.
@ -328,8 +328,8 @@ Including a possible common base that is reused across the different sites:</p>
</pre></div>
</div>
<p>Have a look at git-remote(1) to adjust the remote configuration, which allows</p>
</div>
<div class="section" id="multiple-developers-with-different-trust">
</section>
<section id="multiple-developers-with-different-trust">
<h2><span class="section-number">25.7. </span>Multiple developers with different trust<a class="headerlink" href="#multiple-developers-with-different-trust" title="Permalink to this headline"></a></h2>
<p>If you are working in an environment that requires different people to
work on the same configuration, but having different privileges, you can
@ -348,8 +348,8 @@ implement this scenario with a gateway host and sudo:</p>
</li>
</ul>
<p>For more details consult sudoers(5)</p>
</div>
<div class="section" id="templating">
</section>
<section id="templating">
<h2><span class="section-number">25.8. </span>Templating<a class="headerlink" href="#templating" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>create directory files/ in your type (convention)</p></li>
@ -386,8 +386,8 @@ cat <span class="s">&lt;&lt; EOF</span>
<span class="go"> --source &quot;$__object/files/basic.conf&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="testing-a-new-type">
</section>
<section id="testing-a-new-type">
<h2><span class="section-number">25.9. </span>Testing a new type<a class="headerlink" href="#testing-a-new-type" title="Permalink to this headline"></a></h2>
<p>If you want to test a new type on a node, you can tell cdist to only use an
object of this type: Use the '--initial-manifest' parameter
@ -405,8 +405,8 @@ of cdist:</p>
cdist config --initial-manifest - cdist-dev-01.ungleich.ch
</pre></div>
</div>
</div>
<div class="section" id="other-content-in-cdist-repository">
</section>
<section id="other-content-in-cdist-repository">
<h2><span class="section-number">25.10. </span>Other content in cdist repository<a class="headerlink" href="#other-content-in-cdist-repository" title="Permalink to this headline"></a></h2>
<p>Usually the cdist repository contains all configuration
items. Sometimes you may have additional resources that
@ -418,8 +418,8 @@ in the repository for such content: It allows you to
easily distinguish what is used by cdist and what is not
and also to store all important files in one
repository.</p>
</div>
<div class="section" id="notes-on-cdist-order-dependency">
</section>
<section id="notes-on-cdist-order-dependency">
<h2><span class="section-number">25.11. </span>Notes on CDIST_ORDER_DEPENDENCY<a class="headerlink" href="#notes-on-cdist-order-dependency" title="Permalink to this headline"></a></h2>
<p>With CDIST_ORDER_DEPENDENCY all types are executed in the order in which they
are created in the manifest. The current created object automatically depends
@ -427,7 +427,7 @@ on the previously created object.</p>
<p>It essentially helps you to build up blocks of code that build upon each other
(like first creating the directory xyz than the file below the directory).</p>
<p>This can be helpful, but one must be aware of its side effects.</p>
<div class="section" id="cdist-order-dependency-kills-parallelization">
<section id="cdist-order-dependency-kills-parallelization">
<h3><span class="section-number">25.11.1. </span>CDIST_ORDER_DEPENDENCY kills parallelization<a class="headerlink" href="#cdist-order-dependency-kills-parallelization" title="Permalink to this headline"></a></h3>
<p>Suppose you have defined CDIST_ORDER_DEPENDENCY and then, among other things,
you specify creation of three, by nature independent, files.</p>
@ -460,9 +460,9 @@ __file /tmp/file3
<span class="nb">unset</span> CDIST_ORDER_DEPENDENCY
</pre></div>
</div>
</div>
</div>
</div>
</section>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>12. Bootstrap &mdash; cdist 6.9.5 documentation</title>
<title>12. Bootstrap &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -189,12 +189,12 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="bootstrap">
<section id="bootstrap">
<h1><span class="section-number">12. </span>Bootstrap<a class="headerlink" href="#bootstrap" title="Permalink to this headline"></a></h1>
<p>This document describes the usual steps recommended for a new
cdist setup. It is recommended that you have read and understood
<a class="reference external" href="cdist-quickstart.html">cdist quickstart</a> before digging into this.</p>
<div class="section" id="location">
<section id="location">
<h2><span class="section-number">12.1. </span>Location<a class="headerlink" href="#location" title="Permalink to this headline"></a></h2>
<p>First of all, you should think about where to store your configuration
database and who will be accessing or changing it. Secondly you have to
@ -207,8 +207,8 @@ relies on is recommended, for use as backup as well as to allow easy collaborati
with others.</p>
<p>For more sophisticated setups developing cdist configurations with multiple
people, have a look at <a class="reference external" href="cdist-best-practice.html">cdist best practice</a>.</p>
</div>
<div class="section" id="setup-working-directory-and-branch">
</section>
<section id="setup-working-directory-and-branch">
<h2><span class="section-number">12.2. </span>Setup working directory and branch<a class="headerlink" href="#setup-working-directory-and-branch" title="Permalink to this headline"></a></h2>
<p>I assume you have a fresh copy of the cdist tree in ~/cdist, cloned from
one of the official URLs (see <a class="reference external" href="cdist-quickstart.html">cdist quickstart</a> if you don't).
@ -255,8 +255,8 @@ ethz-systems, localch, customerX, ... But this is pretty much up to you.</p>
</pre></div>
</div>
<p>From now on, you can use git as usual to commit your changes in your own branch.</p>
</div>
<div class="section" id="publishing-the-configuration">
</section>
<section id="publishing-the-configuration">
<h2><span class="section-number">12.3. </span>Publishing the configuration<a class="headerlink" href="#publishing-the-configuration" title="Permalink to this headline"></a></h2>
<p>Usually a development machine like a notebook should be considered
temporary only. For this reason and to enable shareability, the configuration
@ -283,8 +283,8 @@ reachable via ssh and has git installed:</p>
<p>Now you have setup the git repository to synchronise the <strong>mycompany</strong>
branch with the <strong>master</strong> branch on the host <strong>loch</strong>. Thus you can commit
as usual in your branch and push out changes by entering <strong>git push</strong>.</p>
</div>
<div class="section" id="updating-from-origin">
</section>
<section id="updating-from-origin">
<h2><span class="section-number">12.4. </span>Updating from origin<a class="headerlink" href="#updating-from-origin" title="Permalink to this headline"></a></h2>
<p>Whenever you want to update your cdist installation, you can use git to do so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Update git repository with latest changes from origin</span>
@ -297,8 +297,8 @@ as usual in your branch and push out changes by entering <strong>git push</stron
<span class="n">cdist</span><span class="o">%</span> <span class="n">git</span> <span class="n">merge</span> <span class="n">origin</span><span class="o">/</span><span class="mf">2.0</span>
</pre></div>
</div>
</div>
</div>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>27. Local cache overview &mdash; cdist 6.9.5 documentation</title>
<title>27. Local cache overview &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -190,9 +190,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="local-cache-overview">
<section id="local-cache-overview">
<h1><span class="section-number">27. </span>Local cache overview<a class="headerlink" href="#local-cache-overview" title="Permalink to this headline"></a></h1>
<div class="section" id="description">
<section id="description">
<h2><span class="section-number">27.1. </span>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>While executing, cdist stores data to local cache. Currently this feature is
one way only. That means that cdist does not use stored data for future runs.
@ -205,8 +205,8 @@ configuration option or by using <strong>CDIST_CACHE_PATH_PATTERN</strong>
environment variable.</p>
<p>For more info on cache path pattern see <strong>CACHE PATH PATTERN FORMAT</strong>
section in cdist man page.</p>
</div>
<div class="section" id="cache-overview">
</section>
<section id="cache-overview">
<h2><span class="section-number">27.2. </span>Cache overview<a class="headerlink" href="#cache-overview" title="Permalink to this headline"></a></h2>
<p>As noted above each configured host has got its subdirectory in local cache.
Entries in host's cache directory are as follows.</p>
@ -235,10 +235,16 @@ cdist</p>
<dt>typeorder</dt><dd><p>file containing types in order of execution.</p>
</dd>
</dl>
<div class="section" id="object-cache-overview">
<section id="object-cache-overview">
<h3><span class="section-number">27.2.1. </span>Object cache overview<a class="headerlink" href="#object-cache-overview" title="Permalink to this headline"></a></h3>
<p>Each object under <strong>object</strong> directory has its own structure.</p>
<dl class="simple">
<dt>autorequire</dt><dd><p>file containing a list of object auto requirements</p>
</dd>
<dt>children</dt><dd><p>file containing a list of object children, i.e. objects of types that this
type reuses (along with 'parents' it is used for maintaining parent-child
relationship graph)</p>
</dd>
<dt>code-local</dt><dd><p>code generated from gencode-local, present only if something is
generated</p>
</dd>
@ -253,6 +259,13 @@ after running on target host</p>
<dt>parameter</dt><dd><p>directory containing type parameter named files containing parameter
values</p>
</dd>
<dt>parents</dt><dd><p>file containing a list of object parents, i.e. objects of types that reuse
this type (along with 'children' it is used for maintaining parent-child
relationship graph); objects without parents are objects specified in init
manifest</p>
</dd>
<dt>require</dt><dd><p>file containing a list of object requirements</p>
</dd>
<dt>source</dt><dd><p>this type's source (init manifest)</p>
</dd>
<dt>state</dt><dd><p>this type execution state ('done' when finished)</p>
@ -266,9 +279,9 @@ outputs</p>
outputs.</p>
</dd>
</dl>
</div>
</div>
</div>
</section>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>13. Configuration &mdash; cdist 6.9.5 documentation</title>
<title>13. Configuration &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -187,9 +187,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="configuration">
<section id="configuration">
<h1><span class="section-number">13. </span>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h1>
<div class="section" id="description">
<section id="description">
<h2><span class="section-number">13.1. </span>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>cdist obtains configuration data from the following sources in the following
order:</p>
@ -215,8 +215,8 @@ then ~/.cdist.cfg is used.</p>
<p>For a per-project configuration, particular environment variables or better,
CDIST_CONFIG_FILE environment variable or -g CONFIG_FILE command line option,
can be used.</p>
</div>
<div class="section" id="config-file-format">
</section>
<section id="config-file-format">
<h2><span class="section-number">13.2. </span>Config file format<a class="headerlink" href="#config-file-format" title="Permalink to this headline"></a></h2>
<p>cdist configuration file is in the INI file format. Currently it supports
only [GLOBAL] section.</p>
@ -307,8 +307,8 @@ only [GLOBAL] section.</p>
<span class="c1"># verbosity = INFO</span>
</pre></div>
</div>
</div>
</div>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>17. Explorer &mdash; cdist 6.9.5 documentation</title>
<title>17. Explorer &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -187,9 +187,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="explorer">
<section id="explorer">
<h1><span class="section-number">17. </span>Explorer<a class="headerlink" href="#explorer" title="Permalink to this headline"></a></h1>
<div class="section" id="description">
<section id="description">
<h2><span class="section-number">17.1. </span>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>Explorers are small shell scripts, which will be executed on the target
host. The aim of each explorer is to give hints to types on how to act on the
@ -212,8 +212,8 @@ the type specific below the object.</p>
error message on stderr, which will cause cdist to abort.</p>
<p>You can also use stderr for debugging purposes while developing a new
explorer.</p>
</div>
<div class="section" id="examples">
</section>
<section id="examples">
<h2><span class="section-number">17.2. </span>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<p>A very simple explorer may look like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">hostname</span>
@ -231,8 +231,8 @@ explorer.</p>
dpkg -s <span class="s2">&quot;</span><span class="nv">$name</span><span class="s2">&quot;</span> <span class="m">2</span>&gt;/dev/null <span class="o">||</span> <span class="nb">exit</span> <span class="m">0</span>
</pre></div>
</div>
</div>
</div>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2. Features &mdash; cdist 6.9.5 documentation</title>
<title>2. Features &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -183,7 +183,7 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="features">
<section id="features">
<h1><span class="section-number">2. </span>Features<a class="headerlink" href="#features" title="Permalink to this headline"></a></h1>
<p>But cdist ticks differently, here is the feature set that makes it unique:</p>
<dl class="simple">
@ -221,7 +221,7 @@ Batteries included: A lot of requirements can be solved using standard types</p>
<dt>UNIX, simplicity, familiar environment</dt><dd><p>cdist is configured in POSIX shell</p>
</dd>
</dl>
</div>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>30. Hacking &mdash; cdist 6.9.5 documentation</title>
<title>30. Hacking &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -191,9 +191,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="hacking">
<section id="hacking">
<h1><span class="section-number">30. </span>Hacking<a class="headerlink" href="#hacking" title="Permalink to this headline"></a></h1>
<div class="section" id="welcome">
<section id="welcome">
<h2><span class="section-number">30.1. </span>Welcome<a class="headerlink" href="#welcome" title="Permalink to this headline"></a></h2>
<p>Welcome dear hacker! I invite you to a tour of pointers to
get into the usable configuration management system, cdist.</p>
@ -201,20 +201,20 @@ get into the usable configuration management system, cdist.</p>
you by people who care about how code looks like and who think
twice before merging or implementing a feature: Less features
with good usability are far better than the opposite.</p>
</div>
<div class="section" id="reporting-bugs">
</section>
<section id="reporting-bugs">
<h2><span class="section-number">30.2. </span>Reporting bugs<a class="headerlink" href="#reporting-bugs" title="Permalink to this headline"></a></h2>
<p>If you believe you've found a bug and verified that it is
in the latest version, drop a mail to the cdist mailing list,
subject prefixed with &quot;[BUG] &quot; or create an issue on code.ungleich.ch.</p>
</div>
<div class="section" id="coding-conventions-everywhere">
</section>
<section id="coding-conventions-everywhere">
<h2><span class="section-number">30.3. </span>Coding conventions (everywhere)<a class="headerlink" href="#coding-conventions-everywhere" title="Permalink to this headline"></a></h2>
<p>If something should be improved or needs to be fixed, add the word FIXME
nearby, so grepping for FIXME gives all positions that need to be fixed.</p>
<p>Indentation is 4 spaces (welcome to the python world).</p>
</div>
<div class="section" id="how-to-submit-stuff-for-inclusion-into-upstream-cdist">
</section>
<section id="how-to-submit-stuff-for-inclusion-into-upstream-cdist">
<h2><span class="section-number">30.4. </span>How to submit stuff for inclusion into upstream cdist<a class="headerlink" href="#how-to-submit-stuff-for-inclusion-into-upstream-cdist" title="Permalink to this headline"></a></h2>
<p>If you did some cool changes to cdist, which you think might be of benefit to other
cdist users, you're welcome to propose inclusion into upstream.</p>
@ -241,8 +241,8 @@ the other needs to be improved.</p></li>
<p>As soon as your work meets these requirements, write a mail
for inclusion to the mailinglist <strong>cdist-configuration-management at googlegroups.com</strong>
or open a merge request at <a class="reference external" href="https://code.ungleich.ch/ungleich-public/cdist">https://code.ungleich.ch/ungleich-public/cdist</a>.</p>
</div>
<div class="section" id="how-to-submit-a-new-type">
</section>
<section id="how-to-submit-a-new-type">
<h2><span class="section-number">30.5. </span>How to submit a new type<a class="headerlink" href="#how-to-submit-a-new-type" title="Permalink to this headline"></a></h2>
<p>For detailed information about types, see <a class="reference external" href="cdist-type.html">cdist type</a>.</p>
<p>Submitting a type works as described above, with the additional requirement
@ -253,8 +253,8 @@ AND the manpage builds (<cite>make man</cite>).</p>
<strong>gencode</strong> will not be accepted, because they are of no use. Every type can output
code and thus such a type introduces redundant functionality that is given by
core cdist already.</p>
</div>
<div class="section" id="example-git-workflow">
</section>
<section id="example-git-workflow">
<h2><span class="section-number">30.6. </span>Example git workflow<a class="headerlink" href="#example-git-workflow" title="Permalink to this headline"></a></h2>
<p>The following workflow works fine for most developers</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># get latest upstream master branch</span>
@ -326,8 +326,8 @@ git merge origin/master</p>
</div></blockquote>
<p>(you can repeat the code above for as many features as you want to develop
in parallel)</p>
</div>
</div>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>4. How to install cdist &mdash; cdist 6.9.5 documentation</title>
<title>4. How to install cdist &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -200,11 +200,11 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="how-to-install-cdist">
<section id="how-to-install-cdist">
<h1><span class="section-number">4. </span>How to install cdist<a class="headerlink" href="#how-to-install-cdist" title="Permalink to this headline"></a></h1>
<div class="section" id="requirements">
<section id="requirements">
<h2><span class="section-number">4.1. </span>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<div class="section" id="source-host">
<section id="source-host">
<h3><span class="section-number">4.1.1. </span>Source Host<a class="headerlink" href="#source-host" title="Permalink to this headline"></a></h3>
<p>This is the machine from which you will configure target hosts.</p>
<blockquote>
@ -215,8 +215,8 @@
<li><p>sphinx (for building html docs and/or the man pages)</p></li>
</ul>
</div></blockquote>
</div>
<div class="section" id="target-hosts">
</section>
<section id="target-hosts">
<h3><span class="section-number">4.1.2. </span>Target Hosts<a class="headerlink" href="#target-hosts" title="Permalink to this headline"></a></h3>
<blockquote>
<div><ul class="simple">
@ -224,11 +224,11 @@
<li><p>SSH server</p></li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="install-cdist">
</section>
</section>
<section id="install-cdist">
<h2><span class="section-number">4.2. </span>Install cdist<a class="headerlink" href="#install-cdist" title="Permalink to this headline"></a></h2>
<div class="section" id="from-git">
<section id="from-git">
<h3><span class="section-number">4.2.1. </span>From git<a class="headerlink" href="#from-git" title="Permalink to this headline"></a></h3>
<p>Cloning cdist from git gives you the advantage of having
a version control in place for development of your own stuff
@ -262,7 +262,7 @@ Or directly with distutils:</p>
</pre></div>
</div>
<p>Note that <cite>bin/cdist-build-helper</cite> script is intended for cdist maintainers.</p>
<div class="section" id="available-versions-in-git">
<section id="available-versions-in-git">
<h4><span class="section-number">4.2.1.1. </span>Available versions in git<a class="headerlink" href="#available-versions-in-git" title="Permalink to this headline"></a></h4>
<blockquote>
<div><ul class="simple">
@ -280,8 +280,8 @@ git checkout -b &lt;localbranchname&gt; origin/&lt;branchname&gt;
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git checkout -b <span class="m">4</span>.1 origin/4.1
</pre></div>
</div>
</div>
<div class="section" id="building-and-using-documentation-man-and-html">
</section>
<section id="building-and-using-documentation-man-and-html">
<h4><span class="section-number">4.2.1.2. </span>Building and using documentation (man and html)<a class="headerlink" href="#building-and-using-documentation-man-and-html" title="Permalink to this headline"></a></h4>
<p>If you want to build and use the documentation, run:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>make docs
@ -318,17 +318,17 @@ some other custom .cdist directory, e.g. /opt/cdist then use:</p>
</div>
<p>Note that <cite>dotman</cite>-target has to be built before a <cite>make docs</cite>-run, otherwise
the custom man-pages are not picked up.</p>
</div>
</div>
<div class="section" id="python-package">
</section>
</section>
<section id="python-package">
<h3><span class="section-number">4.2.2. </span>Python package<a class="headerlink" href="#python-package" title="Permalink to this headline"></a></h3>
<p>Cdist is available as a python package at
<a class="reference external" href="http://pypi.python.org/pypi/cdist/">PyPi</a>. You can install it using</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pip install cdist
</pre></div>
</div>
</div>
<div class="section" id="installing-from-source-with-signature-verification">
</section>
<section id="installing-from-source-with-signature-verification">
<h3><span class="section-number">4.2.3. </span>Installing from source with signature verification<a class="headerlink" href="#installing-from-source-with-signature-verification" title="Permalink to this headline"></a></h3>
<p>If you want to install cdist from signed source and verify it, first you need to
download cdist archive and its detached signature.</p>
@ -345,9 +345,9 @@ gpg: Good signature from <span class="s2">&quot;ungleich GmbH (ungleich FOSS) &l
</pre></div>
</div>
<p>Further steps are the same as for <a class="reference external" href="cdist-install.html#from-git">installing from git</a>.</p>
</div>
</div>
</div>
</section>
</section>
</section>
</div>

View file

@ -5,10 +5,11 @@
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>23. cdist integration / using cdist as library &mdash; cdist 6.9.5 documentation</title>
<title>23. cdist integration / using cdist as library &mdash; cdist 6.9.6 documentation</title>
@ -24,7 +25,6 @@
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -63,7 +63,7 @@
<div class="version">
6.9.5
6.9.6
</div>
@ -187,9 +187,9 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="cdist-integration-using-cdist-as-library">
<section id="cdist-integration-using-cdist-as-library">
<h1><span class="section-number">23. </span>cdist integration / using cdist as library<a class="headerlink" href="#cdist-integration-using-cdist-as-library" title="Permalink to this headline"></a></h1>
<div class="section" id="description">
<section id="description">
<h2><span class="section-number">23.1. </span>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>cdist can be integrate with other applications by importing cdist and other
cdist modules and setting all by hand. There are also helper functions which
@ -208,8 +208,8 @@ path to cdist executable, if it is <cite>None</cite> then functions will try to
find it first from local lib directory and then in PATH.</p>
<p>In case of cdist error <strong>cdist.Error</strong> exception is raised.</p>
<p><strong>WARNING</strong>: cdist integration helper functions are not yet stable!</p>
</div>
<div class="section" id="examples">