poise-boiler 1.13.2 → 1.14.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/gemfiles/master.gemfile +1 -0
- data/lib/poise_boiler/helpers/kitchen.rb +49 -10
- data/lib/poise_boiler/helpers/rake/travis.rb +23 -1
- data/lib/poise_boiler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f57300a29b2e9a7c8bc9fcc44a4776f72de99830
|
4
|
+
data.tar.gz: 9247d44758c5307eb3371c9862f217219db3b680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c20b4be76e93d84bc27a9122920c9bc57302201d33dfcd6383b4bf0784c5ab2f9fbb41b96572272bf0acfde5f19eb2c0a6eef86d1e73e459c545016384197e0
|
7
|
+
data.tar.gz: 8737d162302255f2ac401d3360ee5dd7d7724752974a11fd2ab71a974958adb09c2cdb235b0e8f82e6ee57777606c6c9d1d7c1b4dc545775735565466a5c98ac
|
data/CHANGELOG.md
CHANGED
data/gemfiles/master.gemfile
CHANGED
@@ -29,6 +29,7 @@ module PoiseBoiler
|
|
29
29
|
# @see #expand_platforms
|
30
30
|
PLATFORM_ALIASES = {
|
31
31
|
'windows' => %w{windows-2012r2},
|
32
|
+
'windows32' => %w{windows-2008sp2},
|
32
33
|
'ubuntu' => %w{ubuntu-12.04 ubuntu-14.04},
|
33
34
|
'rhel' => %w{centos},
|
34
35
|
'centos' => %w{centos-6 centos-7},
|
@@ -37,6 +38,15 @@ module PoiseBoiler
|
|
37
38
|
'all' => %w{unix windows},
|
38
39
|
}
|
39
40
|
|
41
|
+
# Default EC2 subnet ID when not overridden in the environment or config.
|
42
|
+
DEFAULT_EC2_SUBNET_ID = 'subnet-ca674af7'
|
43
|
+
|
44
|
+
# Default EC2 subnet ID for previous-generation instance types.
|
45
|
+
DEFAULT_EC2_LEGACY_INSTANCES_SUBNET_ID = 'subnet-1ffec232'
|
46
|
+
|
47
|
+
# Default EC2 security group when not overridden in the environment or config.
|
48
|
+
DEFAULT_EC2_SECURITY_GROUP_ID = 'sg-ed1ad892'
|
49
|
+
|
40
50
|
def initialize(**options)
|
41
51
|
# Figure out the directory that contains the kitchen.yml by looking for
|
42
52
|
# the first entry in the stack that isn't inside poise-boiler.
|
@@ -155,9 +165,7 @@ module PoiseBoiler
|
|
155
165
|
# Set a default instance size.
|
156
166
|
config['flavor_id'] = options[:rackspace_flavor] || 'general1-1'
|
157
167
|
when 'ec2'
|
158
|
-
|
159
|
-
config['security_group_ids'] = [ENV['AWS_SECURITY_GROUP_ID']]
|
160
|
-
config['subnet_id'] = ENV['AWS_SUBNET_ID']
|
168
|
+
config.update(ec2_driver_config)
|
161
169
|
end
|
162
170
|
config
|
163
171
|
end
|
@@ -169,8 +177,15 @@ module PoiseBoiler
|
|
169
177
|
{
|
170
178
|
# Use the sftp transport from kitchen-sync.
|
171
179
|
'name' => 'sftp',
|
172
|
-
# Use the
|
173
|
-
'ssh_key' => kitchen_driver
|
180
|
+
# Use the SSH key for this driver.
|
181
|
+
'ssh_key' => case kitchen_driver
|
182
|
+
when 'docker'
|
183
|
+
"#{base}/.kitchen/docker_id_rsa"
|
184
|
+
when 'ec2'
|
185
|
+
"#{base}/test/ec2/ssh.key"
|
186
|
+
else
|
187
|
+
nil
|
188
|
+
end,
|
174
189
|
}
|
175
190
|
end
|
176
191
|
|
@@ -209,16 +224,27 @@ module PoiseBoiler
|
|
209
224
|
# Generate extra Test Kitchen platform configuration for Windows hosts.
|
210
225
|
def windows_platform_config(name)
|
211
226
|
{
|
212
|
-
'driver' => {
|
213
|
-
'name' => 'ec2',
|
227
|
+
'driver' => ec2_driver_config.merge({
|
214
228
|
'instance_type' => 'm3.medium',
|
215
|
-
'
|
229
|
+
'retryable_tries' => 120,
|
230
|
+
}),
|
231
|
+
'provisioner' => {
|
232
|
+
'product_name' => 'chef',
|
233
|
+
'channel' => chef_version ? 'stable' : 'current',
|
234
|
+
'product_version' => chef_version,
|
216
235
|
},
|
217
236
|
'transport' => {
|
218
237
|
'name' => 'winrm',
|
219
|
-
'ssh_key' =>
|
238
|
+
'ssh_key' => "#{base}/test/ec2/ssh.key",
|
220
239
|
},
|
221
|
-
}
|
240
|
+
}.tap do |cfg|
|
241
|
+
if name == 'windows-2008sp2'
|
242
|
+
cfg['driver']['image_id'] = 'ami-f6a043e0'
|
243
|
+
cfg['driver']['instance_type'] = 'm1.medium'
|
244
|
+
cfg['driver']['subnet_id'] = ENV['AWS_SUBNET_ID'] || DEFAULT_EC2_LEGACY_INSTANCES_SUBNET_ID
|
245
|
+
cfg['provisioner']['architecture'] = 'i386'
|
246
|
+
end
|
247
|
+
end
|
222
248
|
end
|
223
249
|
|
224
250
|
# Generate a Test Kitchen suite configuration hash. This is a single suite
|
@@ -232,6 +258,19 @@ module PoiseBoiler
|
|
232
258
|
}
|
233
259
|
end
|
234
260
|
|
261
|
+
# Generate a Test Kitchen driver configuration hash with basic settings
|
262
|
+
# for kitchen-ec2.
|
263
|
+
#
|
264
|
+
# @return [Hash]
|
265
|
+
def ec2_driver_config
|
266
|
+
{
|
267
|
+
'name' => 'ec2',
|
268
|
+
'aws_ssh_key_id' => "#{cookbook_name}-kitchen",
|
269
|
+
'security_group_ids' => ENV['AWS_SECURITY_GROUP_ID'] ? [ENV['AWS_SECURITY_GROUP_ID']] : [DEFAULT_EC2_SECURITY_GROUP_ID],
|
270
|
+
'subnet_id' => ENV['AWS_SUBNET_ID'] || DEFAULT_EC2_SUBNET_ID,
|
271
|
+
}
|
272
|
+
end
|
273
|
+
|
235
274
|
end
|
236
275
|
end
|
237
276
|
end
|
@@ -56,8 +56,30 @@ module PoiseBoiler
|
|
56
56
|
sh(*cmd)
|
57
57
|
end
|
58
58
|
|
59
|
+
task 'travis:integration:rackspace' do
|
60
|
+
if integration_rackspace?
|
61
|
+
shell.say('Configuring Rackspace test dependencies')
|
62
|
+
task('.ssh/id_rsa').invoke
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
task 'travis:integration:docker' do
|
67
|
+
if integration_docker?
|
68
|
+
shell.say('Configuring Docker test dependencies')
|
69
|
+
task('test/docker/docker.key').invoke
|
70
|
+
task('./docker').invoke
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
task 'travis:integration:ec2' do
|
75
|
+
if ENV['KITCHEN_EC2_PASS']
|
76
|
+
shell.say('Configuring EC2 test dependencies')
|
77
|
+
sh(*%w{openssl rsa -in test/ec2/ssh.pem -passin env:KITCHEN_EC2_PASS -out test/ec2/ssh.key})
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
59
81
|
desc 'Run Test-Kitchen integration tests.'
|
60
|
-
task 'travis:integration' =>
|
82
|
+
task 'travis:integration' => %w{travis:integration:rackspace travis:integration:docker travis:integration:ec2 chef:kitchen}
|
61
83
|
|
62
84
|
desc 'Run CI tests'
|
63
85
|
task 'travis' do
|
data/lib/poise_boiler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-boiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|