Reputation: 1269
First would like to apologise if this is blatantly obvious, have only just started working with Chef and still getting to grips with the details. Have some experience using Vagrant and Puppet but haven't done any infrastructure testing before. Overall I have been struggling to find any details of standard practices with test kitchen. And good up to date examples seem pretty much non-existent.
Anyway currently starting my development VM is done using
kitchen converge
This is not very practical as I can't halt the VM or make use of any of the vagrant cli commands. To be honest I'm pretty sure this is the wrong way of doing things!
My questions 1) Is it possible to sync the .kitchen.yml and Vagrant file? Essentially generating the Vagrant file from .kitchen.yml so that I don't have to maintain two separate files? I'm aware that test kitchen generates it's own Vagrant file from this, using that seems a little hacky? 2) Does anyone have any example repositories of a full setup (including a Symfony2 app would be even better ;) )
Any pointers/links to guides/examples on using this properly would be brilliant!
Have put my initial code up on GitHub here which installs Apache, mySQL and memcached with some basic tests of how it currently stands. https://github.com/phillipsnick/nickphillips.co/tree/v0.0.1
Upvotes: 1
Views: 638
Reputation: 4223
From my experience most of the chef community has moved away from Vagrantfile
's. We just use test-kitchen directly. A converge should be relatively quick, so the need to halt and restart is pretty low.
If you really need that, however, you can find the Vagrantfile generated by kitchen in `.kitchen/kitchen-vagrant//Vagrantfile. So you could call vagrant commands directly from that directory, I imagine (never tried it myself). You shouldn't, however, need to sync that with Kitchen. You should be using the .kitchen.yml directly, without ever directly touching your vagrantfile.
As for examples, many of the community cookbooks are good examples for you. While it's far from the best, I've been working on the mod_security2 cookbook which does have a full test kitchen setup.
Upvotes: 1