- A Configuration Management Tool
- A framework for Systems Automation
- A Declarative Domain Specific Language (DSL)
- An OpenSource software in written Ruby
- Works on Linux, Unix (Solaris, AIX, *BSD), MacOS, Windows (Supported Platforms)
- Facter - Complementary tool to retrieve system's data
- MCollective - Infrastructure Orchestration framework
- Hiera - Key-value lookup tool where Puppet data can be placed
- PuppetDB - Stores all the data generated by Puppet
- Puppet DashBoard - A Puppet Web frontend and External Node Classifier (ENC)
- The Foreman - A well-known third party provisioning tool and Puppet ENC
- Geppetto - A Puppet IDE based on Eclipse
-
Debian, Ubuntu
wget https://apt.puppet.com/puppet7-release-focal.deb && \ sudo dpkg -i puppet7-release-focal.deb && \ sudo apt update
sudo apt install puppet-agent # On Client (Nodes) sudo apt install puppetserver # On Server (Master)
-
RedHat, CentOS
# this example is for RHEL8 sudo rpm -Uvh https://yum.puppet.com/puppet7-release-el-8.noarch.rpm
sudo yum install puppet-agent # On Client (Nodes) sudo yum install puppetserver # On Server (Master)
- A Declarative Domain Specific Language (DSL)
- It defines STATES (Not procedures)
- Puppet code is written in manifests (files with .pp extension)
- In the code we declare resources that affect elements of the system (files, packages, services ...)
- Resources are grouped in classes which may expose parameters that affect their behavior.
- Classes and configuration files are organized in modules.
- Consult the official glossary to give the correct meaning to Puppet terms
-
When clients connect, the Puppet Master generates a catalog with the list of of the resources that clients have to apply locally.
-
The Puppet Master has to classify nodes and define for each of them:
- The classes to include
- The parameters to pass
- The Puppet environment to use
-
The catalog is generated by the Master according to the logic of our Puppet code and data.
-
In our code we can define our variables and use other ones that may come from different sources:
- facts generated directly by the client.
- parameters obtained from node's classification.
- Puppet internal variables.
- Resource Types are single units of configuration composed by:
- A type (package, service, file, user, mount, exec ...)
- A title (how is called and referred)
- Zero or more arguments.
Example for a file resource type:
type { 'title': argument => value, other_arg => value, }
file { 'motd': path => '/etc/motd', content => 'Let's learning Puppet :)' }
- From the shell the command line interface:
puppet describe file
- For the full list of available descriptions try:
puppet describe --list
- Puppet code for the list of native resource types:
ls $(facter rubysitedir)/puppet/type
- Installation of
OpenSSH
packagepackage { 'openssh': ensure => present, }
- Creation of
/etc/motd
filefile { 'motd': path => '/etc/motd', }
- Start of
http
serviceservice { 'httpd': ensure => running, enable => true, }
Preview
- Complete Puppet learning in README.md file
-
Vagrantfile
for creating Puppet server-client environment. -
docker-compose.yml
for creating puppet server instance - Configuring
puppetdb
andfireman
- Creating a secanrio with this environment and Puppet. (preferably install
k8s-lab
through Puppet)