| 1 |
Why should I use cdist? |
| 2 |
======================= |
| 3 |
|
| 4 |
There are several motivations to use cdist, these |
| 5 |
are probably the most popular ones. |
| 6 |
|
| 7 |
Known language |
| 8 |
-------------- |
| 9 |
|
| 10 |
Cdist is being configured in |
| 11 |
`shell script <https://en.wikipedia.org/wiki/Shell_script>`_. |
| 12 |
Shell script is used by UNIX system engineers for decades. |
| 13 |
So when cdist is introduced, your staff does not need to learn a new |
| 14 |
`DSL <https://en.wikipedia.org/wiki/Domain-specific_language>`_ |
| 15 |
or programming language. |
| 16 |
|
| 17 |
Powerful language |
| 18 |
----------------- |
| 19 |
|
| 20 |
Not only is shell scripting widely known by system engineers, |
| 21 |
but it is also a very powerful language. Here are some features |
| 22 |
which make daily work easy: |
| 23 |
|
| 24 |
* Configuration can react dynamically on explored values |
| 25 |
* High level string manipulation (using sed, awk, grep) |
| 26 |
* Conditional support (**if, case**) |
| 27 |
* Loop support (**for, while**) |
| 28 |
* Support for dependencies between cdist types |
| 29 |
|
| 30 |
More than shell scripting |
| 31 |
------------------------- |
| 32 |
|
| 33 |
If you compare regular shell scripting with cdist, there is one major |
| 34 |
difference: When using cdist types, |
| 35 |
the results are |
| 36 |
`idempotent <https://en.wikipedia.org/wiki/Idempotence>`_. |
| 37 |
In practise that means it does not matter in which order you |
| 38 |
call cdist types, the result is always the same. |
| 39 |
|
| 40 |
Zero dependency configuration management |
| 41 |
---------------------------------------- |
| 42 |
|
| 43 |
Cdist requires very little on a target system. Even better, |
| 44 |
in almost all cases all dependencies are usually fulfilled. |
| 45 |
Cdist does not require an agent or high level programming |
| 46 |
languages on the target host: it will run on any host that |
| 47 |
has a **ssh server running** and a POSIX compatible shell |
| 48 |
(**/bin/sh**). Compared to other configuration management systems, |
| 49 |
it does not require to open up an additional port. |
| 50 |
|
| 51 |
Push based distribution |
| 52 |
----------------------- |
| 53 |
|
| 54 |
Cdist uses the push based model for configuration. In this |
| 55 |
scenario, one (or more) computers connect to the target hosts |
| 56 |
and apply the configuration. That way the source host has |
| 57 |
very little requirements: Cdist can even run on a sysadmin |
| 58 |
notebook that is loosely connected to the network and has |
| 59 |
limited amount of resources. |
| 60 |
|
| 61 |
Furthermore, from a security point of view, only one machine |
| 62 |
needs access to the target hosts. No target hosts will ever |
| 63 |
need to connect back to the source host, which contains the |
| 64 |
full configuration. |
| 65 |
|
| 66 |
Highly scalable |
| 67 |
--------------- |
| 68 |
|
| 69 |
If at some point you manage more hosts than can be handled from |
| 70 |
a single source host, you can simply add more resources: Either |
| 71 |
add more cores to one host or add hosts. |
| 72 |
Cdist will utilise the given resources in parallel. |