-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
32 lines (29 loc) · 1.13 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
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "80"]
end
#config.vm.provision :shell, path: "bootstrap.sh"
config.vm.define :master do |master|
master.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
master.vm.box = "ubuntu/jammy64"
master.vm.hostname = "master"
master.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision :shell, inline: "echo Master"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.provision :shell, inline: "echo Master Ready and Bootstrapped"
end
%w{worker1}.each_with_index do |name, i|
config.vm.define name do |worker|
worker.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
worker.vm.box = "ubuntu/jammy64"
worker.vm.hostname = name
worker.vm.network "private_network", ip: "192.168.33.#{i + 11}"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.provision :shell, inline: "echo worker #{i} Ready and Bootstrapped"
end
end
end