User:Djmitche/Puppet Stuffz
From MozillaWiki
Commands
puppet --debug foo.pp
executes foo.py. Can supply facts with FACTER_varname or even --factpath; can load specific classes with --loadclasses=, and that classfile can be created with --classfile in puppetd
Testing
You can test a set of manifests without a server:
- clone the manifests
- cp secrets.pp.template secrets.pp (if necessary)
In the root of the clone,
puppet --verbose --noop --modulepath=modules/ mv-production.pp
(or whichever file contains the necessary node definition)
You can also test a particular class e.g.,
puppet --verbose --noop --modulepath=modules/ -e 'include nagios'
This may only work with 0.25.0 and up, but hey, it's useful for masters at least.
Classfile
puppetd dumps /var/lib/puppet/classes.txt, giving the set of classes applied to this node.
RI's blog posts
- http://www.devco.net/archives/2010/11/14/getting_diffs_for_puppet_catelogs.php
- http://www.devco.net/archives/2009/08/19/tips_and_tricks_for_puppet_debugging.php
Tools
Other Links
- http://red45.wordpress.com/2010/09/27/writing-puppet-types/ - writing puppet types
- http://agiletesting.blogspot.com/2009/11/automated-deployments-with-puppet-and.html - using puppet to deploy web apps (includes some virtualenv stuff, and an 'unless' clause trying to import a Python module