Make sure dev VMs have different IPs
This commit is contained in:
parent
9e0e0d50b5
commit
0704ca2ce2
1 changed files with 9 additions and 3 deletions
12
development/Vagrantfile
vendored
12
development/Vagrantfile
vendored
|
@ -14,9 +14,6 @@ Vagrant.configure("2") do |config|
|
||||||
config.cache.auto_detect = true
|
config.cache.auto_detect = true
|
||||||
config.cache.enable_nfs = true
|
config.cache.enable_nfs = true
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |_, vb|
|
|
||||||
vb.vm.network :private_network, ip: "192.168.50.123"
|
|
||||||
end
|
|
||||||
|
|
||||||
config.omnibus.chef_version = :latest
|
config.omnibus.chef_version = :latest
|
||||||
config.vm.provision :chef_solo do |chef|
|
config.vm.provision :chef_solo do |chef|
|
||||||
|
@ -62,6 +59,10 @@ Vagrant.configure("2") do |config|
|
||||||
fi
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
|
configure_private_network = lambda do |node, suffix|
|
||||||
|
node.vm.network :private_network, ip: "192.168.50.#{suffix}"
|
||||||
|
end
|
||||||
|
|
||||||
debian_like_configs = lambda do |debian|
|
debian_like_configs = lambda do |debian|
|
||||||
# Here we have the RubyGems cache bucket configured to the right path, so we
|
# Here we have the RubyGems cache bucket configured to the right path, so we
|
||||||
# bundle the project
|
# bundle the project
|
||||||
|
@ -74,22 +75,26 @@ Vagrant.configure("2") do |config|
|
||||||
config.vm.define :ubuntu do |ubuntu|
|
config.vm.define :ubuntu do |ubuntu|
|
||||||
ubuntu.vm.box = "quantal64"
|
ubuntu.vm.box = "quantal64"
|
||||||
debian_like_configs.call ubuntu
|
debian_like_configs.call ubuntu
|
||||||
|
configure_private_network.call ubuntu, 10
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :lucid do |lucid|
|
config.vm.define :lucid do |lucid|
|
||||||
lucid.vm.box = "lucid64"
|
lucid.vm.box = "lucid64"
|
||||||
debian_like_configs.call lucid
|
debian_like_configs.call lucid
|
||||||
|
configure_private_network.call lucid, 11
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :debian do |debian|
|
config.vm.define :debian do |debian|
|
||||||
debian.vm.box = "squeeze64"
|
debian.vm.box = "squeeze64"
|
||||||
debian.vm.box_url = 'http://f.willianfernandes.com.br/vagrant-boxes/DebianSqueeze64.box'
|
debian.vm.box_url = 'http://f.willianfernandes.com.br/vagrant-boxes/DebianSqueeze64.box'
|
||||||
debian_like_configs.call debian
|
debian_like_configs.call debian
|
||||||
|
configure_private_network.call debian, 12
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define :centos do |centos|
|
config.vm.define :centos do |centos|
|
||||||
centos.vm.box = 'centos6_64'
|
centos.vm.box = 'centos6_64'
|
||||||
centos.vm.box_url = 'http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.box'
|
centos.vm.box_url = 'http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130309.box'
|
||||||
|
configure_private_network.call centos, 13
|
||||||
# Here we have the RubyGems cache bucket configured to the right path, so we
|
# Here we have the RubyGems cache bucket configured to the right path, so we
|
||||||
# bundle the project
|
# bundle the project
|
||||||
centos.vm.provision :shell, inline: '
|
centos.vm.provision :shell, inline: '
|
||||||
|
@ -100,6 +105,7 @@ Vagrant.configure("2") do |config|
|
||||||
config.vm.define :arch do |arch|
|
config.vm.define :arch do |arch|
|
||||||
arch.vm.box = 'arch64'
|
arch.vm.box = 'arch64'
|
||||||
arch.vm.box_url = 'http://vagrant.pouss.in/archlinux_2012-07-02.box'
|
arch.vm.box_url = 'http://vagrant.pouss.in/archlinux_2012-07-02.box'
|
||||||
|
configure_private_network.call arch, 14
|
||||||
arch.vm.provision :shell, inline: '
|
arch.vm.provision :shell, inline: '
|
||||||
pacman -Syu --noconfirm libffi git
|
pacman -Syu --noconfirm libffi git
|
||||||
HOME=/home/vagrant su -p vagrant -l -c "cd /vagrant && bundle"'
|
HOME=/home/vagrant su -p vagrant -l -c "cd /vagrant && bundle"'
|
||||||
|
|
Loading…
Reference in a new issue