Automate IT and infrastructure, manage complex workflows, and mitigate risk at scale.
Try the full-featured Puppet Enterprise for free on 10 nodes.
Find and prevent compliance failures
Continuous Delivery for Puppet Enterprise
Build, test, and deploy infrastructure as code faster and easier
Compliance Enforcement Modules
Remediate to stay in compliance
Content & Modules
Pre-built scripts to automate common tasks
Get Puppet Enterprise
First 10 nodes are free!
Try it now
Request a demo
Find thousands of component modules built by the community and guidance on using them in your own infrastructure.
Visit Puppet Forge >>
Open Source PuppetPerfect for individuals and small infrastructure
BoltAutomate tasks in orchestration workflows
See all open source projects >>
Contribute to open source projects >>
Get rid of unused modules and get your time back with Dropsonde.
Table of Contents:
Dropsonde is the content telemetry client built into recent versions of the Puppet Server that helps us focus on the modules and parts of modules that people are actively using.
It was designed to respect your privacy and will only report information about publicly published Forge modules. As part of this goal, it was architected from the very beginning to generate local reports so that you can see exactly what information is submitted.
You’ve probably been using Puppet Forge modules to manage bits in your infrastructure for years. If you’re like most of us, you’ve gradually added more modules and maybe you’ve lost track of exactly what some of them do and on what nodes they’re declared. You may even suspect that you have modules installed that you haven’t actually used in years…. only you’re not quite certain which modules those might be. I am certainly guilty of this!
If you relate to this, you likely won’t be surprised to learn that one of our most common customer requests is for a way to audit modules in order to identify which are no longer in use. Having these extra unused modules in your environments only serves as dead weight. Code deployments, pluginsync, and onboarding new team members all take longer because the cognitive load of understanding the codebase is greater. Each unused module only adds a miniscule amount but, cumulatively, they really add up.
Identifying and removing unused modules can give that valuable time back.
I’d like to tell you about a couple of tools and techniques for identifying and removing unused modules. In general, there are three scenarios in which you’d want to do this:
One of the metrics that Dropsonde generates is information about the modules installed – which versions, how many nodes they're declared on, what platforms they're declared on – and which modules don't appear to be used at all.
Getting the list of unused modules is as straightforward as ensuring that version 0.0.8 or greater is installed on your primary Puppet server and running a local report on the command line. Follow the detailed instructions on our technical blog if you'd like to try it out.
Puppet Ghostbuster is a slightly different kind of tool that will help you in the second and third scenarios above. It's designed to run directly on module code and thus can tell you more about the individual components – like functions and templates. A developer can run it on their local workstation with the codebase checked out and get a pretty good idea of which stale components can be removed. You'll need to do a bit of configuration for this, such as exporting your PuppetDB credentials as environment variables and specifying the path to your Hiera data.
Because the tool is implemented as a set of puppet-lint plugins, it's also pretty trivial to configure it to run in CI so that pull request reviewers have an idea of how the code they're reviewing is actually used. Check out the project page for more information, or follow Puppet's technical blog on Dev.to to be the first to know when we publish our detailed tutorials.
Good luck and happy codebase cleaning!
Not using Puppet Enterprise yet? Get started with your free trial today.
START MY TRIAL
Community and Developer Relations Lead, Puppet by Perforce