Chef Testing Part 1 with Jenkins, Vagrant among many others...
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.
Ruby syntax, Cookbook Syntax, JSON and Lint checking via FoodCritic
Testing the upload of your cookbooks to a Chef on the Opscode hosted platform.
Ensure that Cookbooks are tested against any variety of platforms (e.g. Ubuntu, Fedora, CentOS and even Windows) via Vagrant,EC2 or RackSpace Cloud.
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)
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.