-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
32 lines (28 loc) · 1.05 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "kubemaster" do |kubemaster|
kubemaster.vm.hostname = "kubemaster"
kubemaster.vm.box = "ubuntu/bionic64"
kubemaster.vm.network "private_network", ip: "192.168.99.20"
# kubemaster.vm.provision :shell, inline: "sed 's/127\.0\.0\.1.*kubemaster.*/192\.168\.99\.20 kubemaster/' -i /etc/hosts"
kubemaster.vm.provision "shell", path: "provision.sh"
kubemaster.vm.provider "virtualbox" do |vb|
vb.memory = "3096"
vb.cpus = 2
end
end
(1..2).each do |i|
config.vm.define "worker#{i}" do |worker|
worker.vm.hostname = "worker#{i}"
worker.vm.box = "ubuntu/bionic64"
worker.vm.network "private_network", ip: "192.168.99.2#{i}"
# worker.vm.provision :shell, inline: "sed 's/127\.0\.0\.1.*worker.*/192\.168\.99\.2#{i} worker#{i}/' -i /etc/hosts"
worker.vm.provision "shell", path: "provision.sh"
worker.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = 2
end
end
end
end