beaker-pe 2.11.6 → 2.11.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODEOWNERS +2 -1
- data/lib/beaker-pe/install/pe_utils.rb +39 -3
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2729fa197d07e6977316382ea5621a152a0d740a19b1bd8639101867384eb15f
|
4
|
+
data.tar.gz: 434680a7743f98182d0a2261c5151b204bd1e0439cf4532ce249bdfb93e2ac14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 024973babe90a837c4c86b3efecfe5792dc1610eae356a3e05abd54ecafb529640b616923aa674e51c125a4bd4405b67ab15dfaac82f391a9aa7a1cbafb5513c
|
7
|
+
data.tar.gz: 884e05b5a6a9e0c0a43420f5fa71bd5c805cc641d2b5cf5bcd3ff9eb2f359bd239c297d93e2405cad89bd06805430006d59666fb4903e9a44d78da9905f9341a
|
data/CODEOWNERS
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#This Repository is maintained by both the beaker and
|
1
|
+
#This Repository is maintained by both the beaker, installer, and Night's Watch teams, depending on the location of the changes
|
2
2
|
* @puppetlabs/beaker
|
3
3
|
/lib/beaker-pe/install @puppetlabs/installer-and-management
|
4
|
+
/lib/beaker-pe/pe-client-tools @puppetlabs/night-s-watch
|
4
5
|
/spec/beaker-pe/install @puppetlabs/installer-and-management
|
@@ -6,7 +6,6 @@ require "beaker-answers"
|
|
6
6
|
require "timeout"
|
7
7
|
require "json"
|
8
8
|
require "deep_merge"
|
9
|
-
|
10
9
|
module Beaker
|
11
10
|
module DSL
|
12
11
|
module InstallUtils
|
@@ -582,6 +581,8 @@ module Beaker
|
|
582
581
|
do_install_pe_with_pe_managed_external_postgres(hosts,opts)
|
583
582
|
when :simple_monolithic
|
584
583
|
simple_monolithic_install(hosts.first, hosts.drop(1), opts)
|
584
|
+
when :simple_monolithic_install_with_preload
|
585
|
+
simple_monolithic_install_with_preload(hosts.first, hosts.drop(1), opts)
|
585
586
|
when :simple_split
|
586
587
|
# This isn't implemented yet, so just do a generic install instead
|
587
588
|
#simple_split_install(hosts, opts)
|
@@ -628,7 +629,11 @@ module Beaker
|
|
628
629
|
|
629
630
|
mono_roles = ['master', 'database', 'dashboard']
|
630
631
|
if has_all_roles?(hosts.first, mono_roles) && hosts.drop(1).all? {|host| host['roles'].include?('frictionless')}
|
631
|
-
:
|
632
|
+
if hosts.first['template'] =~ /-preload/ && opts[:type] != :upgrade
|
633
|
+
:simple_monolithic_install_with_preload
|
634
|
+
else
|
635
|
+
:simple_monolithic
|
636
|
+
end
|
632
637
|
elsif hosts[0]['roles'].include?('master') && hosts[1]['roles'].include?('database') && hosts[2]['roles'].include?('dashboard') && hosts.drop(3).all? {|host| host['roles'].include?('frictionless')}
|
633
638
|
:simple_split
|
634
639
|
elsif hosts.any? {|host| host['roles'].include?('pe_postgres')}
|
@@ -661,7 +666,7 @@ module Beaker
|
|
661
666
|
register_feature_flags!(opts)
|
662
667
|
generate_installer_conf_file_for(master, all_hosts, opts)
|
663
668
|
step "Install PE on master" do
|
664
|
-
on master, installer_cmd(master, opts)
|
669
|
+
on master, installer_cmd(master, opts)
|
665
670
|
end
|
666
671
|
|
667
672
|
step "Stop agent on master" do
|
@@ -683,6 +688,37 @@ module Beaker
|
|
683
688
|
end
|
684
689
|
end
|
685
690
|
|
691
|
+
# Configure PE on a monolithic master and some number of frictionless agents if a node is using a PE preloaded image for the master node.
|
692
|
+
# @param [Host] master The node to configure the master on
|
693
|
+
# @param [Array<Host>] agents The nodes to install agents on
|
694
|
+
# @param [Hash{Symbol=>Symbol, String}] opts The options for how to install or upgrade PE
|
695
|
+
#
|
696
|
+
# @example
|
697
|
+
# simple_monolithic_install_with_preload(master, agents, {:type => :install, :pe_ver => '2017.2.0'})
|
698
|
+
#
|
699
|
+
# @return nil
|
700
|
+
#
|
701
|
+
# @api private
|
702
|
+
def simple_monolithic_install_with_preload(master, agents, opts={})
|
703
|
+
step "Performing a standard monolithic install with frictionless agents on a preloaded image"
|
704
|
+
all_hosts = [master, *agents]
|
705
|
+
configure_type_defaults_on([master])
|
706
|
+
|
707
|
+
# Set PE distribution on the agents, creates working directories
|
708
|
+
prepare_hosts(all_hosts, opts)
|
709
|
+
register_feature_flags!(opts)
|
710
|
+
generate_installer_conf_file_for(master, all_hosts, opts)
|
711
|
+
|
712
|
+
step "Stop agent on master" do
|
713
|
+
stop_agent_on(master)
|
714
|
+
end
|
715
|
+
|
716
|
+
if manage_puppet_service?(master[:pe_ver], options)
|
717
|
+
configure_puppet_agent_service(:ensure => 'stopped', :enabled => false)
|
718
|
+
end
|
719
|
+
|
720
|
+
install_agents_only_on(agents, opts)
|
721
|
+
end
|
686
722
|
|
687
723
|
# Configure the master to use a proxy and drop unproxied connections
|
688
724
|
def config_hosts_for_proxy_access hosts
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -1621,6 +1621,13 @@ describe ClassMixedWithDSLInstallUtils do
|
|
1621
1621
|
subject.do_install([])
|
1622
1622
|
end
|
1623
1623
|
|
1624
|
+
it 'chooses to do a simple monolithic install with preload when appropriate' do
|
1625
|
+
expect(subject).to receive(:simple_monolithic_install_with_preload)
|
1626
|
+
allow(subject).to receive(:determine_install_type).and_return(:simple_monolithic_install_with_preload)
|
1627
|
+
|
1628
|
+
subject.do_install([])
|
1629
|
+
end
|
1630
|
+
|
1624
1631
|
it 'can perform a simple installation' do
|
1625
1632
|
expect(subject).to receive(:get_mco_setting).and_return({})
|
1626
1633
|
allow( subject ).to receive( :verify_network_resources).with(hosts, nil)
|
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: 2.11.
|
4
|
+
version: 2.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|