beaker-pe 2.11.11 → 2.11.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/beaker-pe/install/pe_utils.rb +44 -3
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.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: 324a9d18893ffc429e8ac5dd4539df131a61b3317c0993ce5c69945d836dea14
|
4
|
+
data.tar.gz: 283b5c762fb1f8918a46f743cd07f0b700cb28c94046a9f1f0b99efeea068c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07bd5f9ef9c47d1af9c7b2df095ecdcc0e3c190181a9043171428c43685f1d7fe238e02886b120bdb4e950ed483084ea09b95fcd5742c2fc2bb32740ba967823
|
7
|
+
data.tar.gz: dbc42764185aad94c793e0d66c6007a3db6b29e5b71e4e07b853196526132a6cb74ad95565f354a57016e4192a8a7af80684a8f6136c3ca8c3dedf21e0205d2f
|
data/Gemfile
CHANGED
@@ -15,6 +15,7 @@ end
|
|
15
15
|
group :acceptance_testing do
|
16
16
|
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
|
17
17
|
gem "beaker-vmpooler", *location_for(ENV['BEAKER_VMPOOLER_VERSION'] || '~> 1.3')
|
18
|
+
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.8')
|
18
19
|
end
|
19
20
|
|
20
21
|
gem "scooter", *location_for(ENV['SCOOTER_VERSION'] || '~> 4.3')
|
@@ -139,7 +139,7 @@ module Beaker
|
|
139
139
|
#Return true if tlsv1 protocol needs to be enforced
|
140
140
|
#param [Host] the host
|
141
141
|
def require_tlsv1?(host)
|
142
|
-
tlsv1_platforms = [/
|
142
|
+
tlsv1_platforms = [/el-5/, /solaris-1[0,1]-[i,x]/, /sles-11/,/windows-2008/]
|
143
143
|
return tlsv1_platforms.any? {|platform_regex| host['platform'] =~ platform_regex}
|
144
144
|
end
|
145
145
|
|
@@ -190,6 +190,12 @@ module Beaker
|
|
190
190
|
return "curl -kO https://#{downloadhost}:8140/packages/current/#{host['platform']}.bash && bash #{host['platform']}.bash"
|
191
191
|
end
|
192
192
|
|
193
|
+
# PE 2019.8.5 has an issue with the GPG key that does not allow el-5 and sles-11 to install the puppet-agent
|
194
|
+
if host['platform'] =~ /(el-5)|(sles-11)/ && pe_version.eql?('2019.8.5')
|
195
|
+
on(host, "curl --remote-name --location http://yum.puppet.com/RPM-GPG-KEY-puppet-20250406")
|
196
|
+
on(host, "rpm --import RPM-GPG-KEY-puppet-20250406")
|
197
|
+
end
|
198
|
+
|
193
199
|
if host['platform'] =~ /windows/ then
|
194
200
|
if use_puppet_ca_cert
|
195
201
|
frictionless_install_opts << '-UsePuppetCA'
|
@@ -211,7 +217,7 @@ module Beaker
|
|
211
217
|
end
|
212
218
|
if use_puppet_ca_cert
|
213
219
|
curl_opts << '--cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem'
|
214
|
-
|
220
|
+
else
|
215
221
|
curl_opts << '-k'
|
216
222
|
end
|
217
223
|
|
@@ -362,9 +368,11 @@ module Beaker
|
|
362
368
|
scp_to host, "#{path}/#{filename}#{extension}", "#{host['working_dir']}/#{filename}#{extension}"
|
363
369
|
if extension =~ /gz/
|
364
370
|
on host, "cd #{host['working_dir']}; gunzip #{filename}#{extension}"
|
371
|
+
gpg_key_overwrite(host, 'tarball')
|
365
372
|
end
|
366
373
|
if extension =~ /tar/
|
367
374
|
on host, "cd #{host['working_dir']}; tar -xvf #{filename}.tar"
|
375
|
+
gpg_key_overwrite(host, 'tarball')
|
368
376
|
end
|
369
377
|
else
|
370
378
|
if host['platform'] =~ /eos/
|
@@ -389,7 +397,37 @@ module Beaker
|
|
389
397
|
command_file_push = "curl -L #{curlopts}#{path}/"
|
390
398
|
end
|
391
399
|
on host, "cd #{host['working_dir']}; #{command_file_push}#{filename}#{extension} | #{unpack}"
|
400
|
+
gpg_key_overwrite(host, 'tarball')
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
392
404
|
|
405
|
+
#PE-32680, GPG expired on older PE versions, need to update with a new GPG key on the primary server
|
406
|
+
#only affects PE versions 2019.8.4 and earlier, and only needed for debian, ubuntu, and sles agent platforms
|
407
|
+
# @param [Host] host to see if we need to update the gpg key
|
408
|
+
# @param [String] location of the GPG key we intend to overwrite
|
409
|
+
# If someone is using this gem and is not on the PE private network, they need to download the new private GPG key and host
|
410
|
+
# it somewhere, then set the URL as an enviromental variable GPG_URL.
|
411
|
+
def gpg_key_overwrite(host, location)
|
412
|
+
gpg_url = ENV['GPG_URL'] || 'https://artifactory.delivery.puppetlabs.net/artifactory/generic__local/extended_gpg_key.asc'
|
413
|
+
case location
|
414
|
+
when 'tarball'
|
415
|
+
path_to_gpg_key = "#{host['working_dir']}/#{host['dist']}/packages/GPG-KEY-puppet"
|
416
|
+
when 'pe_repo'
|
417
|
+
path_to_gpg_key = '/opt/puppetlabs/puppet/modules/pe_repo/files/GPG-KEY-puppet'
|
418
|
+
when 'pe_repo_env'
|
419
|
+
path_to_gpg_key = '/opt/puppetlabs/server/data/environments/enterprise/modules/pe_repo/files/GPG-KEY-puppet'
|
420
|
+
else
|
421
|
+
raise(StandardError, "gpg_key_overwrite requires a valid location: tarball, or pe_repo. #{location} was supplied")
|
422
|
+
end
|
423
|
+
|
424
|
+
if (host['roles'].include?('master') || host['roles'].include?('pe_postgres')) && version_is_less(host[:pe_ver], '2019.8.5') && hosts.any? {|agent| agent['platform'] =~ /(debian)|(ubuntu)|(sles)/}
|
425
|
+
on(host, "rm -f #{path_to_gpg_key}")
|
426
|
+
on(host, "curl #{gpg_url} --output #{path_to_gpg_key}")
|
427
|
+
if location == 'pe_repo'
|
428
|
+
gpg_key_overwrite(host, 'pe_repo_env')
|
429
|
+
elsif location == 'pe_repo_env'
|
430
|
+
on host, puppet('agent -t'), :acceptable_exit_codes => [0,2]
|
393
431
|
end
|
394
432
|
end
|
395
433
|
end
|
@@ -433,7 +471,6 @@ module Beaker
|
|
433
471
|
# For some platforms (e.g, redhatfips), packaging_platfrom is set and should
|
434
472
|
# be used as the primary source of truth for the platform string.
|
435
473
|
platform = host['packaging_platform'] || host['platform']
|
436
|
-
|
437
474
|
# We don't have a separate AIX 7.2 build, so it is
|
438
475
|
# classified as 7.1 for pe_repo purposes
|
439
476
|
if platform == "aix-7.2-power"
|
@@ -1992,6 +2029,10 @@ module Beaker
|
|
1992
2029
|
end
|
1993
2030
|
end
|
1994
2031
|
|
2032
|
+
if hosts.any? {|host| host['roles'].include?('pe_postgres')}
|
2033
|
+
gpg_key_overwrite(pe_postgres, 'pe_repo')
|
2034
|
+
end
|
2035
|
+
|
1995
2036
|
step "Install agents" do
|
1996
2037
|
block_on(agent_nodes, {:run_in_parallel => true}) do |host|
|
1997
2038
|
install_ca_cert_on(host, opts)
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -263,7 +263,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
263
263
|
expecting = [
|
264
264
|
"FRICTIONLESS_TRACE='true'",
|
265
265
|
"export FRICTIONLESS_TRACE",
|
266
|
-
"cd /tmp && curl -O --tlsv1 https://testmaster:8140/packages/current/install.bash && bash install.bash"
|
266
|
+
"cd /tmp && curl -O --tlsv1 -k https://testmaster:8140/packages/current/install.bash && bash install.bash"
|
267
267
|
].join("; ")
|
268
268
|
|
269
269
|
expect( subject.frictionless_agent_installer_cmd( host, {}, '2016.4.0' ) ).to eq(expecting)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-pe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|