beaker-hostgenerator 1.4.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/beaker-hostgenerator.gemspec +0 -3
- data/lib/beaker-hostgenerator/data.rb +91 -217
- data/lib/beaker-hostgenerator/generator.rb +4 -4
- data/lib/beaker-hostgenerator/hypervisor/abs.rb +17 -1
- data/lib/beaker-hostgenerator/hypervisor/docker.rb +32 -1
- data/lib/beaker-hostgenerator/hypervisor/unknown.rb +1 -1
- data/lib/beaker-hostgenerator/hypervisor/vagrant.rb +1 -1
- data/lib/beaker-hostgenerator/hypervisor/vmpooler.rb +16 -5
- data/lib/beaker-hostgenerator/hypervisor.rb +1 -1
- data/lib/beaker-hostgenerator/util.rb +3 -3
- data/lib/beaker-hostgenerator/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 132dc94d5189e4ca79255f915ed53ef895b607a82df75f01948ee1e3ae97d3d8
|
4
|
+
data.tar.gz: 75682b346b6d75f4a7bf457a0364919dc910698faa2ac7a318fdd1a2daae1824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a3ee4782860c88a2f5717f5f0a1eb8e65686ca9c0e1b165cadb9154cc24234261a0a86477bfea4b548aae4db6e68e07a9832ef0ece0a88ebc57e5a3252e9854
|
7
|
+
data.tar.gz: 18b20b4d3b7f9bdc007b60afebdf2609e3bc2f9212b26953fb9fada146793d083e1ec602778c359d85381447f0ce18bdce4788a72097860c770db3d0917b2b10
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,50 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [1.7.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.7.0) (2021-09-22)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.6.1...1.7.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- \(IMAGES-1302\) Add Alma and Rocky 8 support [\#226](https://github.com/voxpupuli/beaker-hostgenerator/pull/226) ([GabrielNagy](https://github.com/GabrielNagy))
|
12
|
+
- Add RedHat 8 FIPS platform definition [\#224](https://github.com/voxpupuli/beaker-hostgenerator/pull/224) ([GabrielNagy](https://github.com/GabrielNagy))
|
13
|
+
- Remove stringify-hash as a dependency [\#219](https://github.com/voxpupuli/beaker-hostgenerator/pull/219) ([ekohl](https://github.com/ekohl))
|
14
|
+
|
15
|
+
## [1.6.1](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.6.1) (2021-08-26)
|
16
|
+
|
17
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.6.0...1.6.1)
|
18
|
+
|
19
|
+
**Fixed bugs:**
|
20
|
+
|
21
|
+
- Debian 11 docker: Install iproute2 [\#222](https://github.com/voxpupuli/beaker-hostgenerator/pull/222) ([bastelfreak](https://github.com/bastelfreak))
|
22
|
+
|
23
|
+
## [1.6.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.6.0) (2021-08-17)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.5.0...1.6.0)
|
26
|
+
|
27
|
+
**Implemented enhancements:**
|
28
|
+
|
29
|
+
- Generate Ubuntu ABS, vmpooler, and Docker templates on the fly [\#218](https://github.com/voxpupuli/beaker-hostgenerator/pull/218) ([ekohl](https://github.com/ekohl))
|
30
|
+
|
31
|
+
**Fixed bugs:**
|
32
|
+
|
33
|
+
- Set up Debian 11 on Docker [\#220](https://github.com/voxpupuli/beaker-hostgenerator/pull/220) ([ekohl](https://github.com/ekohl))
|
34
|
+
|
35
|
+
## [1.5.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.5.0) (2021-06-14)
|
36
|
+
|
37
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.4.0...1.5.0)
|
38
|
+
|
39
|
+
**Implemented enhancements:**
|
40
|
+
|
41
|
+
- Ensure amd64 containers are pulled when needed [\#214](https://github.com/voxpupuli/beaker-hostgenerator/pull/214) ([genebean](https://github.com/genebean))
|
42
|
+
- Add Fedora 34 support [\#212](https://github.com/voxpupuli/beaker-hostgenerator/pull/212) ([GabrielNagy](https://github.com/GabrielNagy))
|
43
|
+
|
44
|
+
**Fixed bugs:**
|
45
|
+
|
46
|
+
- Fix oracle image name [\#215](https://github.com/voxpupuli/beaker-hostgenerator/pull/215) ([genebean](https://github.com/genebean))
|
47
|
+
- Avoid activesupport deep\_merge conflict [\#213](https://github.com/voxpupuli/beaker-hostgenerator/pull/213) ([GabrielNagy](https://github.com/GabrielNagy))
|
48
|
+
|
5
49
|
## [1.4.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.4.0) (2021-05-11)
|
6
50
|
|
7
51
|
[Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.3.0...1.4.0)
|
@@ -83,7 +83,7 @@ module BeakerHostGenerator
|
|
83
83
|
result = {}
|
84
84
|
|
85
85
|
# Fedora
|
86
|
-
(19..
|
86
|
+
(19..34).each do |release|
|
87
87
|
# 32 bit support was dropped in Fedora 31
|
88
88
|
if release < 31
|
89
89
|
result["fedora#{release}-32"] = {
|
@@ -100,6 +100,55 @@ module BeakerHostGenerator
|
|
100
100
|
}
|
101
101
|
end
|
102
102
|
|
103
|
+
# Ubuntu
|
104
|
+
#
|
105
|
+
# Generate LTS platforms
|
106
|
+
(14..20).select(&:even?).each do |release|
|
107
|
+
# 32 bit support was dropped in Ubuntu 18.04
|
108
|
+
if release < 18
|
109
|
+
result["ubuntu#{release}04-32"] = {
|
110
|
+
:general => {
|
111
|
+
'platform' => "ubuntu-#{release}.04-i386"
|
112
|
+
}
|
113
|
+
}
|
114
|
+
end
|
115
|
+
|
116
|
+
result["ubuntu#{release}04-64"] = {
|
117
|
+
:general => {
|
118
|
+
'platform' => "ubuntu-#{release}.04-amd64"
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
result["ubuntu#{release}04-POWER"] = {
|
123
|
+
:general => {
|
124
|
+
'platform' => "ubuntu-#{release}.04-ppc64el"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
result["ubuntu#{release}04-AARCH64"] = {
|
129
|
+
:general => {
|
130
|
+
'platform' => "ubuntu-#{release}.04-aarch64"
|
131
|
+
}
|
132
|
+
}
|
133
|
+
end
|
134
|
+
|
135
|
+
# Generate STS platforms
|
136
|
+
[20, 21].each do |release|
|
137
|
+
unless release.even?
|
138
|
+
result["ubuntu#{release}04-64"] = {
|
139
|
+
:general => {
|
140
|
+
'platform' => "ubuntu-#{release}.04-amd64"
|
141
|
+
}
|
142
|
+
}
|
143
|
+
end
|
144
|
+
|
145
|
+
result["ubuntu#{release}10-64"] = {
|
146
|
+
:general => {
|
147
|
+
'platform' => "ubuntu-#{release}.10-amd64"
|
148
|
+
}
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
103
152
|
result.merge!({
|
104
153
|
'aix53-POWER' => {
|
105
154
|
:general => {
|
@@ -137,6 +186,17 @@ module BeakerHostGenerator
|
|
137
186
|
'template' => 'aix-7.2-power'
|
138
187
|
}
|
139
188
|
},
|
189
|
+
'almalinux8-64' => {
|
190
|
+
:general => {
|
191
|
+
'platform' => 'el-8-x86_64',
|
192
|
+
},
|
193
|
+
:docker => {
|
194
|
+
'docker_image_commands' => [
|
195
|
+
'cp /bin/true /sbin/agetty',
|
196
|
+
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en'
|
197
|
+
]
|
198
|
+
}
|
199
|
+
},
|
140
200
|
'amazon6-64' => {
|
141
201
|
:general => {
|
142
202
|
'platform' => 'el-6-x86_64',
|
@@ -592,6 +652,13 @@ module BeakerHostGenerator
|
|
592
652
|
'platform' => 'debian-11-amd64',
|
593
653
|
'packaging_platform' => 'debian-11-amd64'
|
594
654
|
},
|
655
|
+
:docker => {
|
656
|
+
'docker_image_commands' => [
|
657
|
+
'cp /bin/true /sbin/agetty',
|
658
|
+
'rm -f /usr/sbin/policy-rc.d',
|
659
|
+
'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg iproute2'
|
660
|
+
]
|
661
|
+
},
|
595
662
|
:vagrant => {
|
596
663
|
'box' => 'debian/bullseye64',
|
597
664
|
},
|
@@ -936,6 +1003,15 @@ module BeakerHostGenerator
|
|
936
1003
|
'template' => 'redhat-8-x86_64'
|
937
1004
|
}
|
938
1005
|
},
|
1006
|
+
'redhatfips8-64' => {
|
1007
|
+
:general => {
|
1008
|
+
'platform' => 'el-8-x86_64',
|
1009
|
+
'packaging_platform' => 'redhatfips-8-x86_64'
|
1010
|
+
},
|
1011
|
+
:vmpooler => {
|
1012
|
+
'template' => 'redhat-fips-8-x86_64'
|
1013
|
+
}
|
1014
|
+
},
|
939
1015
|
'redhat8-AARCH64' => {
|
940
1016
|
:general => {
|
941
1017
|
'platform' => 'el-8-aarch64',
|
@@ -957,6 +1033,17 @@ module BeakerHostGenerator
|
|
957
1033
|
'template' => 'redhat-8-power8'
|
958
1034
|
}
|
959
1035
|
},
|
1036
|
+
'rocky8-64' => {
|
1037
|
+
:general => {
|
1038
|
+
'platform' => 'el-8-x86_64',
|
1039
|
+
},
|
1040
|
+
:docker => {
|
1041
|
+
'docker_image_commands' => [
|
1042
|
+
'cp /bin/true /sbin/agetty',
|
1043
|
+
'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en'
|
1044
|
+
]
|
1045
|
+
}
|
1046
|
+
},
|
960
1047
|
'scientific5-32' => {
|
961
1048
|
:general => {
|
962
1049
|
'platform' => 'el-5-i386',
|
@@ -1165,216 +1252,6 @@ module BeakerHostGenerator
|
|
1165
1252
|
'template' => 'solaris-114-x86_64'
|
1166
1253
|
}
|
1167
1254
|
},
|
1168
|
-
'ubuntu1004-32' => {
|
1169
|
-
:general => {
|
1170
|
-
'platform' => 'ubuntu-10.04-i386'
|
1171
|
-
},
|
1172
|
-
:vmpooler => {
|
1173
|
-
'template' => 'ubuntu-1004-i386'
|
1174
|
-
}
|
1175
|
-
},
|
1176
|
-
'ubuntu1004-64' => {
|
1177
|
-
:general => {
|
1178
|
-
'platform' => 'ubuntu-10.04-amd64'
|
1179
|
-
},
|
1180
|
-
:vmpooler => {
|
1181
|
-
'template' => 'ubuntu-1004-x86_64'
|
1182
|
-
}
|
1183
|
-
},
|
1184
|
-
'ubuntu1204-32' => {
|
1185
|
-
:general => {
|
1186
|
-
'platform' => 'ubuntu-12.04-i386'
|
1187
|
-
},
|
1188
|
-
:vmpooler => {
|
1189
|
-
'template' => 'ubuntu-1204-i386'
|
1190
|
-
}
|
1191
|
-
},
|
1192
|
-
'ubuntu1204-64' => {
|
1193
|
-
:general => {
|
1194
|
-
'platform' => 'ubuntu-12.04-amd64'
|
1195
|
-
},
|
1196
|
-
:docker => {
|
1197
|
-
'docker_image_commands' => [
|
1198
|
-
'cp /bin/true /sbin/agetty',
|
1199
|
-
'apt-get install -y net-tools wget',
|
1200
|
-
'locale-gen en_US.UTF-8'
|
1201
|
-
]
|
1202
|
-
},
|
1203
|
-
:vmpooler => {
|
1204
|
-
'template' => 'ubuntu-1204-x86_64'
|
1205
|
-
}
|
1206
|
-
},
|
1207
|
-
'ubuntu1404-32' => {
|
1208
|
-
:general => {
|
1209
|
-
'platform' => 'ubuntu-14.04-i386',
|
1210
|
-
'packaging_platform' => 'ubuntu-14.04-i386'
|
1211
|
-
},
|
1212
|
-
:vmpooler => {
|
1213
|
-
'template' => 'ubuntu-1404-i386'
|
1214
|
-
}
|
1215
|
-
},
|
1216
|
-
'ubuntu1404-64' => {
|
1217
|
-
:general => {
|
1218
|
-
'platform' => 'ubuntu-14.04-amd64',
|
1219
|
-
'packaging_platform' => 'ubuntu-14.04-amd64'
|
1220
|
-
},
|
1221
|
-
:docker => {
|
1222
|
-
'docker_image_commands' => [
|
1223
|
-
'cp /bin/true /sbin/agetty',
|
1224
|
-
'rm /usr/sbin/policy-rc.d',
|
1225
|
-
'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl',
|
1226
|
-
'apt-get install -y net-tools wget apt-transport-https',
|
1227
|
-
'locale-gen en_US.UTF-8',
|
1228
|
-
'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
1229
|
-
]
|
1230
|
-
},
|
1231
|
-
:vmpooler => {
|
1232
|
-
'template' => 'ubuntu-1404-x86_64'
|
1233
|
-
}
|
1234
|
-
},
|
1235
|
-
'ubuntu1504-32' => {
|
1236
|
-
:general => {
|
1237
|
-
'platform' => 'ubuntu-15.04-i386'
|
1238
|
-
},
|
1239
|
-
:vmpooler => {
|
1240
|
-
'template' => 'ubuntu-1504-i386'
|
1241
|
-
}
|
1242
|
-
},
|
1243
|
-
'ubuntu1504-64' => {
|
1244
|
-
:general => {
|
1245
|
-
'platform' => 'ubuntu-15.04-amd64'
|
1246
|
-
},
|
1247
|
-
:vmpooler => {
|
1248
|
-
'template' => 'ubuntu-1504-x86_64'
|
1249
|
-
}
|
1250
|
-
},
|
1251
|
-
'ubuntu1510-32' => {
|
1252
|
-
:general => {
|
1253
|
-
'platform' => 'ubuntu-15.10-i386'
|
1254
|
-
},
|
1255
|
-
:vmpooler => {
|
1256
|
-
'template' => 'ubuntu-1510-i386'
|
1257
|
-
}
|
1258
|
-
},
|
1259
|
-
'ubuntu1510-64' => {
|
1260
|
-
:general => {
|
1261
|
-
'platform' => 'ubuntu-15.10-amd64'
|
1262
|
-
},
|
1263
|
-
:vmpooler => {
|
1264
|
-
'template' => 'ubuntu-1510-x86_64'
|
1265
|
-
}
|
1266
|
-
},
|
1267
|
-
'ubuntu1604-32' => {
|
1268
|
-
:general => {
|
1269
|
-
'platform' => 'ubuntu-16.04-i386',
|
1270
|
-
'packaging_platform' => 'ubuntu-16.04-i386'
|
1271
|
-
},
|
1272
|
-
:vmpooler => {
|
1273
|
-
'template' => 'ubuntu-1604-i386'
|
1274
|
-
}
|
1275
|
-
},
|
1276
|
-
'ubuntu1604-64' => {
|
1277
|
-
:general => {
|
1278
|
-
'platform' => 'ubuntu-16.04-amd64',
|
1279
|
-
'packaging_platform' => 'ubuntu-16.04-amd64'
|
1280
|
-
},
|
1281
|
-
:docker => {
|
1282
|
-
'docker_image_commands' => [
|
1283
|
-
'cp /bin/true /sbin/agetty',
|
1284
|
-
'apt-get install -y net-tools wget locales apt-transport-https',
|
1285
|
-
'locale-gen en_US.UTF-8',
|
1286
|
-
'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
1287
|
-
]
|
1288
|
-
},
|
1289
|
-
:vmpooler => {
|
1290
|
-
'template' => 'ubuntu-1604-x86_64'
|
1291
|
-
}
|
1292
|
-
},
|
1293
|
-
'ubuntu1604-POWER' => {
|
1294
|
-
:general => {
|
1295
|
-
'platform' => 'ubuntu-16.04-ppc64el',
|
1296
|
-
'packaging_platform' => 'ubuntu-16.04-ppc64el'
|
1297
|
-
},
|
1298
|
-
:abs => {
|
1299
|
-
'template' => 'ubuntu-16.04-power8'
|
1300
|
-
}
|
1301
|
-
},
|
1302
|
-
'ubuntu1610-32' => {
|
1303
|
-
:general => {
|
1304
|
-
'platform' => 'ubuntu-16.10-i386'
|
1305
|
-
},
|
1306
|
-
:vmpooler => {
|
1307
|
-
'template' => 'ubuntu-1610-i386'
|
1308
|
-
}
|
1309
|
-
},
|
1310
|
-
'ubuntu1610-64' => {
|
1311
|
-
:general => {
|
1312
|
-
'platform' => 'ubuntu-16.10-amd64'
|
1313
|
-
},
|
1314
|
-
:vmpooler => {
|
1315
|
-
'template' => 'ubuntu-1610-x86_64'
|
1316
|
-
}
|
1317
|
-
},
|
1318
|
-
'ubuntu1804-64' => {
|
1319
|
-
:general => {
|
1320
|
-
'platform' => 'ubuntu-18.04-amd64',
|
1321
|
-
'packaging_platform' => 'ubuntu-18.04-amd64'
|
1322
|
-
},
|
1323
|
-
:docker => {
|
1324
|
-
'docker_image_commands' => [
|
1325
|
-
'cp /bin/true /sbin/agetty',
|
1326
|
-
'apt-get install -y net-tools wget locales apt-transport-https iproute2 gnupg',
|
1327
|
-
'locale-gen en_US.UTF-8',
|
1328
|
-
'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
1329
|
-
]
|
1330
|
-
},
|
1331
|
-
:vmpooler => {
|
1332
|
-
'template' => 'ubuntu-1804-x86_64'
|
1333
|
-
}
|
1334
|
-
},
|
1335
|
-
'ubuntu1810-64' => {
|
1336
|
-
:general => {
|
1337
|
-
'platform' => 'ubuntu-18.10-amd64',
|
1338
|
-
'packaging_platform' => 'ubuntu-18.10-amd64'
|
1339
|
-
},
|
1340
|
-
:docker => {
|
1341
|
-
'docker_image_commands' => [
|
1342
|
-
'cp /bin/true /sbin/agetty',
|
1343
|
-
'apt-get install -y net-tools wget locales apt-transport-https iproute2',
|
1344
|
-
'locale-gen en_US.UTF-8',
|
1345
|
-
'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
1346
|
-
]
|
1347
|
-
},
|
1348
|
-
:vmpooler => {
|
1349
|
-
'template' => 'ubuntu-1810-x86_64'
|
1350
|
-
}
|
1351
|
-
},
|
1352
|
-
'ubuntu2004-64' => {
|
1353
|
-
:general => {
|
1354
|
-
'platform' => 'ubuntu-20.04-amd64',
|
1355
|
-
'packaging_platform' => 'ubuntu-20.04-amd64'
|
1356
|
-
},
|
1357
|
-
:docker => {
|
1358
|
-
'docker_image_commands' => [
|
1359
|
-
'cp /bin/true /sbin/agetty',
|
1360
|
-
'apt-get install -y net-tools wget locales apt-transport-https iproute2 gnupg',
|
1361
|
-
'locale-gen en_US.UTF-8',
|
1362
|
-
'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
1363
|
-
]
|
1364
|
-
},
|
1365
|
-
:vmpooler => {
|
1366
|
-
'template' => 'ubuntu-2004-x86_64'
|
1367
|
-
}
|
1368
|
-
},
|
1369
|
-
'ubuntu2004-AARCH64' => {
|
1370
|
-
:general => {
|
1371
|
-
'platform' => 'ubuntu-20.04-aarch64',
|
1372
|
-
'packaging_platform' => 'ubuntu-20.04-aarch64'
|
1373
|
-
},
|
1374
|
-
:abs => {
|
1375
|
-
'template' => 'ubuntu-2004-arm64'
|
1376
|
-
},
|
1377
|
-
},
|
1378
1255
|
'vro6-64' => {
|
1379
1256
|
:general => {
|
1380
1257
|
'platform' => 'sles-11-x86_64',
|
@@ -1924,9 +1801,9 @@ module BeakerHostGenerator
|
|
1924
1801
|
def get_osinfo(bhg_version)
|
1925
1802
|
case bhg_version
|
1926
1803
|
when 0
|
1927
|
-
{}.
|
1804
|
+
{}.deeper_merge!(osinfo)
|
1928
1805
|
when 1
|
1929
|
-
{}.
|
1806
|
+
{}.deeper_merge!(osinfo).deeper_merge!(osinfo_bhgv1)
|
1930
1807
|
else
|
1931
1808
|
raise "Invalid beaker-hostgenerator version: #{bhg_version}"
|
1932
1809
|
end
|
@@ -1970,10 +1847,7 @@ module BeakerHostGenerator
|
|
1970
1847
|
# }
|
1971
1848
|
def get_platform_info(bhg_version, platform, hypervisor)
|
1972
1849
|
info = get_osinfo(bhg_version)[platform]
|
1973
|
-
|
1974
|
-
result.deep_merge!(info[:general]) if info[:general]
|
1975
|
-
result.deep_merge!(info[hypervisor]) if info[hypervisor]
|
1976
|
-
result
|
1850
|
+
{}.deeper_merge!(info[:general]).deeper_merge!(info[hypervisor])
|
1977
1851
|
end
|
1978
1852
|
|
1979
1853
|
# Perform any adjustments or modifications necessary to the given node
|
@@ -22,7 +22,7 @@ module BeakerHostGenerator
|
|
22
22
|
def generate(layout, options)
|
23
23
|
layout = prepare(layout)
|
24
24
|
tokens = tokenize_layout(layout)
|
25
|
-
config = {}.
|
25
|
+
config = {}.deeper_merge(BASE_CONFIG)
|
26
26
|
nodeid = Hash.new(1)
|
27
27
|
ostype = nil
|
28
28
|
bhg_version = options[:osinfo_version] || 0
|
@@ -51,7 +51,7 @@ module BeakerHostGenerator
|
|
51
51
|
# Delegate to the hypervisor
|
52
52
|
hypervisor = BeakerHostGenerator::Hypervisor.create(node_info, options)
|
53
53
|
host_config = hypervisor.generate_node(node_info, host_config, bhg_version)
|
54
|
-
config['CONFIG'].
|
54
|
+
config['CONFIG'].deeper_merge!(hypervisor.global_config())
|
55
55
|
|
56
56
|
# Merge in any arbitrary key-value host settings. Treat the 'hostname'
|
57
57
|
# setting specially, and don't merge it in as an arbitrary setting.
|
@@ -80,7 +80,7 @@ module BeakerHostGenerator
|
|
80
80
|
decoded = "{#{decoded}}"
|
81
81
|
end
|
82
82
|
global_config = settings_string_to_map(decoded)
|
83
|
-
config['CONFIG'].
|
83
|
+
config['CONFIG'].deeper_merge!(global_config)
|
84
84
|
end
|
85
85
|
|
86
86
|
# Munge non-string scalar values into proper data types
|
@@ -117,7 +117,7 @@ module BeakerHostGenerator
|
|
117
117
|
|
118
118
|
if not options[:disable_role_config]
|
119
119
|
host_config['roles'].each do |role|
|
120
|
-
host_config.
|
120
|
+
host_config.deeper_merge! get_role_config(role)
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator/data'
|
2
2
|
require 'beaker-hostgenerator/hypervisor'
|
3
|
-
require 'deep_merge'
|
3
|
+
require 'deep_merge/rails_compat'
|
4
4
|
|
5
5
|
module BeakerHostGenerator
|
6
6
|
module Hypervisor
|
@@ -27,6 +27,22 @@ module BeakerHostGenerator
|
|
27
27
|
base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
|
28
28
|
when /^fedora/
|
29
29
|
base_config['template'] = base_config['platform']
|
30
|
+
when /^ubuntu/
|
31
|
+
base_template = node_info['ostype'].sub('ubuntu', 'ubuntu-')
|
32
|
+
arch = case node_info['bits']
|
33
|
+
when '64'
|
34
|
+
'x86_64'
|
35
|
+
when '32'
|
36
|
+
'i386'
|
37
|
+
when 'AARCH64'
|
38
|
+
'arm64'
|
39
|
+
when 'POWER'
|
40
|
+
base_template = node_info['ostype'].sub(/ubuntu(\d\d)/, 'ubuntu-\1.')
|
41
|
+
'power8'
|
42
|
+
else
|
43
|
+
raise "Unknown bits '#{node_info['bits']}' for '#{node_info['ostype']}'"
|
44
|
+
end
|
45
|
+
base_config['template'] = "#{base_template}-#{arch}"
|
30
46
|
end
|
31
47
|
|
32
48
|
base_config
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator/data'
|
2
2
|
require 'beaker-hostgenerator/hypervisor'
|
3
|
-
require 'deep_merge'
|
3
|
+
require 'deep_merge/rails_compat'
|
4
4
|
|
5
5
|
module BeakerHostGenerator
|
6
6
|
module Hypervisor
|
@@ -10,8 +10,39 @@ module BeakerHostGenerator
|
|
10
10
|
def generate_node(node_info, base_config, bhg_version)
|
11
11
|
base_config['docker_cmd'] = ['/sbin/init']
|
12
12
|
base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1')
|
13
|
+
base_config['image'].sub!(/\w+/, 'oraclelinux') if node_info['ostype'] =~ /^oracle/
|
13
14
|
base_config['image'].sub!(/(\w+)/, '\1/leap') if node_info['ostype'] =~ /^opensuse/
|
14
15
|
base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/
|
16
|
+
if node_info['bits'] == '64'
|
17
|
+
base_config['image'] = "amd64/#{base_config['image']}"
|
18
|
+
end
|
19
|
+
|
20
|
+
docker_commands = []
|
21
|
+
|
22
|
+
case node_info['ostype']
|
23
|
+
when /^ubuntu/
|
24
|
+
docker_commands << 'cp /bin/true /sbin/agetty'
|
25
|
+
|
26
|
+
if node_info['ostype'] =~ /1404/
|
27
|
+
docker_commands << 'rm /usr/sbin/policy-rc.d'
|
28
|
+
docker_commands << 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl'
|
29
|
+
end
|
30
|
+
|
31
|
+
extra_packages_to_install = case node_info['ostype']
|
32
|
+
when /1404/
|
33
|
+
['apt-transport-https']
|
34
|
+
when /1604/
|
35
|
+
['locales']
|
36
|
+
else
|
37
|
+
['locales', 'iproute2', 'gnupg']
|
38
|
+
end
|
39
|
+
|
40
|
+
docker_commands << "apt-get install -y net-tools wget #{extra_packages_to_install.join(' ')}"
|
41
|
+
docker_commands << 'locale-gen en_US.UTF-8'
|
42
|
+
docker_commands << 'echo LANG=en_US.UTF-8 > /etc/default/locale'
|
43
|
+
|
44
|
+
base_config['docker_image_commands'] = docker_commands
|
45
|
+
end
|
15
46
|
|
16
47
|
return base_generate_node(node_info, base_config, bhg_version, :docker)
|
17
48
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator/data'
|
2
2
|
require 'beaker-hostgenerator/hypervisor'
|
3
|
-
require 'deep_merge'
|
3
|
+
require 'deep_merge/rails_compat'
|
4
4
|
|
5
5
|
module BeakerHostGenerator
|
6
6
|
module Hypervisor
|
@@ -8,7 +8,7 @@ module BeakerHostGenerator
|
|
8
8
|
include BeakerHostGenerator::Data
|
9
9
|
|
10
10
|
# default global configuration keys
|
11
|
-
def global_config
|
11
|
+
def global_config
|
12
12
|
{
|
13
13
|
'pooling_api' => 'http://vmpooler.delivery.puppetlabs.net/'
|
14
14
|
}
|
@@ -18,10 +18,21 @@ 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 /^centos/
|
22
|
-
base_config['template']
|
21
|
+
when /^(almalinux|centos|redhat|rocky)/
|
22
|
+
base_config['template'] ||= base_config['platform'].gsub(/^el/, $1)
|
23
23
|
when /^fedora/
|
24
|
-
base_config['template']
|
24
|
+
base_config['template'] ||= base_config['platform']
|
25
|
+
when /^ubuntu/
|
26
|
+
arch = case node_info['bits']
|
27
|
+
when '64'
|
28
|
+
'x86_64'
|
29
|
+
when '32'
|
30
|
+
'i386'
|
31
|
+
else
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
base_config['template'] ||= "#{node_info['ostype'].sub('ubuntu', 'ubuntu-')}-#{arch}" if arch
|
25
36
|
end
|
26
37
|
|
27
38
|
# Some vmpooler/vsphere platforms have special requirements.
|
@@ -94,7 +94,7 @@ module BeakerHostGenerator
|
|
94
94
|
def base_generate_node(node_info, base_config, bhg_version, *hypervisors)
|
95
95
|
platform = node_info['platform']
|
96
96
|
hypervisors.map do |hypervisor|
|
97
|
-
base_config.
|
97
|
+
base_config.deeper_merge! get_platform_info(bhg_version, platform, hypervisor)
|
98
98
|
end
|
99
99
|
|
100
100
|
base_config['hypervisor'] = @name
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'beaker-hostgenerator/data'
|
2
2
|
require 'beaker-hostgenerator/roles'
|
3
3
|
require 'beaker-hostgenerator/hypervisor/vmpooler'
|
4
|
-
require 'deep_merge'
|
4
|
+
require 'deep_merge/rails_compat'
|
5
5
|
|
6
6
|
module BeakerHostGenerator
|
7
7
|
module Utils
|
@@ -18,8 +18,8 @@ module BeakerHostGenerator
|
|
18
18
|
def dump_hosts(hosts, path)
|
19
19
|
vmpooler_hypervisor = BeakerHostGenerator::Hypervisor::Vmpooler.new
|
20
20
|
config = {}
|
21
|
-
config.
|
22
|
-
config['CONFIG'].
|
21
|
+
config.deeper_merge! BeakerHostGenerator::Data.BASE_CONFIG
|
22
|
+
config['CONFIG'].deeper_merge! vmpooler_hypervisor.global_config()
|
23
23
|
|
24
24
|
hosts.each do |host|
|
25
25
|
config['HOSTS'][host.node_name] = {
|
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: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Branan Purvine-Riley
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-09-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -158,20 +158,6 @@ dependencies:
|
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
160
|
version: '1.0'
|
161
|
-
- !ruby/object:Gem::Dependency
|
162
|
-
name: stringify-hash
|
163
|
-
requirement: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- - "~>"
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: 0.0.0
|
168
|
-
type: :runtime
|
169
|
-
prerelease: false
|
170
|
-
version_requirements: !ruby/object:Gem::Requirement
|
171
|
-
requirements:
|
172
|
-
- - "~>"
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version: 0.0.0
|
175
161
|
description: |
|
176
162
|
The beaker-hostgenerator tool will take a Beaker SUT (System Under Test) spec as
|
177
163
|
its first positional argument and use that to generate a Beaker host
|