A list of puppet modules, tools, testing, and architecture that are good references for current Puppet best practices.
- Puppet Tea - Custom Defined Types that can be used to shorten the parameter list definitions and/or when complex types are used in multiple places.
-
Puppet Development Kit - All-in-one CLI for writing and testing puppet modules (docs, announcement, github); provides Gemfile, Rakefile, Travis CI, Rubocop, and other settings you should use.
-
Modulesync helps synchronize consistent settings across modules in a user or organization namespace.
- modulesync_config reference is an example of a starting configuration.
-
puppet-retrospec will help you get started with some quick and dirty rspec tests.
-
puppet-ghostbuster is a dead code detector. Requires puppetdb 3+.
- VSCode Plugin: syntax highlighting, code snippets, linting, IntelliSense (using your deployed modules), validation, import from
puppet resource
, node graph view, PDK integration (blog, VSCode) - JetBrain's RubyMine: style guide, syntax and error highlighting, some refactoring support, code completion, structure view download
- vim-puppet: provides syntax highlighting and other plugins for editing puppet files.
- Atom: syntax highlighting, linting
-
Introduction to Testing Puppet Modules (slides and video) by David Schmitt
The modules below each highlight one or more aspects of rspec-puppet testing.
- puppetlabs/java's java_version
- puppetinabox puppet_role fact and test - The puppet_role fact is calculated on another fact's value, hostname, which requires resetting BOTH custom facts for every test.
- puppetlabs/apache's defined type apache::vhost requires the class
apache
to be included as well, vialet :pre_condition do .. end
Templates are often fed values by class parameters. Test for portions of the content based on the values you expect to find with various parameter settings, rather than testing the entire contents.
- puppetlabs/apache - httpd.conf.erb's DefaultType setting is tested here
A Control Repository is used to control the code deployed in Puppet environments. Puppet has two official reference repositories, and there are some public repositories that are a mix of reference architecture and practical usage.
- puppetlabs/control-repo - Official reference architecture from Puppet, based on Even Besterer Practices.
- puppetlabs-education/classroom-control-vf - A good reference implementation of the control repository, maintained by Puppet's Education group.
- example42/control-repo - Example 42's reference control repository.
- puppetinabox/controlrepo - Rob Nelson's control repository for his PuppetInABox project.
- Whirlwind Tour of Puppet 4 - Slides and video
- Puppet Cookbook, a collection of task oriented solutions in Puppet
- YAML for Puppet users? - A combination YAML primer and Guide to Puppet/YAML idiosyncracies.