forked from folio-org/folio-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
230 lines (210 loc) · 9.08 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Build a VM to serve as an Okapi/Docker server
# Deploy development environment
Vagrant.configure(2) do |config|
# Give us a little headroom
# Note that provisioning a Stripes webpack requires more RAM
config.vm.provider "virtualbox" do |vb|
vb.memory = 8192
vb.cpus = 2
end
config.vm.define "snapshot-core", autostart: false do |snapshot_core|
snapshot_core.vm.box = "folio/snapshot-core"
snapshot_core.vm.network "forwarded_port", guest: 9130, host: 9130
snapshot_core.vm.network "forwarded_port", guest: 3000, host: 3000
snapshot_core.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "snapshot-backend-core", autostart: false do |snapshot_backend_core|
snapshot_backend_core.vm.box = "folio/snapshot-backend-core"
snapshot_backend_core.vm.network "forwarded_port", guest: 9130, host: 9130
snapshot_backend_core.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "testing", autostart: false do |testing|
testing.vm.box = "folio/testing"
testing.vm.network "forwarded_port", guest: 9130, host: 9130
testing.vm.network "forwarded_port", guest: 3000, host: 3000
testing.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "testing-backend", autostart: false do |testing_backend|
testing_backend.vm.box = "folio/testing-backend"
testing_backend.vm.network "forwarded_port", guest: 9130, host: 9130
testing_backend.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "snapshot", autostart: false do |snapshot|
snapshot.vm.box = "folio/snapshot"
snapshot.vm.network "forwarded_port", guest: 9130, host: 9130
snapshot.vm.network "forwarded_port", guest: 3000, host: 3000
snapshot.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "release-core", autostart: false do |snapshot|
snapshot.vm.box = "folio/release-core"
snapshot.vm.network "forwarded_port", guest: 9130, host: 9130
snapshot.vm.network "forwarded_port", guest: 3000, host: 3000
snapshot.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "release", autostart: false do |snapshot|
snapshot.vm.box = "folio/release"
snapshot.vm.network "forwarded_port", guest: 9130, host: 9130
snapshot.vm.network "forwarded_port", guest: 3000, host: 3000
snapshot.vm.network "forwarded_port", guest: 8000, host: 8130
end
config.vm.define "build_snapshot_core", autostart: false do |build_snapshot_core|
build_snapshot_core.vm.box = "bento/ubuntu-20.04"
build_snapshot_core.vm.provider "virtualbox" do |vt|
vt.memory = 10240
end
build_snapshot_core.vm.network "forwarded_port", guest: 9130, host: 9130
build_snapshot_core.vm.network "forwarded_port", guest: 3000, host: 3000
build_snapshot_core.vm.network "forwarded_port", guest: 8000, host: 8130
build_snapshot_core.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_snapshot_core"],
"snapshot-core" => ["build_snapshot_core"],
"stripes-docker" => ["build_snapshot_core"]
}
end
end
config.vm.define "build_snapshot_backend_core", autostart: false do |build_snapshot_backend_core|
build_snapshot_backend_core.vm.box = "bento/ubuntu-20.04"
build_snapshot_backend_core.vm.provider "virtualbox" do |vt|
vt.memory = 10240
end
build_snapshot_backend_core.vm.network "forwarded_port", guest: 9130, host: 9130
build_snapshot_backend_core.vm.network "forwarded_port", guest: 8000, host: 8130
build_snapshot_backend_core.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_snapshot_backend_core"],
"snapshot-core" => ["build_snapshot_backend_core"]
}
end
end
config.vm.define "build_testing", autostart: false do |build_testing|
build_testing.vm.box = "bento/ubuntu-20.04"
build_testing.vm.provider "virtualbox" do |vt|
vt.memory = 10240
end
build_testing.vm.network "forwarded_port", guest: 9130, host: 9130
build_testing.vm.network "forwarded_port", guest: 3000, host: 3000
build_testing.vm.network "forwarded_port", guest: 8000, host: 8130
build_testing.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_testing"],
"testing" => ["build_testing"],
"stripes" => ["build_testing"]
}
end
end
config.vm.define "build_testing_backend", autostart: false do |build_testing_backend|
build_testing_backend.vm.box = "bento/ubuntu-20.04"
build_testing_backend.vm.provider "virtualbox" do |vtb|
vtb.memory = 10240
end
build_testing_backend.vm.network "forwarded_port", guest: 9130, host: 9130
build_testing_backend.vm.network "forwarded_port", guest: 8000, host: 8130
build_testing_backend.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_testing_backend"],
"testing" => ["build_testing_backend"],
"stripes-build" => ["build_testing_backend"]
}
end
end
config.vm.define "build_testing_core", autostart: false do |build_testing_core|
build_testing_core.vm.box = "bento/ubuntu-20.04"
build_testing_core.vm.provider "virtualbox" do |vt|
vt.memory = 10240
end
build_testing_core.vm.network "forwarded_port", guest: 9130, host: 9130
build_testing_core.vm.network "forwarded_port", guest: 3000, host: 3000
build_testing_core.vm.network "forwarded_port", guest: 8000, host: 8130
build_testing_core.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_testing_core"],
"testing-core" => ["build_testing_core"],
"stripes" => ["build_testing_core"]
}
end
end
config.vm.define "build_testing_backend_core", autostart: false do |build_testing_backend_core|
build_testing_backend_core.vm.box = "bento/ubuntu-20.04"
build_testing_backend_core.vm.provider "virtualbox" do |vtb|
vtb.memory = 10240
end
build_testing_backend_core.vm.network "forwarded_port", guest: 9130, host: 9130
build_testing_backend_core.vm.network "forwarded_port", guest: 8000, host: 8130
build_testing_backend_core.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_testing_backend_core"],
"testing-core" => ["build_testing_backend_core"],
"stripes-build" => ["build_testing_backend_core"]
}
end
end
config.vm.define "build_snapshot", autostart: false do |build_snapshot|
build_snapshot.vm.box = "bento/ubuntu-20.04"
build_snapshot.vm.network "forwarded_port", guest: 9130, host: 9130
build_snapshot.vm.network "forwarded_port", guest: 3000, host: 3000
build_snapshot.vm.network "forwarded_port", guest: 8000, host: 8130
build_snapshot.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_snapshot"],
"snapshot" => ["build_snapshot"],
"stripes-docker" => ["build_snapshot"]
}
end
end
config.vm.define "build_release_core", autostart: false do |build_release_core|
build_release_core.vm.box = "bento/ubuntu-16.04"
build_release_core.vm.provider "virtualbox" do |vr|
vr.memory = 10240
end
build_release_core.vm.network "forwarded_port", guest: 9130, host: 9130
build_release_core.vm.network "forwarded_port", guest: 3000, host: 3000
build_release_core.vm.network "forwarded_port", guest: 8000, host: 8130
build_release_core.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_release_core"],
"release-core" => ["build_release_core"],
"stripes" => ["build_release_core"]
}
end
end
config.vm.define "build_release", autostart: false do |build_release|
build_release.vm.box = "bento/ubuntu-16.04"
build_release.vm.provider "virtualbox" do |vrel|
vrel.memory = 10240
end
build_release.vm.network "forwarded_port", guest: 9130, host: 9130
build_release.vm.network "forwarded_port", guest: 3000, host: 3000
build_release.vm.network "forwarded_port", guest: 8000, host: 8130
build_release.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_release"],
"release" => ["build_release"],
"stripes" => ["build_release"]
}
end
end
config.vm.define "build_minimal", autostart: false do |build_minimal|
build_minimal.vm.box = "bento/ubuntu-20.04"
build_minimal.vm.network "forwarded_port", guest: 9130, host: 9130
build_minimal.vm.synced_folder ".", "/vagrant", disabled: true
build_minimal.vm.provision "ansible" do |ansible|
ansible.playbook = "folio.yml"
ansible.groups = {
"vagrant" => ["build_minimal"],
"minimal" => ["build_minimal"]
}
end
end
end