2011-02-18 07:49:28 +00:00
|
|
|
[[!meta title="cdist - configuration management"]]
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
[[!toc levels=2]]
|
|
|
|
|
2011-02-18 07:41:24 +00:00
|
|
|
## Introduction
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-02-18 07:41:24 +00:00
|
|
|
cdist configures your system and is similar to
|
|
|
|
other configuration management systems like
|
|
|
|
[cfengine](http://www.cfengine.org/),
|
|
|
|
[bcfg2](http://trac.mcs.anl.gov/projects/bcfg2),
|
|
|
|
[chef](http://wiki.opscode.com/display/chef/)
|
|
|
|
and [puppet](http://www.puppetlabs.com/), but
|
|
|
|
it ticks differently:
|
|
|
|
|
|
|
|
* cdist sticks completly to the KISS (keep it simple and stupid) paradigma
|
2011-03-04 09:58:26 +00:00
|
|
|
* cdist's core is very small (< 1k lines of code)
|
2011-02-18 07:41:24 +00:00
|
|
|
* There is only one type to extend cdist called ***type***.
|
2011-03-04 09:58:26 +00:00
|
|
|
* One main development target: ***It must be incredible easy to add new types.***
|
2011-02-18 07:41:24 +00:00
|
|
|
* 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
|
2010-12-01 19:06:07 +00:00
|
|
|
|
|
|
|
### Architecture
|
|
|
|
|
2011-02-18 07:41:24 +00:00
|
|
|
* Push mode (server pushes configuration)
|
2011-03-04 09:58:26 +00:00
|
|
|
* Pull mode planned (client triggers configuration)
|
2011-02-18 07:41:24 +00:00
|
|
|
* User defines configuration in shell scripts (called ***manifests***)
|
2011-03-07 13:13:29 +00:00
|
|
|
* 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
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-02-26 10:04:23 +00:00
|
|
|
### Features
|
|
|
|
|
|
|
|
Stuff that should probably be included in every configuration management,
|
|
|
|
but is not. Or: The reason why I began to write cdist.
|
|
|
|
|
|
|
|
* Speed
|
|
|
|
* Elegant code
|
|
|
|
* Clean design
|
|
|
|
* Good documentation (man pages)
|
|
|
|
* Meaningful error messages
|
|
|
|
* No surprise factor
|
|
|
|
* Consistency in behaviour, naming and documentation
|
|
|
|
* Easy integration nacked installations
|
2011-02-26 10:08:07 +00:00
|
|
|
* Simple and well-known DSL: posix shell
|
2011-02-26 10:21:49 +00:00
|
|
|
* It is very easy to
|
|
|
|
* extend cdist
|
|
|
|
* debug cdist-core and cdist-types
|
2011-02-26 10:27:53 +00:00
|
|
|
* Focus on reuse of existing functionality
|
|
|
|
* ssh
|
|
|
|
* sh
|
|
|
|
* find, rm, ...
|
2011-02-26 10:04:23 +00:00
|
|
|
|
2010-12-01 19:06:07 +00:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
### Server
|
|
|
|
|
|
|
|
* A posix like shell
|
2011-03-04 09:58:26 +00:00
|
|
|
* SSH-Client
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
### Client ("target host")
|
2010-12-01 19:06:07 +00:00
|
|
|
|
|
|
|
* A posix like shell
|
2011-03-04 09:58:26 +00:00
|
|
|
* SSH-Server
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-02-26 10:27:53 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
## Getting cdist
|
2011-02-26 10:27:53 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
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.
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
### Installation
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
To install cdist, execute the following commands:
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
git clone git://git.schottelius.org/cdist
|
|
|
|
cd cdist
|
|
|
|
export PATH=$PATH:$(pwd -P)/bin
|
2010-12-01 19:06:07 +00:00
|
|
|
|
2011-03-08 20:51:58 +00:00
|
|
|
# If you want the manpages
|
|
|
|
make man
|
|
|
|
export MANPATH=$MANPATH:$(pwd -P)/doc/man
|
|
|
|
|
2011-02-04 22:15:10 +00:00
|
|
|
|
2011-03-04 10:05:45 +00:00
|
|
|
Afterwards you can run ***cdist-quickstart*** to get an impression on
|
|
|
|
how to use cdist.
|
|
|
|
|
2011-03-04 14:02:56 +00:00
|
|
|
### Available versions
|
|
|
|
|
|
|
|
There are at least two branches available:
|
|
|
|
|
|
|
|
* master: the development branch
|
|
|
|
* 1.0: stable branch of version 1.0
|
|
|
|
|
|
|
|
Other branches may be available as well 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 version 1.0
|
|
|
|
git checkout -b 1.0 origin/1.0
|
2011-03-04 10:05:45 +00:00
|
|
|
|
2011-03-04 09:58:26 +00:00
|
|
|
### Update
|
|
|
|
|
2011-03-04 14:02:56 +00:00
|
|
|
To upgrade cdist in the current branch use
|
2011-03-04 09:58:26 +00:00
|
|
|
|
|
|
|
git pull
|
|
|
|
|
2011-03-08 20:51:58 +00:00
|
|
|
# Also update the manpages
|
|
|
|
make man
|
|
|
|
export MANPATH=$MANPATH:$(pwd -P)/doc/man
|
|
|
|
|
|
|
|
|
2011-03-04 14:02:56 +00:00
|
|
|
The version branches are designed to change if there are incompatibilities.
|
|
|
|
Or the other way round: As long as you stay on 1.0 and do git pull, nothing
|
|
|
|
should break.
|
|
|
|
|
2011-02-04 22:15:10 +00:00
|
|
|
## Support
|
|
|
|
|
|
|
|
### IRC
|
|
|
|
|
|
|
|
You can join the development ***IRC channel***
|
|
|
|
[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux).
|
|
|
|
|
|
|
|
### Mailing list
|
2011-02-04 22:22:01 +00:00
|
|
|
|
2011-02-04 22:15:10 +00:00
|
|
|
Bug reports, questions, patches, etc. should be send to the
|
|
|
|
[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist).
|