forked from pawankkamboj/kubernetes-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
61 lines (44 loc) · 1.65 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
end
config.vm.box_check_update = false
config.vm.define "master1" do |node|
node.vm.network "private_network", ip: "192.168.50.11"
node.vm.hostname = "master1"
node.vm.provision :shell, inline: "cat /vagrant/ssh-key.pub >> .ssh/authorized_keys"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
end
config.vm.define "master2" do |node|
node.vm.network "private_network", ip: "192.168.50.12"
node.vm.hostname = "master2"
node.vm.provision :shell, inline: "cat /vagrant/ssh-key.pub >> .ssh/authorized_keys"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
end
config.vm.define "node1" do |node|
node.vm.network "private_network", ip: "192.168.50.21"
node.vm.hostname = "node1"
node.vm.provision :shell, inline: "cat /vagrant/ssh-key.pub >> .ssh/authorized_keys"
end
config.vm.define "node2" do |node|
node.vm.network "private_network", ip: "192.168.50.22"
node.vm.hostname = "node2"
node.vm.provision :shell, inline: "cat /vagrant/ssh-key.pub >> .ssh/authorized_keys"
end
config.vm.define "yum-proxy" do |node|
node.vm.network "private_network", ip: "192.168.50.99"
node.vm.hostname = "cache"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "512"]
end
node.vm.provision :shell, inline: "cat /vagrant/ssh-key.pub >> .ssh/authorized_keys"
end
end