beaker-hostgenerator 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/lib/beaker-hostgenerator/data.rb +60 -262
- data/lib/beaker-hostgenerator/hypervisor/docker.rb +56 -11
- data/lib/beaker-hostgenerator/hypervisor/hcloud.rb +1 -1
- data/lib/beaker-hostgenerator/hypervisor/vmpooler.rb +5 -4
- data/lib/beaker-hostgenerator/parser.rb +1 -0
- data/lib/beaker-hostgenerator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4dd935507c9a4b146775cd6f323206d074c5ed5d510f25950b38b6b029904bcb
|
|
4
|
+
data.tar.gz: 998047b01604be93e5b1893d3aaea47d00c91329078805b96993ee643d0d0643
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7869080134c9d4ce72852913f07a6e331cd62fc096caeab8a8278d582a6fe0b4cefa7662bd132e2ee35960dcdf159f968e36db34255f2678077cda322fb0ae6c
|
|
7
|
+
data.tar.gz: ca4ec276785e93cb925f50b57d771716fa506fb809209505db1b884101e01e9aae5a226df869f85d160257ae5831683e211d00a577c3e21682380185c29c7c0d
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.2.1](https://github.com/voxpupuli/beaker-hostgenerator/tree/2.2.1) (2023-07-27)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/2.2.0...2.2.1)
|
|
8
|
+
|
|
9
|
+
**Fixed bugs:**
|
|
10
|
+
|
|
11
|
+
- Fix missing include for `strscan` [\#312](https://github.com/voxpupuli/beaker-hostgenerator/pull/312) ([jonathannewman](https://github.com/jonathannewman))
|
|
12
|
+
|
|
13
|
+
**Merged pull requests:**
|
|
14
|
+
|
|
15
|
+
- Move more data into hypervisor specific classes [\#313](https://github.com/voxpupuli/beaker-hostgenerator/pull/313) ([ekohl](https://github.com/ekohl))
|
|
16
|
+
|
|
5
17
|
## [2.2.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/2.2.0) (2023-05-05)
|
|
6
18
|
|
|
7
19
|
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/2.1.0...2.2.0)
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -69,7 +69,7 @@ begin
|
|
|
69
69
|
puts 'Fixing line endings...'
|
|
70
70
|
changelog_file = File.join(__dir__, 'CHANGELOG.md')
|
|
71
71
|
changelog_txt = File.read(changelog_file)
|
|
72
|
-
new_contents = changelog_txt.gsub(
|
|
72
|
+
new_contents = changelog_txt.gsub("\r\n", "\n")
|
|
73
73
|
File.open(changelog_file, 'w') { |file| file.puts new_contents }
|
|
74
74
|
end
|
|
75
75
|
end
|
|
@@ -80,69 +80,10 @@ module BeakerHostGenerator
|
|
|
80
80
|
def osinfo
|
|
81
81
|
result = {}
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# 32 bit support was dropped in Fedora 31
|
|
86
|
-
if release < 31
|
|
87
|
-
result["fedora#{release}-32"] = {
|
|
88
|
-
general: {
|
|
89
|
-
'platform' => "fedora-#{release}-i386",
|
|
90
|
-
},
|
|
91
|
-
}
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
result["fedora#{release}-64"] = {
|
|
83
|
+
generate_osinfo do |name, platform|
|
|
84
|
+
result[name] = {
|
|
95
85
|
general: {
|
|
96
|
-
'platform' =>
|
|
97
|
-
},
|
|
98
|
-
}
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Ubuntu
|
|
102
|
-
#
|
|
103
|
-
# Generate LTS platforms
|
|
104
|
-
(18..22).select(&:even?).each do |release|
|
|
105
|
-
result["ubuntu#{release}04-64"] = {
|
|
106
|
-
general: {
|
|
107
|
-
'platform' => "ubuntu-#{release}.04-amd64",
|
|
108
|
-
},
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
result["ubuntu#{release}04-POWER"] = {
|
|
112
|
-
general: {
|
|
113
|
-
'platform' => "ubuntu-#{release}.04-ppc64el",
|
|
114
|
-
},
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
result["ubuntu#{release}04-AARCH64"] = {
|
|
118
|
-
general: {
|
|
119
|
-
'platform' => "ubuntu-#{release}.04-aarch64",
|
|
120
|
-
},
|
|
121
|
-
}
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
# Generate STS platforms
|
|
125
|
-
[20, 21].each do |release|
|
|
126
|
-
unless release.even?
|
|
127
|
-
result["ubuntu#{release}04-64"] = {
|
|
128
|
-
general: {
|
|
129
|
-
'platform' => "ubuntu-#{release}.04-amd64",
|
|
130
|
-
},
|
|
131
|
-
}
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
result["ubuntu#{release}10-64"] = {
|
|
135
|
-
general: {
|
|
136
|
-
'platform' => "ubuntu-#{release}.10-amd64",
|
|
137
|
-
},
|
|
138
|
-
}
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
# FreeBSD
|
|
142
|
-
(12..13).each do |release|
|
|
143
|
-
result["freebsd#{release}-64"] = {
|
|
144
|
-
general: {
|
|
145
|
-
'platform' => "freebsd-#{release}-amd64",
|
|
86
|
+
'platform' => platform,
|
|
146
87
|
},
|
|
147
88
|
}
|
|
148
89
|
end
|
|
@@ -165,28 +106,6 @@ module BeakerHostGenerator
|
|
|
165
106
|
'template' => 'aix-7.2-power',
|
|
166
107
|
},
|
|
167
108
|
},
|
|
168
|
-
'almalinux8-64' => {
|
|
169
|
-
general: {
|
|
170
|
-
'platform' => 'el-8-x86_64',
|
|
171
|
-
},
|
|
172
|
-
docker: {
|
|
173
|
-
'docker_image_commands' => [
|
|
174
|
-
'cp /bin/true /sbin/agetty',
|
|
175
|
-
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en',
|
|
176
|
-
],
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
'almalinux9-64' => {
|
|
180
|
-
general: {
|
|
181
|
-
'platform' => 'el-9-x86_64',
|
|
182
|
-
},
|
|
183
|
-
docker: {
|
|
184
|
-
'docker_image_commands' => [
|
|
185
|
-
'cp /bin/true /sbin/agetty',
|
|
186
|
-
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en',
|
|
187
|
-
],
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
109
|
'amazon6-64' => {
|
|
191
110
|
general: {
|
|
192
111
|
'platform' => 'el-6-x86_64',
|
|
@@ -226,12 +145,6 @@ module BeakerHostGenerator
|
|
|
226
145
|
general: {
|
|
227
146
|
'platform' => 'el-7-x86_64',
|
|
228
147
|
},
|
|
229
|
-
docker: {
|
|
230
|
-
'docker_image_commands' => [
|
|
231
|
-
'cp /bin/true /sbin/agetty',
|
|
232
|
-
'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss',
|
|
233
|
-
],
|
|
234
|
-
},
|
|
235
148
|
},
|
|
236
149
|
'centos8-64' => {
|
|
237
150
|
general: {
|
|
@@ -241,13 +154,6 @@ module BeakerHostGenerator
|
|
|
241
154
|
'box' => 'centos/stream8',
|
|
242
155
|
'box_url' => 'https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-20230501.0.x86_64.vagrant-libvirt.box',
|
|
243
156
|
},
|
|
244
|
-
docker: {
|
|
245
|
-
'image' => 'quay.io/centos/centos:stream8',
|
|
246
|
-
'docker_image_commands' => [
|
|
247
|
-
'cp /bin/true /sbin/agetty',
|
|
248
|
-
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en hostname',
|
|
249
|
-
],
|
|
250
|
-
},
|
|
251
157
|
},
|
|
252
158
|
'centos9-64' => {
|
|
253
159
|
general: {
|
|
@@ -257,168 +163,42 @@ module BeakerHostGenerator
|
|
|
257
163
|
'box' => 'centos/stream9',
|
|
258
164
|
'box_url' => 'https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-Vagrant-9-20230410.0.x86_64.vagrant-libvirt.box',
|
|
259
165
|
},
|
|
260
|
-
docker: {
|
|
261
|
-
'image' => 'quay.io/centos/centos:stream9',
|
|
262
|
-
'docker_image_commands' => [
|
|
263
|
-
'cp /bin/true /sbin/agetty',
|
|
264
|
-
'dnf install -y crontabs initscripts iproute openssl wget which glibc-langpack-en hostname',
|
|
265
|
-
],
|
|
266
|
-
},
|
|
267
166
|
},
|
|
268
167
|
'debian10-64' => {
|
|
269
168
|
general: {
|
|
270
169
|
'platform' => 'debian-10-amd64',
|
|
271
170
|
},
|
|
272
|
-
docker: {
|
|
273
|
-
'docker_image_commands' => [
|
|
274
|
-
'cp /bin/true /sbin/agetty',
|
|
275
|
-
'rm -f /usr/sbin/policy-rc.d',
|
|
276
|
-
'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg',
|
|
277
|
-
],
|
|
278
|
-
},
|
|
279
171
|
vagrant: {
|
|
280
172
|
'box' => 'debian/buster64',
|
|
281
173
|
},
|
|
282
|
-
vmpooler: {
|
|
283
|
-
'template' => 'debian-10-x86_64',
|
|
284
|
-
},
|
|
285
174
|
},
|
|
286
175
|
'debian10-32' => {
|
|
287
176
|
general: {
|
|
288
177
|
'platform' => 'debian-10-i386',
|
|
289
178
|
},
|
|
290
|
-
docker: {
|
|
291
|
-
'docker_image_commands' => [
|
|
292
|
-
'cp /bin/true /sbin/agetty',
|
|
293
|
-
'rm -f /usr/sbin/policy-rc.d',
|
|
294
|
-
'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg',
|
|
295
|
-
],
|
|
296
|
-
},
|
|
297
|
-
vmpooler: {
|
|
298
|
-
'template' => 'debian-10-i386',
|
|
299
|
-
},
|
|
300
179
|
},
|
|
301
180
|
'debian11-64' => {
|
|
302
181
|
general: {
|
|
303
182
|
'platform' => 'debian-11-amd64',
|
|
304
183
|
},
|
|
305
|
-
docker: {
|
|
306
|
-
'docker_image_commands' => [
|
|
307
|
-
'cp /bin/true /sbin/agetty',
|
|
308
|
-
'rm -f /usr/sbin/policy-rc.d',
|
|
309
|
-
'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg iproute2',
|
|
310
|
-
],
|
|
311
|
-
},
|
|
312
184
|
vagrant: {
|
|
313
185
|
'box' => 'debian/bullseye64',
|
|
314
186
|
},
|
|
315
|
-
vmpooler: {
|
|
316
|
-
'template' => 'debian-11-x86_64',
|
|
317
|
-
},
|
|
318
187
|
},
|
|
319
188
|
'panos61-64' => {
|
|
320
189
|
general: {
|
|
321
190
|
'platform' => 'palo-alto-6.1.0-x86_64',
|
|
322
191
|
},
|
|
323
|
-
vmpooler: {
|
|
324
|
-
'template' => 'palo-alto-6.1.0-x86_64',
|
|
325
|
-
},
|
|
326
192
|
},
|
|
327
193
|
'panos71-64' => {
|
|
328
194
|
general: {
|
|
329
195
|
'platform' => 'palo-alto-7.1.0-x86_64',
|
|
330
196
|
},
|
|
331
|
-
vmpooler: {
|
|
332
|
-
'template' => 'palo-alto-7.1.0-x86_64',
|
|
333
|
-
},
|
|
334
197
|
},
|
|
335
198
|
'panos81-64' => {
|
|
336
199
|
general: {
|
|
337
200
|
'platform' => 'palo-alto-8.1.0-x86_64',
|
|
338
201
|
},
|
|
339
|
-
vmpooler: {
|
|
340
|
-
'template' => 'palo-alto-8.1.0-x86_64',
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
'opensuse15-32' => {
|
|
344
|
-
general: {
|
|
345
|
-
'platform' => 'opensuse-15-i386',
|
|
346
|
-
},
|
|
347
|
-
docker: {
|
|
348
|
-
'docker_image_commands' => [
|
|
349
|
-
'cp /bin/true /sbin/agetty',
|
|
350
|
-
'zypper install -y cron iproute2 tar wget which',
|
|
351
|
-
],
|
|
352
|
-
},
|
|
353
|
-
vmpooler: {
|
|
354
|
-
'template' => 'opensuse-15-i386',
|
|
355
|
-
},
|
|
356
|
-
},
|
|
357
|
-
'opensuse15-64' => {
|
|
358
|
-
general: {
|
|
359
|
-
'platform' => 'opensuse-15-x86_64',
|
|
360
|
-
},
|
|
361
|
-
docker: {
|
|
362
|
-
'docker_image_commands' => [
|
|
363
|
-
'cp /bin/true /sbin/agetty',
|
|
364
|
-
'zypper install -y cron iproute2 tar wget which',
|
|
365
|
-
],
|
|
366
|
-
},
|
|
367
|
-
vmpooler: {
|
|
368
|
-
'template' => 'opensuse-15-x86_64',
|
|
369
|
-
},
|
|
370
|
-
},
|
|
371
|
-
'opensuse42-32' => {
|
|
372
|
-
general: {
|
|
373
|
-
'platform' => 'opensuse-42-i386',
|
|
374
|
-
},
|
|
375
|
-
docker: {
|
|
376
|
-
'docker_image_commands' => [
|
|
377
|
-
'cp /bin/true /sbin/agetty',
|
|
378
|
-
'zypper install -y cron iproute2 tar wget which',
|
|
379
|
-
],
|
|
380
|
-
},
|
|
381
|
-
vmpooler: {
|
|
382
|
-
'template' => 'opensuse-42-i386',
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
'opensuse42-64' => {
|
|
386
|
-
general: {
|
|
387
|
-
'platform' => 'opensuse-42-x86_64',
|
|
388
|
-
},
|
|
389
|
-
docker: {
|
|
390
|
-
'docker_image_commands' => [
|
|
391
|
-
'cp /bin/true /sbin/agetty',
|
|
392
|
-
'zypper install -y cron iproute2 tar wget which',
|
|
393
|
-
],
|
|
394
|
-
},
|
|
395
|
-
vmpooler: {
|
|
396
|
-
'template' => 'opensuse-42-x86_64',
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
'oracle6-32' => {
|
|
400
|
-
general: {
|
|
401
|
-
'platform' => 'el-6-i386',
|
|
402
|
-
},
|
|
403
|
-
vmpooler: {
|
|
404
|
-
'template' => 'oracle-6-i386',
|
|
405
|
-
},
|
|
406
|
-
},
|
|
407
|
-
'oracle6-64' => {
|
|
408
|
-
general: {
|
|
409
|
-
'platform' => 'el-6-x86_64',
|
|
410
|
-
},
|
|
411
|
-
vmpooler: {
|
|
412
|
-
'template' => 'oracle-6-x86_64',
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
'oracle7-64' => {
|
|
416
|
-
general: {
|
|
417
|
-
'platform' => 'el-7-x86_64',
|
|
418
|
-
},
|
|
419
|
-
vmpooler: {
|
|
420
|
-
'template' => 'oracle-7-x86_64',
|
|
421
|
-
},
|
|
422
202
|
},
|
|
423
203
|
'osx1015-64' => {
|
|
424
204
|
general: {
|
|
@@ -501,9 +281,6 @@ module BeakerHostGenerator
|
|
|
501
281
|
general: {
|
|
502
282
|
'platform' => 'el-7-x86_64',
|
|
503
283
|
},
|
|
504
|
-
vmpooler: {
|
|
505
|
-
'template' => 'redhat-7-x86_64',
|
|
506
|
-
},
|
|
507
284
|
},
|
|
508
285
|
'redhatfips7-64' => {
|
|
509
286
|
general: {
|
|
@@ -542,9 +319,6 @@ module BeakerHostGenerator
|
|
|
542
319
|
general: {
|
|
543
320
|
'platform' => 'el-8-x86_64',
|
|
544
321
|
},
|
|
545
|
-
vmpooler: {
|
|
546
|
-
'template' => 'redhat-8-x86_64',
|
|
547
|
-
},
|
|
548
322
|
},
|
|
549
323
|
'redhatfips8-64' => {
|
|
550
324
|
general: {
|
|
@@ -578,39 +352,6 @@ module BeakerHostGenerator
|
|
|
578
352
|
general: {
|
|
579
353
|
'platform' => 'el-9-x86_64',
|
|
580
354
|
},
|
|
581
|
-
vmpooler: {
|
|
582
|
-
'template' => 'redhat-9-x86_64',
|
|
583
|
-
},
|
|
584
|
-
},
|
|
585
|
-
'rocky8-64' => {
|
|
586
|
-
general: {
|
|
587
|
-
'platform' => 'el-8-x86_64',
|
|
588
|
-
},
|
|
589
|
-
docker: {
|
|
590
|
-
'docker_image_commands' => [
|
|
591
|
-
'cp /bin/true /sbin/agetty',
|
|
592
|
-
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en',
|
|
593
|
-
],
|
|
594
|
-
},
|
|
595
|
-
},
|
|
596
|
-
'rocky9-64' => {
|
|
597
|
-
general: {
|
|
598
|
-
'platform' => 'el-9-x86_64',
|
|
599
|
-
},
|
|
600
|
-
docker: {
|
|
601
|
-
'docker_image_commands' => [
|
|
602
|
-
'cp /bin/true /sbin/agetty',
|
|
603
|
-
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en',
|
|
604
|
-
],
|
|
605
|
-
},
|
|
606
|
-
},
|
|
607
|
-
'scientific7-64' => {
|
|
608
|
-
general: {
|
|
609
|
-
'platform' => 'el-7-x86_64',
|
|
610
|
-
},
|
|
611
|
-
vmpooler: {
|
|
612
|
-
'template' => 'scientific-7-x86_64',
|
|
613
|
-
},
|
|
614
355
|
},
|
|
615
356
|
'sles11-32' => {
|
|
616
357
|
general: {
|
|
@@ -1293,5 +1034,62 @@ module BeakerHostGenerator
|
|
|
1293
1034
|
|
|
1294
1035
|
{}.deeper_merge!(info[:general]).deeper_merge!(info[hypervisor])
|
|
1295
1036
|
end
|
|
1037
|
+
|
|
1038
|
+
# @api private
|
|
1039
|
+
def generate_osinfo
|
|
1040
|
+
# Fedora
|
|
1041
|
+
(19..36).each do |release|
|
|
1042
|
+
# 32 bit support was dropped in Fedora 31
|
|
1043
|
+
yield ["fedora#{release}-32", "fedora-#{release}-i386"] if release < 31
|
|
1044
|
+
|
|
1045
|
+
yield ["fedora#{release}-64", "fedora-#{release}-x86_64"]
|
|
1046
|
+
end
|
|
1047
|
+
|
|
1048
|
+
# Ubuntu
|
|
1049
|
+
#
|
|
1050
|
+
# Generate LTS platforms
|
|
1051
|
+
(18..22).select(&:even?).each do |release|
|
|
1052
|
+
yield ["ubuntu#{release}04-64", "ubuntu-#{release}.04-amd64"]
|
|
1053
|
+
|
|
1054
|
+
yield ["ubuntu#{release}04-POWER", "ubuntu-#{release}.04-ppc64el"]
|
|
1055
|
+
|
|
1056
|
+
yield ["ubuntu#{release}04-AARCH64", "ubuntu-#{release}.04-aarch64"]
|
|
1057
|
+
end
|
|
1058
|
+
|
|
1059
|
+
# Generate STS platforms
|
|
1060
|
+
[20, 21].each do |release|
|
|
1061
|
+
# Even years are LTS releases
|
|
1062
|
+
yield ["ubuntu#{release}04-64", "ubuntu-#{release}.04-amd64"] unless release.even?
|
|
1063
|
+
|
|
1064
|
+
yield ["ubuntu#{release}10-64", "ubuntu-#{release}.10-amd64"]
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
# FreeBSD
|
|
1068
|
+
(12..13).each do |release|
|
|
1069
|
+
yield ["freebsd#{release}-64", "freebsd-#{release}-amd64"]
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
# AlmaLinux and Rocky
|
|
1073
|
+
%w[almalinux rocky].each do |os|
|
|
1074
|
+
(8..9).each do |release|
|
|
1075
|
+
yield ["#{os}#{release}-64", "el-#{release}-x86_64"]
|
|
1076
|
+
end
|
|
1077
|
+
end
|
|
1078
|
+
|
|
1079
|
+
# Oracle
|
|
1080
|
+
yield ['oracle6-32', 'el-6-i386']
|
|
1081
|
+
(6..7).each do |release|
|
|
1082
|
+
yield ["oracle#{release}-64", "el-#{release}-x86_64"]
|
|
1083
|
+
end
|
|
1084
|
+
|
|
1085
|
+
# Scientific Linux
|
|
1086
|
+
yield ['scientific7-64', 'el-7-x86_64']
|
|
1087
|
+
|
|
1088
|
+
# OpenSUSE
|
|
1089
|
+
[15, 42].each do |release|
|
|
1090
|
+
yield ["opensuse#{release}-32", "opensuse-#{release}-i386"]
|
|
1091
|
+
yield ["opensuse#{release}-64", "opensuse-#{release}-x86_64"]
|
|
1092
|
+
end
|
|
1093
|
+
end
|
|
1296
1094
|
end
|
|
1297
1095
|
end
|
|
@@ -9,33 +9,78 @@ module BeakerHostGenerator
|
|
|
9
9
|
|
|
10
10
|
def generate_node(node_info, base_config, bhg_version)
|
|
11
11
|
base_config['docker_cmd'] = ['/sbin/init']
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
ostype = node_info['ostype']
|
|
14
|
+
|
|
15
|
+
if (commands = image_commands(ostype))
|
|
16
|
+
base_config['docker_image_commands'] = commands
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
base_config['image'] = image(ostype)
|
|
20
|
+
base_config['image'].prepend('amd64/') if node_info['bits'] == '64' && !base_config['image'].start_with?('quay.io/')
|
|
21
|
+
|
|
22
|
+
base_generate_node(node_info, base_config, bhg_version, :docker)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def image(ostype)
|
|
28
|
+
image = ostype.sub(/(\d)/, ':\1')
|
|
29
|
+
|
|
30
|
+
case ostype
|
|
31
|
+
when /^centos/
|
|
32
|
+
version = ostype.delete_prefix('centos')
|
|
33
|
+
tag = (version.to_i >= 8) ? "stream#{version}" : "centos#{version}"
|
|
34
|
+
image = "quay.io/centos/centos:#{tag}"
|
|
14
35
|
when /^oracle/
|
|
15
|
-
|
|
36
|
+
image.sub!(/\w+/, 'oraclelinux')
|
|
16
37
|
when /^opensuse/
|
|
17
|
-
|
|
38
|
+
image.sub!(/(\w+)/, '\1/leap')
|
|
18
39
|
when /^ubuntu/
|
|
19
|
-
|
|
40
|
+
image.sub!(/(\d{2})/, '\1.')
|
|
20
41
|
when /^rocky/
|
|
21
|
-
|
|
42
|
+
image.sub!(/(\w+)/, 'rockylinux')
|
|
22
43
|
when /^alma/
|
|
23
|
-
|
|
44
|
+
image.sub!(/(\w+)/, 'almalinux')
|
|
24
45
|
end
|
|
25
46
|
|
|
26
|
-
|
|
47
|
+
image
|
|
48
|
+
end
|
|
27
49
|
|
|
28
|
-
|
|
50
|
+
def image_commands(ostype)
|
|
51
|
+
case ostype
|
|
52
|
+
when /^(almalinux|centos|rocky)/
|
|
53
|
+
[
|
|
54
|
+
'cp /bin/true /sbin/agetty',
|
|
55
|
+
el_package_install_command(ostype.delete_prefix(Regexp.last_match(1)).to_i),
|
|
56
|
+
]
|
|
57
|
+
when /^debian/
|
|
58
|
+
[
|
|
59
|
+
'cp /bin/true /sbin/agetty',
|
|
60
|
+
'rm -f /usr/sbin/policy-rc.d',
|
|
61
|
+
'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg',
|
|
62
|
+
]
|
|
63
|
+
when /^opensuse/
|
|
64
|
+
[
|
|
65
|
+
'cp /bin/true /sbin/agetty',
|
|
66
|
+
'zypper install -y cron iproute2 tar wget which',
|
|
67
|
+
]
|
|
29
68
|
when /^ubuntu/
|
|
30
|
-
|
|
69
|
+
[
|
|
31
70
|
'cp /bin/true /sbin/agetty',
|
|
32
71
|
'apt-get install -y net-tools wget locales iproute2 gnupg',
|
|
33
72
|
'locale-gen en_US.UTF-8',
|
|
34
73
|
'echo LANG=en_US.UTF-8 > /etc/default/locale',
|
|
35
74
|
]
|
|
36
75
|
end
|
|
76
|
+
end
|
|
37
77
|
|
|
38
|
-
|
|
78
|
+
def el_package_install_command(version)
|
|
79
|
+
if version >= 8
|
|
80
|
+
'dnf install -y crontabs initscripts iproute openssl wget which glibc-langpack-en hostname'
|
|
81
|
+
else
|
|
82
|
+
'yum intall -y crontabs initscripts iproute openssl wget which sysvinit-tools tar ss'
|
|
83
|
+
end
|
|
39
84
|
end
|
|
40
85
|
end
|
|
41
86
|
end
|
|
@@ -14,7 +14,7 @@ module BeakerHostGenerator
|
|
|
14
14
|
when 'ubuntu'
|
|
15
15
|
"#{os}-#{version[0, 2]}.#{version[2, 2]}"
|
|
16
16
|
when 'centos'
|
|
17
|
-
version.to_i == 7 ? "#{os}-#{version}" : "#{os}-stream-#{version}"
|
|
17
|
+
(version.to_i == 7) ? "#{os}-#{version}" : "#{os}-stream-#{version}"
|
|
18
18
|
else
|
|
19
19
|
"#{os}-#{version}"
|
|
20
20
|
end
|
|
@@ -18,11 +18,12 @@ module BeakerHostGenerator
|
|
|
18
18
|
base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler)
|
|
19
19
|
|
|
20
20
|
case node_info['ostype']
|
|
21
|
-
when /^(almalinux|centos|redhat|rocky)/
|
|
21
|
+
when /^(almalinux|centos|oracle|redhat|rocky|scientific)/
|
|
22
22
|
base_config['template'] ||= base_config['platform'].gsub(/^el/, ::Regexp.last_match(1))
|
|
23
|
-
when /^fedora/
|
|
23
|
+
when /^fedora/, /^opensuse/, /^panos/
|
|
24
24
|
base_config['template'] ||= base_config['platform']
|
|
25
|
-
when /^ubuntu/
|
|
25
|
+
when /^(debian|ubuntu)/
|
|
26
|
+
os = Regexp.last_match(1)
|
|
26
27
|
arch = case node_info['bits']
|
|
27
28
|
when '64'
|
|
28
29
|
'x86_64'
|
|
@@ -30,7 +31,7 @@ module BeakerHostGenerator
|
|
|
30
31
|
'i386'
|
|
31
32
|
end
|
|
32
33
|
|
|
33
|
-
base_config['template'] ||= "#{node_info['ostype'].sub(
|
|
34
|
+
base_config['template'] ||= "#{node_info['ostype'].sub(os, "#{os}-")}-#{arch}" if arch
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
base_config
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: beaker-hostgenerator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Branan Purvine-Riley
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2023-
|
|
14
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: fakefs
|