forked from shusugmt/gobgp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
80 lines (74 loc) · 2.82 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Vagrant.configure(2) do |config|
# g2 (GoBGP)
config.vm.define :g2 do |g2|
g2.vm.box = "bento/debian-8.7"
g2.vm.network "private_network", ip: "10.254.0.102", virtualbox__intnet: "gobgp-t_util"
g2.vm.network "private_network", ip: "10.173.176.102", virtualbox__intnet: "gobgp-t_ix"
g2.vm.network "private_network", ip: "10.1.12.102", virtualbox__intnet: "gobgp-t_1-to-2"
g2.vm.provider "virtualbox" do |v|
v.cpus = 2
v.memory = 512
end
g2.vm.provision "shell", privileged: true, inline: <<-EOS
grep 127.0.1.2 /etc/hosts || echo 127.0.1.2 g2 >> /etc/hosts
hostnamectl set-hostname g2
systemctl restart rsyslog
EOS
g2.vm.provision "shell", privileged: true, path: "prov/install_gobgp.sh"
g2.vm.provision "shell", privileged: true, path: "prov/setup_g2.sh"
end
# r1 junos
config.vm.define :r1 do |r1|
r1.vm.box = "juniper/ffp-12.1X47-D15.4-packetmode"
r1.vm.network "private_network", ip: "10.1.12.101", virtualbox__intnet: "gobgp-t_1-to-2"
r1.vm.network "private_network", ip: "10.1.14.101", virtualbox__intnet: "gobgp-t_1-to-4"
r1.vm.provider "virtualbox" do |v|
v.memory = 512
end
end
# r3 junos
config.vm.define :r3 do |r3|
r3.vm.box = "juniper/ffp-12.1X47-D15.4-packetmode"
r3.vm.network "private_network", ip: "10.173.176.103", virtualbox__intnet: "gobgp-t_ix"
r3.vm.provider "virtualbox" do |v|
v.memory = 512
end
end
# r4 junos
config.vm.define :r4 do |r4|
r4.vm.box = "juniper/ffp-12.1X47-D15.4-packetmode"
r4.vm.network "private_network", ip: "10.1.14.104", virtualbox__intnet: "gobgp-t_1-to-4"
r4.vm.provider "virtualbox" do |v|
v.memory = 512
end
end
config.vm.define :rs do |rs|
rs.vm.box = "bento/debian-8.7"
rs.vm.network "private_network", ip: "10.173.176.211", virtualbox__intnet: "gobgp-t_ix"
rs.vm.provider "virtualbox" do |v|
v.cpus = 2
v.memory = 512
end
rs.vm.provision "shell", privileged: true, inline: <<-EOS
grep 127.0.1.2 /etc/hosts || echo 127.0.1.2 rs >> /etc/hosts
hostnamectl set-hostname rs
systemctl restart rsyslog
EOS
rs.vm.provision "shell", privileged: true, path: "prov/install_gobgp.sh"
rs.vm.provision "shell", privileged: true, path: "prov/setup_rs.sh"
end
config.vm.define :util do |util|
util.vm.box = "bento/debian-8.7"
util.vm.network "private_network", ip: "10.254.0.250", virtualbox__intnet: "gobgp-t_util"
util.vm.provider "virtualbox" do |v|
v.cpus = 2
v.memory = 512
end
util.vm.provision "shell", privileged: true, inline: <<-EOS
grep 127.0.1.2 /etc/hosts || echo 127.0.1.2 util >> /etc/hosts
hostnamectl set-hostname util
systemctl restart rsyslog
EOS
util.vm.provision "shell", privileged: true, path: "prov/setup_util.sh"
end
end