BT

Opscode Chef Integration Tests Now On OpenStack With Test Kitchen 0.7.0

by Matthias Marschall on Jan 03, 2013 |

Opscode has announced the availability of Test Kitchen 0.7.0 with support for using on-demand OpenStack instances to test Chef cookbooks.

Test Kitchen is a tool, which helps Opscode Chef cookbook developers to validate their cookbooks before applying them to their live infrastructure. Test Kitchen not only runs some basic syntax checks on the cookbook under test but additionally provisions a virtual machine (VM) and executes the cookbook under test inside the provisioned VM. After converging the VM it executes MiniTest to validate what the cookbook under test has modified on the VM.

Prior to Test Kitchen 0.7.0 it was mandatory to use Vagrant with VirtualBox to provision VMs. This was tedious for users already running OpenStack because Vagrant needs to be installed and maintained on every developers workstation and on their Continuous Integration server. Using the latest Test Kitchen enables users to avoid managing separate Vagrant environments.

To enable users to move from Vagrant to their already existing OpenStack installation, Test Kitchen 0.7.0 introduces a new OpenStack runner. The new OpenStack runner can be configured in the cookbook's Kitchenfile and it automatically installs chef-client and executes convergence and tests on a OpenStack VM:

openstack do
    auth_url "http://openstack-auth-host.example.com:5000/v2.0/tokens"
    username "openstack-user-name"
    password "the-password-of-the-openstack-user"
    tenant "test-kitchen"
end

Additionally to the new OpenStack runner, Test Kitchen 0.7.0 doesn't have any hard coded dependencies on outdated versions of apt, yum, build-essential, git and rvm cookbooks any more. Instead of specifying those cookbooks in the Cheffile, it now has it's own cookbook to do the initial setup. This cookbook depends on the aforementioned cookbooks without pinning their versions.

Test Kitchen 0.7.0 is available as Ruby Gem since December 3, 2012.  You can install it by simply running:

gem install test-kitchen

The source code of Test Kitchen is available on GitHub.

 

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT