- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Installing Open Source Puppet
Puppet is a configuration management tool that allows us to enforce consistent configurations across multiple platforms, and Puppet open source even lets us do it for free. In this lab, we'll configure an open source Puppet master on a CentOS 7 server, then start bringing our infra under Puppet's control by installing the Puppet agent on a second node. We'll also make sure our certificate authority is up and running by accepting our node's cert on the master.

Lab Info
Table of Contents
-
Challenge
Install the Puppet Server on the CentOS 7 node
Update the
/etc/hosts
information:$ sudo $EDITOR /etc/hosts 127.0.0.1 puppet localhost localhost.localdomain localhost4 localhost4.localdomain4
Add the Puppet 5 Platform repo:
$ sudo rpm -Uvh https://yum.puppet.com/puppet5-release-el-7.noarch.rpm
Install Puppet:
$ sudo yum install puppetserver
Start Puppet, making sure it uses no more than 1 GB of RAM:
$ sudo $EDITOR /etc/sysconfig/puppetserver JAVA_ARGS="-Xms1g -Xmx1g -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger" $ sudo systemctl start puppetserver $ sudo systemctl enable puppetserver
Ensure any Puppet commands can be used with
sudo
:$ sudo $EDITOR /etc/sudoers.d/99_extra Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin $ bash
-
Challenge
Install the Puppet agent on the Ubuntu 18.04 node
Update the
/etc/hosts
file with the private IP and name of the master:$ sudo $EDITOR /etc/hosts 10.0.1.100 puppet
Add the Puppet 5 Platform repository:
$ wget https://apt.puppetlabs.com/puppet5-release-bionic.deb $ sudo dpkg -i puppet5-release-bionic.deb $ sudo apt update
Install the Puppet agent:
$ sudo apt install puppet-agent
Start and enable Puppet:
$ sudo systemctl start puppet $ sudo systemctl enable puppet
Update the secure path:
$ sudo $EDITOR /etc/sudoers.d/99_extra Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin $ bash
-
Challenge
Sign the Ubuntu 18.04 node's cert on the master
On the Ubuntu 18.04 node, view the fingerprint of the node:
$ sudo puppet agent --fingerprint
One the master, list the pending certificates to sign:
$ sudo puppetserver ca list
If the fingerprints match (they should), sign the cert:
$ sudo puppetserver ca sign --certname node1.ec2.internal
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.