Skip to main content

Installing Puppet Enterprise

Hands-On Lab

 

Photo of Elle Krout

Elle Krout

Content Team Lead in Content

Length

00:30:00

Difficulty

Intermediate

Puppet Enterprise is a robust configuration management and automation tool, that allow use to enforce consistent configurations across multiple platform. But before we can get started using Puppet Enterprise, we have to install it! In this hands-on lab, we'll be setting up a Puppet Enterprise Master of Masters and preparing it to help deploy its Puppet agent service across multiple operating systems. To test this, we'll also deploy the Puppet agent on an additional node.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Installing Puppet Enterprise

Introduction

Puppet Enterprise is a robust configuration management and automation tool that allows us to enforce consistent configurations across multiple platform. But before we can get started using Puppet Enterprise, we have to install it! In this hands-on lab, we'll be setting up a Puppet Enterprise Master of Masters and preparing it to help deploy its Puppet agent service across multiple operating systems. To test this, we'll also deploy the Puppet agent on an additional node.

Solution

  1. Begin by logging in to the lab server using the credentials provided on the hands-on lab page:

    ssh cloud_user@PUBLIC_IP_ADDRESS

Install Puppet Enterprise on the "Puppet master" server

Text-Mode

  1. Pull down the installation file:

    $ wget --content-disposition 'https://pm.puppetlabs.com/puppet-enterprise/2018.1.7/puppet-enterprise-2018.1.7-el-7-x86_64.tar.gz'
  2. Expand the file:

    $ tar -xf puppet-enterprise-2018.1.7-el-7-x86_64.tar.gz
  3. Run the installation script:

    $ cd puppet-enterprise-2018.1.7-el-7-x86_64
    $ sudo ./puppet-enterprise-installer
    ...
    How to proceed? [1]: 1
  4. Update the password and DNS alt names:

    "console_admin_password": "password"
    ...
    "pe_install::puppet_master_dnsaltnames": ["puppet", "master"]
  5. Save and exit, then continue installation:

    Proceed with installation using the pe.conf at
    /home/cloud_user/puppet-enterprise-2018.1.7-el-7-x86_64/
    conf.d/custom-pe.conf? [Yn]y
  6. Update the PATH for sudoers:

    $ sudo $EDITOR /etc/sudoers.d/puppet_path
    
    Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin
  7. Save and exit the file, then refresh the Bash session:

    $ bash
  8. Perform a Puppet run twice:

    $ sudo puppet agent -t
    $ sudo puppet agent -t

Graphical-Mode

  1. Update the /etc/hosts file:

    $ sudo $EDITOR /etc/hosts
    
    127.0.0.1   puppet.ec2.internal localhost localhost.localdomain localhost4 localhost4.localdomain4
  2. Save and exit.

  3. Pull down the installation file:

    $ wget --content-disposition 'https://pm.puppetlabs.com/puppet-enterprise/2018.1.7/puppet-enterprise-2018.1.7-el-7-x86_64.tar.gz'
  4. Expand the file:

    $ tar -xf puppet-enterprise-2018.1.7-el-7-x86_64.tar.gz
  5. Run the installation script:

    $ cd puppet-enterprise-2018.1.7-el-7-x86_64
    $ sudo ./puppet-enterprise-installer
    ...
    How to proceed? [1]: 2
  6. Do not navigate to the provided URL, instead go to https://PUBLIC_IP_OF_MASTER:3000. Click Let's get started!.

  7. Set the DNS alt names and the password using the graphical prompt. Click Continue.

    • Puppet master DNS aliases: puppet, master
    • Console 'admin' password: password
    • Click Continue
  8. Review the plan, then click Continue again.

  9. Click Deploy Now. Installation will take about 8 minutes.

  10. Return to the command line and update the PATH for sudoers:

    $ sudo $EDITOR /etc/sudoers.d/puppet_path
    
    Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin
  11. Save and exit the file, then refresh the Bash session:

    $ bash

Update the Puppet master to support Ubuntu 18.04 agent architecture

  1. Access the Puppet Enterprise console through HTTPS and the public IP address of the Puppet master server.

    https://PUBLIC_IP_ADDRESS
  2. Go to Classification.

  3. Select the Puppet Master group.

    • Expand PE Infrastructure and click on PE Master.
  4. Under Configuration, add the pe_repo::platform::ubuntu_1804_amd64 class. Click Add class. Commit 1 change.

  5. Go to Nodes. Click puppet.ec2.internal. Click Run Puppet.... Finally, click Run.

Install the Puppet agent on the "additional node"

  1. On the Puppet Enterprise Console, copy the installation command from the Unsigned Certs page.

  2. Paste and run the command on the "additional node".

    ssh cloud_user@PUBLIC_IP_OF_ADDITIONAL_NODE
    
    $ curl -k https://puppet.ec2.internal:8140/packages/current/install.bash | sudo bash
  3. Check the fingerprint of node1 before signing it on the Puppet Enterprise Console:

    $ sudo puppet agent --fingerprint
  4. On the Master node, refresh the Unsigned Certificates page. Hover over the Fingerprint field to compare it to the output from the previous step.

  5. If the values match, click Accept.

Conclusion

Congratulations — you've completed this hands-on lab!