Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>remotes/origin/1.2
commit
59e774b08d
@ -0,0 +1,198 @@ |
||||
[[!meta title="cdist - 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 |
||||
[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 |
||||
* 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 |
||||
|
||||
### 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 |
||||
|
||||
Stuff that should probably be included in every configuration management, |
||||
but is not. Or: Why I began to write cdist: |
||||
|
||||
* Speed |
||||
* Elegant code |
||||
* Clean design |
||||
* Good documentation (man pages) |
||||
* Meaningful error messages |
||||
* The no surprise factor |
||||
* Consistency in behaviour, naming and documentation |
||||
* Easy integration into bare metal installations |
||||
* Simple and well-known DSL: posix shell |
||||
* It must be very easy to extend and debug cdist |
||||
* Focus on reuse of existing functionality (like sh, ssh, find, rm, ...) |
||||
* Easy upgrade: ***There is no need to update cdist on target hosts!*** |
||||
* cdist only needs to be update on the master server |
||||
|
||||
### OS support |
||||
|
||||
cdist was tested or is know to run on at least |
||||
|
||||
* [Archlinux](http://www.archlinux.org/) |
||||
* [Debian](http://www.debian.org/) |
||||
* [Gentoo](http://www.gentoo.org/) |
||||
* [Mac OS X](http://www.apple.com/macosx/) |
||||
* [Redhat](http://www.redhat.com/) |
||||
* [Ubuntu](http://www.ubuntu.com/) |
||||
|
||||
|
||||
## 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://git.schottelius.org/cdist |
||||
cd cdist |
||||
export PATH=$PATH:$(pwd -P)/bin |
||||
|
||||
# If you want the manpages (requires asciidoc to be installed) |
||||
make 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.0: First official release |
||||
* 1.1: Current stable (includes \_\_file type change) |
||||
|
||||
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 version 1.1 |
||||
git checkout -b 1.1 origin/1.1 |
||||
|
||||
### Mirrors |
||||
|
||||
* 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)) |
||||
|
||||
## Update |
||||
|
||||
To upgrade cdist in the current branch use |
||||
|
||||
git pull |
||||
|
||||
# Also update the manpages |
||||
make 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.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.freenode.org](irc://irc.freenode.org/#cLinux). |
||||
|
||||
### Mailing list |
||||
|
||||
Bug reports, questions, patches, etc. should be send to the |
||||
[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). |
||||
|
||||
## 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 |
||||
|
||||
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) |
||||
* [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) |
||||
* [stunnel](http://stunnel.mirt.net/) (SSL tunnel) |
||||
* [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) |
||||
|
||||
with cdist on a total of **5** production machines of the |
||||
[Systems Group](http://www.systems.ethz.ch) at the |
||||
[ETH Zurich](http://www.ethz.ch). |
@ -1,171 +0,0 @@ |
||||
[[!meta title="cdist - 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 |
||||
[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 |
||||
* 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 |
||||
|
||||
### Architecture |
||||
|
||||
* Push mode (server pushes configuration) |
||||
* Pull mode planned (client triggers 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 |
||||
|
||||
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 |
||||
* Simple and well-known DSL: posix shell |
||||
* It is very easy to |
||||
* extend cdist |
||||
* debug cdist-core and cdist-types |
||||
* Focus on reuse of existing functionality |
||||
* ssh |
||||
* sh |
||||
* find, rm, ... |
||||
|
||||
## 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://git.schottelius.org/cdist |
||||
cd cdist |
||||
export PATH=$PATH:$(pwd -P)/bin |
||||
|
||||
# If you want the manpages (requires asciidoc to be installed) |
||||
make 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 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 |
||||
|
||||
### Update |
||||
|
||||
To upgrade cdist in the current branch use |
||||
|
||||
git pull |
||||
|
||||
# Also update the manpages |
||||
make man |
||||
export MANPATH=$MANPATH:$(pwd -P)/doc/man |
||||
|
||||
|
||||
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. |
||||
|
||||
## Support |
||||
|
||||
### IRC |
||||
|
||||
You can join the development ***IRC channel*** |
||||
[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux). |
||||
|
||||
### Mailing list |
||||
|
||||
Bug reports, questions, patches, etc. should be send to the |
||||
[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). |
||||
|
||||
## 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 |
||||
|
||||
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) |
||||
* [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) |
||||
* [stunnel](http://stunnel.mirt.net/) (SSL tunnel) |
||||
|
||||
with cdist on a total of **3** production servers of the |
||||
[Systems Group](http://www.systems.ethz.ch) at the |
||||
[ETH Zurich](http://www.ethz.ch). |
@ -0,0 +1,50 @@ |
||||
cdist-type__addifnosuchline(7) |
||||
============================== |
||||
Daniel Roth <dani-cdist--@--d-roth.li> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__addifnosuchline - Add a line (if not existing already) |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
This type can be used to check a file for existence of a |
||||
specific line and adding it, if it was not found. |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
line:: |
||||
Specifies the content which shall be added if not existing. |
||||
|
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
file:: |
||||
If supplied, use this as the destination file. |
||||
Otherwise the object_id is used. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf" |
||||
__addifnosuchline www --file /etc/lighttpd.conf --line include_www |
||||
|
||||
# Adds the line "include_git" to the file "lighttpd.conf" |
||||
__addifnosuchline /etc/lighttpd.conf --line include_git |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Daniel Roth. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,34 @@ |
||||
#!/bin/sh |
||||
# |
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org) |
||||
# |
||||
# This file is part of cdist. |
||||
# |
||||
# cdist is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# cdist is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>. |
||||
# |
||||
# |
||||
# Check whether file exists or not |
||||
# |
||||
|
||||
if [ -f "$__object/parameter/destination" ]; then |
||||
destination="$(cat "$__object/parameter/destination")" |
||||
else |
||||
destination="/$__object_id" |
||||
fi |
||||
|
||||
if [ -e "$destination" ]; then |
||||
echo yes |
||||
else |
||||
echo no |
||||
fi |
@ -0,0 +1,57 @@ |
||||
#!/bin/sh |
||||
# |
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org) |
||||
# |
||||
# This file is part of cdist. |
||||
# |
||||
# cdist is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# cdist is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>. |
||||
# |
||||
# |
||||
# Handle directories |
||||
# |
||||
# |
||||
# __directory /etc [--mode --owner --group --parents [yes|no] ] |
||||
# |
||||
|
||||
destination="/$__object_id" |
||||
|
||||
# Include parent directories? |
||||
if [ -f "$__object/parameter/parents" ]; then |
||||
parents="$(cat "$__object/parameter/parents")" |
||||
if [ yes = "$parents" ]; then |
||||
mkdiropt="-p" |
||||
else |
||||
mkdiropt="" |
||||
fi |
||||
fi |
||||
|
||||
# Only create if not already existent |
||||
if [ no = "$(cat "$__object/explorer/exists")" ]; then |
||||
echo mkdir $mkdiropt \"$destination\" |
||||
fi |
||||
|
||||
# Mode settings |
||||
if [ -f "$__object/parameter/mode" ]; then |
||||
echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" |
||||
fi |
||||
|
||||
# Group |
||||
if [ -f "$__object/parameter/group" ]; then |
||||
echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" |
||||
fi |
||||
|
||||
# Owner |
||||
if [ -f "$__object/parameter/owner" ]; then |
||||
echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" |
||||
fi |
@ -0,0 +1,56 @@ |
||||
cdist-type__directory(7) |
||||
======================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__directory - Create a directory |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
This cdist type allows you to create directories on the target. |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
None. |
||||
|
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
group:: |
||||
Group to chgrp to. |
||||
|
||||
mode:: |
||||
Unix permissions, suitable for chmod. |
||||
|
||||
owner:: |
||||
User to chown to. |
||||
|
||||
parents:: |
||||
Whether to create parents as well (mkdir -p behaviour) |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# A silly example |
||||
__directory /tmp/foobar |
||||
|
||||
# Ensure /etc exists correctly |
||||
__file /etc --owner root --group root --mode 0755 |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,4 @@ |
||||
group |
||||
mode |
||||
owner |
||||
parents |
@ -1 +0,0 @@ |
||||
type |
@ -0,0 +1,3 @@ |
||||
Red Hat Enterprise Linux Server (cdist-automated) |
||||
Kernel \r on an \m |
||||
|
@ -0,0 +1,43 @@ |
||||
#!/bin/sh |
||||
# |
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org) |
||||
# |
||||
# This file is part of cdist. |
||||
# |
||||
# cdist is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# cdist is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>. |
||||
# |
||||
# |
||||
# __file is a very basic type and should be able to be used as an |
||||
# example for typewrites later |
||||
# |
||||
|
||||
destination="/$__object_id" |
||||
|
||||
type="$(cat "$__object/parameter/type")" |
||||
source="$(cat "$__object/parameter/source")" |
||||
|
||||
case "$type" in |
||||
symbolic) |
||||
lnopt="-s" |
||||
;; |
||||
hard) |
||||
lnopt="" |
||||
;; |
||||
*) |
||||
echo "Unknown type: $type" >&2 |
||||
exit 1 |
||||
;; |
||||
esac |
||||
|
||||
echo ln ${lnopt} -f \"$source\" \"$destination\" |
@ -0,0 +1,56 @@ |
||||
cdist-type__link(7) |
||||
=================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__link - Create links |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
This cdist type allows you to hard and symoblic links. The given |
||||
object id is the destination for the link. |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
source:: |
||||
Specifies the link source. |
||||
|
||||
type:: |
||||
Specifies the link type: Either hard or symoblic. |
||||
|
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
None. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# Create hard link of /etc/shadow |
||||
__link /root/shadow --source /etc/shadow --type hard |
||||
|
||||
# Relative symbolic link |
||||
__link /etc/apache2/sites-enabled/www.test.ch \ |
||||
--source ../sites-available/www.test.ch \ |
||||
--type symbolic |
||||
|
||||
# Absolute symbolic link |
||||
__link /opt/plone --source /home/services/plone --type symbolic |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,2 @@ |
||||
source |
||||
type |
@ -0,0 +1,53 @@ |
||||
cdist-type__package_apt(7) |
||||
========================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__package_apt - Manage packages with apt-get |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
apt-get is usually used on Debian and variants (like Ubuntu) to |
||||
manage packages. |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
state:: |
||||
Either "installed" or "deinstalled". |
||||
|
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
name:: |
||||
If supplied, use the name and not the object id as the package name. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# Ensure zsh in installed |
||||
__package_apt zsh --state installed |
||||
|
||||
# In case you only want *a* webserver, but don't care which one |
||||
__package_apt webserver --state installed --name nginx |
||||
|
||||
# Remove obsolete package |
||||
__package_apt puppet --state deinstalled |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
- cdist-type__package(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,53 @@ |
||||
cdist-type__package_pacman(7) |
||||
============================= |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type__package_pacman - Manage packages with pacman |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
Pacman is usually used on the Archlinux distribution to manage |
||||
packages. |
||||
|
||||
|
||||
REQUIRED PARAMETERS |
||||
------------------- |
||||
state:: |
||||
Either "installed" or "deinstalled". |
||||
|
||||
|
||||
OPTIONAL PARAMETERS |
||||
------------------- |
||||
name:: |
||||
If supplied, use the name and not the object id as the package name. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# Ensure zsh in installed |
||||
__package_pacman zsh --state installed |
||||
|
||||
# If you don't want to follow pythonX packages, but always use python |
||||
__package_pacman python --state installed --name python2 |
||||
|
||||
# Remove obsolete package |
||||
__package_pacman puppet --state deinstalled |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist-type(7) |
||||
- cdist-type__package(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,27 @@ |
||||
Steven, Nico |
||||
|
||||
How to handle dependencies: |
||||
|
||||
1) Add --require parameter for all types |
||||
- Special handling in cdist-type-emulator |
||||
+ Everything on one line |
||||
|
||||
2) Add __require type |
||||
+ No change in core |
||||
- Type influences core |
||||
- Additional line |
||||
- Core needs to know about requirements |
||||
|
||||
3) cdist-require as a seperate executable |
||||
+ No change in cdist-type-emulator |
||||
- new behaviour |
||||
- first time cdist-xxx dependency in types |
||||
|
||||
4) require="" environment variable for cdist-type-emulator |
||||
+ on one line / same context |
||||
+ special handling is ok for special case |
||||
+ doesn't touch parameters (i.e. type still has full control) |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
|
||||
Result: Use version 4. |
@ -0,0 +1,7 @@ |
||||
Proposal for new types, which replace __file: |
||||
|
||||
x __directory /etc [--mode --owner --group --parents [yes|no] ] |
||||
|
||||
x __link /destination --source abc --type [symbolic|hard] |
||||
|
||||
x __file /etc/passwd [--source] --mode --owner --group |
@ -0,0 +1 @@ |
||||
Release 1.1.0 |
@ -0,0 +1,38 @@ |
||||
cdist-dir(1) |
||||
============ |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-dir - Poor man's directory synchronisation |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-dir <push|pull> TARGET_HOST SRC_DIR DST_DIR |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
cdist-dir either pushes a local directory to the target host |
||||
or pulls a remote directory from a target host to the local host. |
||||
|
||||
In the push case SRC_DIR is local, in the pull case remote. |
||||
In the push case DST_DIR is remote, in the pull case local. |
||||
|
||||
cdist-dir does not cleanup DST_DIR and thus it may contain old |
||||
stuff if used multiple times. |
||||
|
||||
cdist-dir does not rely on rsync or other high level tools, because |
||||
it cannot expect its existence on the local or target host. |
||||
|
||||
SEE ALSO |
||||
-------- |
||||
cdist(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,46 @@ |
||||
cdist-env(1) |
||||
============ |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-env - Setup environment for using cdist |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-env |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
cdist-env outputs two strings suitable for usage in your current shell, |
||||
so you can use cdist from the checkout. cdist-env essentially helps you |
||||
to easily setup PATH and MANPATH. |
||||
|
||||
If you've multiple checkouts of cdist and run cdist-env from the various |
||||
checkouts, a new run will prepend the last directory, thus ensures you |
||||
can run it multiple times and does what one expects. |
||||
|
||||
EXAMPLES |
||||
-------- |
||||
For use in bourne shell variants (like dash, bash, ksh) as well as |
||||
in csh variants (csh, tcsh): |
||||
|
||||
-------------------------------------------------------------------------------- |
||||
eval `./bin/cdist-env` |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
Replace "./" with the checkout directory of cdist. |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
cdist(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -0,0 +1,51 @@ |
||||
cdist-quickstart(1) |
||||
=================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
NAME |
||||
---- |
||||
cdist-quickstart - Make use of cinit in 5 minutes |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-quickstart |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
cdist-quickstart is an interactive guide to cdist. It should be one |
||||
of the first tools you use when you begin with cdist. |
||||
|
||||
|
||||
EXAMPLES |
||||
-------- |
||||
|
||||
To use cdist-quickstart, add the bin directory to your PATH, |
||||
execute cdist-quickstart and enjoy cdist: |
||||
|
||||
|
||||
-------------------------------------------------------------------------------- |
||||
# Bourne shell example |
||||
export PATH=$(pwd -P)/bin:$PATH |
||||
|
||||
# Alternatively, usable for csh and bsh, set's up PATH and MANPATH |
||||
eval `./bin/cdist-env` |
||||
|
||||
# Let's go! |
||||
cdist-quickstart |
||||
-------------------------------------------------------------------------------- |
||||
|
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
- cdist(7) |
||||
- cdist-env(1) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
||||
## How to use cdist? |
@ -1,42 +0,0 @@ |
||||
cdist-quickstart(1) |
||||
=================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
NAME |
||||
---- |
||||
cdist-quickstart - Make use of cinit in 5 minutes |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
This document helps you to take the first steps with cdist. |
||||
We'll begin to configure the host "localhost" to have two files |
||||
in place, /etc/DO-NOT-CHANGE and /root/CDIST-ENABLED-HOST, which |
||||
both are used to warn other sysadmins that this system is managed |
||||
by configuration management and manual changes may get overwritten. |
||||
|
||||
Begin to execute cdist-quickstart, it will show you the steps it |
||||
takes and explains what it does: |
||||
|
||||
% cdist-quickstart |
||||
|
||||
mkdir -p /etc/cdist/manifests |
||||
|
||||
# Create |
||||
|
||||
Cdist uses |
||||
kgives you an impression of |
||||
0. Create a host specification (/etc/cdist/hosts/**hostname**) |
||||
0. Add functionalilty to add |
||||
0. Run ***cdist-apply*** |
||||
|
||||
SEE ALSO |
||||
-------- |
||||
cdist-config-layout(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
||||
## How to use cdist? |
@ -1,26 +0,0 @@ |
||||
cdist-terms(7) |
||||
============== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-terms - Describe terms used in cdist |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
provider: Provides functionality. |
||||
object: Instance with provider unique id of a provider. |
||||
manifest: Define which objects to create [on hosts] |
||||
server: The machine that configures all targets. |
||||
target: Host that should be configured. |
||||
|
||||
SEE ALSO |
||||
-------- |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -1,30 +0,0 @@ |
||||
cdist-type-addifnosuchline(1) |
||||
====================== |
||||
Daniel Roth <dani-cdist--@--d-roth.li> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type-addifnosuchline |
||||
|
||||
|
||||
SYNOPSIS |
||||
-------- |
||||
cdist-type-addifnosuchline Add if no such line |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
cdist-type-addifnosuchline can be used to check a file for existence of a |
||||
specific line and adding that if not found |
||||
|
||||
|
||||
SEE ALSO |
||||
-------- |
||||
cdist(7) |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2011 Daniel Roth. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
@ -1,24 +0,0 @@ |
||||
cdist-type-manifest(7) |
||||
====================== |
||||
Nico Schottelius <nico-cdist--@--schottelius.org> |
||||
|
||||
|
||||
NAME |
||||
---- |
||||
cdist-type-manifest - Manifest of a type |
||||
|
||||
|
||||
DESCRIPTION |
||||
----------- |
||||
CWD = object directory |
||||
ARGV = target host, basedir |
||||
ENV = |
||||
|
||||
SEE ALSO |
||||
-------- |
||||
|
||||
|
||||
COPYING |
||||
------- |
||||
Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is |
||||
granted under the terms of the GNU General Public License version 3 (GPLv3). |
Loading…
Reference in new issue