forked from osuosl/ganeti-instance-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
44 lines (41 loc) · 1.32 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = '2'
Vagrant.require_version '>= 1.7.0'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
%w(centos-6.6 debian-7.7 ubuntu-12.04 ubuntu-14.04).each do |os|
config.vm.define os do |node|
config.vm.hostname = "instance-image"
config.omnibus.chef_version = 'latest' if
Vagrant.has_plugin?('vagrant-omnibus')
config.berkshelf.enabled = true if
Vagrant.has_plugin?('vagrant-berkshelf')
config.vm.box = "chef/#{os}"
config.vm.network :private_network, ip: '192.168.10.100'
config.vm.provision :chef_solo do |chef|
chef.json = {
:"ganeti" => {
:"master-node" => true,
:"cluster" => {
:"master-netdev" => 'lo',
:"extra-opts" => '--vg-name ganeti -H kvm:kernel_path=""',
:"disk-templates" => %w(plain),
:"nic" => {
:"mode" => 'routed',
:"link" => '100'
},
:"name" => 'ganeti.local'
}
}
}
chef.run_list = %w(
recipe[apt]
recipe[instance-image-devel]
recipe[ganeti]
recipe[instance-image-devel::install]
recipe[instance-image-devel::variants]
)
end
end
end
end