Last active
August 29, 2015 13:57
-
-
Save zhanghui9700/9681231 to your computer and use it in GitHub Desktop.
vagrant file for a multi host develop environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define :node1 do |node1| | |
node1.vm.box = "centos65" | |
node1.vm.hostname = "admin.i-cloud.com" | |
node1.vm.network :private_network, :ip => "172.16.200.100" | |
node1.vm.network :public_network, :bridge => "eth0", :auto_config => false | |
end | |
config.vm.define :node2 do |node2| | |
node2.vm.box = "centos65" | |
node2.vm.hostname = "compute1.i-cloud.com" | |
node2.vm.network :private_network, :ip => "172.16.200.101" | |
node2.vm.network :public_network, :bridge => "eth0", :auto_config => false | |
end | |
config.vm.define :node3 do |node3| | |
node3.vm.box = "centos65" | |
node3.vm.hostname = "compute2.i-cloud.com" | |
node3.vm.network :private_network, :ip => "172.16.200.102" | |
node3.vm.network :public_network, :bridge => "eth0", :auto_config => false | |
end | |
config.vm.define :node4 do |node4| | |
node4.vm.box = "centos65" | |
node4.vm.hostname = "compute3.i-cloud.com" | |
node4.vm.network :private_network, :ip => "172.16.200.103" | |
node4.vm.network :public_network, :bridge => "eth0", :auto_config => false | |
end | |
config.vm.provider :virtualbox do |vb| | |
vb.gui = false | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
vb.customize ["modifyvm", :id, "--ioapic", "on"] | |
vb.customize ["modifyvm", :id, "--cpus", "2"] | |
vb.customize ["modifyvm", :id, "--nic2", "intnet"] | |
vb.customize ["modifyvm", :id, "--nictype2", "Am79C973"] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment