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

Puppet Quickstart Guide (Part 1)

Published by SPK Blog Post
on August 11, 2016

Puppet is the most well-known configuration management tool in the DevOps world and used by systems administrators to centrally manage large numbers of servers and computer systems. There are several Puppet quickstart guides online. However, these guides are unnecessarily long and complicated in my opinion. For example, an administrator learning Puppet for the first time can download and run the Puppet Learning virtual machine image.  Once downloaded, the admin can then learn how to configure Puppet by using a GUI interface. However, when the admin starts using Puppet for real they discover the GUI interface is only on the paid version.  As a result, the admin must configure everything by editing text files. To me such setup guidelines seem unnecessarily complicated as a beginner would likely not buy the premium version before testing the software. 

Here’s a  less complicated setup that includes steps to get Puppet up and running in record time on two separate Ubuntu 16.04 LTS machines. One machine will act as the puppet master and the other as the client. You will need to be root to run all of these commands.

How to Quickly Setup Puppet on Two Linux Machines. 

Step 1 – On the machine you want to act as the puppet master install the puppetmaster package.

root@puppetmaster:~# apt-get install puppetmaster

Step 2 – On the other machine install the puppet client.

root@puppetclient:~# apt-get install puppet

Step 3 – Still in the client machine, edit the /etc/puppet/puppet.conf file, and add this line under the [main] section.

server=FQDN or ip address of puppet master

Step 4 – Save the file, and then enable the puppet agent back at the command line.

root@puppet:~# puppet agent –enable

Step 5 – Run the puppet agent. It will attempt to communicate with the puppet master.

root@puppetclient:~# puppet agent -t

Exiting; no certificate found and waitforcert is disabled

puppet agent

It may appear to have done nothing, but in the background it generated a certificate request.

Step 6 – Switch back to the puppet master where you will look for the cert.

root@puppetmaster:~# puppet cert list

Step 7 – If everything has gone well up to this point you should see a response similar to the following.

“puppetclient.localdomain” (SHA256) 05:0C:23:87:47:75:E1:70:7D:6A:5D:F7:18:EF:C9:3F:C3:F6:9C:CA:CB:90:F0:D9:65:16:86:D7:65:60:66:31

Step 8 – Sign the cert.

root@puppetmaster:~# puppet cert sign puppetclient.localdomain

Notice: Signed certificate request for puppetclient.localdomain

Notice: Removing file Puppet::SSL::CertificateRequest puppetclient.localdomain at '/var/lib/puppet/ssl/ca/requests/puppetclient.localdomain.pem'

The client and master should now be setup to communicate with each other.

Step 9 – Go back to the client to verify this by running the same command you ran last time.

root@puppetclient:~# puppet agent -t

Info: Retrieving pluginfacts

Info: Retrieving plugin

Info: Caching catalog for puppetclient.localdomain

Info: Applying configuration version '1469488836'

Notice: Finished catalog run in 0.03 seconds

puppet agent success

If you get an error complaining of a certificate mismatch, you can change the entry you made in /etc/puppet/puppet.config so that the server name matches what’s expected, and run the command again.

If you didn’t get any error message then congratulations, the puppet master and client are now in communication with each other. Success!

In part 2 I’ll wrap things up by showing you how to configure the puppet master so that you can centrally manage multiple servers. Feel free to contact me with any questions or check out our Cloud Services for relief of any configuration, production or scaling headaches.

Tony Fontanilla
Linux Administrator
SPK and Associates

Latest White Papers

Total Economic Impact for Atlassian Open DevOps

Total Economic Impact for Atlassian Open DevOps

Forrester's Total Economic Impact Study found that Atlassian Open DevOps could net your organization a potential ROI of 358%. Discover an overview of this Forrester research paper below and download your free copy. Forrester Research Into Atlassian Open DevOps Agile...

Related Resources

LastPass Business For Corporate and Client Security

LastPass Business For Corporate and Client Security

At SPK, we want to empower employees to safely manage their own passwords. Additionally, for organizations, we want to enable the enforcement of password standards. Businesses that follow good password standards, such as increased complexity, non-duplicate passwords ...

Why You Should Be Using PTC Windchill As Your PLM Software

Why You Should Be Using PTC Windchill As Your PLM Software

As a manufacturer, you have to be both structured and agile to constantly stay in line or ahead of the industry. You have to deliver quality products that meet the customer’s needs today whilst being future-proofed for tomorrow.  Aside from that, you also need to...

Jira Integration For Greenlight Guru: Top 3 Reasons To Do It

Jira Integration For Greenlight Guru: Top 3 Reasons To Do It

Medical devices manufacturers can now benefit from Jira integration with Greenlight Guru. The only electronic quality management system (eQMS) specifically designed for medical device companies. This Greenlight Guru integration with Jira creates an agile system for...