beaker-pe 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +81 -2
- data/lib/beaker-pe/install/pe_utils.rb +5 -2
- data/lib/beaker-pe/pe-client-tools/install_helper.rb +11 -3
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +16 -0
- data/spec/beaker-pe/pe-client-tools/installer_helper_spec.rb +56 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTE4ODY4OWQzNDM5ZDEyNzVmMjY4ZTIwMzkwZjE4NjYxYTY2ZmQ3Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjUxMGNlNmEyNGYxZDQ1ZWJmMzVkOWIzNGJlZTI0M2Q1ODU3MmFmOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDhiZTQ1NThmMTQwYjlkOGVmNTM2MTdjZWFjNDQwNjEzZTUxYWY3ZmIwYzY2
|
10
|
+
ZGU2NmQ1YTc4MGIxZTgxZTNjNzZhOWZiNTNlOThjZTVmYjQzYmE1MjVkOTA4
|
11
|
+
Zjc0ZDBiYzAwNTUwZmFlYjgwNWNkZTMyNzQ1YTI1OWJjODllYzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTkyMWZlYTNmNDJiNWQ1OTkyZTVhMDJmNmNmMjBmZjE4NmMzODhkNTA2ODUx
|
14
|
+
OGQ3MzJmZDE0OTJhNjg4ZWVhYjM3MTFjZWFmOTFhYmUxMTkzM2RkMTZmNzcz
|
15
|
+
ODBkNTdjMjViZjc2YmQzNzdjMmU1ZmExZTg3MTAxYTBjNGQ0YWU=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# worker - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 10 May, 2017 (588c5ca5)](#LATEST)
|
4
|
+
* [1.13.0 - 6 Apr, 2017 (a3c5d641)](#1.13.0)
|
4
5
|
* [1.12.1 - 29 Mar, 2017 (fe8bbc82)](#1.12.1)
|
5
6
|
* [1.12.0 - 23 Mar, 2017 (0784adc6)](#1.12.0)
|
6
7
|
* [1.11.0 - 23 Mar, 2017 (6c3b0067)](#1.11.0)
|
@@ -36,7 +37,85 @@
|
|
36
37
|
* [0.1.0 - 29 Feb, 2016 (4fc88d8c)](#0.1.0)
|
37
38
|
|
38
39
|
## Details
|
39
|
-
### <a name = "LATEST">LATEST -
|
40
|
+
### <a name = "LATEST">LATEST - 10 May, 2017 (588c5ca5)
|
41
|
+
|
42
|
+
* (GEM) update beaker-pe version to 1.14.0 (588c5ca5)
|
43
|
+
|
44
|
+
* Merge pull request #69 from nicklewis/properly-install-pe-client-tools-from-tag (e162d8ed)
|
45
|
+
|
46
|
+
|
47
|
+
```
|
48
|
+
Merge pull request #69 from nicklewis/properly-install-pe-client-tools-from-tag
|
49
|
+
|
50
|
+
(maint) Properly install pe-client-tools when using a tag version
|
51
|
+
```
|
52
|
+
* (maint) Properly install pe-client-tools when using a tag version (8b8e5366)
|
53
|
+
|
54
|
+
|
55
|
+
```
|
56
|
+
(maint) Properly install pe-client-tools when using a tag version
|
57
|
+
|
58
|
+
Previously, installing pe-client-tools with a tag version would fail on
|
59
|
+
Windows/OS X and install the wrong package on Linux.
|
60
|
+
|
61
|
+
When installing pe-client-tools, we provide two options:
|
62
|
+
- pe_client_tools_sha: the commit SHA of the version to install
|
63
|
+
- pe_client_tools_version: the `git describe` of the version to install
|
64
|
+
|
65
|
+
pe_client_tools_version is always the name of the package to install.
|
66
|
+
But the *location* of the package differs based on whether the package
|
67
|
+
version corresponds to a tag or not. When the package isn't a tag
|
68
|
+
version, it's located in a directory named based on the SHA. But when it
|
69
|
+
is a tag version, it's located in a directory named after the tag.
|
70
|
+
|
71
|
+
When pe_client_tools_version was specified as a tag, we would look in
|
72
|
+
the directory named after the SHA (which was actually from a *previous*
|
73
|
+
build of the package, from before it was tagged) for a file named after
|
74
|
+
the tag. That file would never be there, since we had a mismatch of
|
75
|
+
directory and filename. For Windows and OS X, this caused a failure to
|
76
|
+
install, because they need to know the exact filename.
|
77
|
+
|
78
|
+
This case incidentally *worked* (or appeared to work) on Linux
|
79
|
+
platforms, because they never actually refer to the package by
|
80
|
+
filename. Instead, they install the package by setting up a repo config,
|
81
|
+
which *is* always named after pe_client_tools_sha, and never
|
82
|
+
pe_client_tools_version. In that case, the Linux platforms would
|
83
|
+
actually install the previous version of the package by SHA, from before
|
84
|
+
it had been tagged.
|
85
|
+
|
86
|
+
We now properly handle the case where pe_client_tools_version is a tag,
|
87
|
+
by using that version as the location of the file in addition to the
|
88
|
+
filename.
|
89
|
+
```
|
90
|
+
* Merge pull request #66 from cthorn42/main/master/PE-20086_msi_install_method_for_2016.5.(0|1)_if_windows2008r2 (a77cf5bf)
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
Merge pull request #66 from cthorn42/main/master/PE-20086_msi_install_method_for_2016.5.(0|1)_if_windows2008r2
|
95
|
+
|
96
|
+
(PE-20086) PE 2016.5.(0|1) should install via msi method if windows2008r2
|
97
|
+
```
|
98
|
+
* (PE-20086) PE 2016.5.(0|1) should install via msi method for windows2008r2 (738e6f52)
|
99
|
+
|
100
|
+
|
101
|
+
```
|
102
|
+
(PE-20086) PE 2016.5.(0|1) should install via msi method for windows2008r2
|
103
|
+
|
104
|
+
Due to the timing of our LTS releases and our new major branches, PE 2016.5.0 and
|
105
|
+
PE 2016.5.1 did not get the windows2008r2 powershell fix that was done in PE-18351.
|
106
|
+
This means we need to not attempt to install fricitonlessly if it is pe 2016.5.(0|1)
|
107
|
+
if the agent platform is windows2008r2.
|
108
|
+
This PR adjust the install_via_msi? method and refactors the logic in there to clean
|
109
|
+
it up a bit (it is getting tough to easily read).
|
110
|
+
It breaks the method down to three lines:
|
111
|
+
1. If the agent is older then PE 2016.4.0.
|
112
|
+
2. If the agent is windows2008r2 and is less then 2016.4.3
|
113
|
+
3. If the agent is windows2008r2 and the agent version is between 2016.4.99 and 2016.5.99.
|
114
|
+
If any of those are true then the MSI method should be used to install the agent.
|
115
|
+
```
|
116
|
+
### <a name = "1.13.0">1.13.0 - 6 Apr, 2017 (a3c5d641)
|
117
|
+
|
118
|
+
* (HISTORY) update beaker-pe history for gem release 1.13.0 (a3c5d641)
|
40
119
|
|
41
120
|
* (GEM) update beaker-pe version to 1.13.0 (197a55dd)
|
42
121
|
|
@@ -759,13 +759,16 @@ module Beaker
|
|
759
759
|
Beaker::DSL::InstallUtils::FeatureFlags.new(opts).flag?(flag)
|
760
760
|
end
|
761
761
|
|
762
|
+
# @deprecated the !version_is_less(host['pe_ver'], '3.99') can be removed once we no longer support pre 2015.2.0 PE versions
|
762
763
|
# Check if windows host is able to frictionlessly install puppet
|
763
764
|
# @param [Beaker::Host] host that we are checking if it is possible to install frictionlessly to
|
764
765
|
# @return [Boolean] true if frictionless is supported and not affected by known bugs
|
765
766
|
def install_via_msi?(host)
|
766
767
|
#windows agents from 4.0 -> 2016.1.2 were only installable via the aio method
|
767
|
-
#powershell2 bug was fixed in PE 2016.4.3
|
768
|
-
(host['platform'] =~ /windows/ && (version_is_less(host['pe_ver'], '2016.4.0') && !version_is_less(host['pe_ver'], '3.99'))) ||
|
768
|
+
#powershell2 bug was fixed in PE 2016.4.3, and PE 2017.1.0, but not 2016.5.z.
|
769
|
+
(host['platform'] =~ /windows/ && (version_is_less(host['pe_ver'], '2016.4.0') && !version_is_less(host['pe_ver'], '3.99'))) ||
|
770
|
+
(host['platform'] =~ /windows-2008r2/ && (version_is_less(host['pe_ver'], '2016.4.3') && !version_is_less(host['pe_ver'], '3.99'))) ||
|
771
|
+
(host['platform'] =~ /windows-2008r2/ && (!version_is_less(host['pe_ver'], '2016.4.99') && version_is_less(host['pe_ver'], '2016.5.99') && !version_is_less(host['pe_ver'], '3.99')))
|
769
772
|
end
|
770
773
|
|
771
774
|
# True if version is greater than or equal to MEEP_CLASSIFICATION_VERSION
|
@@ -17,14 +17,22 @@ module Beaker
|
|
17
17
|
block_on hosts do |host|
|
18
18
|
variant, version, arch, codename = host['platform'].to_array
|
19
19
|
package_name = ''
|
20
|
+
# If we're installing a tagged version, then the package will be
|
21
|
+
# located in a directory named after the tag. Otherwise, look for
|
22
|
+
# it by SHA.
|
23
|
+
if opts[:pe_client_tools_version] =~ /^\d+(\.\d+)+$/
|
24
|
+
directory = opts[:pe_client_tools_version]
|
25
|
+
else
|
26
|
+
directory = opts[:pe_client_tools_sha]
|
27
|
+
end
|
20
28
|
case host['platform']
|
21
29
|
when /win/
|
22
30
|
package_name << product
|
23
|
-
release_path = "#{opts[:dev_builds_url]}/#{product}/#{
|
31
|
+
release_path = "#{opts[:dev_builds_url]}/#{product}/#{directory}/artifacts/#{variant}"
|
24
32
|
package_name << "-#{opts[:pe_client_tools_version]}-x#{arch}.msi"
|
25
33
|
generic_install_msi_on(host, File.join(release_path, package_name), {}, {:debug => true})
|
26
34
|
when /osx/
|
27
|
-
release_path = "#{opts[:dev_builds_url]}/#{product}/#{
|
35
|
+
release_path = "#{opts[:dev_builds_url]}/#{product}/#{directory}/artifacts/apple/#{version}/#{opts[:puppet_collection]}/#{arch}"
|
28
36
|
package_base = product.dup
|
29
37
|
package_base << "-#{opts[:pe_client_tools_version]}"
|
30
38
|
package_name = package_base.dup
|
@@ -36,7 +44,7 @@ module Beaker
|
|
36
44
|
scp_to host, File.join(copy_dir_local, package_name), host.external_copy_base
|
37
45
|
host.generic_install_dmg(package_name, package_base, installer)
|
38
46
|
else
|
39
|
-
install_dev_repos_on(product, host,
|
47
|
+
install_dev_repos_on(product, host, directory, '/tmp/repo_configs',{:dev_builds_url => opts[:dev_builds_url]})
|
40
48
|
host.install_package('pe-client-tools')
|
41
49
|
end
|
42
50
|
end
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -285,6 +285,22 @@ describe ClassMixedWithDSLInstallUtils do
|
|
285
285
|
expect(subject.install_via_msi?(the_host)).to eq(false)
|
286
286
|
end
|
287
287
|
|
288
|
+
it 'returns true if pe_version is 2016.5.1 and platform is windows-2008r2 bug' do
|
289
|
+
the_host = winhost.dup
|
290
|
+
the_host['roles'] = ['frictionless']
|
291
|
+
the_host['platform'] = 'windows-2008r2'
|
292
|
+
the_host['pe_ver'] = '2016.5.1'
|
293
|
+
expect(subject.install_via_msi?(the_host)).to eq(true)
|
294
|
+
end
|
295
|
+
|
296
|
+
it 'returns false if pe_version is 2017.1.0 and platform is windows-2008r2 bug' do
|
297
|
+
the_host = winhost.dup
|
298
|
+
the_host['roles'] = ['frictionless']
|
299
|
+
the_host['platform'] = 'windows-2008r2'
|
300
|
+
the_host['pe_ver'] = '2017.1.0'
|
301
|
+
expect(subject.install_via_msi?(the_host)).to eq(false)
|
302
|
+
end
|
303
|
+
|
288
304
|
end
|
289
305
|
|
290
306
|
describe 'higgs installer' do
|
@@ -10,14 +10,20 @@ describe ClassPEClientToolsMixedWithPatterns do
|
|
10
10
|
let(:hosts) do
|
11
11
|
make_hosts({:platform => platform })
|
12
12
|
end
|
13
|
-
opts
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
let(:opts) do
|
14
|
+
{:puppet_collection => 'PC1',
|
15
|
+
:pe_client_tools_sha => '12345',
|
16
|
+
:pe_client_tools_version => '1.0.0-g12345'}
|
17
|
+
end
|
18
|
+
|
19
|
+
let(:tag_opts) do
|
20
|
+
{:puppet_collection => 'PC1',
|
21
|
+
:pe_client_tools_sha => '56789',
|
22
|
+
:pe_client_tools_version => '1.0.0'}
|
23
|
+
end
|
18
24
|
|
19
25
|
before do
|
20
|
-
allow(subject).
|
26
|
+
allow(subject).to receive(:scp_to)
|
21
27
|
end
|
22
28
|
|
23
29
|
context 'on el-6' do
|
@@ -25,11 +31,20 @@ describe ClassPEClientToolsMixedWithPatterns do
|
|
25
31
|
it 'installs' do
|
26
32
|
hosts.each do |host|
|
27
33
|
allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/repo_configs/rpm/", "pl-pe-client-tools-#{opts[:pe_client_tools_sha]}-el-6-x86_64.repo", "/tmp/repo_configs/el-6-x86_64")
|
28
|
-
allow(host). to receive(:external_copy_base)
|
29
34
|
expect(host).to receive(:install_package).with("pe-client-tools")
|
35
|
+
|
30
36
|
subject.install_pe_client_tools_on(host, opts)
|
31
37
|
end
|
32
38
|
end
|
39
|
+
|
40
|
+
it 'installs tag versions correctly' do
|
41
|
+
hosts.each do |host|
|
42
|
+
allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/repo_configs/rpm/", "pl-pe-client-tools-#{tag_opts[:pe_client_tools_version]}-el-6-x86_64.repo", "/tmp/repo_configs/el-6-x86_64")
|
43
|
+
expect(host).to receive(:install_package).with("pe-client-tools")
|
44
|
+
|
45
|
+
subject.install_pe_client_tools_on(host, tag_opts)
|
46
|
+
end
|
47
|
+
end
|
33
48
|
end
|
34
49
|
|
35
50
|
context 'on ubuntu' do
|
@@ -37,20 +52,28 @@ describe ClassPEClientToolsMixedWithPatterns do
|
|
37
52
|
it 'installs' do
|
38
53
|
hosts.each do |host|
|
39
54
|
allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/repo_configs/deb/", "pl-pe-client-tools-#{opts[:pe_client_tools_sha]}-xenial.list", "/tmp/repo_configs/ubuntu-xenial-x86_64")
|
40
|
-
allow(host). to receive(:external_copy_base)
|
41
55
|
expect(subject).to receive(:on).with(host, 'apt-get update')
|
42
56
|
expect(host).to receive(:install_package).with('pe-client-tools')
|
57
|
+
|
43
58
|
subject.install_pe_client_tools_on(host, opts)
|
44
59
|
end
|
45
60
|
end
|
61
|
+
|
62
|
+
it 'installs tag versions correctly' do
|
63
|
+
hosts.each do |host|
|
64
|
+
allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/repo_configs/deb/", "pl-pe-client-tools-#{tag_opts[:pe_client_tools_version]}-xenial.list", "/tmp/repo_configs/ubuntu-xenial-x86_64")
|
65
|
+
expect(subject).to receive(:on).with(host, 'apt-get update')
|
66
|
+
expect(host).to receive(:install_package).with('pe-client-tools')
|
67
|
+
|
68
|
+
subject.install_pe_client_tools_on(host, tag_opts)
|
69
|
+
end
|
70
|
+
end
|
46
71
|
end
|
47
72
|
|
48
73
|
context 'on windows' do
|
49
74
|
let(:platform) { Beaker::Platform.new('windows-2012r2-x86_64') }
|
50
75
|
it 'installs' do
|
51
76
|
hosts.each do |host|
|
52
|
-
allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/artifacts/deb/xenial/PC1", "pe-client-tools_#{opts[:pe_client_tools_version]}-1xenial_x86_64.deb", "tmp/repo_configs")
|
53
|
-
allow(host). to receive(:external_copy_base)
|
54
77
|
expect(subject).to receive(:generic_install_msi_on).with( host,
|
55
78
|
"http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/artifacts/windows/pe-client-tools-#{opts[:pe_client_tools_version]}-xx86_64.msi",
|
56
79
|
{},
|
@@ -59,18 +82,39 @@ describe ClassPEClientToolsMixedWithPatterns do
|
|
59
82
|
subject.install_pe_client_tools_on(host, opts)
|
60
83
|
end
|
61
84
|
end
|
85
|
+
|
86
|
+
it 'installs tag versions correctly' do
|
87
|
+
hosts.each do |host|
|
88
|
+
expect(subject).to receive(:generic_install_msi_on).with( host,
|
89
|
+
"http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/artifacts/windows/pe-client-tools-#{tag_opts[:pe_client_tools_version]}-xx86_64.msi",
|
90
|
+
{},
|
91
|
+
{ :debug => true }
|
92
|
+
)
|
93
|
+
subject.install_pe_client_tools_on(host, tag_opts)
|
94
|
+
end
|
95
|
+
end
|
62
96
|
end
|
63
97
|
|
64
98
|
context 'on OS X' do
|
65
99
|
let(:platform) { Beaker::Platform.new('osx-1111-x86_64') }
|
66
100
|
it 'installs' do
|
67
101
|
hosts.each do |host|
|
68
|
-
allow(subject).
|
69
|
-
allow(host).
|
102
|
+
allow(subject).to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/artifacts/apple/1111/PC1/x86_64", "pe-client-tools-#{opts[:pe_client_tools_version]}-1.osx1111.dmg", "tmp/repo_configs")
|
103
|
+
allow(host).to receive(:external_copy_base)
|
70
104
|
expect(host).to receive(:generic_install_dmg).with("pe-client-tools-#{opts[:pe_client_tools_version]}-1.osx1111.dmg", "pe-client-tools-#{opts[:pe_client_tools_version]}", "pe-client-tools-#{opts[:pe_client_tools_version]}-1-installer.pkg")
|
71
105
|
subject.install_pe_client_tools_on(host, opts)
|
72
106
|
end
|
73
107
|
end
|
108
|
+
|
109
|
+
it 'installs tag versions correctly' do
|
110
|
+
hosts.each do |host|
|
111
|
+
allow(subject).to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/artifacts/apple/1111/PC1/x86_64", "pe-client-tools-#{tag_opts[:pe_client_tools_version]}-1.osx1111.dmg", "tmp/repo_configs")
|
112
|
+
allow(host).to receive(:external_copy_base)
|
113
|
+
expect(host).to receive(:generic_install_dmg).with("pe-client-tools-#{tag_opts[:pe_client_tools_version]}-1.osx1111.dmg", "pe-client-tools-#{tag_opts[:pe_client_tools_version]}", "pe-client-tools-#{tag_opts[:pe_client_tools_version]}-1-installer.pkg")
|
114
|
+
|
115
|
+
subject.install_pe_client_tools_on(host, tag_opts)
|
116
|
+
end
|
117
|
+
end
|
74
118
|
end
|
75
119
|
|
76
120
|
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: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|