This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
63 lines (55 loc) · 1.56 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
require 'vagrant-berkshelf'
require 'vagrant-omnibus'
Vagrant.configure("2") do |config|
config.omnibus.chef_version = :latest
config.vm.box = "precise64"
config.ssh.max_tries = 40
config.ssh.timeout = 120
run_lists = {
"x1" => [
"recipe[xtreemfs::dir]",
"recipe[xtreemfs::mrc]",
"recipe[xtreemfs::osd]",
"recipe[autoetchosts]"
],
"x2" => [
"recipe[xtreemfs::mrc]",
"recipe[xtreemfs::dir]",
"recipe[xtreemfs::osd]",
"recipe[autoetchosts]"
],
"x3" => [
"recipe[xtreemfs::dir]",
"recipe[xtreemfs::mrc]",
"recipe[xtreemfs::client]",
"recipe[xtreemfs::osd]",
"recipe[autoetchosts]"
]
}
(1..3).each do |i|
config.vm.define "x#{i}".to_s do |v|
v.vm.hostname = "x#{i}"
v.vm.network :private_network, ip: "33.33.33.#{10+i}"
v.vm.provision :chef_solo do |chef|
chef.data_bags_path = "data_bags"
chef.json = {
:xtreemfs => {
:standalone => false,
:osd => {
:bind_ip => "33.33.33.#{10+i}"
},
:mrc => {
:replication => true,
:bind_ip => "33.33.33.#{10+i}"
},
:dir => {
:replication => true,
:bind_ip => "33.33.33.#{10+i}"
}
}
}
chef.run_list = run_lists["x#{i}"]
end
end
end
end