forked from ClusterLabs/hawk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
64 lines (48 loc) · 1.85 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "webhippie/opensuse-13.1"
config.librarian_chef.cheffile_dir = "chef"
config.vm.define "webui", default: true do |machine|
machine.vm.hostname = "webui.hawk.suse.com"
machine.vm.network "forwarded_port", guest: 22, host: 3022
machine.vm.network "forwarded_port", guest: 3000, host: 3000
machine.vm.network "forwarded_port", guest: 7630, host: 7630
machine.vm.network "private_network", ip: "10.13.37.10"
machine.vm.synced_folder ".", "/vagrant", type: "virtualbox"
machine.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["chef/cookbooks", "chef/site"]
chef.roles_path = "chef/roles"
chef.custom_config_path = "chef/solo.rb"
chef.synced_folder_type = "virtualbox"
chef.add_role "base"
chef.add_role "webui"
end
machine.vm.provider :virtualbox do |provider, override|
provider.memory = 2048
provider.cpus = 4
provider.name = "hawk-webui"
end
end
1.upto(3).each do |i|
config.vm.define "node#{i}" do |machine|
machine.vm.hostname = "node#{i}.hawk.suse.com"
machine.vm.network "forwarded_port", guest: 22, host: 3022 + (i * 100)
machine.vm.network "private_network", ip: "10.13.37.#{10 + i}"
machine.vm.synced_folder ".", "/vagrant", type: "virtualbox"
machine.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ["chef/cookbooks", "chef/site"]
chef.roles_path = "chef/roles"
chef.custom_config_path = "chef/solo.rb"
chef.synced_folder_type = "virtualbox"
chef.add_role "base"
chef.add_role "node"
end
machine.vm.provider :virtualbox do |provider, override|
provider.memory = 512
provider.cpus = 1
provider.name = "hawk-node#{i}"
end
end
end
end