How can Vagrant/Berkshelf be used to test AWS apps?

127 views Asked by At

I'm trying to wrap my head around Vagrant and Berkshelf, and am trying to see if I can use them for testing & development of our new AWS app.

Looks like Vagrant is a wrapper for VirtualBox and allows you to quickly spin up a virtual machine by given it a very simple/basic config file. Looks like Berkshelf is a wrapper for Chef and allows you to specify the software stack you want installed on a particular machine.

So, if that assessment is correct (more or less), then I'm wondering if its possible to either:

  1. Spin up an Amazon Machine Image (AMI) on your local computer (as a guest VM) and use Berkshelf to configure its software stack; and/or...
  2. Spin up an AMI on AWS itself, and use Berkshelf to configure its software stack; and/or...
  3. Any other possible use cases for these technologies and AWS? Is anybody else doing this already or using Vagrant/Berkshelf for these purposes?
1

There are 1 answers

0
Cryptographic_ICE On

Its been a while but the workflow I used looked like this:

Use vagrant / berkshelf to create and test cookbooks (which uses chef-solo). when the cookbooks are ready upload them to chef-server spin up an AWS machine and use SSH to connect it to chef-server (boot-strapping)

once connected to chef-server the AWS instance will be configured according to the cookbook.

here is an example program that basically does the same thing you are trying to accomplish

https://gist.github.com/amoslanka/6245043