Skip to content

Instantly share code, notes, and snippets.

@JoeStanton
Created February 6, 2013 12:16
Show Gist options
  • Save JoeStanton/4722223 to your computer and use it in GitHub Desktop.
Save JoeStanton/4722223 to your computer and use it in GitHub Desktop.
A typical Vagrantfile. Web: Nginx+ Node.js DB: MongoDB + Redis
Vagrant::Config.run do |config|
config.vm.define :web do |web|
web.vm.box = "precise64"
web.vm.box_url = "http://files.vagrantup.com/precise64.box"
web.vm.network :hostonly, "192.168.100.10"
web.vm.host_name = "web.local"
web.vm.provision :chef_solo do |chef|
chef.add_recipe "ohai"
chef.add_recipe "apt"
chef.add_recipe "nginx"
chef.add_recipe "nodejs"
end
end
config.vm.define :backend do |backend|
backend.vm.box = "precise64"
backend.vm.box_url = "http://files.vagrantup.com/precise64.box"
backend.vm.network :hostonly, "192.168.100.20"
backend.vm.host_name = "backend.local"
backend.vm.provision :chef_solo do |chef|
chef.add_recipe "redisio::install"
chef.add_recipe "redisio::enable"
chef.add_recipe "mongodb::10gen_repo"
chef.add_recipe "mongodb"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment