kitchen-ec2 0.10.0.rc.1 → 0.10.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 +9 -2
- data/README.md +10 -3
- data/lib/kitchen/driver/aws/instance_generator.rb +2 -1
- data/lib/kitchen/driver/ec2.rb +1 -2
- data/lib/kitchen/driver/ec2_version.rb +1 -1
- data/spec/kitchen/driver/ec2/instance_generator_spec.rb +29 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7d28f5952b83630a3d5da24788ff269318ddb78
|
|
4
|
+
data.tar.gz: ad437ab4aee9027473f8ce896f1816cc49fd334f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 555b1c421bfbb295e47ea4bd37ce152e43c0524395a47bcedd0f7c6ca184c377d6fea0004dcd641ad7a714f9f0fc39923fb8c6fefbeff06481e71e1d5ffe3ca4
|
|
7
|
+
data.tar.gz: 8b4ba45abccbcc9a499e2603f055ad6447a04dab4ff9f72a0c5acb1f4c1a4520d4a0ba60fedb29eb6dd81cb55016e800df9ed13db6784ff2df2e8f2d06960d1f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
## 0.10.0 /
|
|
1
|
+
## 0.10.0 / 2016-06-24
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
+
* Pull Request [#165][]: Added `ebs_iops` parameter to block_device_mappings, necessary when specifying volume type of `io1` ([@tyler-ball][])
|
|
6
|
+
* Pull Request [#161][]: Fixing UTF error in hints file on Windows ([@zl4bv][])
|
|
7
|
+
* Pull Request [#166][]: If `security_group_ids` is specified as a string instead of an array we coerce it to an array automatically ([@fnichol][])
|
|
8
|
+
|
|
5
9
|
### New Features
|
|
6
10
|
|
|
7
11
|
* Pull Request [#150][]: Added support for managing Windows hosts in AWS
|
|
@@ -193,9 +197,13 @@
|
|
|
193
197
|
[#142]: https://github.com/test-kitchen/kitchen-ec2/issues/142
|
|
194
198
|
[#150]: https://github.com/test-kitchen/kitchen-ec2/issues/150
|
|
195
199
|
[#151]: https://github.com/test-kitchen/kitchen-ec2/issues/151
|
|
200
|
+
[#161]: https://github.com/test-kitchen/kitchen-ec2/issues/161
|
|
201
|
+
[#165]: https://github.com/test-kitchen/kitchen-ec2/issues/165
|
|
202
|
+
[#166]: https://github.com/test-kitchen/kitchen-ec2/issues/166
|
|
196
203
|
[@Atalanta]: https://github.com/Atalanta
|
|
197
204
|
[@Igorshp]: https://github.com/Igorshp
|
|
198
205
|
[@JamesAwesome]: https://github.com/JamesAwesome
|
|
206
|
+
[@afiune]: https://github.com/afiune
|
|
199
207
|
[@anl]: https://github.com/anl
|
|
200
208
|
[@arangamani]: https://github.com/arangamani
|
|
201
209
|
[@bozinsky]: https://github.com/bozinsky
|
|
@@ -213,7 +221,6 @@
|
|
|
213
221
|
[@mattray]: https://github.com/mattray
|
|
214
222
|
[@mumoshu]: https://github.com/mumoshu
|
|
215
223
|
[@nicgrayson]: https://github.com/nicgrayson
|
|
216
|
-
[@afiune]: https://github.com/afiune
|
|
217
224
|
[@scarolan]: https://github.com/scarolan
|
|
218
225
|
[@sebbrandt87]: https://github.com/sebbrandt87
|
|
219
226
|
[@sethvargo]: https://github.com/sethvargo
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ instances. Use Amazon's cloud for your infrastructure testing!
|
|
|
12
12
|
## Requirements
|
|
13
13
|
|
|
14
14
|
There are **no** external system requirements for this driver. However you
|
|
15
|
-
will need access to an [AWS][aws_site] account.
|
|
15
|
+
will need access to an [AWS][aws_site] account. [IAM][iam_site] users should have, at a minimum, permission to manage the lifecycle of an EC2 instance along with modifying components specified in kitchen driver configs. Consider using a permissive managed IAM policy like ``arn:aws:iam::aws:policy/AmazonEC2FullAccess`` or tailor one specific to your security requirements.
|
|
16
16
|
|
|
17
17
|
## Installation and Setup
|
|
18
18
|
|
|
@@ -234,7 +234,7 @@ The default is `nil`.
|
|
|
234
234
|
|
|
235
235
|
Specify a proxy to send AWS requests through. Should be of the format `http://<host>:<port>`.
|
|
236
236
|
|
|
237
|
-
The default is `ENV[
|
|
237
|
+
The default is `ENV["HTTPS_PROXY"] || ENV["HTTP_PROXY"]`. If you have these environment variables set and do not want to use a proxy when contacting aws set `http_proxy: nil`.
|
|
238
238
|
|
|
239
239
|
**Note** - The AWS command line utility allow you to specify [two proxies](http://docs.aws.amazon.com/cli/latest/userguide/cli-http-proxy.html), one for HTTP and one for HTTPS. The AWS Ruby SDK only allows you to specify 1 proxy and because all requests are `https://` this proxy needs to support HTTPS.
|
|
240
240
|
|
|
@@ -272,6 +272,11 @@ block_device_mappings:
|
|
|
272
272
|
ebs_volume_size: 15
|
|
273
273
|
ebs_delete_on_termination: true
|
|
274
274
|
ebs_snapshot_id: snap-0015d0bc
|
|
275
|
+
- ebs_device_name: /dev/sdc
|
|
276
|
+
ebs_volume_size: 100
|
|
277
|
+
ebs_delete_on_termination: true
|
|
278
|
+
ebs_volume_type: io1
|
|
279
|
+
ebs_iops: 100
|
|
275
280
|
```
|
|
276
281
|
|
|
277
282
|
The keys `ebs_device_name`, `ebs_volume_size` and `ebs_delete_on_termination` are required for every mapping.
|
|
@@ -280,7 +285,8 @@ storage config keys are present.
|
|
|
280
285
|
|
|
281
286
|
The keys `ebs_volume_type`, `ebs_virtual_name` and `ebs_snapshot_id` are optional. See
|
|
282
287
|
[Amazon EBS Volume Types](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) to find out more about
|
|
283
|
-
volume types. `ebs_volume_type` defaults to `standard` but can also be `gp2` or `io1`.
|
|
288
|
+
volume types. `ebs_volume_type` defaults to `standard` but can also be `gp2` or `io1`. If you specify `io1` you must
|
|
289
|
+
also specify `ebs_iops`.
|
|
284
290
|
|
|
285
291
|
If you have a block device mapping with a `ebs_device_name` equal to the root storage device name on your
|
|
286
292
|
[image](#config-image-id) then the provided mapping will replace the settings in the image.
|
|
@@ -474,6 +480,7 @@ Apache 2.0 (see [LICENSE][license])
|
|
|
474
480
|
[amis_json]: https://github.com/test-kitchen/kitchen-ec2/blob/master/data/amis.json
|
|
475
481
|
[ami_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html
|
|
476
482
|
[aws_site]: http://aws.amazon.com/
|
|
483
|
+
[iam_site]: http://aws.amazon.com/iam
|
|
477
484
|
[credentials_docs]: http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
|
|
478
485
|
[aws_sdk_gem]: http://docs.aws.amazon.com/sdkforruby/api/index.html
|
|
479
486
|
[group_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
|
|
@@ -52,7 +52,7 @@ module Kitchen
|
|
|
52
52
|
:private_ip_address => config[:private_ip_address]
|
|
53
53
|
}
|
|
54
54
|
i[:block_device_mappings] = block_device_mappings unless block_device_mappings.empty?
|
|
55
|
-
i[:security_group_ids] = config[:security_group_ids] if config[:security_group_ids]
|
|
55
|
+
i[:security_group_ids] = Array(config[:security_group_ids]) if config[:security_group_ids]
|
|
56
56
|
i[:user_data] = prepared_user_data if prepared_user_data
|
|
57
57
|
if config[:iam_profile_name]
|
|
58
58
|
i[:iam_instance_profile] = { :name => config[:iam_profile_name] }
|
|
@@ -110,6 +110,7 @@ module Kitchen
|
|
|
110
110
|
:device_name => bdm[:ebs_device_name]
|
|
111
111
|
}
|
|
112
112
|
b[:ebs][:volume_type] = bdm[:ebs_volume_type] if bdm[:ebs_volume_type]
|
|
113
|
+
b[:ebs][:iops] = bdm[:ebs_iops] if bdm[:ebs_iops]
|
|
113
114
|
b[:ebs][:snapshot_id] = bdm[:ebs_snapshot_id] if bdm[:ebs_snapshot_id]
|
|
114
115
|
b[:virtual_name] = bdm[:ebs_virtual_name] if bdm[:ebs_virtual_name]
|
|
115
116
|
b
|
data/lib/kitchen/driver/ec2.rb
CHANGED
|
@@ -178,7 +178,6 @@ module Kitchen
|
|
|
178
178
|
return if state[:server_id]
|
|
179
179
|
|
|
180
180
|
info(Kitchen::Util.outdent!(<<-END))
|
|
181
|
-
Creating <#{state[:server_id]}>...
|
|
182
181
|
If you are not using an account that qualifies under the AWS
|
|
183
182
|
free-tier, you may be charged to run these suites. The charge
|
|
184
183
|
should be minimal, but neither Test Kitchen nor its maintainers
|
|
@@ -427,7 +426,7 @@ module Kitchen
|
|
|
427
426
|
|
|
428
427
|
def create_ec2_json(state)
|
|
429
428
|
if windows_os?
|
|
430
|
-
cmd = "
|
|
429
|
+
cmd = "New-Item -Force C:\\chef\\ohai\\hints\\ec2.json -ItemType File"
|
|
431
430
|
else
|
|
432
431
|
cmd = "sudo mkdir -p /etc/chef/ohai/hints;sudo touch /etc/chef/ohai/hints/ec2.json"
|
|
433
432
|
end
|
|
@@ -114,6 +114,13 @@ describe Kitchen::Driver::Aws::InstanceGenerator do
|
|
|
114
114
|
:ebs_volume_type => "gp2",
|
|
115
115
|
:ebs_snapshot_id => "id",
|
|
116
116
|
:ebs_virtual_name => "test"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
:ebs_volume_size => 100,
|
|
120
|
+
:ebs_delete_on_termination => true,
|
|
121
|
+
:ebs_device_name => "/dev/sda3",
|
|
122
|
+
:ebs_volume_type => "io1",
|
|
123
|
+
:ebs_iops => 100
|
|
117
124
|
}
|
|
118
125
|
] }
|
|
119
126
|
end
|
|
@@ -137,6 +144,15 @@ describe Kitchen::Driver::Aws::InstanceGenerator do
|
|
|
137
144
|
},
|
|
138
145
|
:device_name => "/dev/sda2",
|
|
139
146
|
:virtual_name => "test"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
:ebs => {
|
|
150
|
+
:volume_size => 100,
|
|
151
|
+
:volume_type => "io1",
|
|
152
|
+
:iops => 100,
|
|
153
|
+
:delete_on_termination => true
|
|
154
|
+
},
|
|
155
|
+
:device_name => "/dev/sda3"
|
|
140
156
|
}
|
|
141
157
|
]
|
|
142
158
|
)
|
|
@@ -347,6 +363,19 @@ describe Kitchen::Driver::Aws::InstanceGenerator do
|
|
|
347
363
|
}]
|
|
348
364
|
)
|
|
349
365
|
end
|
|
366
|
+
|
|
367
|
+
it "accepts a single string value" do
|
|
368
|
+
config[:security_group_ids] = "only-one"
|
|
369
|
+
|
|
370
|
+
expect(generator.ec2_instance_data).to include(
|
|
371
|
+
:network_interfaces => [{
|
|
372
|
+
:device_index => 0,
|
|
373
|
+
:associate_public_ip_address => true,
|
|
374
|
+
:delete_on_termination => true,
|
|
375
|
+
:groups => ["only-one"]
|
|
376
|
+
}]
|
|
377
|
+
)
|
|
378
|
+
end
|
|
350
379
|
end
|
|
351
380
|
|
|
352
381
|
context "and private_ip_address is provided" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-ec2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.0
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fletcher Nichol
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-06-
|
|
11
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|
|
@@ -212,9 +212,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
212
212
|
version: '0'
|
|
213
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
requirements:
|
|
215
|
-
- - "
|
|
215
|
+
- - ">="
|
|
216
216
|
- !ruby/object:Gem::Version
|
|
217
|
-
version:
|
|
217
|
+
version: '0'
|
|
218
218
|
requirements: []
|
|
219
219
|
rubyforge_project:
|
|
220
220
|
rubygems_version: 2.4.7
|