BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Opscode Chef Integration Tests Now On OpenStack With Test Kitchen 0.7.0

Opscode Chef Integration Tests Now On OpenStack With Test Kitchen 0.7.0

This item in japanese

Bookmarks

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.

 

Rate this Article

Adoption
Style

BT