2012-06-17 // Puppet boilerplate modules: more example content, new boilerplates
About a month ago, I introduced the ”Puppet boilerplate modules” project with the goal to help users to create Puppet modules in a fast and comfortable way. I got much positive feedback and the “new module wizard” helped to create tons of modules for e.g. the companies I work for and with. Everything seems to be fine so far.
But what I really want to write about is a new GIMP example module I created for the puppet-boilerplate-modules-example-content repository. It is based on a new boilerplate (application-004) which comes with additional preparations for software with plugin/extension/modules (or however the application's nomenclature calls such components). So check it out if you want to see what to expect and if the new content might be useful for you.
2012-05-11 // Introducing Puppet boilerplate modules [Update]
My colleague and I are maintaining a ”Puppet boilerplate modules” project (something like puppet module generate on steroids). To keep up with the OSS spirit, we thought it would be a good idea to share it with the community.
The project helps you to create high quality Puppet modules in a fast and comfortable way. Main goals are to boost efficiency and Puppet code quality. Use it if you want to get module skeletons with:
- tidy and easily extendable structure
- good README skeleton, RDoc documentation and license information
- source code which follows the official style guide
- an easy way to push your new modules to GitHub or Bitbucket
- module variable debugging functionality (some boilerplates online)
Usage
- Clone the repository:
$ git clone git://github.com/syn-systems/puppet-boilerplate-modules.git
- Call the wizard to create the module skeleton for a new module:
$ ./puppet-boilerplate-modules/newmodule.sh
Hint: You can provide the answers by using parameters. Use
newmodule.sh -hto get a parameter listing and usage instructions.
The puppet-boilerplate-modules-example-content repository is your friend if you need more help. It provides example modules including detailed creation transcripts.1)
Example content
- The puppet-boilerplate-modules-example-content repository provides example modules and rendered2) documentation (created with ). It should give you an impression of what to expect from and how to use puppet-boilerplate-modules and if the project might be useful for you.
- Some screenshots of the module wizard (→
newmodule.sh):
Some explanatory notes
- Every boilerplate comes with different manifest files, each encapsulates the Puppet code for a specific job. This ensures a clean module structure. The name of the manifest should say what it does in general, the RDoc block at the top provides more details. Example: the
application-002boilerplate comes with the following files in/manifests:init.pp
Contains the main module class. It validates the module parameters and coordinates the actions (e.g. by chaining resources).params.pp
Sets the default values for the parameters of the main module class (→init.pp) and manages internal module variables. Therefore, many operating system dependent differences like package names are addressed in here.package.pp
Coordinates all software package management related actions. Normally, there is no need to edit this file.config.pp
Coordinates all configuration related actions. Many modules won't need this because most there is no need for a special application configuration. If so, just delete the file and the references ininit.pp.repo.pp
Coordinates all package repository related actions. Many modules won't need this because an additional repository is not needed to install the application. If so, just delete the file and the references ininit.pp.
- Everything you must edit/check after you generated a module is marked with a
FIXME/TODO. E.g. when the package list or some class calls when using theapplication-002boilerplate. - You don't need to use GitHub/Bitbucket. The DVCS repository hosting part of the wizard is completely optional.
- There is always room for improvement. If you're able to add any contributions to make our project better, please let me know or discuss your thoughts right here in the comments.
Update 2012-05-30: I changed the links and text regarding the new puppet example content.
2012-02-05 // How to start with Puppet (system config management tool): useful links and resources
Puppet is a1) powerful open source tool to automate the configuration of and software management on Unix-like2) operating systems. This posting is a distillate of the resources I collected during my Puppet learning phase. I hope it helps to get an overview about what Puppet can do for you and how to use it (plus providing existing Puppet users some new ideas or tips).
Links
Selected slides and presentations (overview, use-cases, experts, tips)
- Developing infrastructures with Puppet (JS slides, use the ← and → key)




