Jump to content

Cdist: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Fixed syntax and embellished ref/cite
Rescuing 3 sources and tagging 0 as dead. #IABot (v2.0beta10)
Line 43: Line 43:
[[Python (programming language)|Python]], so controlling computer
[[Python (programming language)|Python]], so controlling computer
need to have installed Python version
need to have installed Python version
3.2<ref name="python32">{{cite web|url=http://nico.schottelius.org/blog/cdist-python-3.2-requirement/ |title=cdist: Why we require Python 3.2 on the source host |website=Nico.schottelius.org |date= |accessdate=2016-04-10}}</ref>
3.2<ref name="python32">{{cite web |url=http://nico.schottelius.org/blog/cdist-python-3.2-requirement/ |title=cdist: Why we require Python 3.2 on the source host |website=Nico.schottelius.org |date= |accessdate=2016-04-10 |archive-url=https://web.archive.org/web/20160313073123/http://www.nico.schottelius.org/blog/cdist-python-3.2-requirement/# |archive-date=2016-03-13 |dead-url=no |df= }}</ref>
or later.
or later.


Line 54: Line 54:
is actively being developed<ref>[http://cia.vc/stats/project/cdist ]{{dead link|date=April 2016}}</ref> by a lot of [[free and open-source software]] contributors
is actively being developed<ref>[http://cia.vc/stats/project/cdist ]{{dead link|date=April 2016}}</ref> by a lot of [[free and open-source software]] contributors
and maintained by the two main developers Nico Schottelius and
and maintained by the two main developers Nico Schottelius and
Steven Armstrong.<ref>{{cite web|url=https://github.com/telmich/cdist |title=ungleich/cdist: cdist configuration management |website=GitHub.com |date= |accessdate=2016-04-10}}</ref>
Steven Armstrong.<ref>{{cite web |url=https://github.com/telmich/cdist |title=ungleich/cdist: cdist configuration management |website=GitHub.com |date= |accessdate=2016-04-10 |archive-url=https://web.archive.org/web/20150705072143/https://github.com/telmich/cdist# |archive-date=2015-07-05 |dead-url=no |df= }}</ref>
The major part of the discussion about cdist happens on the mailinglist<ref>{{cite web|url=http://l.schottelius.org/mailman/listinfo/cdist |title=Archived copy |accessdate=June 6, 2012 |deadurl=yes |archiveurl=https://web.archive.org/web/20111121044650/http://l.schottelius.org/mailman/listinfo/cdist |archivedate=November 21, 2011 }}</ref>
The major part of the discussion about cdist happens on the mailinglist<ref>{{cite web|url=http://l.schottelius.org/mailman/listinfo/cdist |title=Archived copy |accessdate=June 6, 2012 |deadurl=yes |archiveurl=https://web.archive.org/web/20111121044650/http://l.schottelius.org/mailman/listinfo/cdist |archivedate=November 21, 2011 }}</ref>
and on the IRC channel #cstar in the [[Freenode]] network. cdist is being used at various companies in Switzerland (for instance at
and on the IRC channel #cstar in the [[Freenode]] network. cdist is being used at various companies in Switzerland (for instance at
Line 159: Line 159:
|dead-url=no|archive-url=https://web.archive.org/web/20181122144404/https://wwwtech.de/articles/2015/feb/automatic-configuration-deployment-with-cdist|archive-date=22 November 2018|df=dmy-all}}</ref>
|dead-url=no|archive-url=https://web.archive.org/web/20181122144404/https://wwwtech.de/articles/2015/feb/automatic-configuration-deployment-with-cdist|archive-date=22 November 2018|df=dmy-all}}</ref>


<ref name="A-doc">{{cite web|title=Installation Guide|access-date=22 November 2018|website=Ansible|url=https://docs.ansible.com/ansible/2.5/installation_guide/intro_installation.html|id=Managed Node Requirements}}</ref>
<ref name="A-doc">{{cite web|title=Installation Guide|access-date=22 November 2018|website=Ansible|url=https://docs.ansible.com/ansible/2.5/installation_guide/intro_installation.html|id=Managed Node Requirements|archive-url=https://web.archive.org/web/20180804194804/https://docs.ansible.com/ansible/2.5/installation_guide/intro_installation.html#|archive-date=2018-08-04|dead-url=no|df=}}</ref>
}}
}}



Revision as of 15:46, 22 November 2018

cdist
Original author(s)Nico Schottelius, Steven Armstrong[1]
Initial release2010; 14 years ago (2010)
Stable release
4.10.2 / 6 September 2018; 6 years ago (2018-09-06)
Repository
Written inPython, Bourne shell
Operating systemLinux, Unix-like
TypConfiguration management
LicenseGNU General Public License version 3 or later
Websitenico.schottelius.org/software/cdist/

cdist is a free software configuration management system, which declares to adheres to the KISS principle. It manages nodes over SSH and requires only Bourne Shell to be installed on them and no agents (software required for some configuration management system to operate) are installed on nodes.

Types (pieces of code, describing intended state of node) are written in Bourne Shell. The system uses usual shell scripts and functions to express reusable descriptions of systems. The core of software, that manages ordering and executing code on nodes is written in Python, so controlling computer need to have installed Python version 3.2[2] or later.

For most GNU/Linux distributions, required version of Python is provided in default repositories. Cdist is included as part of Debian GNU/Linux distribution.

Development

cdist development started in 2010 at ETH Zurich and is actively being developed[3] by a lot of free and open-source software contributors and maintained by the two main developers Nico Schottelius and Steven Armstrong.[4] The major part of the discussion about cdist happens on the mailinglist[5] and on the IRC channel #cstar in the Freenode network. cdist is being used at various companies in Switzerland (for instance at ETH Zurich[6] and The OMA Browser project),[7] the US, Germany and France.

Eigenschaften

cdist is a zero dependency configuration management system: It requires only ssh and a bourne-compatible shell on the target host, which is usually enabled on all Unix-like machines.[8] Because of this, cdist can be used to bootstrap other configuration management systems.[9]

Installation and configuration

cdist is not installed traditionally as a package (like .deb or .rpm), but installed via git. All commands are run from the created checkout. The entry point for any configuration is the shell script conf/manifest/init, which is called initial manifest in cdist terms.[10]

The main components of cdist are so called types, which bundle functionality.[11] The types essentially consists of a number of shell scripts to define which types a type reuses and which code is generated to be executed on the target host.

Architecture

cdist is split into two components:

  • The core
  • The configuration

Core

The core of cdist is implemented in Python 3 and provides the executables to configure target hosts. The core operates in a push model: It connects from the source host to the target hosts and configures the machines. For communication and file transfer SSH is being used. To allow parallel configuration of hosts, the core supports a parallel mode in which it creates a child process for every connection. This model allows cdist to scale horizontally with the available computing resources: If at a certain limit is reached and the capacity of the available CPUs has been used, adding another CPU or distributing cdist to multiple hosts allows to configure more hosts in parallel.[12]

Configuration

The configuration is written in Bourne Shell and consists of

  • The initial manifest (which defines which host is assigned which types)
  • Global Explorers (to gain information about the target system)
  • Types (which provide all functionality and consist of a manifest, type explorers and gencode scripts)

Although all of these are written in Shell script, the order of execution in the manifests does not matter: cdist employs an idempotent configuration.

Comparison

In comparison to most other configuration management software, cdist does not have any requirements on the target host besides SSH and a bourne shell. It requires Python 3.2 on the source host, though.[2] cdist operates in push based approach, in which a server pushes configurations to the client and the clients do not poll for updates.

Configuration language

All user configurable parts are contained in manifests or gencode-scripts, which are shell scripts. Shell scripts were chosen, because Unix System Administrators are usually proficient in reading and writing shell scripts. Furthermore, shell is also commonly available on potential target systems, thus avoiding the need to install additional software there ("zero dependencies").

cdist reads its configuration from the initial manifest (conf/manifest/init), in which hosts are mapped to types:

case "$__target_host" in
    myhostname)
        __package zsh --state present
        __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist"
    ;;
esac

When using the types in cdist, they are called like normal programs in manifests and can make use of advanced parameter parsing as well as reading from stdin:

# Provide a default file, but let the user change it
__file /home/frodo/.bashrc --source "/etc/skel/.bashrc" \
   --state exists \
   --owner frodo --mode 0600

# Take file content from stdin
__file /tmp/whatever --owner root --group root --mode 644 --source - << DONE
Here goes the content for /tmp/whatever
DONE

Dependencies are expressed by setting up the require environment variable:

      __directory /tmp/foobar
      require="__directory//tmp/foobar" __file /tmp/foobar/baz

Access to paths and files within types is given by environment variables like $__object.

Similar software

Ansible takes a similar approach to cdist running from a central machine to manage remote nodes[8], however Ansible normally requires Python on the managed target, which cdist does not.[13] Ansible does have some methods for bootstrapping a Python install or working without it using the raw module.[13]

References

  1. ^ Sharma, Rishabh; Soni, Mitesh (15 March 2015). Learning Chef. Packt. pp. 10, 17–18. ISBN 978-1783285211.
  2. ^ a b "cdist: Why we require Python 3.2 on the source host". Nico.schottelius.org. Archived from the original on 2016-03-13. Retrieved 2016-04-10. {{cite web}}: Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  3. ^ [1][dead link]
  4. ^ "ungleich/cdist: cdist configuration management". GitHub.com. Archived from the original on 2015-07-05. Retrieved 2016-04-10. {{cite web}}: Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  5. ^ "Archived copy". Archived from the original on November 21, 2011. Retrieved June 6, 2012. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)CS1 maint: archived copy as title (link)
  6. ^ "Archived copy". Archived from the original on 2013-01-15. Retrieved 2012-06-08. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)CS1 maint: archived copy as title (link)
  7. ^ "Archived copy". Archived from the original on August 17, 2012. Retrieved June 26, 2012. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)CS1 maint: archived copy as title (link)
  8. ^ a b Torberntsson, Kim; Rydin, Ylva (June 2014). A Study of Configuration Management - Systems Solutions for Deployment and Configuration of Software in a Cloud Environment (PDF) (Thesis). Uppsala University. pp. 8, 27, 31, 42. Archived from the original (PDF) on 22 November 2018. {{cite thesis}}: Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  9. ^ "Google Groups". Groups.google.com. Retrieved 2016-04-10.
  10. ^ Kruse, Christian (2016). "Automatic configuration deployment with cdist". WWWTech. Archived from the original on 22 November 2018. Retrieved 22 November 2018. {{cite web}}: Cite has empty unknown parameter: |1= (help); Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  11. ^ "cdist-type(7)". Nico.schottelius.org. Archived from the original on 2016-03-03. Retrieved 2016-04-10. {{cite web}}: Unknown parameter |deadurl= ignored (|url-status= suggested) (help)
  12. ^ Bezroukov, Nikolai. "cdist". Softpanorama. Archived from the original on 8 July 2018. Retrieved 22 November 2018. {{cite web}}: |archive-date= / |archive-url= timestamp mismatch; 8 July 2017 suggested (help); Unknown parameter |dead-url= ignored (|url-status= suggested) (help)
  13. ^ a b "Installation Guide". Ansible. Managed Node Requirements. Archived from the original on 2018-08-04. Retrieved 22 November 2018. {{cite web}}: Unknown parameter |dead-url= ignored (|url-status= suggested) (help)