beaker-hostgenerator 1.3.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d7fbf823a00d608b392540e4eceb7239951cbffe6a7e066098de301dccbd1a6
4
- data.tar.gz: c0b1c9a1977e21a2ecc0afcc52ac48429af6fb4a9c946a7e9256eb56bc79cafc
3
+ metadata.gz: 7b2a6c099303930ab796b759e8a34d3e75533cad6836969f5044074cb0875af3
4
+ data.tar.gz: 381973aaccc24b4d67e2f08f454b1aace9870eef4d9cf989a35d7b32f4b9e75f
5
5
  SHA512:
6
- metadata.gz: 6b8a4a19950b3f12e8dc21e53b8cc44dc66120f9510f98f4b4963c8d700cfe45d3bc7af058c25008395a8e6602a65342f88b54dc2d06a2be926c6b1e92f38eb1
7
- data.tar.gz: a8f69d25bd171c07232a2985ba92028bfbfbd77911f1e8479f4fa320589cc831d0aba280c0093a0e7ec689dba342433d5e37201a4822bf0fb3bd8922a9125bea
6
+ metadata.gz: f75e1a1294c8a82a05a331a7b83bc60725dd2e7ee6cf0ab372cfc5bdaaaf365b33a07c8065a09264107f3b36008170d9313adb40534b92226d360d3338775a40
7
+ data.tar.gz: 57ebb87964fabac1f6af16b213674b9141e163179aff18c3d706a18de64ea79ba6f9c4ffda9b6cc4f8b309c5c0cf7053d0e65f2801a1633e787fcce6867c1e9d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,53 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.6.1](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.6.1) (2021-08-26)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.6.0...1.6.1)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - Debian 11 docker: Install iproute2 [\#222](https://github.com/voxpupuli/beaker-hostgenerator/pull/222) ([bastelfreak](https://github.com/bastelfreak))
12
+
13
+ ## [1.6.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.6.0) (2021-08-17)
14
+
15
+ [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.5.0...1.6.0)
16
+
17
+ **Implemented enhancements:**
18
+
19
+ - Generate Ubuntu ABS, vmpooler, and Docker templates on the fly [\#218](https://github.com/voxpupuli/beaker-hostgenerator/pull/218) ([ekohl](https://github.com/ekohl))
20
+
21
+ **Fixed bugs:**
22
+
23
+ - Set up Debian 11 on Docker [\#220](https://github.com/voxpupuli/beaker-hostgenerator/pull/220) ([ekohl](https://github.com/ekohl))
24
+
25
+ ## [1.5.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.5.0) (2021-06-14)
26
+
27
+ [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.4.0...1.5.0)
28
+
29
+ **Implemented enhancements:**
30
+
31
+ - Ensure amd64 containers are pulled when needed [\#214](https://github.com/voxpupuli/beaker-hostgenerator/pull/214) ([genebean](https://github.com/genebean))
32
+ - Add Fedora 34 support [\#212](https://github.com/voxpupuli/beaker-hostgenerator/pull/212) ([GabrielNagy](https://github.com/GabrielNagy))
33
+
34
+ **Fixed bugs:**
35
+
36
+ - Fix oracle image name [\#215](https://github.com/voxpupuli/beaker-hostgenerator/pull/215) ([genebean](https://github.com/genebean))
37
+ - Avoid activesupport deep\_merge conflict [\#213](https://github.com/voxpupuli/beaker-hostgenerator/pull/213) ([GabrielNagy](https://github.com/GabrielNagy))
38
+
39
+ ## [1.4.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.4.0) (2021-05-11)
40
+
41
+ [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.3.0...1.4.0)
42
+
43
+ **Implemented enhancements:**
44
+
45
+ - \(IMAGES-1273\) add support for Debian 11 amd64 [\#210](https://github.com/voxpupuli/beaker-hostgenerator/pull/210) ([ciprianbadescu](https://github.com/ciprianbadescu))
46
+ - Add support for redhat8-POWER \(el-8-ppc64le\) [\#208](https://github.com/voxpupuli/beaker-hostgenerator/pull/208) ([GabrielNagy](https://github.com/GabrielNagy))
47
+
48
+ **Merged pull requests:**
49
+
50
+ - Deal with nil when merging [\#209](https://github.com/voxpupuli/beaker-hostgenerator/pull/209) ([ekohl](https://github.com/ekohl))
51
+
5
52
  ## [1.3.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.3.0) (2021-04-15)
6
53
 
7
54
  [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.2.10...1.3.0)
@@ -83,7 +83,7 @@ module BeakerHostGenerator
83
83
  result = {}
84
84
 
85
85
  # Fedora
86
- (19..33).each do |release|
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 => {
@@ -587,6 +636,25 @@ module BeakerHostGenerator
587
636
  'template' => 'debian-10-i386'
588
637
  }
589
638
  },
639
+ 'debian11-64' => {
640
+ :general => {
641
+ 'platform' => 'debian-11-amd64',
642
+ 'packaging_platform' => 'debian-11-amd64'
643
+ },
644
+ :docker => {
645
+ 'docker_image_commands' => [
646
+ 'cp /bin/true /sbin/agetty',
647
+ 'rm -f /usr/sbin/policy-rc.d',
648
+ 'apt-get update && apt-get install -y cron locales-all net-tools wget gnupg iproute2'
649
+ ]
650
+ },
651
+ :vagrant => {
652
+ 'box' => 'debian/bullseye64',
653
+ },
654
+ :vmpooler => {
655
+ 'template' => 'debian-11-x86_64'
656
+ }
657
+ },
590
658
  'fedora14-32' => {
591
659
  :general => {
592
660
  'platform' => 'fedora-14-i386'
@@ -936,6 +1004,15 @@ module BeakerHostGenerator
936
1004
  'template' => 'redhat-8-x86_64'
937
1005
  }
938
1006
  },
1007
+ 'redhat8-POWER' => {
1008
+ :general => {
1009
+ 'platform' => 'el-8-ppc64le',
1010
+ 'packaging_platform' => 'el-8-ppc64le'
1011
+ },
1012
+ :abs => {
1013
+ 'template' => 'redhat-8-power8'
1014
+ }
1015
+ },
939
1016
  'scientific5-32' => {
940
1017
  :general => {
941
1018
  'platform' => 'el-5-i386',
@@ -1144,216 +1221,6 @@ module BeakerHostGenerator
1144
1221
  'template' => 'solaris-114-x86_64'
1145
1222
  }
1146
1223
  },
1147
- 'ubuntu1004-32' => {
1148
- :general => {
1149
- 'platform' => 'ubuntu-10.04-i386'
1150
- },
1151
- :vmpooler => {
1152
- 'template' => 'ubuntu-1004-i386'
1153
- }
1154
- },
1155
- 'ubuntu1004-64' => {
1156
- :general => {
1157
- 'platform' => 'ubuntu-10.04-amd64'
1158
- },
1159
- :vmpooler => {
1160
- 'template' => 'ubuntu-1004-x86_64'
1161
- }
1162
- },
1163
- 'ubuntu1204-32' => {
1164
- :general => {
1165
- 'platform' => 'ubuntu-12.04-i386'
1166
- },
1167
- :vmpooler => {
1168
- 'template' => 'ubuntu-1204-i386'
1169
- }
1170
- },
1171
- 'ubuntu1204-64' => {
1172
- :general => {
1173
- 'platform' => 'ubuntu-12.04-amd64'
1174
- },
1175
- :docker => {
1176
- 'docker_image_commands' => [
1177
- 'cp /bin/true /sbin/agetty',
1178
- 'apt-get install -y net-tools wget',
1179
- 'locale-gen en_US.UTF-8'
1180
- ]
1181
- },
1182
- :vmpooler => {
1183
- 'template' => 'ubuntu-1204-x86_64'
1184
- }
1185
- },
1186
- 'ubuntu1404-32' => {
1187
- :general => {
1188
- 'platform' => 'ubuntu-14.04-i386',
1189
- 'packaging_platform' => 'ubuntu-14.04-i386'
1190
- },
1191
- :vmpooler => {
1192
- 'template' => 'ubuntu-1404-i386'
1193
- }
1194
- },
1195
- 'ubuntu1404-64' => {
1196
- :general => {
1197
- 'platform' => 'ubuntu-14.04-amd64',
1198
- 'packaging_platform' => 'ubuntu-14.04-amd64'
1199
- },
1200
- :docker => {
1201
- 'docker_image_commands' => [
1202
- 'cp /bin/true /sbin/agetty',
1203
- 'rm /usr/sbin/policy-rc.d',
1204
- 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl',
1205
- 'apt-get install -y net-tools wget apt-transport-https',
1206
- 'locale-gen en_US.UTF-8',
1207
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
1208
- ]
1209
- },
1210
- :vmpooler => {
1211
- 'template' => 'ubuntu-1404-x86_64'
1212
- }
1213
- },
1214
- 'ubuntu1504-32' => {
1215
- :general => {
1216
- 'platform' => 'ubuntu-15.04-i386'
1217
- },
1218
- :vmpooler => {
1219
- 'template' => 'ubuntu-1504-i386'
1220
- }
1221
- },
1222
- 'ubuntu1504-64' => {
1223
- :general => {
1224
- 'platform' => 'ubuntu-15.04-amd64'
1225
- },
1226
- :vmpooler => {
1227
- 'template' => 'ubuntu-1504-x86_64'
1228
- }
1229
- },
1230
- 'ubuntu1510-32' => {
1231
- :general => {
1232
- 'platform' => 'ubuntu-15.10-i386'
1233
- },
1234
- :vmpooler => {
1235
- 'template' => 'ubuntu-1510-i386'
1236
- }
1237
- },
1238
- 'ubuntu1510-64' => {
1239
- :general => {
1240
- 'platform' => 'ubuntu-15.10-amd64'
1241
- },
1242
- :vmpooler => {
1243
- 'template' => 'ubuntu-1510-x86_64'
1244
- }
1245
- },
1246
- 'ubuntu1604-32' => {
1247
- :general => {
1248
- 'platform' => 'ubuntu-16.04-i386',
1249
- 'packaging_platform' => 'ubuntu-16.04-i386'
1250
- },
1251
- :vmpooler => {
1252
- 'template' => 'ubuntu-1604-i386'
1253
- }
1254
- },
1255
- 'ubuntu1604-64' => {
1256
- :general => {
1257
- 'platform' => 'ubuntu-16.04-amd64',
1258
- 'packaging_platform' => 'ubuntu-16.04-amd64'
1259
- },
1260
- :docker => {
1261
- 'docker_image_commands' => [
1262
- 'cp /bin/true /sbin/agetty',
1263
- 'apt-get install -y net-tools wget locales apt-transport-https',
1264
- 'locale-gen en_US.UTF-8',
1265
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
1266
- ]
1267
- },
1268
- :vmpooler => {
1269
- 'template' => 'ubuntu-1604-x86_64'
1270
- }
1271
- },
1272
- 'ubuntu1604-POWER' => {
1273
- :general => {
1274
- 'platform' => 'ubuntu-16.04-ppc64el',
1275
- 'packaging_platform' => 'ubuntu-16.04-ppc64el'
1276
- },
1277
- :abs => {
1278
- 'template' => 'ubuntu-16.04-power8'
1279
- }
1280
- },
1281
- 'ubuntu1610-32' => {
1282
- :general => {
1283
- 'platform' => 'ubuntu-16.10-i386'
1284
- },
1285
- :vmpooler => {
1286
- 'template' => 'ubuntu-1610-i386'
1287
- }
1288
- },
1289
- 'ubuntu1610-64' => {
1290
- :general => {
1291
- 'platform' => 'ubuntu-16.10-amd64'
1292
- },
1293
- :vmpooler => {
1294
- 'template' => 'ubuntu-1610-x86_64'
1295
- }
1296
- },
1297
- 'ubuntu1804-64' => {
1298
- :general => {
1299
- 'platform' => 'ubuntu-18.04-amd64',
1300
- 'packaging_platform' => 'ubuntu-18.04-amd64'
1301
- },
1302
- :docker => {
1303
- 'docker_image_commands' => [
1304
- 'cp /bin/true /sbin/agetty',
1305
- 'apt-get install -y net-tools wget locales apt-transport-https iproute2 gnupg',
1306
- 'locale-gen en_US.UTF-8',
1307
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
1308
- ]
1309
- },
1310
- :vmpooler => {
1311
- 'template' => 'ubuntu-1804-x86_64'
1312
- }
1313
- },
1314
- 'ubuntu1810-64' => {
1315
- :general => {
1316
- 'platform' => 'ubuntu-18.10-amd64',
1317
- 'packaging_platform' => 'ubuntu-18.10-amd64'
1318
- },
1319
- :docker => {
1320
- 'docker_image_commands' => [
1321
- 'cp /bin/true /sbin/agetty',
1322
- 'apt-get install -y net-tools wget locales apt-transport-https iproute2',
1323
- 'locale-gen en_US.UTF-8',
1324
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
1325
- ]
1326
- },
1327
- :vmpooler => {
1328
- 'template' => 'ubuntu-1810-x86_64'
1329
- }
1330
- },
1331
- 'ubuntu2004-64' => {
1332
- :general => {
1333
- 'platform' => 'ubuntu-20.04-amd64',
1334
- 'packaging_platform' => 'ubuntu-20.04-amd64'
1335
- },
1336
- :docker => {
1337
- 'docker_image_commands' => [
1338
- 'cp /bin/true /sbin/agetty',
1339
- 'apt-get install -y net-tools wget locales apt-transport-https iproute2 gnupg',
1340
- 'locale-gen en_US.UTF-8',
1341
- 'echo LANG=en_US.UTF-8 > /etc/default/locale'
1342
- ]
1343
- },
1344
- :vmpooler => {
1345
- 'template' => 'ubuntu-2004-x86_64'
1346
- }
1347
- },
1348
- 'ubuntu2004-AARCH64' => {
1349
- :general => {
1350
- 'platform' => 'ubuntu-20.04-aarch64',
1351
- 'packaging_platform' => 'ubuntu-20.04-aarch64'
1352
- },
1353
- :abs => {
1354
- 'template' => 'ubuntu-2004-arm64'
1355
- },
1356
- },
1357
1224
  'vro6-64' => {
1358
1225
  :general => {
1359
1226
  'platform' => 'sles-11-x86_64',
@@ -1903,9 +1770,9 @@ module BeakerHostGenerator
1903
1770
  def get_osinfo(bhg_version)
1904
1771
  case bhg_version
1905
1772
  when 0
1906
- {}.deep_merge!(osinfo)
1773
+ {}.deeper_merge!(osinfo)
1907
1774
  when 1
1908
- {}.deep_merge!(osinfo).deep_merge!(osinfo_bhgv1)
1775
+ {}.deeper_merge!(osinfo).deeper_merge!(osinfo_bhgv1)
1909
1776
  else
1910
1777
  raise "Invalid beaker-hostgenerator version: #{bhg_version}"
1911
1778
  end
@@ -1949,7 +1816,7 @@ module BeakerHostGenerator
1949
1816
  # }
1950
1817
  def get_platform_info(bhg_version, platform, hypervisor)
1951
1818
  info = get_osinfo(bhg_version)[platform]
1952
- {}.deep_merge!(info[:general]).deep_merge!(info[hypervisor])
1819
+ {}.deeper_merge!(info[:general]).deeper_merge!(info[hypervisor])
1953
1820
  end
1954
1821
 
1955
1822
  # 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 = {}.deep_merge(BASE_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'].deep_merge!(hypervisor.global_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'].deep_merge!(global_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.deep_merge! get_role_config(role)
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/hypervisor'
2
2
  require 'beaker-hostgenerator/data'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator::Hypervisor
6
6
  class Unknown < BeakerHostGenerator::Hypervisor::Interface
@@ -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
@@ -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
  }
@@ -22,6 +22,17 @@ module BeakerHostGenerator
22
22
  base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
23
23
  when /^fedora/
24
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.deep_merge! get_platform_info(bhg_version, platform, hypervisor)
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.deep_merge! BeakerHostGenerator::Data.BASE_CONFIG
22
- config['CONFIG'].deep_merge! vmpooler_hypervisor.global_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] = {
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '1.3.0'
3
+ STRING = '1.6.1'
4
4
  end
5
5
  end
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.3.0
4
+ version: 1.6.1
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-04-15 00:00:00.000000000 Z
13
+ date: 2021-08-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest