-
Notifications
You must be signed in to change notification settings - Fork 14
/
Allinone
32 lines (27 loc) · 1019 Bytes
/
Allinone
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 :
vms = {
'extras' => {'memory' => '256', 'cpus' => 1, 'ip' => '40', 'host' => 'extras', 'provision' => 'extras.sh'},
'master' => {'memory' => '4096', 'cpus' => 4, 'ip' => '10', 'host' => 'okd', 'provision' => 'allinone.sh'}
}
Vagrant.configure('2') do |config|
config.vm.box = 'centos/7'
config.vm.box_check_update = false
vms.each do |name, conf|
config.vm.define "#{name}" do |k|
k.vm.hostname = "#{conf['host']}.example.com"
k.vm.network 'private_network', ip: "172.27.11.#{conf['ip']}"
k.vm.provider 'virtualbox' do |vb|
vb.memory = conf['memory']
vb.cpus = conf['cpus']
end
k.vm.provider 'libvirt' do |lv|
lv.memory = conf['memory']
lv.cpus = conf['cpus']
lv.cputopology :sockets => 1, :cores => conf['cpus'], :threads => '1'
end
k.vm.provision 'shell', path: "provision/#{conf['provision']}"
end
end
config.vm.provision 'shell', path: 'provision/provision.sh'
end