beaker-answers 0.5.1 → 0.5.2
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 +32 -2
- data/lib/beaker-answers/version.rb +1 -1
- data/lib/beaker-answers/versions/version20162.rb +7 -6
- data/spec/beaker-answers/versions/version20162_spec.rb +59 -58
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDg1YmEwYTYzYTUxOTA5NmM3YjljYzdjMzA0ZTdiZGVmYjU3Yzc1Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjA4Mjk5MDRlMDNmZDNiNDJlNDQwZmQ1NDY3NTA2MjE4MTk3ZTY0NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGQ2Zjc3OWYzZTNiOWUwMDRjM2Y4NGNlNGY3ZmI3MjNiODJlYWE5ZDBiZDdm
|
10
|
+
MmJiM2MxZmRjYmYwNTM0MTU1Nzk0YmVkYTBkMzA1YWVlNjlhNDQ4MmIwY2Yw
|
11
|
+
ZmI4MzQzNDgxMTY4NDMxY2Q4MzQzODgxZDk4NzEyOGE1MzZjMzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODY5MjJhZGFiZGYxZTRkMzZjMTk1OTI1ODBlNTQxN2YwZTY1NDU3NmVmZTFl
|
14
|
+
NjM4NmRlMTEwOGRhMDM3MzkyNTNlOWRkNGRkZjIxZmYwNmFjY2Y3YjM3NzZk
|
15
|
+
NDUzMjhhYWZiMmFmMDhhNjJhYmFhMTA4ZjhhZWE0NGJkNjU1ZmM=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 6 Jun, 2016 (8f6a39db)](#LATEST)
|
4
|
+
* [0.5.1 - 26 May, 2016 (c74a3fec)](#0.5.1)
|
4
5
|
* [0.5.0 - 26 May, 2016 (c802e883)](#0.5.0)
|
5
6
|
* [0.4.3 - 10 May, 2016 (5ffdb5f2)](#0.4.3)
|
6
7
|
* [0.4.2 - 28 Apr, 2016 (79ccd5de)](#0.4.2)
|
@@ -15,7 +16,36 @@
|
|
15
16
|
* [0.1.0 - 26 Aug, 2015 (ef47972d)](#0.1.0)
|
16
17
|
|
17
18
|
## Details
|
18
|
-
### <a name = "LATEST">LATEST -
|
19
|
+
### <a name = "LATEST">LATEST - 6 Jun, 2016 (8f6a39db)
|
20
|
+
|
21
|
+
* (GEM) update beaker-answers version to 0.5.2 (8f6a39db)
|
22
|
+
|
23
|
+
* Merge pull request #19 from ericwilliamson/task/master/PE-16028-update-for-mono (97409f9c)
|
24
|
+
|
25
|
+
|
26
|
+
```
|
27
|
+
Merge pull request #19 from ericwilliamson/task/master/PE-16028-update-for-mono
|
28
|
+
|
29
|
+
(PE-16028) Update required answers for 2016.2
|
30
|
+
```
|
31
|
+
* (PE-16028) Update required answers for 2016.2 (ba130df3)
|
32
|
+
|
33
|
+
|
34
|
+
```
|
35
|
+
(PE-16028) Update required answers for 2016.2
|
36
|
+
|
37
|
+
Previous to this commit, answer generation for 2016.2 would generate a
|
38
|
+
list of parameters on the puppet_enterprise for both mono and split. Due
|
39
|
+
to changes introduced in Puppet 4.4, the puppet_enterprsie module no
|
40
|
+
longer needs all host parameters in a monolithic install case.
|
41
|
+
This commit updates the generation to match what the module has changed
|
42
|
+
to use. For a monolithic install, the only required answers are now the
|
43
|
+
console admin password, and puppet_master_host. for split installs with
|
44
|
+
PE postgres, just master, console and puppetdb host.
|
45
|
+
```
|
46
|
+
### <a name = "0.5.1">0.5.1 - 26 May, 2016 (c74a3fec)
|
47
|
+
|
48
|
+
* (HISTORY) update beaker-answers history for gem release 0.5.1 (c74a3fec)
|
19
49
|
|
20
50
|
* (GEM) update beaker-answers version to 0.5.1 (31f5b82c)
|
21
51
|
|
@@ -76,13 +76,14 @@ module BeakerAnswers
|
|
76
76
|
puppetdb = only_host_with_role(@hosts, 'database')
|
77
77
|
console = only_host_with_role(@hosts, 'dashboard')
|
78
78
|
|
79
|
-
config["#{ns}::certificate_authority_host"] = answer_for(@options, "#{ns}::certificate_authority_host", master.hostname)
|
80
79
|
config["#{ns}::puppet_master_host"] = answer_for(@options, "#{ns}::puppet_master_host", master.hostname)
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
80
|
+
|
81
|
+
# Monolithic installs now only require the puppet_master_host, so only pass in the console
|
82
|
+
# and puppetdb host if it is a split install
|
83
|
+
if [master, puppetdb, console].uniq.length != 1
|
84
|
+
config["#{ns}::console_host"] = answer_for(@options, "#{ns}::console_host", console.hostname)
|
85
|
+
config["#{ns}::puppetdb_host"] = answer_for(@options, "#{ns}::puppetdb_host", puppetdb.hostname)
|
86
|
+
end
|
86
87
|
|
87
88
|
return config
|
88
89
|
end
|
@@ -1,43 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
|
5
|
-
let( :ver ) { '2016.2.0' }
|
6
|
-
let( :options ) { StringifyHash.new }
|
7
|
-
let( :basic_hosts ) { make_hosts( {'pe_ver' => ver } ) }
|
8
|
-
let( :hosts ) { basic_hosts[0]['roles'] = ['master', 'agent']
|
9
|
-
basic_hosts[1]['roles'] = ['dashboard', 'agent']
|
10
|
-
basic_hosts[2]['roles'] = ['database', 'agent']
|
11
|
-
basic_hosts }
|
12
|
-
let( :answers ) { BeakerAnswers::Answers.create(ver, hosts, options) }
|
13
|
-
let( :answer_hash ) { answers.answers }
|
14
|
-
|
15
|
-
it 'adds orchestrator database answers to console' do
|
16
|
-
expect( answer_hash['vm2'][:q_orchestrator_database_name] ).to be === 'pe-orchestrator'
|
17
|
-
expect( answer_hash['vm2'][:q_orchestrator_database_user] ).to be === 'Orc3Str8R'
|
18
|
-
end
|
19
|
-
|
20
|
-
it 'generates valid answers if #answer_string is called' do
|
21
|
-
expect( answers.answer_string(basic_hosts[2]) ).to match(/q_orchestrator_database_name=pe-orchestrator/)
|
22
|
-
end
|
23
|
-
|
24
|
-
context 'when generating a hiera config' do
|
4
|
+
RSpec.shared_examples 'pe.conf' do
|
25
5
|
let( :options ) { { :format => 'hiera' } }
|
26
6
|
let( :answer_hiera ) { answers.answer_hiera }
|
27
7
|
let( :default_password ) { '~!@#$%^*-/ aZ' }
|
28
|
-
let( :gold_role_answers ) do
|
29
|
-
{
|
30
|
-
"console_admin_password" => default_password,
|
31
|
-
"puppet_enterprise::use_application_services" => true,
|
32
|
-
"puppet_enterprise::certificate_authority_host" => basic_hosts[0].hostname,
|
33
|
-
"puppet_enterprise::puppet_master_host" => basic_hosts[0].hostname,
|
34
|
-
"puppet_enterprise::console_host" => basic_hosts[1].hostname,
|
35
|
-
"puppet_enterprise::puppetdb_host" => basic_hosts[2].hostname,
|
36
|
-
"puppet_enterprise::database_host" => basic_hosts[2].hostname,
|
37
|
-
"puppet_enterprise::pcp_broker_host" => basic_hosts[0].hostname,
|
38
|
-
"puppet_enterprise::mcollective_middleware_hosts" => [basic_hosts[0].hostname],
|
39
|
-
}
|
40
|
-
end
|
41
8
|
let( :gold_db_answers ) do
|
42
9
|
{
|
43
10
|
"puppet_enterprise::activity_database_user" => 'adsfglkj',
|
@@ -77,6 +44,14 @@ describe BeakerAnswers::Version20162 do
|
|
77
44
|
"puppet_enterprise::rbac_database_password" => 'custom-rbac-password',
|
78
45
|
}
|
79
46
|
end
|
47
|
+
let( :overridding_parameters ) do
|
48
|
+
{
|
49
|
+
'puppet_enterprise::certificate_authority_host' => 'enterpriseca.vm',
|
50
|
+
'puppet_enterprise::console_host' => 'enterpriseconsole.vm',
|
51
|
+
'console_admin_password' => 'testing123',
|
52
|
+
}
|
53
|
+
end
|
54
|
+
let( :gold_answers_with_overrides ) { gold_role_answers.merge(overridding_parameters) }
|
80
55
|
|
81
56
|
it 'should not have nil keys or values' do
|
82
57
|
answer_hash.each_pair { |k, v|
|
@@ -177,20 +152,8 @@ describe BeakerAnswers::Version20162 do
|
|
177
152
|
}
|
178
153
|
end
|
179
154
|
|
180
|
-
it '
|
181
|
-
expect(answer_hash
|
182
|
-
end
|
183
|
-
|
184
|
-
it 'overrides the defaults when a :: delimited key is given' do
|
185
|
-
expect(answer_hash["puppet_enterprise::console_host"]).to be === 'enterpriseconsole.vm'
|
186
|
-
end
|
187
|
-
|
188
|
-
it 'overrides the console_admin_password default' do
|
189
|
-
expect(answer_hash["console_admin_password"]).to be === 'testing123'
|
190
|
-
end
|
191
|
-
|
192
|
-
it 'does not add a duplicate key to the hash' do
|
193
|
-
expect(answer_hash.length).to eq(gold_role_answers.length)
|
155
|
+
it 'matches expected answers' do
|
156
|
+
expect(answer_hash).to eq(gold_answers_with_overrides)
|
194
157
|
end
|
195
158
|
end
|
196
159
|
|
@@ -208,21 +171,60 @@ describe BeakerAnswers::Version20162 do
|
|
208
171
|
}
|
209
172
|
end
|
210
173
|
|
211
|
-
it '
|
212
|
-
expect(answer_hash
|
174
|
+
it 'matches expected answers' do
|
175
|
+
expect(answer_hash).to eq(gold_answers_with_overrides)
|
213
176
|
end
|
177
|
+
end
|
178
|
+
end
|
214
179
|
|
215
|
-
|
216
|
-
|
217
|
-
|
180
|
+
describe BeakerAnswers::Version20162 do
|
181
|
+
let( :ver ) { '2016.2.0' }
|
182
|
+
let( :options ) { StringifyHash.new }
|
183
|
+
let( :basic_hosts ) { make_hosts( {'pe_ver' => ver } ) }
|
184
|
+
let( :hosts ) { basic_hosts[0]['roles'] = ['master', 'agent']
|
185
|
+
basic_hosts[1]['roles'] = ['dashboard', 'agent']
|
186
|
+
basic_hosts[2]['roles'] = ['database', 'agent']
|
187
|
+
basic_hosts }
|
188
|
+
let( :answers ) { BeakerAnswers::Answers.create(ver, hosts, options) }
|
189
|
+
let( :answer_hash ) { answers.answers }
|
190
|
+
|
191
|
+
it 'adds orchestrator database answers to console' do
|
192
|
+
expect( answer_hash['vm2'][:q_orchestrator_database_name] ).to be === 'pe-orchestrator'
|
193
|
+
expect( answer_hash['vm2'][:q_orchestrator_database_user] ).to be === 'Orc3Str8R'
|
194
|
+
end
|
195
|
+
|
196
|
+
it 'generates valid answers if #answer_string is called' do
|
197
|
+
expect( answers.answer_string(basic_hosts[2]) ).to match(/q_orchestrator_database_name=pe-orchestrator/)
|
198
|
+
end
|
218
199
|
|
219
|
-
|
220
|
-
|
200
|
+
context 'when generating a hiera config' do
|
201
|
+
context 'for a monolithic install' do
|
202
|
+
let( :basic_hosts ) { make_hosts( {'pe_ver' => ver }, 1 ) }
|
203
|
+
let( :hosts ) { basic_hosts[0]['roles'] = ['master', 'agent', 'dashboard', 'database']
|
204
|
+
basic_hosts }
|
205
|
+
let( :gold_role_answers ) do
|
206
|
+
{
|
207
|
+
"console_admin_password" => default_password,
|
208
|
+
"puppet_enterprise::use_application_services" => true,
|
209
|
+
"puppet_enterprise::puppet_master_host" => basic_hosts[0].hostname,
|
210
|
+
}
|
221
211
|
end
|
222
212
|
|
223
|
-
|
224
|
-
|
213
|
+
include_examples 'pe.conf'
|
214
|
+
end
|
215
|
+
|
216
|
+
context 'for a split install' do
|
217
|
+
let( :gold_role_answers ) do
|
218
|
+
{
|
219
|
+
"console_admin_password" => default_password,
|
220
|
+
"puppet_enterprise::use_application_services" => true,
|
221
|
+
"puppet_enterprise::puppet_master_host" => basic_hosts[0].hostname,
|
222
|
+
"puppet_enterprise::console_host" => basic_hosts[1].hostname,
|
223
|
+
"puppet_enterprise::puppetdb_host" => basic_hosts[2].hostname,
|
224
|
+
}
|
225
225
|
end
|
226
|
+
|
227
|
+
include_examples 'pe.conf'
|
226
228
|
end
|
227
229
|
end
|
228
230
|
|
@@ -362,5 +364,4 @@ describe BeakerAnswers::Version20162 do
|
|
362
364
|
},
|
363
365
|
})
|
364
366
|
end
|
365
|
-
|
366
367
|
end
|
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.5.
|
4
|
+
version: 0.5.2
|
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: 2016-
|
12
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|