Puppet is a tool 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.
Scenario
In this tutorial i am going to use two systems as mentioned below.
Puppet Master:
Puppet client:
Add Puppet repository to your Centos Machine:
For Centos 7:
Install the Puppet Master:
# Download puppet-server from Puppet Labs
# Start Puppet-Server
Centos 7:
# Set Puppet Master to run on startup
Puppet needs a scalable web server in a non testing environment, so lets install apache (Official Docs):
# Download apache and necessary dependencies
# Install Rack/Passenger
Then
passenger-install-apache2-module
Create a virtual host file for puppet:
and add:
Add the puppet https Port to the firewall:
Start up Apache:
Disable WEBrick and enable Apache on boot:
Make sure the port is open and it’s listening:
Append this to the end of the file:
Check the Apache configuration with an apachectl configtest and again fix any errors you encounter.
Now, copy the Rack config:
Give Puppet correct permission to access the Rack config:
Client Node install
Add the puppet labs repo:
Install the Puppet Client:
If you are not using DNS in your envrionment, you will need to manually edit your hosts file on both machines .
Edit /etc/puppet/puppet.conf and add the agent variables:
Set the puppet agent to run on boot:
Now test the client:
Check and apply from The Puppet-master:
Enjoy!
---------------------------------------------------------------------
Install Puppet Server On CentOS 7