fbpx
1-888-310-4540 (main) / 1-888-707-6150 (support) info@spkaa.com
Select Page

Puppet Quick Setup Guide (Part 2) – How to Configure Puppet Master

Published by SPK Blog Post
on October 25, 2016

Recently I explained how to easily set up communication between a Puppet client and master. In this follow up post I’ll outline the steps involved in configuring the Puppet master to control the client machine.

Starting out with Puppet does not have to be a challenging experience. However, if you’re new to Puppet as a configuration management tool, the workflow may appear a bit complex. Understanding the basics of Puppet is key to making it an effective workflow. Let’s take the opportunity to review a setup that was discussed in my previous post. In that post, several servers were configured to communicate with the Puppet master. Here’s some additional steps to now give the administrator complete control through the Puppet master.

  • Open /etc/Puppet/manifests/site.pp for writing and paste the code below into it. (And if you’d like you can verify that /etc/Puppet/manifests/site.pp is the main configuration file with the command “Puppet config print manifest.”)

package { ‘cowsay’:

ensure => installed,

}

  • Save the file and then go back to the client machine and run “Puppet agent -t.” If that completes without error, then try running the following command.

/usr/games/cowsay hello world

  • A talking cow appears on your screen.

screen-shot-2016-10-25-at-3-10-54-pm

You can try adding another entry in site.pp for another package you know isn’t installed on the client. If you wait for at least 30 minutes and then check back on the client machine, you’ll see that the package has been automatically installed.

Most of the time the Puppet master does not act like a ‘master’ but more like a ‘waiter’ and a ‘server.’ It waits for puppet clients to contact it. Every 30 minutes a puppet client will ask the puppet master if there’s anything to do, and the puppet master will respond by serving up instructions and files the client might need in order to carry out those instructions. You can manually force a Puppet client to do this by logging into the machine where it is running and using the “Puppet agent -t” command, but the Puppet master doesn’t initiate contact with the Puppet client and tell it what to do. This would be a “push” from the server. Ansible is a popular CFM that pushes changes out to clients from the master server. The communication path for Puppet always starts with a pull request from the client.

After reviewing the basics of Puppet, there should be a clearer understanding of how the master configuration works and how the client polls for requests. Your initial step in setting up Puppet is establishing the communication link between the master and the client. The next steps will be to configure the Puppet master, establishing all your servers with configured Puppet clients. Note that the Puppet Master did not have to be restarted in order for our configuration changes to be recognized. In most cases you will not need to restart the Puppet master after making changes to the configuration.

This quick setup guide gives you a small sample of what you can do with Puppet. You can build on this experience as you explore other features of Puppet. Besides automatic package installations, you can do things such also manage configurations files, ensure certain services are running or not running, and aid in automatic software deployment. With Puppet, the possibilities are endless.

You have the ability to automate/replicate on multiple servers as a Linux systems administrator with Puppet. You can also download modules created by others at the Puppet Forge, which at the time of this writing has over 4,483 modules available to choose from.

Clearly Puppet has positioned itself as one of the leaders when it comes to automation and the delivery of services. Getting the puppet master and clients setup and running is the first step in making Puppet part of your organization’s infrastructure.

Latest White Papers

Related Resources

2022 Technology Year in Review

2022 Technology Year in Review

In the past 3 years, our world has definitely changed.  This year was no exception.  From the early days of the COVID-19 pandemic to the great resignation, businesses have had to adapt to changing government regulations, employee needs, and methods of doing business. ...

Improve Work Quality With SolidWorks Automation

Improve Work Quality With SolidWorks Automation

There are many customization options for SOLIDWORKS and SOLIDWORKS PDM to make your life easier. But, there are also plenty of out-of-the-box SOLIDWORKS automation checks too. And, these solutions are readily available to make your engineer’s life easier....

What Is AWS (Amazon Web Services)?

What Is AWS (Amazon Web Services)?

Amazon Web Services (AWS) is one of the three biggest cloud service providers in the market, alongside Microsoft and Google. Additionally, it was one of the first cloud providers when it launched Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage...