Brian Scott Home Hire Me!

Chef Testing Part 1 with Jenkins, Vagrant among many others...

19 Nov 2012 - Los Angeles

I know this post has been long-wanted but it's finally here. In this 5 part post series, I will show you how to roll-out your own Chef Testing framework with the following features.

Stage 1

  • Ruby syntax, Cookbook Syntax, JSON and Lint checking via FoodCritic
  • Stage 2

  • Testing the upload of your cookbooks to a Chef on the Opscode hosted platform.
  • Stage 3

  • Ensure that Cookbooks are tested against any variety of platforms (e.g. Ubuntu, Fedora, CentOS and even Windows) via Vagrant,EC2 or RackSpace Cloud.

    Stage 4

  • Minitest and ChefSpec's results are then gathered, evaluated and graphs generated.
  • This setup will consist of 3 Jobs in Jenkins configured in a multi-job configuration. We will be using Vagrant in my examples. Below is a list of what you will need:

  • 1 Physical machine to run Jenkins and Vagrant(http://vagrantup.com/) using Virtualbox (http://virtualbox.org). (If your planning on using Vagrant for the Virtual machines creation, a physical machine is required)
  • Jenkins (https://jenkins-ci.org/)
  • Opscode Hosted Chef Account - Free Tier offers 5 nodes for free which is perfect for this post.
  • At the end of Part 5, I will provide a cookbook that setups the entire testing stack for you! :) Stay Tuned! - New post every week.

    Comments

    Fork me on GitHub