30 Jan 2014
Cellophane A hacked up kitchen vagrant berkshelf
Since vagrant-berkshelf is now deprecated and test-kitchen is the way forward I’ve been thinking how I can still share my boxes with my Java developers who do not have (or want) ruby on their machine, but still want a disposable prod like tomcat/cassandra/zookeeper VM’s on their machines using Berkshelf and Vagrant.
Vagrant has an omnibus version of ruby… so why not use a kitchen wrapper (inspired by gralsw) + bundler + vagrant’s embedded ruby to have no external dependencies?
Caveat: I know this is a horrible way to do it, I just hacked it together this morning.
Since the vagrant script sets the correct environment I used that as a template.
I copied /usr/bin/vagrant to my box location and named it ./kitchenw and added this to the bottom, commenting out the vagrant execute call:
Now I can just do:
Next steps? Make this a real thing? a .bat for Windows? Burn it with fire?
The right solution may be to have a ‘vagrant-kitchen’ cookbook that uses the right gems in the embedded ruby for using the kitchen, if they are bundled separately from vagrants gems. I don’t know enough about how that is handled.
The use case and value of distributing your infrastructure to developers who don’t care about ruby, and do care about servers is still valid.
Want to contribute to this article? Edit this post on Github!