Adding update readme
1 file changed
tree: ab355f592b89cf76adda7dc19f17aaffdaa59a45
  1. .gitignore
  2. .kitchen.cloud.yml
  3. .kitchen.yml
  4. Gemfile
  5. LICENSE
  6. README.md
  7. puppet/
README.md

puppet-kitchen Windows Environment

Test Kitchen + Puppet + Windows

Overview

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 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 done.

Requirements

  • This doc assumes you are running a working version of the existing kitchen from Master. Please follow the list of instructions in that branch.

Usage

Basic

Currently the base machine yaml is hard coded to ..puppet/data/nodes/wintest-windows.yaml. For the remainder of this doc, that will referenced as such.

Get modules

cd $ipr # this will pull in all the 3rd party modules at the specified versions we use in production
./bin/pull # this should only take a minute or two to run, check the output of $ipr/3rdParty

Make modules useable

cd $ipk/puppet/modules
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

Modules

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

Third party modules are listed in infrastructure-puppet/Puppetfile, 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/environments/windows/modules/. Again, documentation on how to write a module can be found in the puppet labs documentation.

Node data are still stored in ../data/nodes/machine.a.o.yaml format.

Usage

Same spin up as the other kitchen:

$ kitchen create wintest-windows

However this will open a VirutalBox window where you can login and interact with Windows (instead of ssh) Default username and password is in .kitchen.yml

Cleanup

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

$ kitchen destroy default

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