Skip to content

Instantly share code, notes, and snippets.

@wantonbe
Created December 19, 2013 12:25
Show Gist options
  • Save wantonbe/8038382 to your computer and use it in GitHub Desktop.
Save wantonbe/8038382 to your computer and use it in GitHub Desktop.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "web" do |web|
web.vm.box = "CentOS-6.4-x86_64"
web.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box"
web.vm.network :private_network, ip: "172.16.1.200"
web.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode
# vb.gui = true
# Use VBoxManage to customize the VM. For example to change memory:
vb.name = "webdev"
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", "1024"]
end
# web.vm.provision :chef_solo do |chef|
# chef.cookbooks_path = "../my-recipes/cookbooks"
# chef.roles_path = "../my-recipes/roles"
# chef.data_bags_path = "../my-recipes/data_bags"
# chef.add_recipe "mysql"
# chef.add_role "web"
#
# # You may also specify custom JSON attributes:
# chef.json = { :mysql_password => "foo" }
# end
end
config.vm.define "db" do |db|
db.vm.box = "CentOS-6.4-x86_64"
db.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box"
db.vm.network :private_network, ip: "172.16.1.201"
db.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode
# vb.gui = true
# Use VBoxManage to customize the VM. For example to change memory:
vb.name = "dbdev"
vb.customize ["modifyvm", :id, "--cpus", "1", "--memory", "1024"]
end
# db.vm.provision :chef_solo do |chef|
# chef.cookbooks_path = "../my-recipes/cookbooks"
# chef.roles_path = "../my-recipes/roles"
# chef.data_bags_path = "../my-recipes/data_bags"
# chef.add_recipe "mysql"
# chef.add_role "web"
#
# # You may also specify custom JSON attributes:
# chef.json = { :mysql_password => "foo" }
# end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment