cdist configuration management Latest manual: Home page:
Go to file
Nico Schottelius 1a0ef5ac63 update changelog
Signed-off-by: Nico Schottelius <>
2011-04-01 09:56:44 +02:00
bin fix cdist-object-all: ensure output directory exists 2011-03-31 22:25:56 +02:00
conf __directory type does not have a destination parameter 2011-03-29 20:10:40 +02:00
doc update changelog 2011-04-01 09:56:44 +02:00
.gitignore integrate cdist-cache 2011-03-25 23:35:11 +01:00 remove leftovers from experimenting with process group control 2011-03-31 20:46:58 +02:00
HACKERS_README shrink hackers_readme in favor for the manpage 2011-03-24 15:39:26 +01:00
README update web/readme 2011-03-29 16:49:49 +02:00

[[!meta title="cdist - usable configuration management"]]

                 ..          .       .x+=:.        s   
               dF           @88>    z`    ^%      :8  
              '88bu.        %8P        .   <k    .88 
          .   '*88888bu      .       .@8Ned8"   :888ooo
     .udR88N    ^"*8888N   .@88u   .@^%8888"  -*8888888
    <888'888k  beWE "888L ''888E` x88:  `)8b.   8888
    9888 'Y"   888E  888E   888E  8888N=*8888   8888
    9888       888E  888E   888E   %8"    R88   8888
    9888       888E  888F   888E    @8Wou 9%   .8888Lu=
    ?8888u../ .888N..888    888&  .888888P`    ^%888*
     "8888P'   `"888*""     R888" `   ^"F        'Y" 
       "P'        ""         ""  

[[!toc  levels=2]]

## Introduction

cdist configures your system and is similar to
other configuration management systems like
and [puppet](, but
it ticks differently:

 * cdist sticks completly to the KISS (keep it simple and stupid) paradigma
  * cdist's core is very small (< 1k lines of code)
  * There is only one type to extend cdist called ***type***.
  * One main development target: ***It must be incredible easy to add new types.***
 * cdist is UNIX
  * It reuses existing tools like cat, find, mv, ...
  * cdist's documentation is bundled as manpages
 * cdist is written in POSIX shell
  * No special requirements like high level interpreters needed on server or target

### Documentation

The cdist documentation is included as manpages in the distribution.
You can [browse the documentation for the latest version online](man) as well.

### Architecture

 * Push mode (server pushes configuration)
 * User defines configuration in shell scripts (called ***manifests***)
 * Generates internal configuration (cconfig style)
 * Uses ***types*** to generate code be executed on the target
 * And finally executes the code on the target / applies the configuration

### Features

 * Elegant code and clean design
  * Type and core cleanly seperated
  * Small codebase in core
 * Good documentation (man pages)
 * Consistency in behaviour, naming and documentation
 * Meaningful error messages
  * Either standard error messages from tools or added description for clearification
 * The no surprise factor
  * No magic guessing of what the user wants
 * Simple and well-known DSL
  * Posix shell
 * Easy integration into bare metal installations
  * requires only ssh + sh
 * Easy upgrade
  * ***There is no need to update cdist on target hosts!***
  * cdist only needs to be updated on the master server(s)
 * Very easy to extend
  * Can be done via types, which can be stacked on top of others
 * Reuse of existing functionality
  * sh, ssh, find, rm, mv, ...
 * Very easy to debug
  * Just add set -x in the scripts

### OS support

cdist was tested or is know to run on at least

 * [Archlinux](
 * [Debian](
 * [Gentoo](
 * [Mac OS X](
 * [OpenBSD](
 * [Redhat](
 * [Ubuntu](

## Requirements

### Server

 * A posix like shell
 * SSH-Client

### Client ("target host")

 * A posix like shell
 * SSH-Server

## Getting cdist

You can clone cdist from git, which gives you the advantage of having
a version control in place for development of your own stuff as well.

### Installation

To install cdist, execute the following commands:

    git clone git://
    cd cdist
    export PATH=$PATH:$(pwd -P)/bin

    # If you want the manpages (requires gmake and asciidoc to be installed)
    ./ man
    export MANPATH=$MANPATH:$(pwd -P)/doc/man

Afterwards you can run ***cdist-quickstart*** to get an impression on
how to use cdist.

### Available versions

There are at least the following branches available:

 * master: the development branch
 * 1.5: Focus on object orientation instead of global stage orientation

Old versions:

 * 1.4: Support for redefiniton of objects (if equal)
 * 1.3: Support for local and remote code execution (current stable)
 * 1.2: Dependencies supported
 * 1.1: __file to __file, __directory, __link migration
 * 1.0: First official release

Other branches may be available for features or bugfixes, but they
may vanish at any point. To select a specific branch use

    # Generic code
    git checkout -b <name> origin/<name>
    # Stay on a specific version
    git checkout -b $version origin/$version

### Mirrors

 * git:// ([github](
 * git:// ([sans](;a=summary))

## Update

To upgrade cdist in the current branch use

    git pull

    # Also update the manpages
    ./ man
    export MANPATH=$MANPATH:$(pwd -P)/doc/man

If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break.
The master branch on the other hand is the development branch and may not be
working, break your setup or eat the tree in your garden.

### Upgrading from 1.3 to 1.4

No incompatiblities.

### Upgrading from 1.2 to 1.3

Rename **gencode** of every type to **gencode-remote**.

### Upgrading from 1.1 to 1.2

No incompatiblities.

### Upgrading from 1.0 to 1.1

In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and
**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you
need to replace **\_\_file** calls in your manifests:

 * Remove --type from all \_\_file calls
 * If type was symlink, use \_\_link and --type symbolic
 * If type was directory, use \_\_directory

## Support

### IRC

You can join the development ***IRC channel***
[#cLinux on](irc://

### Mailing list

Bug reports, questions, patches, etc. should be send to the
[cdist mailing list](

## Commercial support

You can request commercial support for cdist from
[my company](

## Used by

If you're using cdist, feel free to send a report to the mailing list.
Interesting information are for instance

 * Which services do you manage?
 * How many machines do you manage?
 * What are the pros/cons you see in cdist?
 * General comments/critics

### Nico Schottelius, Systems Group ETH Zurich and privately

Yes, I'm actually eating my own dogfood and currently managing

 * [plone]( (cms)
 * [moinmoin]( (wiki)
 * [apache]( (webserver)
 * [kerberos (mit)]( (authentication)
 * [ircd-hybrid]( (chat)
 * [stunnel]( (SSL tunnel)
 * [mercurial-server]( (version control)
 * [xfce]( (lightweight desktop environment)
 * [slim]( (graphical login manager for X11)

with cdist on a total of **9** production machines of the
[Systems Group]( at the
[ETH Zurich]( as well at home.

### Steven Armstrong, CBRG ETH Zurich

The CBRG is managing most of their compute clusters with cdist.