Skip to main content

Troubleshooting a Puppet Install

Hands-On Lab

 

Photo of Elle Krout

Elle Krout

Content Team Lead in Content

Length

00:30:00

Difficulty

Intermediate

The Puppet installation process can be quite simple — as long as everything is set up properly to begin with. However, when we go to perform what should be simple tasks, things can go wrong. In this hands-on lab, we will explore what happens when our Puppet Enterprise install doesn't go the way we expect it to. We will also examine what steps we can take to pinpoint the problem, fix it, and then get Puppet back to an operational state.

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.

Troubleshooting a Puppet Install

Introduction

In this hands-on lab, we will explore what happens when our Puppet Enterprise install doesn't go the way we expect it to. We will also examine what steps we can take to pinpoint the problem, fix it, and then get Puppet back to an operational state.

Solution

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

 ssh cloud_user@PUBLIC_IP_ADDRESS

Attempt to Install Puppet Enterprise

  1. Attempt to run the installer and access the graphical install:

    cd puppet-enterprise-2018.1.7-el-7-x86_64/
    $ sudo ./puppet-enterprise-installer

    Note: We will be asked to choose an installation method, either Text-mode Install or Graphical-mode Install can be used for completing this lab.

  2. Input your method of installation with either 1 for Text-mode Install or 2 for Graphical-mode Install.

  3. Next, navigate to port 3000 via a web browser.

  4. In the web address bar type: https://[Enter the IP Address Here]:3000

  5. When we try to access the console, it will time out, therefore; return to the command line and cancel the installer with (CTRL+C).

Check the Firewall

  1. Check the status of the firewall:

    $ sudo firewall-cmd --state
  2. We should see the status as --state running.
  3. Since the firewall is being enforced, we cannot access the installer. Let's assume we will update our firewall ports via a Puppet post-install, so just stop it using the following firewalld commands:

    $ sudo systemctl stop firewalld
    $ sudo systemctl disable firewalld

Check the Hosts File

  1. Attempt to run the installer, once again with:

    $ sudo ./puppet-enterprise-installer
  2. Choose the same method of installation, that was used earlier on in this lab.
  3. Reload the page from earlier or access a web browser again and in the top web address bar use this format: https://[Enter the IP Address Here]:3000 for the connection test.
  4. A "your connection is not private" message should appear, but we will click on Advanced.
  5. Click Proceed.
  6. Click Let's Get Started.
  7. Add a password to the Console admin user.
  8. Click Continue.
  9. On the Confirm the plan page, click Continue.
  10. We will encounter a "could not resolve DNS" message indicating that Puppet was unable to connect to itself with puppet.ec2.internal.
  11. Although the graphical installer worked that time, we must update the /etc/hosts file. Leave the existing web browser page open and go back to the command line.
  12. Clear the command line screen with the shortcut (CTRL+C).
  13. Execute a test ping with:
    `ping puppet.ect2.internal`

    Note: The firewalls are set to off, so we do not need to telnet because the ports are open.

  14. Enter the following to verify that puppet.ec2.internal is not included:
    $ sudo vim /etc/hosts
  15. Use the following command line format to address the installer recognition problem:
    127.0.0.1   puppet.ec2.internal localhost localhost.localdomain localhost4 localhost4.localdomain4
  16. Save and exit.
  17. Try running the Puppet Enterprise installer again with:
    $ sudo ./puppet-enterprise-installer
  18. When asked, choose the same method of installation that was used earlier on in this lab.
  19. Navigate back to a web browser, and click the puppet logo that's located already on the page to reload it.
  20. Click Let's Get Started.
  21. Once again, add a password to the Console adminuser.
  22. Click Continue.
  23. On the Confirm plan page, click Continue.
  24. We should see a series of verification messages that indicate all of the issues are now fixed for the installation.
  25. Click Deploy Now to run the installation.
  26. Lastly, it is optional to see the installation of Puppet Enterprise on puppet.ect2.internalfinish.

Conclusion

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