Skip to content

Instantly share code, notes, and snippets.

@bjallen
Created September 30, 2012 01:51
Show Gist options
  • Save bjallen/3805617 to your computer and use it in GitHub Desktop.
Save bjallen/3805617 to your computer and use it in GitHub Desktop.
multiple vagrant vm config
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.define :app do |app_config|
app_config.vm.customize ["modifyvm", :id, "--name", "app1", "--memory", "512"]
app_config.vm.box = "precise64_with_ruby_193"
app_config.vm.host_name = "app1"
app_config.vm.forward_port 22, 2222, :auto => true
app_config.vm.forward_port 80, 4567
app_config.vm.network :hostonly, "33.33.13.37"
end
config.vm.define :db do |db_config|
db_config.vm.customize ["modifyvm", :id, "--name", "db", "--memory", "512"]
db_config.vm.box = "precise64_with_ruby_193"
db_config.vm.host_name = "db"
db_config.vm.forward_port 22, 2222, :auto => true
db_config.vm.network :hostonly, "33.33.13.38"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment