beaker-hostgenerator 2.2.0 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -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: 93ed6dbbd9d25d946d16120fa33f862ce17fef626f20929e32833c053763f564
|
4
|
+
data.tar.gz: 5b615776e072662675ec1c6f27ad433257ed941de43d75fc73ac371af041d350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf058c89d83f556cb8c7dddd3e29ccdecf115e335faf57b2c870630cbab1ff1f1c3fd17be1417350729b5b74ba0fec080194d9067ecdc17c0a5271e71627ba0
|
7
|
+
data.tar.gz: 48b9975c3cbce170ef22160dff4de8fec6d6390c96f3965a218242e527a0586f5e98701c960d5771d7a5ba45e6c4f21c69fe36e1da29395ffb7213b1cf76c8e4
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,26 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [2.2.2](https://github.com/voxpupuli/beaker-hostgenerator/tree/2.2.2) (2023-07-27)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/2.2.1...2.2.2)
|
8
|
+
|
9
|
+
**Fixed bugs:**
|
10
|
+
|
11
|
+
- Fix typo in yum command [\#315](https://github.com/voxpupuli/beaker-hostgenerator/pull/315) ([smortex](https://github.com/smortex))
|
12
|
+
|
13
|
+
## [2.2.1](https://github.com/voxpupuli/beaker-hostgenerator/tree/2.2.1) (2023-07-27)
|
14
|
+
|
15
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/2.2.0...2.2.1)
|
16
|
+
|
17
|
+
**Fixed bugs:**
|
18
|
+
|
19
|
+
- Fix missing include for `strscan` [\#312](https://github.com/voxpupuli/beaker-hostgenerator/pull/312) ([jonathannewman](https://github.com/jonathannewman))
|
20
|
+
|
21
|
+
**Merged pull requests:**
|
22
|
+
|
23
|
+
- Move more data into hypervisor specific classes [\#313](https://github.com/voxpupuli/beaker-hostgenerator/pull/313) ([ekohl](https://github.com/ekohl))
|
24
|
+
|
5
25
|
## [2.2.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/2.2.0) (2023-05-05)
|
6
26
|
|
7
27
|
[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 install -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.2
|
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
|