-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
38 lines (36 loc) · 1.37 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define "server1" do |s1|
s1.vm.box = "ubuntu/trusty64"
s1.vm.network "private_network", ip: "172.20.83.83", auto_config: false #IPs are placeholders to make Vagrant work
s1.vm.network "private_network", ip: "172.20.84.83", auto_config: false
s1.vm.provision "shell", inline: <<-SHELL
#sudo apt-get update
sudo apt-get install -y vlan ifenslave
sudo cp /vagrant/server1 /etc/network/interfaces
sudo modprobe bonding
sudo modprobe 8021q
sudo su -c 'echo "8021q" >> /etc/modules'
sudo su -c 'echo "bonding" >> /etc/modules'
sleep 10
sudo ifup -a
SHELL
end
config.vm.define "server2" do |s2|
s2.vm.box = "ubuntu/trusty64"
s2.vm.network "private_network", ip: "172.20.83.84", auto_config: false #IPs are placeholders to make Vagrant work
s2.vm.network "private_network", ip: "172.20.84.84", auto_config: false
s2.vm.provision "shell", inline: <<-SHELL
#sudo apt-get update
sudo apt-get install -y vlan ifenslave
sudo cp /vagrant/server2 /etc/network/interfaces
sudo modprobe bonding
sudo modprobe 8021q
sudo su -c 'echo "8021q" >> /etc/modules'
sudo su -c 'echo "bonding" >> /etc/modules'
sleep 10
sudo ifup -a
SHELL
end
end