Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Troubleshooting Puppet
  • Table Of Contents Toc
Troubleshooting Puppet

Troubleshooting Puppet

By : Thomas Uphill
4 (1)
close
close
Troubleshooting Puppet

Troubleshooting Puppet

4 (1)
By: Thomas Uphill

Overview of this book

Puppet is a configuration management system written for system administrators to manage a large number of systems efficiently and help maintain order. Deploying Puppet becomes more complex as you increase the number of nodes in your environment. The Puppet tool is an intelligent solution that increases the automation footprint for the proactive management of server infrastructures. Puppet's simple programming language is usable on most operating systems and is portable on different deployment environments. We begin by looking at the puppet.conf server configuration file, and talk about possible problems that can occur. What does puppet really do in the background and what options does it provide for troubleshooting? This is what we will explore. Moving on, we will be troubleshooting errors made in modules and templates, finding the best solutions. We will be writing code that will helping us in identify errors. Then we will explain how several ENCs do their job and how puppet communicates with them. We will learn how PuppetDB collects data generated by Puppet. It also enables advanced Puppet features like exported resources, and can be the foundation for other applications that use Puppet’s data. By the end of the book we will have learned the best debugging tips for Puppet and PuppetServer.
Table of Contents (13 chapters)
close
close
11
11. What's Next?
12
Index

Debugging Ruby


There are two supported ways to debug Ruby code with puppetserver—ruby-debug and Pry. Both of these will implement a Read Eval Print Loop (REPL). A REPL allows you to type commands and have them evaluated in real time. When working with puppetserver, this gives you the power to inspect the puppetserver process while it is compiling a catalog or processing a report. Both ruby-debug and Pry are installed as Ruby gems. To use them with puppetserver, you have to install them by using the puppetserver gem command. I prefer to use Pry. So, I will show you how to use Pry in this example. We'll inspect calls to the hiera function by using Pry. To start, install Pry for use within puppetserver, as follows:

[root@puppet ~]# puppetserver gem install pry
Fetching: coderay-1.1.0.gem (100%)
Successfully installed coderay-1.1.0
Fetching: slop-3.6.0.gem (100%)
Successfully installed slop-3.6.0
Fetching: method_source-0.8.2.gem (100%)
Successfully installed method_source-0.8.2
Fetching: spoon...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Troubleshooting Puppet
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon