beaker-pe 1.4.0 → 1.5.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 +8 -8
- data/HISTORY.md +26 -2
- data/lib/beaker-pe/install/pe_utils.rb +17 -0
- data/lib/beaker-pe/options/presets.rb +9 -0
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +40 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NjM1NWI4YTRlNTU0OTY1MjI4MDgxNTgwZTRkNGZmMzJiM2Y2YjE3MQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YTQ0NjYzNzBmM2I4Y2RhY2IwMmQwYWJmMTMxYzQxYzE5MGZjMGVlOQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZTVjOTQyMWIzM2Q2ZGUzNTIzNTdkYWNlODM1YjA0ZDgxNzhkOTYzYmYzNTM2
|
|
10
|
+
MTZmNWI1ZTQzZTJmMDExZTc4NmFmOGJjOGI5NTk1OTIxNjJlYWNlZTkyMjM2
|
|
11
|
+
ZjE5MjAwYzJmZmM5ZjJmNjlkOWIwYTkzNmIzNzMxNjdhZThkM2E=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MGIyYTBmYzg2Yjc2Yzk1ZTJiZTkyZWNkZDc2OGU0OTgxMDkzOTgyYzNkNThh
|
|
14
|
+
ODk5NmRjZmQ1MzllNWU1ZjcxNDQyYTJiMGE2MjI4MjhkODFjZWZmMjJhMmUx
|
|
15
|
+
ODY3NTRiMTg2MjY1NjA4NjFiZmU5OWY4YmViNzlkYWFkZTIwZmE=
|
data/HISTORY.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# default - History
|
|
2
2
|
## Tags
|
|
3
|
-
* [LATEST -
|
|
3
|
+
* [LATEST - 7 Nov, 2016 (614c736b)](#LATEST)
|
|
4
|
+
* [1.4.0 - 11 Oct, 2016 (6becdbb2)](#1.4.0)
|
|
4
5
|
* [1.3.0 - 6 Oct, 2016 (97f781bb)](#1.3.0)
|
|
5
6
|
* [1.2.0 - 4 Oct, 2016 (7362ab78)](#1.2.0)
|
|
6
7
|
* [1.1.0 - 29 Sep, 2016 (5b9f2600)](#1.1.0)
|
|
@@ -22,7 +23,30 @@
|
|
|
22
23
|
* [0.1.0 - 29 Feb, 2016 (4fc88d8c)](#0.1.0)
|
|
23
24
|
|
|
24
25
|
## Details
|
|
25
|
-
### <a name = "LATEST">LATEST -
|
|
26
|
+
### <a name = "LATEST">LATEST - 7 Nov, 2016 (614c736b)
|
|
27
|
+
|
|
28
|
+
* (GEM) update beaker-pe version to 1.5.0 (614c736b)
|
|
29
|
+
|
|
30
|
+
* Merge pull request #36 from james-stocks/BKR-967 (e4a48b7c)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Merge pull request #36 from james-stocks/BKR-967
|
|
35
|
+
|
|
36
|
+
(BKR-967) Add :disable_analytics option
|
|
37
|
+
```
|
|
38
|
+
* (BKR-967) Add :disable_analytics option (c9e25658)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
(BKR-967) Add :disable_analytics option
|
|
43
|
+
|
|
44
|
+
Allow :disable_analytics to be set in beaker options, allowing us to block
|
|
45
|
+
traffic to Google Analytics.
|
|
46
|
+
```
|
|
47
|
+
### <a name = "1.4.0">1.4.0 - 11 Oct, 2016 (6becdbb2)
|
|
48
|
+
|
|
49
|
+
* (HISTORY) update beaker-pe history for gem release 1.4.0 (6becdbb2)
|
|
26
50
|
|
|
27
51
|
* (GEM) update beaker-pe version to 1.4.0 (2c31bfcb)
|
|
28
52
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
[ 'aio_defaults', 'pe_defaults', 'puppet_utils', 'windows_utils' ].each do |lib|
|
|
2
2
|
require "beaker/dsl/install_utils/#{lib}"
|
|
3
3
|
end
|
|
4
|
+
require "beaker/host_prebuilt_steps"
|
|
4
5
|
require "beaker-answers"
|
|
5
6
|
require "timeout"
|
|
6
7
|
require "json"
|
|
8
|
+
require "beaker-pe/options/presets"
|
|
9
|
+
|
|
7
10
|
module Beaker
|
|
8
11
|
module DSL
|
|
9
12
|
module InstallUtils
|
|
@@ -22,6 +25,7 @@ module Beaker
|
|
|
22
25
|
include PEDefaults
|
|
23
26
|
include PuppetUtils
|
|
24
27
|
include WindowsUtils
|
|
28
|
+
include HostPrebuiltSteps
|
|
25
29
|
|
|
26
30
|
# Version of PE when we switched from legacy installer to MEEP.
|
|
27
31
|
MEEP_CUTOVER_VERSION = '2016.2.0'
|
|
@@ -705,6 +709,12 @@ module Beaker
|
|
|
705
709
|
install_pe_on(hosts, options)
|
|
706
710
|
end
|
|
707
711
|
|
|
712
|
+
def disable_analytics(hosts)
|
|
713
|
+
logger.info("Disabling analytics on dashboard host(s)")
|
|
714
|
+
set_etc_hosts(hosts, "127.0.0.1\tgoogle-analytics.com\n")
|
|
715
|
+
set_etc_hosts(hosts, "127.0.0.1\twww.google-analytics.com\n")
|
|
716
|
+
end
|
|
717
|
+
|
|
708
718
|
def check_puppetdb_status_endpoint(host)
|
|
709
719
|
if version_is_less(host['pe_ver'], '2016.1.0')
|
|
710
720
|
return true
|
|
@@ -774,6 +784,8 @@ module Beaker
|
|
|
774
784
|
# options, refer to {#do_install} documentation
|
|
775
785
|
#
|
|
776
786
|
def install_pe_on(install_hosts, opts)
|
|
787
|
+
opts = pe_presets.merge(opts)
|
|
788
|
+
|
|
777
789
|
confine_block(:to, {}, install_hosts) do
|
|
778
790
|
sorted_hosts.each do |host|
|
|
779
791
|
#process the version files if necessary
|
|
@@ -791,6 +803,11 @@ module Beaker
|
|
|
791
803
|
host['pe_ver'] ||= Beaker::Options::PEVersionScraper.load_pe_version(host[:pe_dir] || opts[:pe_dir], opts[:pe_version_file])
|
|
792
804
|
end
|
|
793
805
|
end
|
|
806
|
+
|
|
807
|
+
if opts[:disable_analytics] then
|
|
808
|
+
disable_analytics(dashboard)
|
|
809
|
+
end
|
|
810
|
+
|
|
794
811
|
do_install sorted_hosts, opts
|
|
795
812
|
end
|
|
796
813
|
end
|
data/lib/beaker-pe/version.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
require 'beaker'
|
|
3
|
+
require 'beaker-pe/options/presets'
|
|
3
4
|
|
|
4
5
|
class ClassMixedWithDSLInstallUtils
|
|
5
6
|
include Beaker::DSL::InstallUtils
|
|
@@ -283,6 +284,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
283
284
|
context 'the do_higgs_install' do
|
|
284
285
|
it 'submits the correct installer cmd to invoke Higgs' do
|
|
285
286
|
prep_host(host)
|
|
287
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
286
288
|
subject.do_higgs_install(host, opts)
|
|
287
289
|
end
|
|
288
290
|
end
|
|
@@ -305,6 +307,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
305
307
|
context 'the do_higgs_install' do
|
|
306
308
|
it 'submits the correct installer cmd to invoke Higgs' do
|
|
307
309
|
prep_host(host)
|
|
310
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
308
311
|
subject.do_higgs_install(host, opts)
|
|
309
312
|
end
|
|
310
313
|
end
|
|
@@ -889,6 +892,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
889
892
|
end
|
|
890
893
|
|
|
891
894
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
|
895
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
892
896
|
#create answers file per-host, except windows
|
|
893
897
|
allow( subject ).to receive( :create_remote_file ).with( hosts[0], /answers/, /q/ )
|
|
894
898
|
#run installer on all hosts
|
|
@@ -944,6 +948,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
944
948
|
allow( subject ).to receive( :sleep ).and_return( true )
|
|
945
949
|
|
|
946
950
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
|
951
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
947
952
|
|
|
948
953
|
#run higgs installer command
|
|
949
954
|
expect( subject ).to receive( :on ).with( hosts[0],
|
|
@@ -959,6 +964,7 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
959
964
|
allow( subject ).to receive( :sleep ).and_return( true )
|
|
960
965
|
|
|
961
966
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
|
967
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
962
968
|
|
|
963
969
|
#run higgs installer command
|
|
964
970
|
expect( subject ).to receive( :on ).with( hosts[0],
|
|
@@ -977,7 +983,35 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
977
983
|
allow( subject ).to receive( :options ).and_return( {} )
|
|
978
984
|
allow( subject ).to receive( :hosts ).and_return( hosts_sorted )
|
|
979
985
|
allow( subject ).to receive( :do_install ).and_return( true )
|
|
980
|
-
|
|
986
|
+
allow( subject ).to receive( :set_etc_hosts )
|
|
987
|
+
expect( subject ).to receive( :do_install ).with( hosts, pe_presets )
|
|
988
|
+
subject.install_pe
|
|
989
|
+
end
|
|
990
|
+
|
|
991
|
+
it 'blocks analytics by default' do
|
|
992
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
993
|
+
allow( subject ).to receive( :hosts ).and_return( hosts_sorted )
|
|
994
|
+
allow( subject ).to receive( :do_install ).and_return( true )
|
|
995
|
+
allow( subject ).to receive( :set_etc_hosts )
|
|
996
|
+
expect( subject ).to receive( :do_install ).with( hosts, pe_presets )
|
|
997
|
+
subject.install_pe
|
|
998
|
+
end
|
|
999
|
+
|
|
1000
|
+
it 'blocks analytics when disable_analytics is true' do
|
|
1001
|
+
allow( subject ).to receive( :options ).and_return( {:disable_analytics => true} )
|
|
1002
|
+
allow( subject ).to receive( :hosts ).and_return( hosts_sorted )
|
|
1003
|
+
allow( subject ).to receive( :do_install ).and_return( true )
|
|
1004
|
+
allow( subject ).to receive( :set_etc_hosts )
|
|
1005
|
+
expect( subject ).to receive( :do_install ).with( hosts, {:disable_analytics => true} )
|
|
1006
|
+
subject.install_pe
|
|
1007
|
+
end
|
|
1008
|
+
|
|
1009
|
+
it 'does not block analytics when disable_analytics is false' do
|
|
1010
|
+
allow( subject ).to receive( :options ).and_return( {:disable_analytics => false} )
|
|
1011
|
+
allow( subject ).to receive( :hosts ).and_return( hosts_sorted )
|
|
1012
|
+
allow( subject ).to receive( :do_install ).and_return( true )
|
|
1013
|
+
expect( subject ).to_not receive( :set_etc_hosts )
|
|
1014
|
+
expect( subject ).to receive( :do_install ).with( hosts, {:disable_analytics => false} )
|
|
981
1015
|
subject.install_pe
|
|
982
1016
|
end
|
|
983
1017
|
|
|
@@ -989,7 +1023,8 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
989
1023
|
allow( subject ).to receive( :hosts ).and_return( hosts_sorted )
|
|
990
1024
|
allow( subject ).to receive( :options ).and_return( {} )
|
|
991
1025
|
allow( subject ).to receive( :do_install ).and_return( true )
|
|
992
|
-
|
|
1026
|
+
allow( subject ).to receive( :set_etc_hosts )
|
|
1027
|
+
expect( subject ).to receive( :do_install ).with( hosts, pe_presets )
|
|
993
1028
|
subject.install_pe
|
|
994
1029
|
hosts.each do |h|
|
|
995
1030
|
expect( h['pe_ver'] ).to be === '2.8'
|
|
@@ -998,8 +1033,10 @@ describe ClassMixedWithDSLInstallUtils do
|
|
|
998
1033
|
|
|
999
1034
|
it 'can act upon a single host' do
|
|
1000
1035
|
allow( subject ).to receive( :hosts ).and_return( hosts )
|
|
1036
|
+
allow( subject ).to receive( :options ).and_return( {} )
|
|
1001
1037
|
allow( subject ).to receive( :sorted_hosts ).and_return( [hosts[0]] )
|
|
1002
|
-
|
|
1038
|
+
allow( subject ).to receive( :set_etc_hosts )
|
|
1039
|
+
expect( subject ).to receive( :do_install ).with( [hosts[0]], pe_presets )
|
|
1003
1040
|
subject.install_pe_on(hosts[0], {})
|
|
1004
1041
|
end
|
|
1005
1042
|
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.5.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-
|
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -190,6 +190,7 @@ files:
|
|
|
190
190
|
- lib/beaker-pe.rb
|
|
191
191
|
- lib/beaker-pe/install/pe_utils.rb
|
|
192
192
|
- lib/beaker-pe/options/pe_version_scraper.rb
|
|
193
|
+
- lib/beaker-pe/options/presets.rb
|
|
193
194
|
- lib/beaker-pe/pe-client-tools/config_file_helper.rb
|
|
194
195
|
- lib/beaker-pe/pe-client-tools/executable_helper.rb
|
|
195
196
|
- lib/beaker-pe/pe-client-tools/install_helper.rb
|