www.nico.schottelius.org/software/cdist.mdwn

221 lines
6.9 KiB
Text
Raw Normal View History

2011-03-19 02:10:18 +00:00
[[!meta title="cdist - usable configuration management"]]
2011-03-12 18:06:30 +00:00
2011-03-12 18:00:40 +00:00
.. . .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' "" ""
2011-03-12 18:06:30 +00:00
2011-03-12 18:00:40 +00:00
2011-03-04 08:45:43 +00:00
[[!toc levels=2]]
2011-02-18 07:42:04 +00:00
## Introduction
2011-02-18 07:42:04 +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/)
2011-04-01 23:49:58 +00:00
and [puppet](http://www.puppetlabs.com/), but it ticks differently.
Here are some features that makes it unique:
[[!table data="""
2011-04-01 23:52:47 +00:00
Keywords | Description
2011-04-01 23:49:58 +00:00
Simplicity | There is only one type to extend cdist called ***type***
Design | Type and core cleanly seperated
Design | cdist sticks completly to the KISS (keep it simple and stupid) paradigma
Design | Meaningful error messages - do not lose time debugging error messages
Design | Consistency in behaviour, naming and documentation
Design | No surprise factor: Only do what is obviously clear, no magic
Design | Define target state, do not focus on methods or scripts
Small core | cdist's core is very small - less code, less bugs
Fast development | Focus on straightforwardness of type creation is a main development objective
Requirements, Scalability | No central server needed, cdist operates in push mode and can be run from any computer
Requirements, Scalability, Upgrade | cdist only needs to be updated on the master, not on the target hosts
Requirements | cdist requires only SSH and a shell on the target
Requirements |
UNIX | Reuse of existing tools like cat, find, mv, ...
UNIX, familar environment, documentation | Is available as manpages and HTML
UNIX, simplicity, familar environment | cdist is written in POSIX shell
UNIX, simplicity, familar environment | cdist is configured in POSIX shell
"""]]
2011-03-21 12:56:48 +00:00
### Documentation
The cdist documentation is included as manpages in the distribution.
2011-03-21 14:17:07 +00:00
You can [browse the documentation for the latest version online](man) as well.
2011-03-21 12:56:48 +00:00
2011-03-16 10:11:13 +00:00
### OS support
cdist was tested or is know to run on at least
* [Archlinux](http://www.archlinux.org/)
* [Debian](http://www.debian.org/)
2011-04-02 00:25:16 +00:00
* [Fedora](http://fedoraproject.org/)
2011-03-16 10:11:13 +00:00
* [Gentoo](http://www.gentoo.org/)
* [Mac OS X](http://www.apple.com/macosx/)
2011-03-25 21:31:16 +00:00
* [OpenBSD](http://www.openbsd.org)
2011-03-16 10:21:44 +00:00
* [Redhat](http://www.redhat.com/)
2011-03-16 10:11:13 +00:00
* [Ubuntu](http://www.ubuntu.com/)
2011-03-04 08:32:01 +00:00
## Requirements
### Server
* A posix like shell
2011-03-04 08:32:01 +00:00
* SSH-Client
2011-03-04 08:32:01 +00:00
### Client ("target host")
* A posix like shell
2011-03-04 08:32:01 +00:00
* 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
2011-03-04 08:32:01 +00:00
To install cdist, execute the following commands:
git clone git://git.schottelius.org/cdist
2011-03-04 08:32:01 +00:00
cd cdist
export PATH=$PATH:$(pwd -P)/bin
2011-03-24 22:40:37 +00:00
# If you want the manpages (requires gmake and asciidoc to be installed)
2011-03-25 21:31:16 +00:00
./build.sh man
2011-03-10 17:19:08 +00:00
export MANPATH=$MANPATH:$(pwd -P)/doc/man
2011-03-04 10:04:48 +00:00
Afterwards you can run ***cdist-quickstart*** to get an impression on
how to use cdist.
2011-03-04 14:03:06 +00:00
### Available versions
2011-03-16 09:45:23 +00:00
There are at least the following branches available:
2011-03-04 14:03:06 +00:00
* master: the development branch
2011-03-29 14:56:24 +00:00
* 1.5: Focus on object orientation instead of global stage orientation
2011-03-19 02:10:18 +00:00
Old versions:
2011-03-29 14:56:24 +00:00
* 1.4: Support for redefiniton of objects (if equal)
2011-03-24 12:34:34 +00:00
* 1.3: Support for local and remote code execution (current stable)
2011-03-19 23:10:06 +00:00
* 1.2: Dependencies supported
2011-03-24 12:34:34 +00:00
* 1.1: __file to __file, __directory, __link migration
* 1.0: First official release
2011-03-04 14:03:06 +00:00
2011-03-16 09:45:23 +00:00
Other branches may be available for features or bugfixes, but they
2011-03-04 14:03:06 +00:00
may vanish at any point. To select a specific branch use
# Generic code
git checkout -b <name> origin/<name>
2011-03-21 12:56:48 +00:00
# Stay on a specific version
2011-03-29 14:56:24 +00:00
version=1.5
git checkout -b $version origin/$version
2011-03-04 10:04:48 +00:00
2011-03-16 10:38:17 +00:00
### Mirrors
2011-03-16 10:55:20 +00:00
* git://github.com/telmich/cdist.git ([github](https://github.com/telmich/cdist))
* git://git.sans.ethz.ch/cdist ([sans](http://git.sans.ethz.ch/?p=cdist;a=summary))
2011-03-16 10:38:17 +00:00
2011-03-16 09:45:23 +00:00
## Update
2011-03-04 14:03:06 +00:00
To upgrade cdist in the current branch use
2011-03-04 08:32:01 +00:00
git pull
2011-02-04 22:14:58 +00:00
2011-03-10 17:19:08 +00:00
# Also update the manpages
2011-03-25 21:31:16 +00:00
./build.sh man
2011-03-10 17:19:08 +00:00
export MANPATH=$MANPATH:$(pwd -P)/doc/man
2011-03-16 09:45:23 +00:00
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.
2011-04-01 08:03:48 +00:00
### Upgrading from 1.3 to 1.5
2011-03-24 12:34:34 +00:00
No incompatiblities.
2011-03-21 12:56:48 +00:00
### Upgrading from 1.2 to 1.3
Rename **gencode** of every type to **gencode-remote**.
2011-03-19 02:10:18 +00:00
### Upgrading from 1.1 to 1.2
No incompatiblities.
2011-03-16 09:45:23 +00:00
### Upgrading from 1.0 to 1.1
2011-03-16 09:48:45 +00:00
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:
2011-03-16 09:45:23 +00:00
2011-03-16 09:48:45 +00:00
* Remove --type from all \_\_file calls
* If type was symlink, use \_\_link and --type symbolic
* If type was directory, use \_\_directory
2011-03-10 17:19:08 +00:00
2011-03-04 14:03:06 +00:00
2011-02-04 22:14:58 +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-18 07:42:04 +00:00
2011-02-04 22:14:58 +00:00
Bug reports, questions, patches, etc. should be send to the
[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist).
2011-03-10 22:16:55 +00:00
2011-03-21 23:43:49 +00:00
## Commercial support
You can request commercial support for cdist from
[my company](http://firma.schottelius.org/english/).
2011-03-10 22:16:55 +00:00
## 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
2011-03-24 12:34:34 +00:00
### Nico Schottelius, Systems Group ETH Zurich and privately
2011-03-10 22:16:55 +00:00
Yes, I'm actually eating my own dogfood and currently managing
* [plone](http://plone.org/) (cms)
* [moinmoin](http://moinmo.in/) (wiki)
* [apache](http://httpd.apache.org/) (webserver)
* [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication)
2011-03-12 18:00:40 +00:00
* [ircd-hybrid](http://www.ircd-hybrid.org/) (chat)
* [stunnel](http://stunnel.mirt.net/) (SSL tunnel)
2011-03-16 10:11:13 +00:00
* [mercurial-server](http://www.lshift.net/mercurial-server.html) (version control)
* [xfce](http://www.xfce.org/) (lightweight desktop environment)
* [slim](http://slim.berlios.de/) (graphical login manager for X11)
2011-03-10 22:16:55 +00:00
2011-04-01 23:26:01 +00:00
with cdist on a total of **20** production machines of the
2011-03-10 22:16:55 +00:00
[Systems Group](http://www.systems.ethz.ch) at the
2011-03-24 12:34:34 +00:00
[ETH Zurich](http://www.ethz.ch) as well at home.
2011-03-21 19:36:21 +00:00
### Steven Armstrong, CBRG ETH Zurich
The CBRG is managing most of their compute clusters with cdist.