beaker-pe 3.4.0 → 3.6.0
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 +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/beaker-pe/install/pe_utils.rb +40 -6
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +51 -5
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eed7c2a8bf17ddf132b8304f399dc281662a1e5bcf30adccacded869ef4046ec
|
|
4
|
+
data.tar.gz: fd6a280140761abbc2daac3d441ed0514ddc172f338323467e56bb901f45e2c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a66def81ab2b5d734370bf39488a85c9e138918aceae47528adf4af8fc7aa0efe48963341e9e6c2fa06583bf926b6b549291995fde8259e8abe9aa85be20629f
|
|
7
|
+
data.tar.gz: 371a84424c62700aa73b68c161a3a8ede63accc2a5a909ddaebb5eeeeea199331c46651ee40b2283096a1991f786e67d37b98e311381ff63eb15225c01add041
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.6.0](https://github.com/puppetlabs/beaker-pe/tree/3.6.0) (2025-11-20)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.5.0...3.6.0)
|
|
6
|
+
|
|
7
|
+
**Implemented enhancements:**
|
|
8
|
+
|
|
9
|
+
- \[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))
|
|
10
|
+
|
|
11
|
+
## [3.5.0](https://github.com/puppetlabs/beaker-pe/tree/3.5.0) (2025-04-15)
|
|
12
|
+
|
|
13
|
+
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.4.0...3.5.0)
|
|
14
|
+
|
|
15
|
+
**Implemented enhancements:**
|
|
16
|
+
|
|
17
|
+
- \(PE-40793\) Follow https->>http redirects [\#287](https://github.com/puppetlabs/beaker-pe/pull/287) ([tvpartytonight](https://github.com/tvpartytonight))
|
|
18
|
+
|
|
3
19
|
## [3.4.0](https://github.com/puppetlabs/beaker-pe/tree/3.4.0) (2025-03-12)
|
|
4
20
|
|
|
5
21
|
[Full Changelog](https://github.com/puppetlabs/beaker-pe/compare/3.3.1...3.4.0)
|
|
@@ -325,6 +325,35 @@ 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"
|
|
353
|
+
extension = ".pkg.gz"
|
|
354
|
+
host.install_package("#{path}/#{filename}#{extension}")
|
|
355
|
+
end
|
|
356
|
+
|
|
328
357
|
# Determine the build package to download on a sles-11 (Intel) host, install that package onto the host.
|
|
329
358
|
# Assumed file name format: puppet-agent-7.29.1.26.gf344eeefa-1.sles11.x86_64.rpm.
|
|
330
359
|
# This method should be called after puppet is installed on the master since it relies on the master
|
|
@@ -334,11 +363,9 @@ module Beaker
|
|
|
334
363
|
# @api private
|
|
335
364
|
def install_rpm_on_sles11_host(host, puppet_agent_ver, opts)
|
|
336
365
|
# Since sles11 builds are not available in PE, download from agent-downloads.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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"
|
|
366
|
+
vars = agent_package_common_vars(puppet_agent_ver, opts)
|
|
367
|
+
path = "#{vars[:agent_downloads_url]}/#{puppet_agent_ver}/repos/sles/11/#{vars[:stream]}/x86_64"
|
|
368
|
+
filename = "puppet-agent-#{vars[:master_aio_version]}-1.sles11.x86_64"
|
|
342
369
|
extension = ".rpm"
|
|
343
370
|
host.install_package_with_rpm("#{path}/#{filename}#{extension}")
|
|
344
371
|
end
|
|
@@ -1099,7 +1126,12 @@ module Beaker
|
|
|
1099
1126
|
|
|
1100
1127
|
onhost_copied_download = File.join(onhost_copy_base, download_file)
|
|
1101
1128
|
onhost_copied_file = File.join(onhost_copy_base, release_file)
|
|
1102
|
-
|
|
1129
|
+
download_uri = URI.parse("#{release_path}/#{download_file}")
|
|
1130
|
+
if (redirect = Net::HTTP.start(download_uri.host) { |http| http.head(download_uri.path).response['location'] })
|
|
1131
|
+
fetch_http_file(redirect.chomp("/#{download_file}"), download_file, copy_dir_local)
|
|
1132
|
+
else
|
|
1133
|
+
fetch_http_file(release_path, download_file, copy_dir_local)
|
|
1134
|
+
end
|
|
1103
1135
|
scp_to host, File.join(copy_dir_local, download_file), onhost_copy_base
|
|
1104
1136
|
|
|
1105
1137
|
if variant == 'windows'
|
|
@@ -1169,6 +1201,8 @@ module Beaker
|
|
|
1169
1201
|
}
|
|
1170
1202
|
if host['platform'] =~ /sles-11/
|
|
1171
1203
|
install_rpm_on_sles11_host(host, install_params[:puppet_agent_version], opts)
|
|
1204
|
+
elsif host['platform'] =~ /solaris-10-sparc/
|
|
1205
|
+
install_pkg_on_sol10_sparc_host(host, install_params[:puppet_agent_version], opts)
|
|
1172
1206
|
else
|
|
1173
1207
|
install_params.delete(:pe_promoted_builds_url) if install_params[:pe_promoted_builds_url].nil?
|
|
1174
1208
|
install_puppet_agent_pe_promoted_repo_on(host, install_params)
|
data/lib/beaker-pe/version.rb
CHANGED
|
@@ -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'},
|
|
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' ],
|
|
@@ -82,6 +87,25 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
82
87
|
subject.logger = logger
|
|
83
88
|
end
|
|
84
89
|
|
|
90
|
+
context '#install_puppet_agent_pe_promoted_repo_on' do
|
|
91
|
+
|
|
92
|
+
it 'will read a redirect if necessary' do
|
|
93
|
+
# Only test the function under test attempts to read the redirect; skip
|
|
94
|
+
# the rest of function by bailing early after that attempt has been verified
|
|
95
|
+
# by raising this special exception
|
|
96
|
+
class SpecialRedirectTestException < StandardError
|
|
97
|
+
end
|
|
98
|
+
opts[:pe_promoted_builds_url] = 'https://mycooltesturl.com'
|
|
99
|
+
allow(Net::HTTP).to receive(:start).with('mycooltesturl.com').and_return('http://mycooltesturlredirect.com/puppet-agent-el-9-x86_64.tar.gz')
|
|
100
|
+
allow(subject).to receive(:fetch_http_file).with('http://mycooltesturlredirect.com', 'puppet-agent-el-9-x86_64.tar.gz', 'tmp/repo_configs/el').and_raise(SpecialRedirectTestException)
|
|
101
|
+
allow(subject).to receive(:sanitize_opts).and_return(opts)
|
|
102
|
+
|
|
103
|
+
test_host = Beaker::Host.create("test", {platform: 'el-9-x86_64'}, opts)
|
|
104
|
+
test_host['platform'] = Beaker::Platform.new(test_host['platform'])
|
|
105
|
+
expect{subject.install_puppet_agent_pe_promoted_repo_on([test_host], opts)}.to raise_error(SpecialRedirectTestException)
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
85
109
|
context '#prep_host_for_upgrade' do
|
|
86
110
|
|
|
87
111
|
it 'sets per host options before global options' do
|
|
@@ -1653,18 +1677,40 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
1653
1677
|
let(:filename) { "puppet-agent-#{master_version}-1.sles11.x86_64" }
|
|
1654
1678
|
let(:extension) { '.rpm' }
|
|
1655
1679
|
let(:url) { "#{path}/#{filename}#{extension}" }
|
|
1656
|
-
|
|
1680
|
+
|
|
1657
1681
|
it "generates the correct url to download the package" do
|
|
1658
1682
|
allow( subject ).to receive( :puppet_fact ).and_return( master_version )
|
|
1659
1683
|
allow( subject ).to receive( :master ).and_return( {} )
|
|
1660
|
-
|
|
1684
|
+
|
|
1661
1685
|
expect( hosts[4] ).to receive( :install_package_with_rpm ).with( url ).once
|
|
1662
1686
|
subject.install_rpm_on_sles11_host(hosts[4], puppet_agent_ver, opts)
|
|
1663
1687
|
end
|
|
1664
1688
|
end
|
|
1665
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.15.0.65' }
|
|
1696
|
+
let(:agent_downloads_url) { "http://agent-downloads.delivery.puppetlabs.net/puppet-agent" }
|
|
1697
|
+
let(:master_version) { '8.15.0.65.gd2a4b575d' }
|
|
1698
|
+
let(:path) { "#{agent_downloads_url}/#{puppet_agent_ver}/repos/solaris/10/#{stream}" }
|
|
1699
|
+
let(:filename) { "puppet-agent-#{master_version}-1.sparc" }
|
|
1700
|
+
let(:extension) { '.pkg.gz' }
|
|
1701
|
+
let(:url) { "#{path}/#{filename}#{extension}" }
|
|
1702
|
+
|
|
1703
|
+
it 'generates the correct url to download the package' do
|
|
1704
|
+
allow( subject ).to receive( :puppet_fact ).and_return( master_version )
|
|
1705
|
+
allow( subject ).to receive( :master ).and_return( {} )
|
|
1706
|
+
|
|
1707
|
+
expect( hosts[5] ).to receive( :install_package ).with( url ).once
|
|
1708
|
+
subject.install_pkg_on_sol10_sparc_host(hosts[5], puppet_agent_ver, opts)
|
|
1709
|
+
end
|
|
1710
|
+
end
|
|
1711
|
+
|
|
1666
1712
|
it 'can perform a simple installation' do
|
|
1667
|
-
expect(subject).to receive(:get_mco_setting).and_return({}).
|
|
1713
|
+
expect(subject).to receive(:get_mco_setting).and_return({}).thrice
|
|
1668
1714
|
allow( subject ).to receive( :verify_network_resources).with(hosts, nil)
|
|
1669
1715
|
allow( subject ).to receive( :on ).and_return( Beaker::Result.new( {}, '' ) )
|
|
1670
1716
|
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.
|
|
4
|
+
version: 3.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppetlabs
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
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.
|
|
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: []
|