Puppet is a tool that automates the configuration and management of a large fleet of machines. Using Puppet you can centrally manage the configurations of one, tens, hundreds and thousands of machines.
In this article I will talk about the main features of the system.
Puppet is written in Ruby, the client-server architecture. On each managed node there is a client that periodically requests https to the server for configuration updates.
')
Configuration Management Language
The configuration is described in a special language. The basic configuration items are resources. Each resource has a type, attributes and name. The simplest example of a file resource:
file {"/ etc / passwd":
owner => "root"
}
This resource includes checking the owner of the / etc / passwd file, and if it is other than root, Puppet sets the user root as the owner of this file.
Resources can (and usually should) be grouped into classes. For example, a class for Postfix will contain resources for both installing and configuring Postfix mail server.
One of the main elements of the configuration description is the node. The node allows you to describe the functionality of a particular type. For example, you can describe the site "office desktop", or "web server". Accordingly, everything necessary for the office software will be installed and configured for the office desktop, and some apache or nginx for the web server.
In general, the configuration description language supports almost all features of a normal OOP language. So, in fact, it turns out that you are programming the behavior of machines. Indeed, the result is a fairly visual description that is easy to read and understand.
The user community
shares its experience , in terms of Puppet, they are called “recipes”.
Where and how does it work?
The next thing to note is platform independence. Your scripts can be deployed equally on Linux and FreeBSD, all features of a particular platform are taken into account by the Puppet client. You can review the
list of supported platforms to make sure your favorite OS is supported by Puppet. Windows is not in this list, but it is reported that Puppet in it works through cygwin.
As for performance. She is pretty good even now. Let's say you can manage 50-100 machines with a rather mediocre server with 2 gigs of memory. However, version 0.25 is on the way, in which one of the main features is the transition from XML-RPC to REST, which means a significant performance improvement.
In addition, like almost any web service, Puppet scales. Puppet can be run using nginx and Mongrel. So you can not be afraid of a situation when suddenly your organization will grow to a large size, Puppet will cope with this job :-)
Summary
Concluding this introductory article, I want to especially note the fact that Puppet can be very useful for you, even if you have only one server. Having a well-documented config, in the event of a server crash, you will very quickly be able to deploy the farm on another server, since the installation and configuration of almost everything that is needed will be done automatically.
In the next section, I will describe the installation, configuration, and basic features of Puppet.
If you can not wait to learn more about Puppet right now,
welcome to the documentation :-)
PS
I put it in “Linux for everyone”, because may be useful not only admins :-)