background preloader

With Test-Kitchen

Facebook Twitter

Test-kitchen is a tool written for chef .. for automating the testing of infrastructure .. It uses vagrant, and orchestrates the creation of VMs ..

First off, the use of chef is put off .. and secondly, I am beginning to think that container orchestration is multiple times more attractive than VM orchestration .. Shell provisioner for Test Kitchen · More than seven. 12 Jan 2014 As of a few weeks ago Test Kitchen has a shell provisioner as well as the original Chef provisioners.

Shell provisioner for Test Kitchen · More than seven

This opens up all sorts of interesting testing potential. If you've not already seen Test Kitchen, probably because you're not using Chef, it's a tool for integration testing infrastructure code. Configured by a simple YAML file it will setup a matrix of virtual machines, using Virtualbox, AWS, OpenStack and more, run some setup code (normally applying Chef recipes) and then run a test suite (with support for Bats, ShUnit2, Rspec and Serverspec). It's all very pluggable. Dependencies First we need to install Test Kitchen.

First create a file called Gemfile with the following contents: source " gem "test-kitchen", :git => " "kitchen-vagrant"gem "vagrant-wrapper" Then run: This should install the above software. Configuration. Survey of Test Kitchen providers - Mischa Taylor's Coding Blog. Update November 10, 2014 * Update for DigitalOcean 0.8x provider using API V2 Test Kitchen supports a wide variety of different providers via Test Kitchen drivers besides the default kitchen-vagrant driver.

Survey of Test Kitchen providers - Mischa Taylor's Coding Blog

In this post, we’ll cover several popular alternatives. Test Kitchen drivers are gem libraries available for download from . Use the kitchen driver discover command to list all the Test Kitchen gems currently available. Thinking about how to merge more, quicker (Was Re: [ansible-devel] Further adventures in variable resolution.) Thanks to everyone for all the input.

Thinking about how to merge more, quicker (Was Re: [ansible-devel] Further adventures in variable resolution.)

Great conversation. And now, $0.02 from someone who hasn't touched any of this stuff. :) On Tue, Feb 17, 2015 at 3:50 AM, jhawkesworth <j.r.haw...> wrote: > Hey, been thinking about this a little, here's a couple of other ideas... > > 1/ give contributors a way to tag their PRs so they can indicate how > important they think the PR is to b/ ansible project as a whole, b/ their > particular use case. I think it might help a little with the 'triage' side > of dealing with PRs, that is, working out when they should be dealt with. Triage is so tricky to do well. > 2/ slowly, and with advance warning, start raising the requirements for a > PR.

> > I'm just talking about requiring say, documentation or tests here, not > requiring particular coding standards. So there's an important difference between "raising the requirements of a PR" and "raising the requirements of a PR that is likely to get accepted. " Ayup. Hmmmmm. --g. Neillturner/kitchen-ansible. Introduction. Introduction Welcome to Test Kitchen!


No, contrary to popular belief, this has nothing to do with the cooking show, or the video game, and everything to do with streamlining and automating the process of getting infrastructure code under test, and into continuous integration. Why would we test infrastructure code? Why would we want to do that? Well, you test your application code, right? Speeding up the QA cycle At the dawn of time, the standard workflow for an engineer building a server was to follow a run book, or checklist, and build a machine ready for production. The introduction of configuration management or infrastructure automation tools decreased the time taken to build the machines, and increased the quality and repeatability of the process. Test Kitchen takes the automation to the next level, and allows you to automate the testing process, to verify that your infrastructure code has done the right thing. Welcome to Test Kitchen - KitchenCI.

Creating a Cookbook. In order to keep our worked example as simple as possible let's create a Chef cookbook to automate the installation and management of the Git distributed version control tool.

Creating a Cookbook

It's true that there is already a very capable Git cookbook available on the Opscode Community Site (not to mention we just installed Git by hand in the Installing section) but this lets us focus on Test Kitchen usage and workflow rather than building more awesome. In the "real world" most Chef cookbook authors are likely to use a cookbook project generator but we're going to skip that step in the interests of transparency. A simple Chef cookbook has very few moving parts so let's start from there. First of all, let's create an empty Git repository and enter into that directory: $ git init git-cookbook Initialized empty Git repository in /tmpt-cookbook/git-cookbook/.git/ $ cd git-cookbook Next we need a metadata.rb file so that various Chef-aware tooling can understand our cookbook.

Name "git"version "0.1.0"