For an example, I just posted an example of using the beta gems to create and test an ActiveDirectory controller pair. The cookbook and tests can be hosted on windows, mac or Linux via virtualbox or Hyper-V.
You can read it here: http://www.hurryupandwait.io/blog/orchestrating-multi-server-tests-in-test-kitchen
From: Torben Knerr
Sent: Saturday, March 28, 2015 4:53 PM
To: Fletcher Nichol, firstname.lastname@example.org, Chef Developers
My (quite basic) kitchen tests with kitchen-vagrant and the
vagrant-lxc provider are still running fine. Thanks for releasing this
with kitchen-vagrant 0.16.0 earlier this week!
“oooo, ahhhh” Windows?!
Indeed very useful (I might need to set up some windows boxes in the
So far I found the boxcutter/windows  boxes superb. Mischa Taylor
has done a great job with boxcutter. Not sure though whether they have
winrm enabled or not…
Btw: are there any real life test-kitchen / windows examples out there already?
 Github: https://github.com/boxcutter/windows
On Wed, Mar 25, 2015 at 4:27 PM, Fletcher Nichol email@example.com wrote:
Guess what? We have a couple of pre-release gems cut today for Test Kitchen, specifically:
- test-kitchen 1.4.0.beta.2 (beta.1 cut yesterday)
- kitchen-vagrant 0.17.beta.2 (beta.1 cut yesterday)
Here’s my ask for anyone with time/interest/ability in the next day or 2:
Where ever you use Test Kitchen, give this pair of releases a try. If you don’t care about the Vagrant Driver, then just use the Test Kitchen pre-release. Use it exactly as you would any previous stable release, don’t change anything.
It’s extremely important that this release doesn’t break existing projects, Drivers, and/or Provisioners in the wild. If you find issues, please let myself or Tyler Ball know and file an issue if you can. Linking to a reproducible project and
kitchen diagnose —alloutput (scrubbed for credentials first) is such a big help, you have no idea.
If you have a Ruby workflow with RubyGems and/or Bundler this won’t be too much work:
Gem install with:
gem install test-kitchen —pre
gem install kitchen-vagrant —pre
gem “test-kitchen”, “~> 1.4.0.beta.2”
gem “kitchen-vagrant”, “~> 0.17.0.beta.2”
If you’re using ChefDK, you might want to give this a spin to update test-kitchen (whipped up last night in a frenzy):
To update the kitchen-vagrant gem, simply:
chef gem install kitchen-vagrant --pre --minimal-deps
Note that this release has the much-fabled “Windows guest support” (insert “oooo, ahhhh” here). How do you get started? At the moment getting Vagrant base box images of Windows is still a big pain, but if you have access to one, here are the versions that should “just work”:
- Windows Server 2012r2
- Windows Server 2012r2 Core (you will need .NET 4.5 installed however)
- Windows Server 2012 (your system/image must have the KB2842230 hotfix applied (https://support.microsoft.com/en-us/kb/2842230))
- Windows Server 2008r2
- Windows 8.1 Pro,Enterprise,etc.
- Windows 8 Pro,Enterprise,etc. (your system/image must have the KB2842230 hotfix applied (https://support.microsoft.com/en-us/kb/2842230))
- Windows 7
Windows with Kitchen::Vagrant
Any Vagrant base box should have
vm.communicator = “winrm”and
vm.guest = “windows”set by default, otherwise
vagrant upwill not be able to correctly boot the VM. Note that there are some Windows base boxes out there with
vm.communicator = “ssh”set, so plan accordingly.
Assuming you have a Vagrant base box called “windows-2012r2”, you can use a .kitchen.yml similar to:
- name: windows-2012r2
- name: default
Note that with the updates in kitchen-vagrant you don’t need to set/override a
:password. Sane defaults should apply.
For anyone who has tried the windows-guest-support branch, you may have seen extra transport configuration like this:
- name: windows-2012r2
- name: default
This is what Test Kitchen’s going to give you by default for any platform name starting with /^win/ (case insensitive) so add it, or don’t, it should work either way. If you don’t believe me, run
kitchen diagnoseagainst both and note the difference
Finally, if you use certain Vagrant providers or use private networks in your setup, kitchen-vagrant is not currently able to determine your WinRM port. I’m hoping to fix this with a Vagrant plugin which kitchen-vagrant can use to return it’s WinRM and RDP hostname and port.
You can check out the CHANGELOG for more details/links regarding beta.1 and beta.2:
Engineering Lead - Test Driven Infrastructure
CHEF | http://www.chef.io
IRC, Twitter, GitHub: fnichol