spk-logo-white-text-short2
0%
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

Written by SPK Blog Post
Published 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

10 AI Use Cases: Accelerating Automotive Embedded Development

10 AI Use Cases: Accelerating Automotive Embedded Development

Software-defined and electric vehicles are only increasing as automotive technology advances. As these features grow, automakers must adapt. Manufacturing a car is not the same as it was years ago. This eBook explores how AI can be used in the automotive development...

Related Resources

Why Agile Teams Struggle with Predictability (and How Data Can Fix It)

Why Agile Teams Struggle with Predictability (and How Data Can Fix It)

Introduction Hello, everyone, and welcome back to another SPK & Associates Vlog. My name is Michael Roberts, and today I am joined by Julia Wester, CEO of 55 Degrees, who is an Atlassian Marketplace Partner. So, Julia, welcome, and please introduce yourself. Hi....

10 Ways Loom Helps Teams Work Faster and Smarter

10 Ways Loom Helps Teams Work Faster and Smarter

Introduction Hello and welcome to this video. Teams today face a difficult paradox. We are asking them to deliver higher quality products faster than ever. Yet our teams are drowning in a sea of synchronous meetings. Physically, being in the same room, or even virtual...

Connecting Slack and JSM for Better and Faster IT Support

Connecting Slack and JSM for Better and Faster IT Support

Atlassian JSM and Slack Integration Hi, this is Carlos Almeida from SPK and Associates. Today I'll be giving you a short demo on the Atlassian JSM to Slack integration. We want an employee to be able to ask a question inside Slack. If there is an existing knowledge...