Puppet (software)

From Wikipedia, the free encyclopedia
  (Redirected from Puppet (tool))
Jump to navigation Jump to search
Puppet
Puppet Logo.svg
Developer(s) Puppet
Initial release 2005; 13 years ago (2005)
Stable release 5.5.0 (March 20, 2018; 3 months ago (2018-03-20)[1]) [±]
Preview release 5.5.0.134.g0251aa7 (March 31, 2018; 2 months ago (2018-03-31)) [±]
Repository Edit this at Wikidata
Written in C++ & Clojure from 4.0,[2] Ruby
Operating system Linux, Unix-like, Microsoft Windows
Type
License Apache for >2.7.0, GPL for prior versions
Website www.puppet.com

In computing, Puppet is an open-source software configuration management tool. It runs on many Unix-like systems as well as on Microsoft Windows, and includes its own declarative language to describe system configuration.

Puppet is produced by Puppet, founded by Luke Kanies in 2005. It is written in C++ and Clojure and released as free software under the GNU General Public License (GPL) until version 2.7.0 and the Apache License 2.0 after that.[3]

Overview[edit]

Puppet is designed to manage the configuration of Unix-like and Microsoft Windows systems declaratively. The user describes system resources and their state, either using Puppet's declarative language or a Ruby DSL (domain-specific language). This information is stored in files called "Puppet manifests". Puppet discovers the system information via a utility called Facter, and compiles the Puppet manifests into a system-specific catalog containing resources and resource dependency, which are applied against the target systems. Any actions taken by Puppet are then reported.

Puppet consists of a custom declarative language to describe system configuration, which can be either applied directly on the system, or compiled into a catalog and distributed to the target system via client–server paradigm (using a REST API), and the agent uses system specific providers to enforce the resource specified in the manifests. The resource abstraction layer enables administrators to describe the configuration in high-level terms, such as users, services and packages without the need to specify OS specific commands (such as rpm, yum, apt).

Puppet is model-driven, requiring limited programming knowledge to use.[4]

Puppet comes in two versions, Puppet Enterprise and Open Source Puppet. In addition to providing functionalities of Open Source Puppet, Puppet Enterprise also provides GUI, API and command line tools for node management.

Architecture[edit]

Puppet manually invoked on a client

Puppet usually follows client-server architecture. The client is known as an agent and the server is known as the master. For testing and simple configuration, it can also be used as a stand-alone application run from the command line.

Puppet Server is installed on one or more servers, and Puppet Agent is installed on all the machines that the user wants to manage. Puppet Agents communicate with the server and fetch configuration instructions. The Agent then applies the configuration on the system and sends a status report to the server.[5] Devices can run Puppet Agent as a daemon, that can be triggered periodically as a cron job or can be run manually whenever needed.

Puppet architecture consists of:

  • Configuration language: The Puppet programming language is a declarative language that describes the state of a computer system in terms of "resources", which represent underlying network and operating system constructs. The user assembles resources into manifests that describe the desired state of the system. These manifests are stored on the server and compiled into configuration instructions for agents on request. [6]

Puppet resource syntax:

type { 'title':
  attribute => value
}

Example resources representing a Unix user:

user { 'harry':
  ensure => present,
  uid    => '1000',
  shell  => '/bin/bash',
  home   => '/var/tmp'
}
  • Resource abstraction: Puppet allows users to configure systems in a platform-agnostic way by representing operating system concepts as structured data. Rather than specifying the exact commands to perform a system action, the user creates a resources, which Puppet then translates into system-specific instructions which are sent to the machine being configured. For example, if an user wants to install a package on three different nodes, each of which runs a different operating system, they can simply declare one resource, and Puppet will determine which commands need to be run based on the data obtained from Facter, a program that collects data about the system it is running on, including its operating system, IP address, and some hardware information.[7] Providers on the node use Facter facts and other system details translate resource types in the catalog into machine instructions that will actually configure the node.
  • Transaction: A normal Puppet run has the following stages:
    1. An agent send facts from Facter to the master.
    2. Puppet builds a graph of the list of resources and their interdependencies, representing the order in which they need to be configured, for every client. The master sends the appropriate catalog to each agent node.
    3. The actual state of the system is then configured according to the desired state described in manifest file. If the system is already in the desired state, Puppet will not make any changes, making transactions idempotent.
    4. Finally, the agent sends a report to the master, detailing what changes were made and any errors that occurred.

See also[edit]

References[edit]

  1. ^ "Puppet 5.5 Release Notes". Retrieved 2 April 2018. 
  2. ^ "Evolving Puppet for the Next 10 Years". Luke Kanies. 2014-09-23. Retrieved 2017-05-26. 
  3. ^ "Puppet Frequently Asked Questions". Puppet Labs. Retrieved 10 March 2010. 
  4. ^ "Deploying Apache Tomcat Applications With Puppet". tomcatexpert.com. Retrieved 23 January 2015. 
  5. ^ "Overview of Puppet's architecture — Documentation — Puppet". docs.puppet.com. Retrieved 2016-09-14. 
  6. ^ Krum, Hevelingen, Kero, Turnbull, McCune. Pro Puppet. Apress. ISBN 978-1430260400. 
  7. ^ https://puppet.com/docs/facter

External links[edit]