Skip to content
Browse files
Merge pull request #3 from rubys/bootstrapping
Document my (incomplete/evolving) understanding
  • Loading branch information
stumped2 committed Jan 5, 2016
2 parents 99b15aa + 0fd9979 commit d1957aea3ddee46c7002e725738b059c01931960
Showing 1 changed file with 59 additions and 15 deletions.
@@ -3,6 +3,24 @@ puppet-kitchen

Test Kitchen + Puppet


Provisioning an Apache Software Foundation VM requires a lot of moving parts
-- things with names like `apt`, `gem`, `hiera`, `kitchen`, `puppet`, and
`r10k`. To make things easier, the Apache infrastructure team provides a base
definition on top of which you install and configure 'modules'. Modules can
be pretty much anything, examples being `ldap` and `tomcat`.

There are two sets of modules that you can draw from: [3rd party modules]( and [ASF]) modules.

As an alternative to a full configuration (which would involve DNS setup,
etc), the recommended process is to copy the relevant configuration file from
the [infrastructure-puppet](
repository to the `default-ubuntu1464`, make changes to that subset of the
configuration, and only copying, committing, and pushing the results when


@@ -45,39 +63,65 @@ for i in $(ls $ipr/3rdParty); do ln -s $ipr/3rdParty/$i ./; done
for i in $(ls $ipr/modules); do ln -s $ipr/modules/$i ./; done

### Boostrapping

kitchen create default
kitchen exec default -c 'sudo gem install deep_merge'
kitchen converge default


Make sure to have some puppet modules in the ``puppet/modules/`` directory.
The current hiera setup assumes you have the following modules:
### Basic

+ [apache](
+ ASF's customfact
+ [concat](
+ [stdlib](
+ [apt](
Start by copying a machine configuration from the
repository to ``puppet/data/node/default-ubuntu1464.yaml``, editing it as
needed, and then running:

If using [GitHub]( to obtain modules, make sure when you clone the module, it only has the module name on the resulting folder.
kitchen converge default

This will bring up a vm, run puppet apply. From there, you can continue modifying the definition and/or writing new puppet module(s) (in ```puppet/modules/$module```) and testing by rerunning the above command.

You can directly `ssh` into your virtual machine using the following command:

git clone apt
kitchen login default

Then edit ``puppet/data/node/default-ubuntu1464.yaml`` to start adding classes and setting class parameters.
If you have started a service like Apache httpd on this machine, you can
access it at the following IP address: ``.

### Modules

Modules are organized into two types: "third party" and "ASF custom".

When you're ready to test, just run:
Third party modules are listed in
and updated using the `bin/pull` command described above. Information on
locating a module can be found at
[puppet labs documentation](

Custom modules are stored in
[infrastructure-puppet/modules/]( Again, documentation on how to write a module can be found in the [puppet labs documentation](

### Cleanup

When done, you can take down and remove the VM with the following command:

kitchen converge default
kitchen destroy default

This will bring up a vm, run puppet apply. From there, you can continue writing your puppet module (in ```puppet/modules/$module```) and testing by running the above command.
### Further reading

Most the the [test-kitchen](
option work with puppet, however make sure to see
the [kitchen-puppet](
documentation (even though the explanations aren't nearly as detailed as it needs to be).

Most information has been taken from [here](

0 comments on commit d1957ae

Please sign in to comment.