fix up bootstrapping
1 file changed
tree: 7a7c83c8e78b6191a5b2750e61af0eb2d63b87a9
  1. puppet/
  2. .gitignore
  3. .kitchen.cloud.yml
  4. .kitchen.yml
  5. Gemfile
  6. LICENSE
  7. README.md
README.md

puppet-kitchen

Test Kitchen + Puppet

Requirements

Installation

Clone ASF's Puppet Repo

git clone https://github.com/apache/infrastructure-puppet

Install required gems

gem install bundler
bundle install

Get modules

cd <path to infra puppet repo>
./bin/pull # this will pull in all the 3rd party modules at the specified versions we use in production

Make modules useable

cd <path to puppet-kitchen repo>
cd puppet/modules
for i in $(ls <path to infra-pupet 3rdParty>); do ln -s <path to infra-puppet 3rdParty>/$i ./; done
for i in $(ls <path to infra-puppet modules>); do ln -s <path to infra-puppet modules>/$i ./; done

Usage

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

If using GitHub to obtain modules, make sure when you clone the module, it only has the module name on the resulting folder. Example:

git clone https://github.com/puppetlabs/puppetlabs-apt.git apt

Then edit puppet/data/node/default-ubuntu1464.yaml to start adding classes and setting class parameters.

When you're ready to test, just run:

kitchen converge 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.

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