beaker-pe 0.4.0 → 0.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGNiYmFhYjQxZjA3NWI3ZjY2OTQ1ZWQ2ZGY5YjE4NzU3MDY5MDNlNQ==
4
+ ZTFkZTk0ODM1OWJkODQyM2M0NDVkNTA2MWIxN2FlYjU5MWI3MjRjMg==
5
5
  data.tar.gz: !binary |-
6
- ZDYwZDc5ZDM4MGRhYjlkMDdiYTdlOTcyOTI3NGJiN2M4NWM4YjcxZA==
6
+ NDNlMmY2MDBiZjMxNjE0NTUzZTI3YzBiZmJlNjA0OTRlYjAxMzQxYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzQ4ZDI4OGNhY2UwNTg3ZmZkZDRlMTJmZjUxNTI4MDUyYzRjOTAxZTZlODQx
10
- NDBiOGZmMTI0MDU4M2NjYTcxY2M3Yzg4NWQ0MjVmNDhkNzFjYjY4OGY5OTcw
11
- YTExOTZjMjlhNWEyOWY5NTZhYTQxZTFjODJhMjYwNDEwOWY5MDg=
9
+ YjcwOTkwYTE2ZTIxNzdmZWVmM2JkODM3MzhmMzlmYTIzZWEwMTNhMmYxMDAz
10
+ YTdkMmIzZTBmN2YyMTI1ZWJmMDkyYWQwN2NlMjQ0NTAyODZmMzEzODJkOTEz
11
+ YWVhN2YwNmYzNzRjNWY3OGE0OTI0YjNlZGJiMWQyYTg4MDliZDc=
12
12
  data.tar.gz: !binary |-
13
- MDgwNzY5MzBmZmMxOWIzY2JhNDE1MTBhYjVkMzI4YTc3YjQxNWIwMWVkZjFl
14
- ZTQyOTkxMzNmZWNjMDQzZGEyYTQxMWUzNWM3YzEyNDE3ZDU4NWFjZmI3YTY3
15
- YjgxMjA0Y2U5MjZkMmI0ZWEwNTJiYTljYzA4YjQyOTI5NWI1ZTk=
13
+ MWIxN2ZmZTc2NDE3MTE5NWNmMTY2OWRhYTUyZjcxZTRhZjNiNjU1NDZjMjcw
14
+ OTlhYmMyNWRiOWY5NDc5YTUyYzgxMDFlM2MyOWU3MDNlYzgxZTNlMjhkNmMw
15
+ NGI2MTRlMjc2MDAzY2YwN2E1MDBlNzQzMTMzMDI3MjRlNjllMjE=
data/HISTORY.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 1 Jun, 2016 (e04b1f64)](#LATEST)
3
+ * [LATEST - 15 Jun, 2016 (985fe231)](#LATEST)
4
+ * [0.4.0 - 1 Jun, 2016 (f5ad1884)](#0.4.0)
4
5
  * [0.3.0 - 26 May, 2016 (0d6b6d4c)](#0.3.0)
5
6
  * [0.2.0 - 18 May, 2016 (a65f2083)](#0.2.0)
6
7
  * [0.1.2 - 4 Apr, 2016 (a6fd7bef)](#0.1.2)
@@ -8,7 +9,36 @@
8
9
  * [0.1.0 - 29 Feb, 2016 (4fc88d8c)](#0.1.0)
9
10
 
10
11
  ## Details
11
- ### <a name = "LATEST">LATEST - 1 Jun, 2016 (e04b1f64)
12
+ ### <a name = "LATEST">LATEST - 15 Jun, 2016 (985fe231)
13
+
14
+ * (GEM) update beaker-pe version to 0.5.0 (985fe231)
15
+
16
+ * Merge pull request #11 from highb/cutover/pe-14555 (1b21288a)
17
+
18
+
19
+ ```
20
+ Merge pull request #11 from highb/cutover/pe-14555
21
+
22
+ (PE-14555) Always use MEEP for >= 2016.2.0
23
+ ```
24
+ * (PE-14555) Always use MEEP for >= 2016.2.0 (de3a5050)
25
+
26
+
27
+ ```
28
+ (PE-14555) Always use MEEP for >= 2016.2.0
29
+
30
+ Prior to this commit pe-beaker would use `INSTALLER_TYPE` to
31
+ specify whether to run a MEEP (new) or legacy install.
32
+ This commit changes pe-beaker to always use MEEP if the PE
33
+ version being installed is >= 2016.2.0, and legacy otherwise.
34
+
35
+ No ENV parameters will be passed to specify which to use, as we
36
+ are now relying on the installer itself to default to using MEEP
37
+ by default in all 2016.2.0 builds going forward.
38
+ ```
39
+ ### <a name = "0.4.0">0.4.0 - 1 Jun, 2016 (f5ad1884)
40
+
41
+ * (HISTORY) update beaker-pe history for gem release 0.4.0 (f5ad1884)
12
42
 
13
43
  * (GEM) update beaker-pe version to 0.4.0 (e04b1f64)
14
44
 
@@ -511,24 +511,17 @@ module Beaker
511
511
  end
512
512
  end
513
513
 
514
- # True if version is greater than or equal to 2016.2.0 and the
515
- # INSTALLER_TYPE environment variable is 'meep'.
516
- #
517
- # This will be switched to be true if >= 2016.2.0 and INSTALLER_TYPE !=
518
- # 'legacy' once meep is default.
519
- #
520
- # And then to just >= 2016.2.0 for cutover.
514
+ # True if version is greater than or equal to MEEP_CUTOVER_VERSION (2016.2.0)
521
515
  def use_meep?(version)
522
- !version_is_less(version, MEEP_CUTOVER_VERSION) && ENV['INSTALLER_TYPE'] != 'legacy'
516
+ !version_is_less(version, MEEP_CUTOVER_VERSION)
523
517
  end
524
518
 
525
519
  # Set installer options on the passed *host* according to current
526
- # version and external INSTALLER_TYPE setting.
520
+ # version.
527
521
  #
528
522
  # Sets:
529
523
  # * 'pe_installer_conf_file'
530
524
  # * 'pe_installer_conf_setting'
531
- # * 'pe_installer_type'
532
525
  #
533
526
  # @param [Beaker::Host] host The host object to configure
534
527
  # @return [Beaker::Host] The same host object passed in
@@ -537,12 +530,10 @@ module Beaker
537
530
  conf_file = "#{host['working_dir']}/pe.conf"
538
531
  host['pe_installer_conf_file'] = conf_file
539
532
  host['pe_installer_conf_setting'] = "-c #{conf_file}"
540
- host['pe_installer_type'] = 'meep'
541
533
  else
542
534
  conf_file = "#{host['working_dir']}/answers"
543
535
  host['pe_installer_conf_file'] = conf_file
544
536
  host['pe_installer_conf_setting'] = "-a #{conf_file}"
545
- host['pe_installer_type'] = 'legacy'
546
537
  end
547
538
  host
548
539
  end
@@ -559,7 +550,7 @@ module Beaker
559
550
  # @param [Hash] opts The Beaker options hash
560
551
  # @return [Hash] a dup of the opts hash with additional settings for BeakerAnswers
561
552
  def setup_beaker_answers_opts(host, opts)
562
- beaker_answers_opts = host['pe_installer_type'] == 'meep' ?
553
+ beaker_answers_opts = use_meep?(host['pe_ver']) ?
563
554
  { :format => :hiera } :
564
555
  { :format => :bash }
565
556
 
@@ -574,9 +565,8 @@ module Beaker
574
565
  # installation.
575
566
  #
576
567
  # Expects the host['pe_installer_conf_file'] to have been set, which is
577
- # where the configuration will be written to, and expects
578
- # host['pe_installer_type'] to have been set to either 'legacy' or
579
- # 'meep'.
568
+ # where the configuration will be written to, and will run MEEP or legacy
569
+ # depending on host[:pe_ver]
580
570
  #
581
571
  # @param [Beaker::Host] host The host to create a configuration file on
582
572
  # @param [Array<Beaker::Host]> hosts All of the hosts to be configured
@@ -776,7 +766,7 @@ module Beaker
776
766
  # The host object must have the 'working_dir', 'dist' and 'pe_installer' field set correctly.
777
767
  # @api private
778
768
  def higgs_installer_cmd host
779
- higgs_answer = host['pe_installer_type'] == 'meep' ? '1' : 'Y'
769
+ higgs_answer = use_meep?(host['pe_ver']) ? '1' : 'Y'
780
770
  "cd #{host['working_dir']}/#{host['dist']} ; nohup ./#{host['pe_installer']} <<<#{higgs_answer} > #{host['higgs_file']} 2>&1 &"
781
771
  end
782
772
 
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '0.4.0'
6
+ STRING = '0.5.0'
7
7
  end
8
8
 
9
9
  end
@@ -292,14 +292,9 @@ describe ClassMixedWithDSLInstallUtils do
292
292
  let(:higgs_answer) { '1' }
293
293
 
294
294
  before(:each) do
295
- ENV['INSTALLER_TYPE'] = 'meep'
296
295
  host['pe_ver'] = '2016.2.0'
297
296
  end
298
297
 
299
- after(:each) do
300
- ENV.delete('INSTALLER_TYPE')
301
- end
302
-
303
298
  context 'the higgs_installer_cmd' do
304
299
  it 'submits correct command to invoke Higgs' do
305
300
  subject.prepare_host_installer_options(host)
@@ -321,31 +316,23 @@ describe ClassMixedWithDSLInstallUtils do
321
316
  {
322
317
  :pe_installer_conf_file => '/tmp/answers',
323
318
  :pe_installer_conf_setting => '-a /tmp/answers',
324
- :pe_installer_type => 'legacy',
325
319
  }
326
320
  end
327
321
  let(:meep_settings) do
328
322
  {
329
323
  :pe_installer_conf_file => '/tmp/pe.conf',
330
324
  :pe_installer_conf_setting => '-c /tmp/pe.conf',
331
- :pe_installer_type => 'meep',
332
325
  }
333
326
  end
334
- let(:installer_type) { nil }
335
327
  let(:host) { unixhost }
336
328
 
337
329
  before(:each) do
338
- ENV['INSTALLER_TYPE'] = installer_type
339
330
  host['pe_ver'] = pe_ver
340
331
  subject.prepare_host_installer_options(host)
341
332
  end
342
333
 
343
- after(:each) do
344
- ENV.delete('INSTALLER_TYPE')
345
- end
346
-
347
334
  def slice_installer_options(host)
348
- host.select { |k,v| [ :pe_installer_conf_file, :pe_installer_conf_setting, :pe_installer_type].include?(k) }
335
+ host.select { |k,v| [ :pe_installer_conf_file, :pe_installer_conf_setting].include?(k) }
349
336
  end
350
337
 
351
338
  context 'when version < 2016.2.0' do
@@ -354,57 +341,20 @@ describe ClassMixedWithDSLInstallUtils do
354
341
  it 'sets legacy settings' do
355
342
  expect(slice_installer_options(host)).to eq(legacy_settings)
356
343
  end
357
-
358
- context 'and ENV["INSTALLER"]=="meep"' do
359
- let(:installer_type) { 'meep' }
360
-
361
- it 'still sets legacy settings' do
362
- expect(slice_installer_options(host)).to eq(legacy_settings)
363
- end
364
- end
365
344
  end
366
345
 
367
346
  context 'when version >= 2016.2.0' do
368
347
  let (:pe_ver) { '2016.2.0' }
369
348
 
370
- context 'and ENV["INSTALLER_TYPE"]=="legacy"' do
371
- let(:installer_type) { 'legacy' }
372
-
373
- it 'sets legacy settings' do
374
- expect(slice_installer_options(host)).to eq(legacy_settings)
375
- end
376
-
377
- it 'test use_meep?' do
378
- expect(subject.use_meep?('3.8.5')).to eq(false)
379
- expect(subject.use_meep?('2016.1.2')).to eq(false)
380
- expect(subject.use_meep?('2016.2.0')).to eq(false)
381
- expect(subject.use_meep?('2016.2.0-rc1-gabcdef')).to eq(false)
382
- end
349
+ it 'test use_meep?' do
350
+ expect(subject.use_meep?('3.8.5')).to eq(false)
351
+ expect(subject.use_meep?('2016.1.2')).to eq(false)
352
+ expect(subject.use_meep?('2016.2.0')).to eq(true)
353
+ expect(subject.use_meep?('2016.2.0-rc1-gabcdef')).to eq(true)
383
354
  end
384
355
 
385
- context 'and ENV["INSTALLER_TYPE"]=="meep"' do
386
- let(:installer_type) { 'meep' }
387
-
388
- it 'sets meep settings' do
389
- expect(slice_installer_options(host)).to eq(meep_settings)
390
- end
391
- end
392
-
393
- context 'and ENV["INSTALLER_TYPE"] is not set' do
394
- before(:each) do
395
- ENV.delete('INSTALLER_TYPE')
396
- end
397
-
398
- it 'sets meep settings' do
399
- expect(slice_installer_options(host)).to eq(meep_settings)
400
- end
401
-
402
- it 'test use_meep?' do
403
- expect(subject.use_meep?('3.8.5')).to eq(false)
404
- expect(subject.use_meep?('2016.1.2')).to eq(false)
405
- expect(subject.use_meep?('2016.2.0')).to eq(true)
406
- expect(subject.use_meep?('2016.2.0-rc1-gabcdef')).to eq(true)
407
- end
356
+ it 'sets meep settings' do
357
+ expect(slice_installer_options(host)).to eq(meep_settings)
408
358
  end
409
359
  end
410
360
  end
@@ -412,9 +362,8 @@ describe ClassMixedWithDSLInstallUtils do
412
362
  describe 'generate_installer_conf_file_for' do
413
363
  let(:master) { hosts.first }
414
364
 
415
- it 'generates a legacy answer file if host["pe_installer_type"]=="legacy"' do
365
+ it 'generates a legacy answer file if < 2016.2.0' do
416
366
  master['pe_installer_conf_file'] = '/tmp/answers'
417
- master['pe_installer_type'] = 'legacy'
418
367
  expect(subject).to receive(:create_remote_file).with(
419
368
  master,
420
369
  '/tmp/answers',
@@ -423,9 +372,8 @@ describe ClassMixedWithDSLInstallUtils do
423
372
  subject.generate_installer_conf_file_for(master, hosts, opts)
424
373
  end
425
374
 
426
- it 'generates a meep config file if host["pe_installer_type"]=="meep"' do
375
+ it 'generates a meep config file if >= 2016.2.0' do
427
376
  master['pe_installer_conf_file'] = '/tmp/pe.conf'
428
- master['pe_installer_type'] = 'meep'
429
377
  master['pe_ver'] = '2016.2.0'
430
378
  expect(subject).to receive(:create_remote_file).with(
431
379
  master,
@@ -442,7 +390,6 @@ describe ClassMixedWithDSLInstallUtils do
442
390
 
443
391
  context 'for legacy installer' do
444
392
  it 'adds option for bash format' do
445
- host['pe_installer_type'] = 'legacy'
446
393
  expect(subject.setup_beaker_answers_opts(host, opts)).to eq(
447
394
  opts.merge(
448
395
  :format => :bash,
@@ -454,13 +401,7 @@ describe ClassMixedWithDSLInstallUtils do
454
401
 
455
402
  context 'for meep installer' do
456
403
  before(:each) do
457
- ENV['INSTALLER_TYPE'] = 'meep'
458
404
  host['pe_ver'] = '2016.2.0'
459
- host['pe_installer_type'] = 'meep'
460
- end
461
-
462
- after(:each) do
463
- ENV.delete('INSTALLER_TYPE')
464
405
  end
465
406
 
466
407
  it 'adds option for hiera format' do
@@ -886,7 +827,7 @@ describe ClassMixedWithDSLInstallUtils do
886
827
  allow( subject ).to receive( :on ).with( host, /puppet agent -t/, :acceptable_exit_codes => [0,2] )
887
828
  end
888
829
  # We wait for puppetdb to restart 3 times; once before the first puppet run, and then during each puppet run
889
- allow( subject ).to receive( :sleep_until_puppetdb_started ).with( hosts[0] ).exactly(3).times
830
+ allow( subject ).to receive( :sleep_until_puppetdb_started ).with( hosts[0] ).exactly(3).times
890
831
  #run puppet agent now that installation is complete
891
832
  allow( subject ).to receive( :on ).with( hosts, /puppet agent/, :acceptable_exit_codes => [0,2] ).twice
892
833
 
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: 0.4.0
4
+ version: 0.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-06-01 00:00:00.000000000 Z
11
+ date: 2016-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec