beaker-pe 1.7.0 → 1.8.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 +32 -2
- data/README.md +3 -0
- data/docs/how_to/install_puppet_enterprise.md +87 -0
- data/lib/beaker-pe/install/pe_utils.rb +11 -4
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +32 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzU2YTU0MGFkMGFiZjliMGU4MTQ2NGM5NThkNDBiZTM5NGJhMmIyOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzFhYjVmY2NhMjZjMDY3ODM5NDhhMDgxYjU2ZmE4N2YyNmQyZGQwOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjA2YWRkMTBhMDg4YjFlNWE2Y2JiYTk1YThhZWU2ZDJmODM1YmQwYmIzN2Mz
|
10
|
+
ZGEzNDZiNjhhYjcxNDliNzM0YWU2MDYxODZmM2RhNjJiM2FjZTViYjQ1ZjM1
|
11
|
+
MWVhZDYyYzdmMWNlZjg4ZmY1MzczMWVmNTliYTI2MzhjOTQ5ZWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDNlZjMxZDQ3Yzk3ODU1ZDllMTE1MjFmM2M2ZTY2ODk3MmE1NDUyYTc1Y2U3
|
14
|
+
NmFmYTE0YTU5OWMxZjI4YTAyMDBlMjg3YTFjYzJlNzE2ZDcwZmNlZDBmMTI0
|
15
|
+
Y2VmN2RiMTJjMGI1MDRlZDNhOGZhMzY3NTI1ZTZhYjIyNjkwMTE=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 30 Dec, 2016 (75d22036)](#LATEST)
|
4
|
+
* [1.7.0 - 20 Dec, 2016 (99e6bbde)](#1.7.0)
|
4
5
|
* [1.6.1 - 22 Nov, 2016 (52e30609)](#1.6.1)
|
5
6
|
* [1.6.0 - 16 Nov, 2016 (0da1b64c)](#1.6.0)
|
6
7
|
* [1.5.0 - 7 Nov, 2016 (24d78992)](#1.5.0)
|
@@ -26,7 +27,36 @@
|
|
26
27
|
* [0.1.0 - 29 Feb, 2016 (4fc88d8c)](#0.1.0)
|
27
28
|
|
28
29
|
## Details
|
29
|
-
### <a name = "LATEST">LATEST -
|
30
|
+
### <a name = "LATEST">LATEST - 30 Dec, 2016 (75d22036)
|
31
|
+
|
32
|
+
* (GEM) update beaker-pe version to 1.8.0 (75d22036)
|
33
|
+
|
34
|
+
* (PE-18728) Skip frictionless install if agent is affected by powershell 2 bug (#45) (48b3b788)
|
35
|
+
|
36
|
+
|
37
|
+
```
|
38
|
+
(PE-18728) Skip frictionless install if agent is affected by powershell 2 bug (#45)
|
39
|
+
|
40
|
+
We introduced frictionless installs for Windows agents in PE 2016.4.0.
|
41
|
+
For upgrade scenarios where we are testing frictionless upgrades, to
|
42
|
+
install we need to use the old MSI method if we are installing less then
|
43
|
+
PE 2016.4.0.
|
44
|
+
However, we have discovered that frictionless installs of windows2008r2
|
45
|
+
will fail on PE 2016.4.0 and PE 2016.4.2.
|
46
|
+
This PR adds in logic to install with the non-frictionless method if the
|
47
|
+
agent is windows2008r2 and version is less then PE 2016.4.3.
|
48
|
+
```
|
49
|
+
* (MAINT) add install PE doc (#41) (2e748b9c)
|
50
|
+
|
51
|
+
|
52
|
+
```
|
53
|
+
(MAINT) add install PE doc (#41)
|
54
|
+
|
55
|
+
[skip ci]
|
56
|
+
```
|
57
|
+
### <a name = "1.7.0">1.7.0 - 20 Dec, 2016 (99e6bbde)
|
58
|
+
|
59
|
+
* (HISTORY) update beaker-pe history for gem release 1.7.0 (99e6bbde)
|
30
60
|
|
31
61
|
* (GEM) update beaker-pe version to 1.7.0 (80c18a2b)
|
32
62
|
|
data/README.md
CHANGED
@@ -17,6 +17,9 @@ that help someone acceptance test PE easier with Beaker.
|
|
17
17
|
technical reference for APIs and other aspects of beaker-pe. They describe
|
18
18
|
how it works and how to use it but assume that you have a basic understanding
|
19
19
|
of key concepts.
|
20
|
+
- [How-to guides](docs/how_to) are recipes. They guide you through the steps
|
21
|
+
involved in addressing key problems and use-cases. For instance, checkout our
|
22
|
+
[How-to Install Puppet Enterprise doc](docs/how_to/install_puppet_enterprise.md).
|
20
23
|
|
21
24
|
# Upgrading from 0.y to 1.y?
|
22
25
|
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# How To Install Puppet Enterprise
|
2
|
+
|
3
|
+
Welcome to the choose your own adventure of installing Puppet Enterprise (PE)!
|
4
|
+
This doc will guide you through the process beaker's DSL helpers use to install
|
5
|
+
PE for acceptance testing.
|
6
|
+
|
7
|
+
Note that this is not a complete documentation of the process, but a general
|
8
|
+
overview. There will be specific hiccups for particular platforms and special
|
9
|
+
cases. These are not included at this point. The idea is that as we come upon
|
10
|
+
them, we will now have a place to document those details, so that we can
|
11
|
+
over time bring this to 100% completeness.
|
12
|
+
|
13
|
+
# First Things First: What Do You Want to Install?
|
14
|
+
|
15
|
+
PE comes in all varieties. Not only in any number of ever-growing versions, but
|
16
|
+
in different install methods & locations as Puppet improves the install methods
|
17
|
+
over time.
|
18
|
+
|
19
|
+
The first questions to ask yourself are:
|
20
|
+
|
21
|
+
1. Are you installing Puppet Agent, or other services?
|
22
|
+
1. What version of PE are you installing from?
|
23
|
+
|
24
|
+
If you're installing PE 2015.2 or newer and you're installing PE's Puppet Agent,
|
25
|
+
then you're on track for our newest agent install strategy, installing from PE's
|
26
|
+
promoted agents location. Check our next section for more information on that.
|
27
|
+
|
28
|
+
If one (or both) of these conditions don't apply to you, then skip to the next
|
29
|
+
section: All Other Installs.
|
30
|
+
|
31
|
+
# PE Promoted Agent Installs
|
32
|
+
|
33
|
+
Installing Puppet Agent from the PE promoted locations is handled in core beaker,
|
34
|
+
not in beaker-pe itself. You can read more about doing this in
|
35
|
+
[beaker's How To Install Puppet Doc](https://github.com/puppetlabs/beaker/tree/master/docs/how_to/install_puppet.md).
|
36
|
+
|
37
|
+
### Higher-level Install Methods
|
38
|
+
|
39
|
+
Below, there's a section on "General Installer Methods." The method in beaker's
|
40
|
+
"How To Install Puppet" doc (link above) is the only one specifically for
|
41
|
+
installing Puppet Agent from the PE promoted location, but the higher methods
|
42
|
+
will call that one if certain conditions are met
|
43
|
+
([conditions doc](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Roles#aio_version%3F-instance_method)).
|
44
|
+
|
45
|
+
# All Other Installs
|
46
|
+
|
47
|
+
If you need any other services besides an agent, or you're installing from a
|
48
|
+
version before 2015.2, you'll end up with our traditional tarball (compressed
|
49
|
+
`*.tar.gz` file) installer. These installers are described in the next section.
|
50
|
+
|
51
|
+
# Generic Installer Methods
|
52
|
+
|
53
|
+
### [`install_pe_on`](http://www.rubydoc.info/github/puppetlabs/beaker-pe/Beaker/DSL/InstallUtils/PEUtils#install_pe_on-instance_method)
|
54
|
+
|
55
|
+
This method is a wrapper on our install PE behavior that allows you to pass in
|
56
|
+
which hosts in particular you'd like to call, as well as specifying the options
|
57
|
+
used yourself.
|
58
|
+
|
59
|
+
Note that there are a number of properties needed for installing
|
60
|
+
PE and they haven't been all documented, so the general workaround is to pass
|
61
|
+
the global options hash (the `options` TestCase accessor is best, you don't have
|
62
|
+
to qualify or include anything to get the method, just use the method by name)
|
63
|
+
as the `opts` parameter.
|
64
|
+
|
65
|
+
Note that this method does the work to figure out `pe_ver` if you don't pass it
|
66
|
+
in as an argument. As a last result, beaker-pe will try to put together a URL
|
67
|
+
in this form from these beaker global settings:
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
#{ pe_dir }/${ pe_version_file }
|
71
|
+
```
|
72
|
+
|
73
|
+
`pe_version_file` is set to `LATEST` by default. This is the file that will tell
|
74
|
+
beaker which PE installer in the directory it should install. This file should
|
75
|
+
be plain text, and just include the PE version number of the installer to use.
|
76
|
+
To check further into how this code works, you'll have to read the code
|
77
|
+
|
78
|
+
To see how the filename for the package itself is built, please checkout how the
|
79
|
+
`host['dist']` property is built for a particular platform in
|
80
|
+
[this code](https://github.com/puppetlabs/beaker-pe/blob/master/lib/beaker-pe/install/pe_utils.rb#L388-L421).
|
81
|
+
|
82
|
+
### [`install_pe`](http://www.rubydoc.info/github/puppetlabs/beaker-pe/Beaker/DSL/InstallUtils/PEUtils#install_pe-instance_method)
|
83
|
+
|
84
|
+
This method is our generic "install PE on all hosts" convenience method. As a
|
85
|
+
matter of fact, it just calls `install_pe_on`, passing the entire `hosts` array
|
86
|
+
and the global options hash as the `opts` parameter, just as we suggested in the
|
87
|
+
`install_pe_on` documentation above. Please check those docs for more info.
|
@@ -397,10 +397,8 @@ module Beaker
|
|
397
397
|
end
|
398
398
|
|
399
399
|
install_hosts.each do |host|
|
400
|
-
#windows agents from 4.0 -> 2016.1.2 were only installable via the aio method
|
401
|
-
is_windows_msi_and_aio = (host['platform'] =~ /windows/ && (version_is_less(host['pe_ver'], '2016.3.0') && !version_is_less(host['pe_ver'], '3.99')))
|
402
400
|
|
403
|
-
if agent_only_check_needed && hosts_agent_only.include?(host) ||
|
401
|
+
if agent_only_check_needed && hosts_agent_only.include?(host) || install_via_msi?(host)
|
404
402
|
host['type'] = 'aio'
|
405
403
|
install_puppet_agent_pe_promoted_repo_on(host, {
|
406
404
|
:puppet_agent_version => get_puppet_agent_version(host, opts),
|
@@ -413,7 +411,7 @@ module Beaker
|
|
413
411
|
acceptable_exit_codes << 2 if opts[:type] == :upgrade
|
414
412
|
setup_defaults_and_config_helper_on(host, master, acceptable_exit_codes)
|
415
413
|
#Windows allows frictionless installs starting with PE Davis, if frictionless we need to skip this step
|
416
|
-
elsif (host['platform'] =~ /windows/ && !(host['roles'].include?('frictionless')))
|
414
|
+
elsif (host['platform'] =~ /windows/ && !(host['roles'].include?('frictionless')) || install_via_msi?(host))
|
417
415
|
opts = { :debug => host[:pe_debug] || opts[:pe_debug] }
|
418
416
|
msi_path = "#{host['working_dir']}\\#{host['dist']}.msi"
|
419
417
|
install_msi_on(host, msi_path, {}, opts)
|
@@ -615,6 +613,15 @@ module Beaker
|
|
615
613
|
!version_is_less(version, MEEP_CUTOVER_VERSION)
|
616
614
|
end
|
617
615
|
|
616
|
+
# Check if windows host is able to frictionlessly install puppet
|
617
|
+
# @param [Beaker::Host] host that we are checking if it is possible to install frictionlessly to
|
618
|
+
# @return [Boolean] true if frictionless is supported and not affected by known bugs
|
619
|
+
def install_via_msi?(host)
|
620
|
+
#windows agents from 4.0 -> 2016.1.2 were only installable via the aio method
|
621
|
+
#powershell2 bug was fixed in PE 2016.4.3
|
622
|
+
(host['platform'] =~ /windows/ && (version_is_less(host['pe_ver'], '2016.4.0') && !version_is_less(host['pe_ver'], '3.99'))) || (host['platform'] =~ /windows-2008r2/ && (version_is_less(host['pe_ver'], '2016.4.3') && !version_is_less(host['pe_ver'], '3.99')))
|
623
|
+
end
|
624
|
+
|
618
625
|
# On July 8th, 2016, the gpg key that was shipped and used to sign repos in
|
619
626
|
# PE tarballs expired. This affects all PE version earlier then 3.8.5, and
|
620
627
|
# versions between 2015.2 to 2016.1.2.
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -251,6 +251,38 @@ describe ClassMixedWithDSLInstallUtils do
|
|
251
251
|
the_host[:pe_debug] = true
|
252
252
|
expect( subject.installer_cmd( the_host, {} ) ).to be === "cd /tmp && curl --tlsv1 -kO https://testmaster:8140/packages/3.8.0/install.bash && bash -x install.bash"
|
253
253
|
end
|
254
|
+
end
|
255
|
+
|
256
|
+
describe 'install_via_msi?' do
|
257
|
+
it 'returns true if pe_version is before PE 2016.4.0' do
|
258
|
+
the_host = winhost.dup
|
259
|
+
the_host['roles'] = ['frictionless']
|
260
|
+
the_host['pe_ver'] = '2015.2.3'
|
261
|
+
expect(subject.install_via_msi?(the_host)).to eq(true)
|
262
|
+
end
|
263
|
+
|
264
|
+
it 'returns nil if pe_version is PE 2016.4.0 or newer' do
|
265
|
+
the_host = winhost.dup
|
266
|
+
the_host['roles'] = ['frictionless']
|
267
|
+
the_host['pe_ver'] = '2016.4.2'
|
268
|
+
expect(subject.install_via_msi?(the_host)).to be nil
|
269
|
+
end
|
270
|
+
|
271
|
+
it 'returns true if pe_version is 2016.4.0 and platform is windows-2008r2 bug' do
|
272
|
+
the_host = winhost.dup
|
273
|
+
the_host['roles'] = ['frictionless']
|
274
|
+
the_host['platform'] = 'windows-2008r2'
|
275
|
+
the_host['pe_ver'] = '2016.4.0'
|
276
|
+
expect(subject.install_via_msi?(the_host)).to eq(true)
|
277
|
+
end
|
278
|
+
|
279
|
+
it 'returns false if pe_version is 2016.4.3 and platform is windows-2008r2 bug' do
|
280
|
+
the_host = winhost.dup
|
281
|
+
the_host['roles'] = ['frictionless']
|
282
|
+
the_host['platform'] = 'windows-2008r2'
|
283
|
+
the_host['pe_ver'] = '2016.4.3'
|
284
|
+
expect(subject.install_via_msi?(the_host)).to eq(false)
|
285
|
+
end
|
254
286
|
|
255
287
|
end
|
256
288
|
|
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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -188,6 +188,7 @@ files:
|
|
188
188
|
- acceptance/tests/install_smoke_test.rb
|
189
189
|
- beaker-pe.gemspec
|
190
190
|
- bin/beaker-template
|
191
|
+
- docs/how_to/install_puppet_enterprise.md
|
191
192
|
- lib/beaker-pe.rb
|
192
193
|
- lib/beaker-pe/install/pe_utils.rb
|
193
194
|
- lib/beaker-pe/options/pe_version_scraper.rb
|