-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
252 lines (213 loc) · 6.62 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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
UBUNTU2204 = "bento/ubuntu-22.04"
UBUNTU2204_DESKTOP = "fasmat/ubuntu2204-desktop"
UBUNTU_JAMMY = "ubuntu/jammy64"
UBUNTU_FOCAL = "ubuntu/focal64"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# vagrant dns; requires `vagrant plugin install vagrant-dns`
config.dns.tld = "vm"
# catchpy postgres
config.vm.define "dbserver" do |dbserver|
dbserver.vm.box = UBUNTU_JAMMY
dbserver.vm.hostname = "dbserver"
dbserver.dns.patterns = [/^dbserver.vm$/]
dbserver.vm.network "private_network", ip: "10.8.50.31"
dbserver.ssh.forward_agent = true
dbserver.ssh.insert_key = false
dbserver.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# catchpy webserver
config.vm.define "catchpy" do |catchpy|
catchpy.vm.box = UBUNTU_JAMMY
catchpy.vm.hostname = "catchpy"
catchpy.dns.patterns = [/^catchpy.vm$/]
catchpy.vm.network "private_network", ip: "10.8.50.41"
catchpy.ssh.forward_agent = true
catchpy.ssh.insert_key = false
catchpy.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# hxat webserver
config.vm.define "hxat" do |hxat|
hxat.vm.box = UBUNTU_JAMMY
hxat.vm.hostname = "hxat"
hxat.dns.patterns = [/^hxat.vm$/]
hxat.vm.network "private_network", ip: "10.8.50.51"
hxat.ssh.forward_agent = true
hxat.ssh.insert_key = false
hxat.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# hxarc node
config.vm.define "hxarc" do |hxarc|
hxarc.vm.box = UBUNTU_JAMMY
hxarc.vm.hostname = "hxarc"
hxarc.dns.patterns = [/^hxarc.vm$/]
hxarc.vm.network "private_network", ip: "10.8.44.11"
hxarc.ssh.forward_agent = true
hxarc.ssh.insert_key = false
hxarc.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# www2 node
config.vm.define "www2" do |www2|
www2.vm.box = UBUNTU_JAMMY
www2.vm.hostname = "www2"
www2.dns.patterns = [/^www2.vm$/]
www2.vm.network "private_network", ip: "10.8.10.11"
www2.ssh.forward_agent = true
www2.ssh.insert_key = false
www2.vm.provider "virtualbox" do |v|
v.memory = "1024"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# fnup node (hbso files&uploads)
config.vm.define "fnup" do |fnup|
fnup.vm.box = UBUNTU_JAMMY
fnup.vm.hostname = "fnup"
fnup.dns.patterns = [/^fnup.vm$/]
fnup.vm.network "private_network", ip: "10.8.10.21"
fnup.ssh.forward_agent = true
fnup.ssh.insert_key = false
fnup.vm.provider "virtualbox" do |v|
v.memory = "1024"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# hxydra webserver
config.vm.define "hxydra" do |hxydra|
hxydra.vm.box = UBUNTU_JAMMY
hxydra.vm.hostname = "hxydra"
hxydra.dns.patterns = [/^hxydra.vm$/]
hxydra.vm.network "private_network", ip: "10.11.10.10"
hxydra.ssh.forward_agent = true
hxydra.ssh.insert_key = false
hxydra.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# issue tracker roundup: https://www.roundup-tracker.org/index.html
config.vm.define "roundup" do |roundup|
roundup.vm.box = "geerlingguy/ubuntu2004"
roundup.vm.hostname = "roundup"
roundup.dns.patterns = [/^roundup.vm$/]
roundup.vm.network "private_network", ip: "10.77.10.10"
roundup.ssh.forward_agent = true
roundup.ssh.insert_key = false
roundup.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# goaccess log analyzer https://goaccess.io/download#distro
config.vm.define "goaccess" do |goaccess|
goaccess.vm.box = "geerlingguy/ubuntu2004"
goaccess.vm.hostname = "goaccess"
goaccess.dns.patterns = [/^goaccess.vm$/]
goaccess.vm.network "private_network", ip: "10.77.20.10"
goaccess.ssh.forward_agent = true
goaccess.ssh.insert_key = false
goaccess.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# lti13 inspector
config.vm.define "inspector" do |inspector|
inspector.vm.box = UBUNTU2204
inspector.vm.hostname = "inspector"
inspector.dns.patterns = [/^inspector.vm$/]
inspector.vm.network "private_network", ip: "10.77.30.10"
inspector.ssh.forward_agent = true
inspector.ssh.insert_key = false
inspector.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# ubuntu sakai
config.vm.define "sakai" do |sakai|
sakai.vm.box = UBUNTU_JAMMY
sakai.vm.hostname = "sakai"
sakai.dns.patterns = [/^sakai.vm$/]
sakai.vm.network "private_network", ip: "10.77.30.40"
sakai.ssh.forward_agent = true
sakai.ssh.insert_key = false
sakai.vm.provider "virtualbox" do |v|
v.memory = "4096"
v.customize [
"modifyvm", :id,
"--natdnshostresolver1", "on",
"--natdnshostresolver2", "on",
]
end
end
# allow guests to reach each other by hostname
#config.vm.provision "allow_guest_host_resolution",
# type: "shell",
# inline: <<-SHELL
# apt update
# apt install -y avahi-daemon libnss-mdns
# SHELL
end
#
# for vagrant plugin dns
# https://stackoverflow.com/a/70704094
# https://www.virtualbox.org/manual/ch06.html#network_hostonly
# $> cat /etc/vbox/networks.conf
# * 10.0.0.0/8 192.168.0.0/16
# * 2001::/64
#