beaker-pe 3.5.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67b0404c59865c818eee51a02ce5788f0aef2f5b753a42c9aea792b51e7be236
4
- data.tar.gz: a6e7771b5f79635ef39b205eff75079788ebaed1b4fdbac38f241da2092db783
3
+ metadata.gz: dfd1d8c42972081bb9b5f9f49d4f1cefd90424a84594dfdf1c96a136fa48d7d8
4
+ data.tar.gz: eff2646196013b1cf2ad368e4a5f4ce3fe4c6d5534dcf5425f5024dc1b508b53
5
5
  SHA512:
6
- metadata.gz: 104e1314b325bca84a49450ef3f8934783a7c6b686becacd0a30304af35c1ce360fefaede0545abe8167cd6f528140e999536c5f6f11d4c3a194a88eb95ba28a
7
- data.tar.gz: 88f0f6c2b7017e5d92b4af70016b24f2d7adb0529a933132862576bb4e8d3f2b651809d4fa69b7c61bd7aa88ad590db74265700ea9b80f754954efeb34d2d037
6
+ metadata.gz: '069a53cb8696fb530fe31c90cb3820408285a56894bfa62c6677dd4ea89a9e183a74dc1f1771bebb14bd1ec43af32457427d6b712eb5a0587a14e9a251df0efe'
7
+ data.tar.gz: f3053f4e7d7a3a1aae929b40448e8c60357e814cd8bedc91a3d165d899932410575f11d02c3ca3f6a3ed65d7b95db32292278abcbb7a035ceca0012ac3a16958
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.6.1](https://github.com/puppetlabs/beaker-pe/tree/3.6.1) (2025-11-21)
4
+
5
+ [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.6.0...3.6.1)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - \[PE-41604\]: Update Solaris 10 SPARC package installation method in PE Utils [\#291](https://github.com/puppetlabs/beaker-pe/pull/291) ([span786](https://github.com/span786))
10
+
11
+ ## [3.6.0](https://github.com/puppetlabs/beaker-pe/tree/3.6.0) (2025-11-20)
12
+
13
+ [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.5.0...3.6.0)
14
+
15
+ **Implemented enhancements:**
16
+
17
+ - \[PE-42706\]: Add support for installing Puppet agent on Solaris 10 SPARC hosts [\#289](https://github.com/puppetlabs/beaker-pe/pull/289) ([span786](https://github.com/span786))
18
+
3
19
  ## [3.5.0](https://github.com/puppetlabs/beaker-pe/tree/3.5.0) (2025-04-15)
4
20
 
5
21
  [Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.4.0...3.5.0)
@@ -325,6 +325,66 @@ module Beaker
325
325
  end
326
326
  end
327
327
 
328
+ # Helper method to get common variables for agent package installation
329
+ # @param [String] puppet_agent_ver The puppet agent version
330
+ # @param [Hash{Symbol=>Symbol, String}] opts The options
331
+ # @return [Hash] Hash containing agent_downloads_url, master_aio_version, and stream
332
+ # @api private
333
+ def agent_package_common_vars(puppet_agent_ver, opts)
334
+ {
335
+ agent_downloads_url: "http://agent-downloads.delivery.puppetlabs.net/puppet-agent",
336
+ master_aio_version: puppet_fact(master, 'aio_agent_build'),
337
+ stream: opts[:puppet_collection] || "puppet#{puppet_agent_ver[0]}"
338
+ }
339
+ end
340
+
341
+ # Determine the build package to download on a solaris-10-sparc host, install that package onto the host.
342
+ # Assumed file name format: puppet-agent-8.15.0-1.sparc.pkg.gz
343
+ # This method should be called after puppet is installed on the master since it relies on the master
344
+ # telling it the puppet agent version to form the download URL.
345
+ # @param [Host] host The sol10-sparc host to download and install the package on.
346
+ # @param [Hash{Symbol=>Symbol, String}] opts The options
347
+ # @api private
348
+ def install_pkg_on_sol10_sparc_host(host, puppet_agent_ver, opts)
349
+ # Since sol10-sparc builds are not available in PE, download from agent-downloads.
350
+ vars = agent_package_common_vars(puppet_agent_ver, opts)
351
+ path = "#{vars[:agent_downloads_url]}/#{puppet_agent_ver}/repos/solaris/10/#{vars[:stream]}"
352
+ filename = "puppet-agent-#{vars[:master_aio_version]}-1.sparc.pkg.gz"
353
+ vanagon_noask = <<-NOASK
354
+ # Write the noask file to a temporary directory
355
+ # please see man -s 4 admin for details about this file:
356
+ # http://www.opensolarisforum.org/man/man4/admin.html
357
+ #
358
+ # The key thing we don\'t want to prompt for are conflicting files.
359
+ # The other nocheck settings are mostly defensive to prevent prompts
360
+ # We _do_ want to check for available free space and abort if there is
361
+ # not enough
362
+ mail=
363
+ # Overwrite already installed instances
364
+ instance=overwrite
365
+ # Do not bother checking for partially installed packages
366
+ partial=nocheck
367
+ # Do not bother checking the runlevel
368
+ runlevel=nocheck
369
+ # Do not bother checking package dependencies (We take care of this)
370
+ idepend=nocheck
371
+ rdepend=nocheck
372
+ # DO check for available free space and abort if there isn\'t enough
373
+ space=quit
374
+ # Do not check for setuid files.
375
+ setuid=nocheck
376
+ # Do not check if files conflict with other packages
377
+ conflict=nocheck
378
+ # We have no action scripts. Do not check for them.
379
+ action=nocheck
380
+ # Install to the default base directory.
381
+ basedir=default
382
+ NOASK
383
+
384
+ host.execute("echo \"#{vanagon_noask}\" > /var/tmp/vanagon-noask")
385
+ host.execute("curl --output #{filename} #{path}/#{filename} && gunzip -c #{filename} | pkgadd -d /dev/stdin -a /var/tmp/vanagon-noask all")
386
+ end
387
+
328
388
  # Determine the build package to download on a sles-11 (Intel) host, install that package onto the host.
329
389
  # Assumed file name format: puppet-agent-7.29.1.26.gf344eeefa-1.sles11.x86_64.rpm.
330
390
  # This method should be called after puppet is installed on the master since it relies on the master
@@ -334,11 +394,9 @@ module Beaker
334
394
  # @api private
335
395
  def install_rpm_on_sles11_host(host, puppet_agent_ver, opts)
336
396
  # Since sles11 builds are not available in PE, download from agent-downloads.
337
- agent_downloads_url = "http://agent-downloads.delivery.puppetlabs.net/puppet-agent"
338
- master_aio_version = puppet_fact(master, 'aio_agent_build')
339
- stream = opts[:puppet_collection] || "puppet#{puppet_agent_ver[0]}"
340
- path = "#{agent_downloads_url}/#{puppet_agent_ver}/repos/sles/11/#{stream}/x86_64"
341
- filename = "puppet-agent-#{master_aio_version}-1.sles11.x86_64"
397
+ vars = agent_package_common_vars(puppet_agent_ver, opts)
398
+ path = "#{vars[:agent_downloads_url]}/#{puppet_agent_ver}/repos/sles/11/#{vars[:stream]}/x86_64"
399
+ filename = "puppet-agent-#{vars[:master_aio_version]}-1.sles11.x86_64"
342
400
  extension = ".rpm"
343
401
  host.install_package_with_rpm("#{path}/#{filename}#{extension}")
344
402
  end
@@ -1174,6 +1232,8 @@ module Beaker
1174
1232
  }
1175
1233
  if host['platform'] =~ /sles-11/
1176
1234
  install_rpm_on_sles11_host(host, install_params[:puppet_agent_version], opts)
1235
+ elsif host['platform'] =~ /solaris-10-sparc/
1236
+ install_pkg_on_sol10_sparc_host(host, install_params[:puppet_agent_version], opts)
1177
1237
  else
1178
1238
  install_params.delete(:pe_promoted_builds_url) if install_params[:pe_promoted_builds_url].nil?
1179
1239
  install_puppet_agent_pe_promoted_repo_on(host, install_params)
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '3.5.0'
6
+ STRING = '3.6.1'
7
7
  end
8
8
 
9
9
  end
@@ -30,14 +30,15 @@ describe ClassMixedWithDSLInstallUtils do
30
30
  let(:basic_hosts) { make_hosts( { :pe_ver => '3.0',
31
31
  :platform => 'linux',
32
32
  :roles => [ 'agent' ],
33
- :type => 'pe'}, 5 ) }
33
+ :type => 'pe'}, 6 ) }
34
34
  let(:hosts) { basic_hosts[0][:roles] = ['master', 'database', 'dashboard']
35
35
  basic_hosts[1][:platform] = 'windows'
36
36
  basic_hosts[2][:platform] = 'osx-10.9-x86_64'
37
37
  basic_hosts[3][:platform] = 'eos'
38
38
  basic_hosts[4][:platform] = 'sles'
39
+ basic_hosts[5][:platform] = 'solaris'
39
40
  basic_hosts }
40
- let(:hosts_sorted) { [ hosts[1], hosts[0], hosts[2], hosts[3], hosts[4] ] }
41
+ let(:hosts_sorted) { [ hosts[1], hosts[0], hosts[2], hosts[3], hosts[4], hosts[5] ] }
41
42
  let(:winhost) { make_host( 'winhost', { :platform => 'windows',
42
43
  :pe_ver => '3.0',
43
44
  :type => 'pe',
@@ -60,6 +61,10 @@ describe ClassMixedWithDSLInstallUtils do
60
61
  :pe_ver => '3.0',
61
62
  :type => 'pe',
62
63
  :working_dir => '/tmp'} ) }
64
+ let(:solaris10host) { make_host( 'sol10', { :platform => 'solaris-10-sparc',
65
+ :pe_ver => '3.0',
66
+ :type => 'pe',
67
+ :working_dir => '/tmp'} ) }
63
68
  let(:lei_hosts) { make_hosts( { :pe_ver => '3.0',
64
69
  :platform => 'linux',
65
70
  :roles => [ 'agent' ],
@@ -1672,18 +1677,72 @@ describe ClassMixedWithDSLInstallUtils do
1672
1677
  let(:filename) { "puppet-agent-#{master_version}-1.sles11.x86_64" }
1673
1678
  let(:extension) { '.rpm' }
1674
1679
  let(:url) { "#{path}/#{filename}#{extension}" }
1675
-
1680
+
1676
1681
  it "generates the correct url to download the package" do
1677
1682
  allow( subject ).to receive( :puppet_fact ).and_return( master_version )
1678
1683
  allow( subject ).to receive( :master ).and_return( {} )
1679
-
1684
+
1680
1685
  expect( hosts[4] ).to receive( :install_package_with_rpm ).with( url ).once
1681
1686
  subject.install_rpm_on_sles11_host(hosts[4], puppet_agent_ver, opts)
1682
1687
  end
1683
1688
  end
1684
1689
 
1690
+ context 'install pkg.gz file in solaris host' do
1691
+ let(:opts) {
1692
+ { :puppet_collection => 'puppet8' }
1693
+ }
1694
+ let(:stream) { opts[:puppet_collection] }
1695
+ let(:puppet_agent_ver) { '8.16.0' }
1696
+ let(:agent_downloads_url) { "http://agent-downloads.delivery.puppetlabs.net/puppet-agent" }
1697
+ let(:master_version) { '8.16.0' }
1698
+ let(:path) { "#{agent_downloads_url}/#{puppet_agent_ver}/repos/solaris/10/#{stream}" }
1699
+ let(:filename) { "puppet-agent-#{master_version}-1.sparc.pkg.gz" }
1700
+ let(:url) { "#{path}/#{filename}" }
1701
+ let(:vanagon_noask) do
1702
+ <<-NOASK
1703
+ # Write the noask file to a temporary directory
1704
+ # please see man -s 4 admin for details about this file:
1705
+ # http://www.opensolarisforum.org/man/man4/admin.html
1706
+ #
1707
+ # The key thing we don\'t want to prompt for are conflicting files.
1708
+ # The other nocheck settings are mostly defensive to prevent prompts
1709
+ # We _do_ want to check for available free space and abort if there is
1710
+ # not enough
1711
+ mail=
1712
+ # Overwrite already installed instances
1713
+ instance=overwrite
1714
+ # Do not bother checking for partially installed packages
1715
+ partial=nocheck
1716
+ # Do not bother checking the runlevel
1717
+ runlevel=nocheck
1718
+ # Do not bother checking package dependencies (We take care of this)
1719
+ idepend=nocheck
1720
+ rdepend=nocheck
1721
+ # DO check for available free space and abort if there isn\'t enough
1722
+ space=quit
1723
+ # Do not check for setuid files.
1724
+ setuid=nocheck
1725
+ # Do not check if files conflict with other packages
1726
+ conflict=nocheck
1727
+ # We have no action scripts. Do not check for them.
1728
+ action=nocheck
1729
+ # Install to the default base directory.
1730
+ basedir=default
1731
+ NOASK
1732
+ end
1733
+
1734
+ it 'generates the correct url to download the package' do
1735
+ allow( subject ).to receive( :puppet_fact ).and_return( master_version )
1736
+ allow( subject ).to receive( :master ).and_return( {} )
1737
+
1738
+ expect( hosts[5] ).to receive( :execute ).with( "echo \"#{vanagon_noask}\" > /var/tmp/vanagon-noask" ).once
1739
+ expect( hosts[5] ).to receive( :execute ).with( "curl --output #{filename} #{url} && gunzip -c #{filename} | pkgadd -d /dev/stdin -a /var/tmp/vanagon-noask all" ).once
1740
+ subject.install_pkg_on_sol10_sparc_host(hosts[5], puppet_agent_ver, opts)
1741
+ end
1742
+ end
1743
+
1685
1744
  it 'can perform a simple installation' do
1686
- expect(subject).to receive(:get_mco_setting).and_return({}).twice
1745
+ expect(subject).to receive(:get_mco_setting).and_return({}).thrice
1687
1746
  allow( subject ).to receive( :verify_network_resources).with(hosts, nil)
1688
1747
  allow( subject ).to receive( :on ).and_return( Beaker::Result.new( {}, '' ) )
1689
1748
  allow( subject ).to receive( :fetch_pe ).and_return( true )
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-04-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
@@ -307,7 +306,6 @@ homepage: https://github.com/puppetlabs/beaker-pe
307
306
  licenses:
308
307
  - Apache2
309
308
  metadata: {}
310
- post_install_message:
311
309
  rdoc_options: []
312
310
  require_paths:
313
311
  - lib
@@ -322,8 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
322
320
  - !ruby/object:Gem::Version
323
321
  version: '0'
324
322
  requirements: []
325
- rubygems_version: 3.5.22
326
- signing_key:
323
+ rubygems_version: 3.6.9
327
324
  specification_version: 4
328
325
  summary: Beaker PE DSL Helpers!
329
326
  test_files: []