beaker-pe 2.11.12 → 2.11.16

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: 0ea72482bc472e4a0559e8f1c451de554f2c35c1e88337280c1c5e79b8dbabf1
4
- data.tar.gz: f07017a866d781a895481347ec738da1e42a1e07fc1d7aeed50945e7cc0f6a02
3
+ metadata.gz: 52adaf3c402a17eead36d731fb3f999b86abef884cec5cc575e481ac8e3e8c9f
4
+ data.tar.gz: fc2acec40bf906655511f3c918345f3a425ac5bd98dc522791e912d8a0dc166a
5
5
  SHA512:
6
- metadata.gz: 27d77ade9aabcc07859a6aa09e54ce9c7be605e527531dc58f5ed75c1119590de9a0e59aece829d6616db4d0a34cac7e83c5e207ac484d101ca1ce35008b7002
7
- data.tar.gz: a782f6043fc83b976949c45899ef95914b41b74e5d2515458081c34e91b3cba84455278f24fa9d52c9bade9afa913fa04063c1d41f9ff04e08ed5d63b6e8846b
6
+ metadata.gz: 1d6a1cd59d1d3f3e9a00e363c60b9703b526bf77dcda4523ad830bd654ef02d9187c80f50828c913d51ba247da14fca0f2c8e0c5af2530f534c07fe6ad40925a
7
+ data.tar.gz: 1dbbd8949c123c925cebcee3c82aee46a924433a9c829887e45916bdd040fb65e6e944e7ad8a2f6a5f384a49105597d809834b6262dffc25cc734a6b931b3bb1
@@ -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'
@@ -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,16 @@ module Beaker
1992
2029
  end
1993
2030
  end
1994
2031
 
2032
+ # pe_postgres node needs new gpg key
2033
+ if hosts.any? {|host| host['roles'].include?('pe_postgres')}
2034
+ gpg_key_overwrite(pe_postgres, 'pe_repo')
2035
+ end
2036
+
2037
+ # pe_repo needs updated with gpg key if sles/ubuntu/debian agent will be used
2038
+ if hosts.any? {|host| host['platform'] =~ /(sles)|(ubuntu)|(debian)/}
2039
+ gpg_key_overwrite(master, 'pe_repo')
2040
+ end
2041
+
1995
2042
  step "Install agents" do
1996
2043
  block_on(agent_nodes, {:run_in_parallel => true}) do |host|
1997
2044
  install_ca_cert_on(host, opts)
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.11.12'
6
+ STRING = '2.11.16'
7
7
  end
8
8
 
9
9
  end
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.12
4
+ version: 2.11.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec