beaker-pe 2.11.10 → 2.11.14

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: e67561d58e3d22880ebc902fd9204e74deadb4af7f35580d93c4352e6bbd08c8
4
- data.tar.gz: 922b92e642722c8592d48925ee374d474cecda7b92f0ed4f23db6fe411e78ef9
3
+ metadata.gz: 8e9b569e250c94eb451c24254d071bb6fef6894f8a88c2935ce971fff81fe67b
4
+ data.tar.gz: abcf48ef49c6ce13258c4228ffc01ec4b53edac71a05617f5e35da6f0c3d28fe
5
5
  SHA512:
6
- metadata.gz: 40180fdc182048b2bac7632c8d2236f70f2c6ff4a5256d6b42e3b0281823ed0bc1c2b03907f677471fb9483d022cec9b3fe8e513131e7313e9c2b37e78c5baa0
7
- data.tar.gz: ac839faf008edf53c4ec75e1c27a61fa1e6fab8ae9902cb584058d35eae6f95bc3a9814b5c32ee7a82c6169d1d1cbe3aaf1f3c2d95cf8bcfdd01e6e0dc842a61
6
+ metadata.gz: edd113d5a18fadcba0f7eb2a9e01bd4bd3335973cc2eca1a649e32cf52e1e7936c76430d8b5b27dda0b1ab2d0122d4d97baa4ed1869f902515e4e9f68b07f433
7
+ data.tar.gz: 7074073427dc6118f5e706eaf600dc8d72b15b8488cb12cc8515e4f52da20a1431fc7b8e7b314e2015e286c7c3d867ea28b7b25e2a3c8de3a25833b9945a7412
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 = [/aix/, /el-5/, /solaris-1[0,1]-[i,x]/, /sles-11/,/windows-2008/]
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
- elsif host['platform'] !~ /aix/
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(master, "rm -f #{path_to_gpg_key}")
426
+ on(master, "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 master, 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"
@@ -761,6 +798,9 @@ module Beaker
761
798
  on host, "iptables -A OUTPUT -p tcp -d #{@osmirror_host_ip} -j DROP"
762
799
  on host, "iptables -A OUTPUT -p tcp -d #{@delivery_host_ip} -j DROP"
763
800
  on host, "iptables -A OUTPUT -p tcp -d #{@test_forge_host_ip} -j DROP"
801
+ # The next two lines are for our production and test k8s test runners
802
+ on host, "iptables -A OUTPUT -p tcp -d 10.236.112.0/20 -j ACCEPT"
803
+ on host, "iptables -A OUTPUT -p tcp -d 10.220.0.0/16 -j ACCEPT"
764
804
  # The next two lines clear the rest of the internal puppet lan
765
805
  on host, "iptables -A OUTPUT -p tcp -d 10.16.0.0/16 -j ACCEPT"
766
806
  on host, "iptables -A OUTPUT -p tcp -d 10.32.0.0/16 -j ACCEPT"
@@ -1989,6 +2029,8 @@ module Beaker
1989
2029
  end
1990
2030
  end
1991
2031
 
2032
+ gpg_key_overwrite(master, 'pe_repo')
2033
+
1992
2034
  step "Install agents" do
1993
2035
  block_on(agent_nodes, {:run_in_parallel => true}) do |host|
1994
2036
  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.10'
6
+ STRING = '2.11.14'
7
7
  end
8
8
 
9
9
  end
@@ -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.10
4
+ version: 2.11.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-15 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec