www.nico.schottelius.org/software/cdist/man/man7/cdist-tutorial.html
Nico Schottelius aa31ea7d57 cdist update
2011-09-27 01:12:48 +02:00

40 lines
4.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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-tutorial(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-tutorial(7)" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id366794"></a>cdist-tutorial(7)</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Nico</span> <span class="surname">Schottelius</span></h3><code class="email">&lt;<a class="email" href="mailto:nico-cdist--@--schottelius.org">nico-cdist--@--schottelius.org</a>&gt;</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="#_introduction">2. INTRODUCTION</a></span></dt><dt><span class="section"><a href="#_quick_start">3. QUICK START</a></span></dt><dt><span class="section"><a href="#_see_also">4. SEE ALSO</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-tutorial - a guided introduction into cdist</p></div><div class="section" title="2. INTRODUCTION"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_introduction"></a>2. INTRODUCTION</h2></div></div></div><p>This tutorial is aimed at people learning cdist and shows
typical approaches as well as gives an easy start into
the world of configuration management.</p><p>This tutorial assumes you are configuring <span class="strong"><strong>localhost</strong></span>, because
it is always available. Just repace <span class="strong"><strong>localhost</strong></span> with your target
host for real life usage.</p></div><div class="section" title="3. QUICK START"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_quick_start"></a>3. QUICK START</h2></div></div></div><p>For those who just want to configure a system with the
cdist configuration management and do not need (or want)
to understand everything.</p><p>Cdist uses <span class="strong"><strong>ssh</strong></span> for communication and transportation
and usually logs into the <span class="strong"><strong>target host</strong></span> as the
<span class="strong"><strong>root</strong></span> user. So you need to configure the <span class="strong"><strong>ssh server</strong></span>
of the target host to allow root logins: Edit
the file <span class="strong"><strong>/etc/ssh/sshd_config</strong></span> and add one of the following
lines:</p><pre class="screen"># Allow login only via public key
PermitRootLogin without-password
# Allow login via password and public key
PermitRootLogin yes</pre><p>As cdist uses ssh intensively, it is recommended to setup authentication
with public keys:</p><pre class="screen"># Generate pubkey pair as a normal user
ssh-keygen
# Copy pubkey over to target host
ssh-copy-id root@localhost</pre><p>As soon as you are able to login without passwort to the target host,
we can use cdist, to configure it. You can copy and paste the following
code into your shell to get started and configure localhost:</p><pre class="screen"># Get cdist
git clone git://git.schottelius.org/cdist
# Create manifest (maps configuration to host(s)
cd cdist
echo '__file /etc/cdist-configured' &gt; conf/manifest/init
chmod 0700 conf/manifest/init
# Configure localhost
./bin/cdist config localhost
# Find out that cdist created /etc/cdist-configured
ls -l /etc/cdist-configured</pre><p>The file <span class="emphasis"><em>conf/manifest/init</em></span> is usually the entry point for cdist,
to find out what to configure on which host. All manifests are
essentially shell scripts. Every manifest can use the types known to
cdist, which are usually underline prefixed (__).</p></div><div class="section" title="4. SEE ALSO"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>4. SEE ALSO</h2></div></div></div><p>cdist(1), cdist-type(7), cdist-stages(7)</p></div></div></body></html>