-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
100 lines (84 loc) · 2.74 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# -*- mode: ruby -*-
VAGRANTFILE_API_VERSION = "2"
LIBVIRT_POOL = "default"
# <http://docs.openstack.org/developer/devstack/guides/single-vm.html#virtual-machine>
# DevStack should run in any virtual machine running a supported Linux
# release. It will perform best with 4GB or more of RAM.
# TODO: check if there is some reproducibile provision ordering
# https://www.vagrantup.com/docs/multi-machine/
LIBVIRT_MEMORY_SMALL = 1024 # MB
LIBVIRT_MEMORY = 2048 # MB
LIBVIRT_MEMORY_BIG = 3096 # MB
LIBVIRT_MEMORY_HUGE = 4096 # MB
LIBVIRT_CPUS = 1
LIBVIRT_CPUS_BIG = 2
LIBVIRT_CPUS_HUGE = 4
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
# See: <https://github.com/fgrehm/vagrant-cachier>
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end
config.vm.provider "libvirt" do |dm|
dm.storage_pool_name = LIBVIRT_POOL
dm.memory = LIBVIRT_MEMORY
dm.cpus = LIBVIRT_CPUS
end
config.vm.provider "virtualbox" do |vb|
vb.memory = LIBVIRT_MEMORY
vb.cpus = LIBVIRT_CPUS
end
config.vm.define "storlets" do |vmc|
vmc.vm.hostname = "storlets"
vmc.vm.network "private_network", ip: "192.168.52.101"
vmc.vm.provision "shell" do |s|
s.path = "provision/provision_root"
s.args = ["storlets"]
end
vmc.vm.provider :libvirt do |domain|
domain.memory = LIBVIRT_MEMORY_HUGE
domain.cpus = LIBVIRT_CPUS_BIG
end
vmc.vm.provider :virtualbox do |vb|
vb.memory = LIBVIRT_MEMORY
vb.cpus = LIBVIRT_CPUS
end
end
config.vm.define "devstackstorlets" do |vmc|
vmc.vm.hostname = "devstackstorlets"
vmc.vm.network "private_network", ip: "192.168.52.102"
vmc.vm.provision "shell" do |s|
s.path = "provision/provision_root_devstackstorlets"
s.args = ["devstackstorlets"]
end
vmc.vm.provider :libvirt do |domain|
domain.memory = LIBVIRT_MEMORY_HUGE
domain.cpus = LIBVIRT_CPUS_BIG
end
vmc.vm.provider :virtualbox do |vb|
vb.memory = LIBVIRT_MEMORY
vb.cpus = LIBVIRT_CPUS
end
end
config.vm.define "devstackstorletsliberty" do |vmc|
vmc.vm.hostname = "devstackstorletsliberty"
vmc.vm.network "private_network", ip: "192.168.52.102"
vmc.vm.provision "shell" do |s|
s.path = "provision/provision_root_devstackstorlets"
s.args = ["devstackstorletsliberty"]
end
vmc.vm.provider :libvirt do |domain|
domain.memory = LIBVIRT_MEMORY_HUGE
domain.cpus = LIBVIRT_CPUS_BIG
end
vmc.vm.provider :virtualbox do |vb|
vb.memory = LIBVIRT_MEMORY
vb.cpus = LIBVIRT_CPUS
end
end
end