-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
77 lines (60 loc) · 2.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# -*- mode: ruby -*-
# vi: set ft=ruby :
$commonCentosScript = <<-SCRIPT
yum update
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
ENV["LANG"] = "en_US.UTF-8"
ENV["LC_ALL"] = "en_US.UTF-8"
NodeCount = 1
MasterCount = 2
config.vm.define "deploy" do |deploy|
deploy.vm.network "private_network", ip: "10.240.0.10"
deploy.vm.hostname = "deploy-10.240.0.10.kuber.net"
deploy.vm.provider "virtualbox" do |vb|
vb.name = "deploy"
vb.gui = false
vb.cpus = 1
vb.memory = "1024"
end
deploy.vm.provision "shell", inline: $commonUbuntuScript
end
config.vm.define "proxy" do |proxy|
proxy.vm.network "private_network", ip: "10.240.0.12"
proxy.vm.hostname = "lb-10.240.0.11.kuber.net"
proxy.vm.provider "virtualbox" do |vb|
vb.name = "lb"
vb.gui = false
vb.cpus = 1
vb.memory = "1024"
end
proxy.vm.provision "shell", inline: $commonUbuntuScript
end
(0..MasterCount).each do |i|
config.vm.define "master-#{i}" do |master|
master.vm.network "private_network", ip: "10.240.0.3#{i}"
master.vm.hostname = "master-10.240.0.3#{i}.kuber.net"
master.vm.provider "virtualbox" do |vb|
vb.name = "master-#{i}"
vb.gui = false
vb.cpus = 2
vb.memory = "2048"
end
master.vm.provision "shell", inline: $commonUbuntuScript
end
end
(0..NodeCount).each do |i|
config.vm.define "node-#{i}" do |node|
node.vm.network "private_network", ip: "10.240.0.4#{i}"
node.vm.hostname = "node-10.240.0.4#{i}.akiryushin.net"
node.vm.provider "virtualbox" do |vb|
vb.name = "node-#{i}"
vb.gui = false
vb.cpus = 2
vb.memory = "2048"
end
node.vm.provision "shell", inline: $commonUbuntuScript
end
end
end