www.nico.schottelius.org/software/cdist/man/3.0.8/man7/cdist-quickstart.html
2014-02-11 22:47:13 +01:00

52 lines
No EOL
5.4 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.

This file contains Unicode characters that might be confused with other characters. 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-quickstart(7)</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="idm139652867855872"></a>cdist-quickstart(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 class="toc"><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_get_your_hands_dirty_now">3. QUICK START - GET YOUR HANDS DIRTY NOW</a></span></dt><dt><span class="section"><a href="#_see_also">4. SEE ALSO</a></span></dt><dt><span class="section"><a href="#_copying">5. COPYING</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_name"></a>1. NAME</h2></div></div></div><p>cdist-quickstart - jump in and enjoy cdist</p></div><div class="section"><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 replace <span class="strong"><strong>localhost</strong></span> with your target
host for real life usage.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_quick_start_get_your_hands_dirty_now"></a>3. QUICK START - GET YOUR HANDS DIRTY NOW</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>Have a look at ssh-agent(1) and ssh-add(1) on how to cache the password for
your public key. Usually it looks like this:</p><pre class="screen"># Start agent and export variables
eval `ssh-agent`
# Add keys (requires password for every identity file)
ssh-add</pre><p>At this point you should be able to <span class="strong"><strong><span class="strong"><strong>ssh root@localhost</strong></span></strong></span> without
re-entering the password. If something failed until here, ensure that
all steps went successfully and you have read and understood the
documentation.</p><p>As soon as you are able to login without password to localhost,
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
# Mirrors can be found on
# http://www.nico.schottelius.org/software/cdist/install/#index2h4
git clone git://git.schottelius.org/cdist
# Create manifest (maps configuration to host(s)
cd cdist
echo '__file /etc/cdist-configured' &gt; cdist/conf/manifest/init
# Configure localhost in verbose mode
./bin/cdist config -v localhost
# Find out that cdist created /etc/cdist-configured
ls -l /etc/cdist-configured</pre><p>Thats it, youve successfully used cdist to configure your first host!
Continue reading the next sections, to understand what you did and how
to create a more sophisticated configuration.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_see_also"></a>4. SEE ALSO</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
cdist(1)
</li><li class="listitem">
cdist-tutorial(7)
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_copying"></a>5. COPYING</h2></div></div></div><p>Copyright (C) 2011-2012 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>