forked from kinvolk-archives/kubernetes-the-hard-way-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
52 lines (40 loc) · 1.41 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
vb.customize ["modifyvm", :id, "--audio", "none"]
end
# must be at the top
config.vm.define "lb-0" do |c|
c.vm.hostname = "lb-0"
c.vm.network "private_network", ip: "192.168.199.40"
c.vm.provision :shell, :path => "scripts/vagrant-setup-haproxy.bash"
c.vm.provider "virtualbox" do |vb|
end
end
(0..2).each do |n|
config.vm.define "controller-#{n}" do |c|
c.vm.hostname = "controller-#{n}"
c.vm.network "private_network", ip: "192.168.199.1#{n}"
c.vm.provision :shell, :path => "scripts/vagrant-setup-hosts-file.bash"
c.vm.provider "virtualbox" do |vb|
vb.memory = "750"
end
end
end
(0..2).each do |n|
config.vm.define "worker-#{n}" do |c|
c.vm.hostname = "worker-#{n}"
c.vm.network "private_network", ip: "192.168.199.2#{n}"
c.vm.provision :shell, :path => "scripts/vagrant-setup-routes.bash"
c.vm.provision :shell, :path => "scripts/vagrant-setup-hosts-file.bash"
end
end
config.vm.define "traefik-0", autostart: false do |c|
c.vm.hostname = "traefik-0"
c.vm.network "private_network", ip: "192.168.199.30"
c.vm.provision :shell, :path => "scripts/vagrant-setup-routes.bash"
end
end