beaker-answers 0.1.0 → 0.2.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 +23 -2
- data/lib/beaker-answers/answers.rb +3 -0
- data/lib/beaker-answers/version.rb +1 -1
- data/lib/beaker-answers/versions/version20153.rb +32 -0
- data/lib/beaker-answers/versions/version40.rb +1 -1
- data/spec/beaker-answers/beaker-answers_spec.rb +33 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTU5ZTdlZWM5ODVlYmIyNTI5MzAxNzA3ODg1M2JmZWIyZTllMWEwZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjQwNGZiY2M1MTQzZjY1YzIwODEyMDQzOWRkNWRiMDE3OWNmMDEzYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODBjNWI4M2U1YmU5ZmQzMmRiZjZlNWE1MDk2OTkwODU4YTFiYzY2NzIwMGJh
|
10
|
+
MzAxMjgzNzhhMmZhNTFkMGI2YWZiN2E4MDU1NmNiM2FmNTQ1YTZiN2QzMDVm
|
11
|
+
ODMzYTgwZjRlYzIwZGQ4OWFkZmRiMTQzYWFjMDNiZDY2NGJlMDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjYyMWFmOWUzODg3OGEwNjdhZDZhY2U4MjRmYWFhY2U5YWJkZTAxYjAxMzE2
|
14
|
+
ZDAzYTI5YjZjNWYzYzZiOTQzYzdjYjYyYzBmNDlmOWJjNTFmYWFmODlhYmQ0
|
15
|
+
ZTViZmVmZWQxZTdiMzg1ZTMyZjA1YTliZmEwOTI3MzIxNGFmOWM=
|
data/HISTORY.md
CHANGED
@@ -1,8 +1,29 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 31 Aug, 2015 (9448d177)](#LATEST)
|
4
|
+
* [0.1.0 - 26 Aug, 2015 (ef47972d)](#0.1.0)
|
4
5
|
|
5
6
|
## Details
|
6
|
-
### <a name = "LATEST">LATEST -
|
7
|
+
### <a name = "LATEST">LATEST - 31 Aug, 2015 (9448d177)
|
8
|
+
|
9
|
+
* (GEM) update beaker-answers version to 0.2.0 (9448d177)
|
10
|
+
|
11
|
+
* Merge pull request #3 from nicklewis/APPMGMT-881-orchestrator-answers (40b8bed9)
|
12
|
+
|
13
|
+
|
14
|
+
```
|
15
|
+
Merge pull request #3 from nicklewis/APPMGMT-881-orchestrator-answers
|
16
|
+
|
17
|
+
(APPMGMT-882) Add orchestrator answers for 2015.3
|
18
|
+
```
|
19
|
+
* (APPMGMT-882) Add orchestrator answers for 2015.3 (a0e09a31)
|
20
|
+
|
21
|
+
|
22
|
+
```
|
23
|
+
(APPMGMT-882) Add orchestrator answers for 2015.3
|
24
|
+
|
25
|
+
This also updates Version40 answers to only support 2015.2, not 2015.3.
|
26
|
+
```
|
27
|
+
### <a name = "0.1.0">0.1.0 - 26 Aug, 2015 (ef47972d)
|
7
28
|
|
8
29
|
* Initial release.
|
@@ -18,6 +18,9 @@ module BeakerAnswers
|
|
18
18
|
:q_database_root_password => '=ZYdjiP3jCwV5eo9s1MBd',
|
19
19
|
:q_database_root_user => 'pe-postgres',
|
20
20
|
:q_database_export_dir => '/tmp',
|
21
|
+
:q_orchestrator_database_name => 'pe-orchestrator',
|
22
|
+
:q_orchestrator_database_user => 'Orc3Str8R',
|
23
|
+
:q_orchestrator_database_password => '~!@#$%^*-/ aZ',
|
21
24
|
:q_puppetdb_database_name => 'pe-puppetdb',
|
22
25
|
:q_puppetdb_database_user => 'mYpdBu3r',
|
23
26
|
:q_database_port => 5432,
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'beaker-answers/versions/version40'
|
2
|
+
|
3
|
+
module BeakerAnswers
|
4
|
+
# This class provides answer file information for PE version 2015.3
|
5
|
+
#
|
6
|
+
# @api private
|
7
|
+
class Version20153 < Version40
|
8
|
+
# The version of PE that this set of answers is appropriate for
|
9
|
+
def self.pe_version_matcher
|
10
|
+
/\A2015\.3/
|
11
|
+
end
|
12
|
+
|
13
|
+
def generate_answers
|
14
|
+
the_answers = super
|
15
|
+
|
16
|
+
return the_answers if @options[:masterless]
|
17
|
+
|
18
|
+
master = only_host_with_role(@hosts, 'master')
|
19
|
+
database = only_host_with_role(@hosts, 'database')
|
20
|
+
|
21
|
+
orchestrator_db = {
|
22
|
+
:q_orchestrator_database_name => answer_for(@options, :q_orchestrator_database_name),
|
23
|
+
:q_orchestrator_database_user => answer_for(@options, :q_orchestrator_database_user),
|
24
|
+
:q_orchestrator_database_password => answer_for(@options, :q_orchestrator_database_password),
|
25
|
+
}
|
26
|
+
the_answers[master.name].merge!(orchestrator_db)
|
27
|
+
the_answers[database.name].merge!(orchestrator_db)
|
28
|
+
|
29
|
+
the_answers
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -29,6 +29,11 @@ describe BeakerAnswers do
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
it 'generates 2015.3 answers for 2015.3 hosts' do
|
33
|
+
@ver = '2015.3.0'
|
34
|
+
expect( answers ).to be_a_kind_of BeakerAnswers::Version20153
|
35
|
+
end
|
36
|
+
|
32
37
|
it 'generates 4.0 answers for 2015 hosts' do
|
33
38
|
@ver = '2015.1.2'
|
34
39
|
expect( answers ).to be_a_kind_of BeakerAnswers::Version40
|
@@ -314,6 +319,34 @@ describe BeakerAnswers::Version40 do
|
|
314
319
|
end
|
315
320
|
end
|
316
321
|
|
322
|
+
describe BeakerAnswers::Version20153 do
|
323
|
+
let( :options ) { StringifyHash.new }
|
324
|
+
let( :basic_hosts ) { make_hosts( {'pe_ver' => @ver } ) }
|
325
|
+
let( :hosts ) { basic_hosts[0]['roles'] = ['master', 'agent']
|
326
|
+
basic_hosts[1]['roles'] = ['dashboard', 'agent']
|
327
|
+
basic_hosts[2]['roles'] = ['database', 'agent']
|
328
|
+
basic_hosts }
|
329
|
+
let( :answers ) { BeakerAnswers::Answers.create(@ver, hosts, options) }
|
330
|
+
let( :upgrade_answers ) { BeakerAnswers::Answers.create(@ver, hosts, options.merge( {:type => :upgrade}) ) }
|
331
|
+
|
332
|
+
before :each do
|
333
|
+
@ver = '2015.3'
|
334
|
+
@answers = answers.answers
|
335
|
+
end
|
336
|
+
|
337
|
+
it 'should add orchestrator database answers to master' do
|
338
|
+
expect( @answers['vm1'][:q_orchestrator_database_name] ).to be === 'pe-orchestrator'
|
339
|
+
expect( @answers['vm1'][:q_orchestrator_database_user] ).to be === 'Orc3Str8R'
|
340
|
+
expect( @answers['vm1'][:q_orchestrator_database_password] ).to be === '~!@#$%^*-/ aZ'
|
341
|
+
end
|
342
|
+
|
343
|
+
it 'should add orchestrator database answers to database' do
|
344
|
+
expect( @answers['vm3'][:q_orchestrator_database_name] ).to be === 'pe-orchestrator'
|
345
|
+
expect( @answers['vm3'][:q_orchestrator_database_user] ).to be === 'Orc3Str8R'
|
346
|
+
expect( @answers['vm3'][:q_orchestrator_database_password] ).to be === '~!@#$%^*-/ aZ'
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
317
350
|
describe BeakerAnswers::Version32 do
|
318
351
|
let( :options ) { StringifyHash.new }
|
319
352
|
let( :basic_hosts ) { make_hosts( {'pe_ver' => @ver } ) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-answers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-08-
|
12
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/beaker-answers/answers.rb
|
188
188
|
- lib/beaker-answers/version.rb
|
189
189
|
- lib/beaker-answers/versions/version20.rb
|
190
|
+
- lib/beaker-answers/versions/version20153.rb
|
190
191
|
- lib/beaker-answers/versions/version28.rb
|
191
192
|
- lib/beaker-answers/versions/version30.rb
|
192
193
|
- lib/beaker-answers/versions/version32.rb
|