Drop the Spreadsheet, Use Puppet Enterprise as Your Single Source of Truth
For people who might never have considered a career in accounting, a lot of sysadmins seem to spend their days living out of a spreadsheet. They're not balancing the books, they're cataloging their infrastructure. It's important work that has to be done. You have to know what you're running, because your ability to maintain a reliable, responsive infrastructure depends on it. It's also tedious work, and Excel probably isn't the best tool for the job. Rather than spending all your time in a spreadsheet, you should be spending it on more interesting things. One key recommendation from the 2013 State of DevOps Report was how important it is to pick a single source of truth that accurately reflects the configuration of all the systems in your infrastructure, then stick with it. Knowing the current state of everything you're managing, whether it's inside the firewall or out in the cloud, provides a way to allocate resources, plan for maintenance, or respond quickly to emerging issues. If you're using a spreadsheet to help with this, you already know what the problems are:
- You have to update the information by hand
- If you don't keep things updated, your inventory quickly becomes useless
- There's always one more thing it might be nice to know, making that spreadsheet dozens of columns wide and overwhelming to review
A Quick Tour of Puppet Enterprise Inventory ToolsPuppet Enterprise provides some inventory tools that make the process of capturing configuration information in one place much simpler. In most Puppet Enterprise configurations, puppet agents are checking in with their puppet master every half hour. Though we often think about the work the puppet master is doing -- directing the configuration of resources it manages -- those agents are also reporting in with the exact kinds of configuration information you may have been recording in that spreadsheet. Each agent uses Facter, Puppet's cross-platform system profiler, to relate dozens of facts, from the operating system and kernel versions -- the kinds of things you can track by hand -- all the way down to operational details you can't know without automated reporting, like the system's current uptime and how much free swap it has.
Listing Nodes in Your InfrastructureAt the highest level, the Puppet Enterprise console offers a view of all the nodes in your infrastructure via the node manager view. Though this view is fairly general, it does provide a quick, at-a-glance summary of the general state of your puppet agents. It also lists all the nodes in your Puppet Enterprise-managed infrastructure. You can get a lot more detail about each node in the list by clicking on it and scrolling down to the inventory data section of the individual node page. That's where you can see all the information Facter has provided to the puppet master about that node: If you're curious about just how comprehensive that list is, the Puppet Labs docs site has a report of all the core facts provided by Facter, and it's worth noting that with the latest release of Facter, you can easily write your own facts for a given node to relate information that's important to you but not covered by the core Facter library. All this information is updated with each puppet run, so you know you're always getting current data without having to do any manual data entry.
Searching on Configuration DataYou can use the inventory search tool to search across your infrastructure for nodes that match a given fact. For instance, if you want to learn which nodes are running CentOS, you'd search
CentOS: Another useful fact for sysadmins is system uptime. Performing an inventory search of
uptime_days > 21will show just the nodes that have been up for longer than three weeks. You can also search on multiple conditions, such as a combination of
virtual(to determine the virtualization platform under which a guest node is running) and
environment(to find just your production systems). You could do this kind of filtering with a spreadsheet, but the data gathering alone would be incredibly time consuming, and without any of the additional ever-changing operational data puppet agents routinely relate to their puppet master.