forked from grahamgilbert/vagrant-puppetmaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
81 lines (69 loc) · 2.87 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect = true
end
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
vb.customize ["modifyvm", :id, "--nictype3", "virtio"]
vb.memory = 1024
vb.cpus = 2
end
config.vm.define :master do |master|
master.vm.hostname = "puppet.test"
master.vm.box = "precise64"
master.vm.box_url = "http://files.vagrantup.com/precise64.box"
master.vm.network :private_network, ip: "192.168.251.210"
master.vm.provision :shell, :path => "scripts/puppet_master.sh"
master.vm.provision :shell, :path => "scripts/puppet_r10k.sh"
master.vm.provision :puppet do |puppet|
puppet.manifests_path = "VagrantConf/manifests"
puppet.manifest_file = "default.pp"
puppet.options = "--verbose --modulepath /home/vagrant/modules"
end
master.vm.synced_folder "puppet/manifests", "/etc/puppet/manifests"
master.vm.synced_folder "puppet/modules", "/etc/puppet/modules"
master.vm.synced_folder "puppet/hieradata", "/etc/puppet/hieradata"
end
(0..2).each do |i|
config.vm.define "mon#{i}" do |mon|
mon.vm.box = "wheezy64"
mon.vm.box_url = "http://os.enocloud.com:8080/v1/AUTH_fc47c4103c9b4aaf9271c581776a268f/public/wheezy64.box"
mon.vm.hostname = "ceph-mon#{i}.test"
mon.vm.network :private_network, ip: "192.168.251.1#{i}"
mon.vm.network :private_network, ip: "192.168.252.1#{i}"
mon.vm.provision :shell, :path => "scripts/mon.sh"
end
end
(0..2).each do |i|
config.vm.define "osd#{i}" do |osd|
osd.vm.box = "wheezy64"
osd.vm.box_url = "http://os.enocloud.com:8080/v1/AUTH_fc47c4103c9b4aaf9271c581776a268f/public/wheezy64.box"
osd.vm.hostname = "ceph-osd#{i}.test"
osd.vm.network :private_network, ip: "192.168.251.10#{i}"
osd.vm.network :private_network, ip: "192.168.252.10#{i}"
osd.vm.provision :shell, :path => "scripts/osd.sh"
(0..1).each do |d|
osd.vm.provider :virtualbox do |vb|
vb.customize [ "createhd", "--filename", "disk-#{i}-#{d}", "--size", "5000" ]
vb.customize [ "storageattach", :id, "--storagectl", "SATA Controller", "--port", 3+d, "--device", 0, "--type", "hdd", "--medium", "disk-#{i}-#{d}.vdi" ]
end
end
end
end
(0..1).each do |i|
config.vm.define "mds#{i}" do |mds|
mds.vm.box = "wheezy64"
mds.vm.box_url = "http://os.enocloud.com:8080/v1/AUTH_fc47c4103c9b4aaf9271c581776a268f/public/wheezy64.box"
mds.vm.hostname = "ceph-mds#{i}.test"
mds.vm.network :private_network, ip: "192.168.251.15#{i}"
mds.vm.provision :shell, :path => "scripts/mds.sh"
end
end
end