-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
53 lines (43 loc) · 1.67 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
# scaleio admin password
password="Scaleio123"
# add your domain here
domain = 'scaleio.local'
# add your IPs here
network = "192.168.100"
firstmdmip = "#{network}.11"
secondmdmip = "#{network}.12"
tbip = "#{network}.13"
# modifiy hostnames if required
nodes = [
{hostname: "node1", ipaddress: "#{tbip}", type: "tb", box: "bento/centos-7.3", memory: "1024"},
{hostname: 'node2', ipaddress: "#{secondmdmip}", type: 'mdm2', box: "bento/centos-7.3", memory: "1024"},
{hostname: 'node3', ipaddress: "#{firstmdmip}", type: 'mdm1', box: "bento/centos-7.3", memory: "1024"},
]
# 100GB fake device
device = "/home/vagrant/scaleio1"
Vagrant.configure("2") do |config|
# try to enable caching to speed up package installation for second run
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
nodes.each do |node|
config.vm.define node[:hostname] do |node_config|
node_config.vm.box = "#{node[:box]}"
node_config.vm.host_name = "#{node[:hostname]}.#{domain}"
node_config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "#{node[:memory]}"]
end
node_config.vm.network "private_network", ip: "#{node[:ipaddress]}"
# update box
#node_config.vm.provision "update", type: "shell", path: "scripts/update.sh"
if node[:type] == "tb"
# download latest ScaleIO bits
node_config.vm.provision "download", type: "shell", path: "scripts/download.sh"
end
node_config.vm.provision "shell" do |s|
s.path = "scripts/install.sh"
s.args = "-d #{device} -f #{firstmdmip} -s #{secondmdmip} -t #{tbip} -p #{password} -n #{node[:type]}"
end
end
end
end