Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 30m
Published
Clock icon Jun 07, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. 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
    
  2. 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
    
  3. 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
    

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans