Comment by keyist
16 years ago
"Could you perhaps turn convert a Vagrant project into an EC2 instance for deployment?"
That's where Chef comes in. Vagrant uses Chef (http://wiki.opscode.com/display/chef/Home) for provisioning VMs. It's basically software configuration management (same category as cfengine or Puppet) -- you write cookbooks that specify how a system should be set up (see http://github.com/opscode/cookbooks/raw/master/nginx/recipes... for an example).
If you write your Chef configuration the right way (ie not hardcoding anything to a set of system specifications), you can take the same set of Chef cookbooks you write and deploy to EC2 or any other Linux box, virtual or no.
So with Vagrant you can essentially pass around a virtual machine configuration amongst your team and be confident that the entire team is coding and testing in a near-exact replica of the production environment. Not that this was impossible before, but Vagrant streamlines the process.
I've provisioned 20+ servers with Chef and once you have a solid base configuration you can take your attended time on a full server stack (nginx, memcached, post{gres,fix}, munin... the works, essentially) to less than 10 minutes.
It looks like it generates solo.rb and dna.json files based on what's in the Vagrant file, which is pretty cool, and I see there is a single cookbook path relative to the project directory. Is there a way to specify a site-cookbooks path, too?
Not at the moment. There will be extensive work on the chef provisioning system in Vagrant before the next minor release (0.2), I'll add this to the list.
Mitchell
Awesome. This is a very interesting project.
Is it still possible to use puppet instead of chef? We have a lot of puppet manifests written.
The Vagrant code is modular enough that puppet support should be fairly straightforward to add.
For a quick hack, you'd primarily change this file http://github.com/mitchellh/vagrant/blob/master/lib/vagrant/... to perform the necessary commands for a puppet setup. You'd need to add support for puppet configuration as well at http://github.com/mitchellh/vagrant/blob/master/lib/vagrant/...
The main goal John and I had initially was to get Vagrant working and released so others could benefit from it. Since we mostly use Chef, thats what we went with first.
Making the provisioning system modular is definitely on the radar, but keyist is absolutely correct in the above response.