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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e607f0adbf9ab049934cd0ce8b147e60e63fe642aa2cb78cbb92db28c72dc97b
4
- data.tar.gz: 3f51752866e156e61b75d9fbca4f1d00cc916f68f7c197fd089d1cc5069649d0
3
+ metadata.gz: 2729fa197d07e6977316382ea5621a152a0d740a19b1bd8639101867384eb15f
4
+ data.tar.gz: 434680a7743f98182d0a2261c5151b204bd1e0439cf4532ce249bdfb93e2ac14
5
5
  SHA512:
6
- metadata.gz: 337a4164bcc7d6a5e73e515ee4b277a11b1a08524cda7158226303a229b962e4a65072aa2b51e968658580c8784c8f9ae25940e79c31e863c94b414a6096438a
7
- data.tar.gz: 81e2989aa75682be94555e98273ce477d71384bdaa55ccbcc3a12d42030d512b6ed3382e04e0aa1d12fc447cd5c0e23f4b7a1dd4da67a1bbdabacc15da6606e7
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 installer teams, depending on the location of the changes
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
- :simple_monolithic
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) if master['template'] !~ /-preload/
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
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.11.6'
6
+ STRING = '2.11.7'
7
7
  end
8
8
 
9
9
  end
@@ -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.6
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-07-22 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec