forked from kelseyhightower/kubernetes-the-hard-way
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathVagrantfile
39 lines (36 loc) · 1.07 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box_check_update = false
config.vm.provider "virtualbox" do |vb|
# vb.cpus = 1
# vb.memory = 768
end
(0..2).each do |i|
config.vm.define "controller-#{i}" do |node|
node.vm.hostname = "controller-#{i}"
node.vm.network "private_network", ip: "192.168.100.1#{i}"
node.vm.provision :hosts, :sync_hosts => true
node.vm.provider "virtualbox" do |vb|
vb.name = "controller-#{i}"
vb.cpus = 1
vb.memory = 1024
end
node.vm.provision "shell", path: "heartbeat.sh"
end
end
(0..2).each do |i|
config.vm.define "worker-#{i}" do |node|
node.vm.hostname = "worker-#{i}"
node.vm.network "private_network", ip: "192.168.100.2#{i}"
node.vm.provision :hosts, :sync_hosts => true
node.vm.provider "virtualbox" do |vb|
vb.name = "worker-#{i}"
vb.cpus = 1
vb.memory = 512
end
node.vm.provision "shell", path: "worker-provision.sh"
end
end
end