Introduction
Puppet is configuration management tool. Puppet manages configuration data on these systems, including users, packages, processes, services. Puppet can manage complex components to ensure compliance with policies you write. Puppet can ensure configuration consistency across thousands of servers. Puppet utilizes node-specific data to tune the policy correct for each system.
As an administrator, you will utilize Puppet configuration language to declare final state of your systems. We describe Puppet as “declarative”.
Declarative language is much easier to read, Puppet was designed to achieve consistent and repeatableresults. Every time Puppet evaluates state of node, it will bring node to a state consistent with the configuration policy.
How Puppet works?
On any node you control is an application namePuppetagent. The agent evaluatesand implements Puppet manifests and files containing Puppet configuration language that declare, desired state of node. The agent evaluates state of each component described in a manifest,and not any change is necessary. If the component needs to be changed, the agent makes the requested changes and logs the event. Puppet will send the node’s data to the master, and receive back a pre-compiled catalogcontaining only the node’s specific policy to enforce. Puppet provides many different ways classify and categorize nodes to limit which resources should be applied to which nodes.
Importance of Puppet
Puppet System & Hardware Requirement
Install Puppet Master
We will be working with an Ubuntu 14.04 LTS master server and one agent nodes: on Ubuntu 14.04.
Configure Puppet Master
Remove the line templatedir=$confdir/templates, Start the puppet master:
sudo service puppetmaster start
Install Puppet Agent
sudo apt-get install puppet
Configure Puppet Agent
/etc/puppet/puppet.conf
[main]
Server = puppet.master.com
Restart the Puppet service:
sudo service puppet restart
Generate and Sign Certificates
sudo puppet agent -t
It will output an error, stating that no certificate has been found. Because the generated certificate needs to be approved by the Puppet master.
On Puppet master list the certifications that need approval:
It should output display with your agent nodes hostname.
Puppet master Machine:
sudo puppet cert list --all
Approve the certificate, replacing hostname:
sudo puppet cert sign hostname.example.com
On the Puppet agent node runs the Puppet agent again:
sudo puppet agent –t
Successfully run without error.
Reference Links: https://docs.puppet.com/puppet/