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

Puppet Quickstart Guide (Part 1)

windchill features best plm software
Written by SPK Blog Post
Published 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

The State of Digital Quality Maturity in Pharma and Medtech

The State of Digital Quality Maturity in Pharma and Medtech

Organizations in the medical, pharmaceutical, and life science industries are constantly adapting to their field’s rapidly changing technology and regulations. This continuous adjustment can become exhausting. Between this burnout and being unsure if your technology...

Related Resources

Digital Maturity in Life Sciences Quality and Manufacturing

Digital Maturity in Life Sciences Quality and Manufacturing

Life sciences manufacturing is arguably the most important branch of the manufacturing industry. The products these manufacturers develop can be life-saving.  With this expectation, life science manufacturers must adhere to the strictest quality and safety standards. ...

The Role of PLM in Orchestrating the Product Digital Thread

The Role of PLM in Orchestrating the Product Digital Thread

Product Lifecycle Management (PLM) plays an important role in the manufacturing industry. Ensuring all factors of a product are well-documented is a priority for every business.  Keeping this information organized is not just a good business practice, but it...

Making the Move from Cherwell to Jira Service Management

Making the Move from Cherwell to Jira Service Management

The landscape of IT Service Management (ITSM) tools is evolving, and with the end-of-life announcement for Cherwell, many organizations are contemplating their next steps. If you're in this position, this blog is for you. Jira Service Management emerges as a...