-
Notifications
You must be signed in to change notification settings - Fork 0
/
_.vagrantfile
48 lines (41 loc) · 1.29 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
base_box = "trusty64"
masters = [:master0,:master1,:master2]
k = 0
masters.each_with_index do |node, index|
config.vm.define node do |node|
ip = k + index
node.vm.box = base_box
node.vm.network :private_network, ip: "192.168.11.10#{ip}"
node.vm.hostname = "master-#{index}"
node.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
end
end
nodes = [:node0,:node1]
i = 110
nodes.each_with_index do |node, index|
config.vm.define node do |node|
ip = i + index
node.vm.box = base_box
node.vm.network :private_network, ip: "192.168.11.#{ip}"
node.vm.hostname = "node-#{index}"
node.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "3072"]
end
end
end
config.vm.define "flume" do |flume|
flume.vm.box = base_box
flume.vm.network :private_network, ip: "192.168.100.100"
flume.vm.hostname = "flume-test"
flume.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
end
end