I've been using Boxen to create a consistent environment on my development machines.

There are plenty of Puppet modules for almost all people, but I have a few extras requirements that I couldn't find. I decided to create my own but had no previous experience of Puppet.

To create your own Puppet modules, grab the Puppet Template and start modifying it.

For example:

# Start somewhere reasonable
cd ~/src/boxen/

# Use underscores for spaces
export CLASSNAME=example_program_name

# create repo
mkdir puppet-$CLASSNAME
cd puppet-$CLASSNAME
git init .
git remote add template https://github.com/boxen/puppet-template.git
git fetch template
git checkout -b master template/master

# remove references to template:
git remote rm template
git tag -d 1.0.0

# add remote
git remote add origin https://github.com/dvdsmpsn/puppet-$CLASSNAME

  • Edit manifests/init.pp and rename the template class
  • Rename:
    • file spec/classes/template_spec.rb to spec/classes/classname_spec.rb
    • folder spec/fixtures/modules/template/ to spec/fixtures/modules/classname/
  • Modify or add CI tests as required
  • Rerun script/cibuild
  • Hook your Github repository up to Travis
  • Add the build status image to the README.md in the root directory e.g.
    [![Build Status](https://travis-ci.org/dvdsmpsn/puppet-acorn.png)](https://travis-ci.org/dvdsmpsn/puppet-acorn)

When all is good, tag the module and add to your Boxen.

Edit our-boxen/Puppetfile. Add:

## From repositories at https://github.org/dvdsmpsn/puppet-*
github "acorn", "1.0.2", :repo => "dvdsmpsn/puppet-acorn"
github "day_o", "1.0.0", :repo => "dvdsmpsn/puppet-day_o"
github "get_iplayer_automator", "1.0.0", :repo => "dvdsmpsn/puppet-get_iplayer_automator"

Edit our-boxen/manifests/site.pp (for a sitewide installation). Add:

# dvdsmpsn/puppet-*
include acorn
include day_o
include get_iplayer_automator

Rerun boxen to install your new puppet modules.

If all went well, consider

Here are a few Puppet modules for Boxen I've rolled myself: