About: Puppet is an open-source DevOps systems management tool

Step1. Install the puppet rpm

rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm

Step2. Install the puppet master

–Run the command (on master)

yum install -y puppet-server

Step3. Check the puppet version

–Run the command (on master)

puppet – -version

Step4. Install the puppet agent

–Run the command (on the agent)

yum install -y puppet

Step5. Edit the hosts file /etc/hosts in puppet

–Run the command (on master)

vi /etc/hosts
192.168.33.51 server1 server1.example.com

Step6. Now edit the puppet configuration on the master

–Run the command (on master)

vi /etc/puppet/puppet.conf
dns_alt_names = server1,server1.example.com
certname=server1

Step7. Edit the hosts file /etc/hosts puppet agent

–Run the command(on the agent)

vi /etc/hosts
192.168.33.52 server2.example.com (##Agent machine IP)
192.168.33.51 server1 server1.example.com (##Master machine IP)

Step8. Now edit the Puppet configuration on the agent

–Run the command (on the agent)

vi /etc/puppet/puppet.conf
server = server1.example.com

Step9. Generate a Puppet Master Certificate on the master

–Run the command (on master)

puppet puppet master –no-daemonize –verbose

Step10. Now start the puppet master on the master machine

–Run the command (on master)

puppet resource service puppetmaster ensure=running

Step11. Send the certificate signing request from puppet agent to the puppet master

–Run the command (on agent)

puppet agent -t

Step12. Sign Puppet Agent Certificate in Puppet Master machine

–Run the command (on master)

puppet cert list
puppet cert sign server2.example.com

Step13. Let’s start the Puppet Agent on the agent machine

–Run the command (on the agent)

puppet resource service puppet ensure=running

Step14. Now we need to update the puppet agent with the changes made in the Puppet Master

–Run the command(on agent)

puppet agent -t

LEAVE A REPLY

Please enter your comment!
Please enter your name here