-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
35 lines (29 loc) · 1.1 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
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "ubuntu/bionic64"
master.vm.network :private_network, ip: "192.168.50.110"
master.vm.provision "shell", path: "provision.sh"
master.vm.hostname = "master"
master.vm.provision "ansible" do |ansible|
ansible.playbook = "../ansible/provision.yml"
end
master.vm.provision "ansible" do |ansible|
ansible.playbook = "../ansible/provision-extra.yml"
end
master.vm.synced_folder "./kubernetes", "/vagrant", type: "rsync", rsync__args: ["--verbose", "--archive", "--compress"]
end
(1..3).each do |i|
config.vm.define "worker-#{i}" do |node|
node.vm.box = "ubuntu/bionic64"
node.vm.network :private_network, ip: "192.168.50.11#{i}"
node.vm.provision "shell", path: "provision.sh"
node.vm.hostname = "worker-#{i}"
node.vm.provision "ansible" do |ansible|
ansible.playbook = "../ansible/provision.yml"
end
node.vm.provision "ansible" do |ansible|
ansible.playbook = "../ansible/provision-extra.yml"
end
end
end
end