kitchen-ec2 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cane +2 -1
- data/.gitignore +2 -0
- data/.rspec +3 -0
- data/.rubocop.yml +9 -0
- data/.yardopts +3 -0
- data/CHANGELOG.md +60 -17
- data/Gemfile +3 -3
- data/README.md +241 -85
- data/Rakefile +30 -12
- data/data/amis.json +18 -0
- data/kitchen-ec2.gemspec +21 -10
- data/lib/kitchen/driver/aws/client.rb +110 -0
- data/lib/kitchen/driver/aws/instance_generator.rb +148 -0
- data/lib/kitchen/driver/ec2.rb +288 -88
- data/lib/kitchen/driver/ec2_version.rb +1 -1
- data/spec/kitchen/driver/ec2/client_spec.rb +119 -0
- data/spec/kitchen/driver/ec2/instance_generator_spec.rb +303 -0
- data/spec/kitchen/driver/ec2_spec.rb +82 -0
- data/spec/spec_helper.rb +104 -0
- metadata +131 -22
- data/.tailor +0 -106
- data/spec/create_spec.rb +0 -106
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b12924746e2f87674fd4988de55bce1d30507be4
|
4
|
+
data.tar.gz: 7fbbd13c4e9810f0aad3d15bff357291cd808695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67561dd868c1a2e8664f99791b62c237b9dc698ed17d587c0f10ce83ad61713a166742d7b50679d93423acf23f5fbecd55e20eaf8d68f3519106af1ecc5d21b7
|
7
|
+
data.tar.gz: db02d3bd6413b7a35e6a843ebced5eba8e54c939462966aee92b87881907e81ad314c4df6839633b912c3b33ad60777fa6cc9ce44864a729b27aec749eb37745
|
data/.cane
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
--
|
1
|
+
--abc-max 30
|
2
|
+
--style-measure 100
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
## 0.9.0 / 2015-05-18
|
2
|
+
|
3
|
+
### Bug Fixes
|
4
|
+
|
5
|
+
* Pull Request [#46][]: Don't create multiple instances if `kitchen create` is called multiple times. ([@anl][])
|
6
|
+
* Pull Request [#97][], [#69][], [#99][]: Try additional connections to servers which don't have a `public_ip_address`. This helps connect to nodes over VPN. ([@chuckg][], [@tyler-ball][], [@mumoshu][])
|
7
|
+
|
8
|
+
### New Features
|
9
|
+
|
10
|
+
* Pull Request [#35][]: Adding support for specifying the IAM profile on created instance. Set `:iam_profile_name` in the driver section of your .kitchen.yml to specify this. ([@nicgrayson][])
|
11
|
+
* Pull Request [#82][]: Add the ability to specify user data. Set `:user_data` in the driver section of your .kitchen.yml. This can either be the user data or the path to a file which contains the user data. ([@sebbrandt87][])
|
12
|
+
* Pull Request [#84][]: Add the ability to specify the private ip of the instance. Set `:private_ip_address` in the driver section of your .kitchen.yml. ([@scarolan][])
|
13
|
+
* Pull Request [#68][], [#104][], [#107][]: If provisioning from an EC2 host and credentials are not set use the local nodes's credentials. If access key & secret are set, do not use local session token - leave it unset. ([@JamesAwesome][], [@Igorshp][], [@daanemanz][])
|
14
|
+
|
15
|
+
### Improvements
|
16
|
+
|
17
|
+
* Pull Request [#110][]: Updating to use the AWS SDK V2 instead of Fog. ([@tyler-ball][])
|
18
|
+
* We no longer recommend storing the AWS credentials in the `.kitchen.yml` file. Instead, specify them as environment variables or in the `~/.aws/credentials` file. See the README for more details.
|
19
|
+
* Pull Request [#112][]: Updating to depend on the latest version of Test Kitchen, 1.4.0. ([@jmundrawala][])
|
20
|
+
|
1
21
|
## 0.8.0 / 2014-02-11
|
2
22
|
|
3
23
|
### Bug fixes
|
@@ -61,36 +81,59 @@
|
|
61
81
|
* Remove default_config :port in favor of SSHBase default (also 22). ([@fnichol][])
|
62
82
|
|
63
83
|
<!--- The following link definition list is generated by PimpMyChangelog --->
|
64
|
-
[#2]: https://github.com/
|
65
|
-
[#5]: https://github.com/
|
66
|
-
[#7]: https://github.com/
|
67
|
-
[#8]: https://github.com/
|
68
|
-
[#9]: https://github.com/
|
69
|
-
[#13]: https://github.com/
|
70
|
-
[#14]: https://github.com/
|
71
|
-
[#15]: https://github.com/
|
72
|
-
[#20]: https://github.com/
|
73
|
-
[#21]: https://github.com/
|
74
|
-
[#22]: https://github.com/
|
75
|
-
[#23]: https://github.com/
|
76
|
-
[#27]: https://github.com/
|
77
|
-
[#28]: https://github.com/
|
78
|
-
[#29]: https://github.com/
|
79
|
-
[#31]: https://github.com/
|
80
|
-
[#34]: https://github.com/
|
84
|
+
[#2]: https://github.com/test-kitchen/kitchen-ec2/issues/2
|
85
|
+
[#5]: https://github.com/test-kitchen/kitchen-ec2/issues/5
|
86
|
+
[#7]: https://github.com/test-kitchen/kitchen-ec2/issues/7
|
87
|
+
[#8]: https://github.com/test-kitchen/kitchen-ec2/issues/8
|
88
|
+
[#9]: https://github.com/test-kitchen/kitchen-ec2/issues/9
|
89
|
+
[#13]: https://github.com/test-kitchen/kitchen-ec2/issues/13
|
90
|
+
[#14]: https://github.com/test-kitchen/kitchen-ec2/issues/14
|
91
|
+
[#15]: https://github.com/test-kitchen/kitchen-ec2/issues/15
|
92
|
+
[#20]: https://github.com/test-kitchen/kitchen-ec2/issues/20
|
93
|
+
[#21]: https://github.com/test-kitchen/kitchen-ec2/issues/21
|
94
|
+
[#22]: https://github.com/test-kitchen/kitchen-ec2/issues/22
|
95
|
+
[#23]: https://github.com/test-kitchen/kitchen-ec2/issues/23
|
96
|
+
[#27]: https://github.com/test-kitchen/kitchen-ec2/issues/27
|
97
|
+
[#28]: https://github.com/test-kitchen/kitchen-ec2/issues/28
|
98
|
+
[#29]: https://github.com/test-kitchen/kitchen-ec2/issues/29
|
99
|
+
[#31]: https://github.com/test-kitchen/kitchen-ec2/issues/31
|
100
|
+
[#34]: https://github.com/test-kitchen/kitchen-ec2/issues/34
|
101
|
+
[#35]: https://github.com/test-kitchen/kitchen-ec2/issues/35
|
102
|
+
[#46]: https://github.com/test-kitchen/kitchen-ec2/issues/46
|
103
|
+
[#68]: https://github.com/test-kitchen/kitchen-ec2/issues/68
|
104
|
+
[#69]: https://github.com/test-kitchen/kitchen-ec2/issues/69
|
105
|
+
[#82]: https://github.com/test-kitchen/kitchen-ec2/issues/82
|
106
|
+
[#84]: https://github.com/test-kitchen/kitchen-ec2/issues/84
|
107
|
+
[#97]: https://github.com/test-kitchen/kitchen-ec2/issues/97
|
108
|
+
[#99]: https://github.com/test-kitchen/kitchen-ec2/issues/99
|
109
|
+
[#104]: https://github.com/test-kitchen/kitchen-ec2/issues/104
|
110
|
+
[#107]: https://github.com/test-kitchen/kitchen-ec2/issues/107
|
111
|
+
[#110]: https://github.com/test-kitchen/kitchen-ec2/issues/110
|
112
|
+
[#112]: https://github.com/test-kitchen/kitchen-ec2/issues/112
|
81
113
|
[@Atalanta]: https://github.com/Atalanta
|
114
|
+
[@Igorshp]: https://github.com/Igorshp
|
115
|
+
[@JamesAwesome]: https://github.com/JamesAwesome
|
116
|
+
[@anl]: https://github.com/anl
|
82
117
|
[@arangamani]: https://github.com/arangamani
|
83
118
|
[@bozinsky]: https://github.com/bozinsky
|
119
|
+
[@chuckg]: https://github.com/chuckg
|
84
120
|
[@coderanger]: https://github.com/coderanger
|
121
|
+
[@daanemanz]: https://github.com/daanemanz
|
85
122
|
[@dissonanz]: https://github.com/dissonanz
|
86
123
|
[@dysinger]: https://github.com/dysinger
|
87
124
|
[@eherot]: https://github.com/eherot
|
88
125
|
[@fnichol]: https://github.com/fnichol
|
89
126
|
[@halcyonCorsair]: https://github.com/halcyonCorsair
|
127
|
+
[@jmundrawala]: https://github.com/jmundrawala
|
90
128
|
[@juliandunn]: https://github.com/juliandunn
|
91
129
|
[@matheeeny]: https://github.com/matheeeny
|
92
130
|
[@mattray]: https://github.com/mattray
|
131
|
+
[@mumoshu]: https://github.com/mumoshu
|
132
|
+
[@nicgrayson]: https://github.com/nicgrayson
|
133
|
+
[@scarolan]: https://github.com/scarolan
|
134
|
+
[@sebbrandt87]: https://github.com/sebbrandt87
|
93
135
|
[@sethvargo]: https://github.com/sethvargo
|
94
136
|
[@someara]: https://github.com/someara
|
95
137
|
[@spheromak]: https://github.com/spheromak
|
96
138
|
[@tiwilliam]: https://github.com/tiwilliam
|
139
|
+
[@tyler-ball]: https://github.com/tyler-ball
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -6,19 +6,19 @@
|
|
6
6
|
|
7
7
|
A [Test Kitchen][kitchenci] Driver for Amazon EC2.
|
8
8
|
|
9
|
-
This driver uses the [
|
9
|
+
This driver uses the [aws sdk gem][aws_sdk_gem] to provision and destroy EC2
|
10
10
|
instances. Use Amazon's cloud for your infrastructure testing!
|
11
11
|
|
12
|
-
##
|
12
|
+
## Requirements
|
13
13
|
|
14
14
|
There are **no** external system requirements for this driver. However you
|
15
15
|
will need access to an [AWS][aws_site] account.
|
16
16
|
|
17
|
-
##
|
17
|
+
## Installation and Setup
|
18
18
|
|
19
19
|
Please read the [Driver usage][driver_usage] page for more details.
|
20
20
|
|
21
|
-
##
|
21
|
+
## Default Configuration
|
22
22
|
|
23
23
|
This driver can determine AMI and username login for a select number of
|
24
24
|
platforms in each region. Currently, the following platform names are
|
@@ -31,6 +31,8 @@ platforms:
|
|
31
31
|
- name: ubuntu-12.04
|
32
32
|
- name: ubuntu-12.10
|
33
33
|
- name: ubuntu-13.04
|
34
|
+
- name: ubuntu-13.10
|
35
|
+
- name: ubuntu-14.04
|
34
36
|
- name: centos-6.4
|
35
37
|
- name: debian-7.1.0
|
36
38
|
```
|
@@ -58,63 +60,98 @@ platforms:
|
|
58
60
|
|
59
61
|
For specific default values, please consult [amis.json][amis_json].
|
60
62
|
|
61
|
-
##
|
63
|
+
## Authenticating with AWS
|
62
64
|
|
63
|
-
|
65
|
+
There are 3 ways you can authenticate against AWS, and we will try them in the
|
66
|
+
following order:
|
64
67
|
|
65
|
-
|
68
|
+
1. You can specify the access key and access secret (and optionally the session
|
69
|
+
token) through config. See the `aws_access_key_id` and `aws_secret_access_key`
|
70
|
+
config sections below to see how to specify these in your .kitchen.yml or
|
71
|
+
through environment variables. If you would like to specify your session token
|
72
|
+
use the environment variable `AWS_SESSION_TOKEN`.
|
73
|
+
1. The shared credentials ini file at `~/.aws/credentials`. You can specify
|
74
|
+
multiple profiles in this file and select one with the `AWS_PROFILE`
|
75
|
+
environment variable or the `shared_credentials_profile` driver config. Read
|
76
|
+
[this][credentials_docs] for more information.
|
77
|
+
1. From an instance profile when running on EC2. This accesses the local
|
78
|
+
metadata service to discover the local instance's IAM instance profile.
|
66
79
|
|
67
|
-
|
80
|
+
This precedence order is taken from http://docs.aws.amazon.com/sdkforruby/api/index.html#Configuration
|
81
|
+
|
82
|
+
The first method attempted that works will be used. IE, if you want to auth
|
83
|
+
using the instance profile, you must not set any of the access key configs
|
84
|
+
or environment variables, and you must not specify a `~/.aws/credentials`
|
85
|
+
file.
|
68
86
|
|
69
|
-
|
87
|
+
Because the Test Kitchen test should be checked into source control and ran
|
88
|
+
through CI we no longer recommend storing the AWS credentials in the
|
89
|
+
`.kitchen.yml` file. Instead, specify them as environment variables or in the
|
90
|
+
`~/.aws/credentials` file.
|
70
91
|
|
71
|
-
|
92
|
+
## General Configuration
|
72
93
|
|
73
|
-
|
74
|
-
or `nil` otherwise.
|
94
|
+
### availability\_zone
|
75
95
|
|
76
|
-
|
96
|
+
The AWS [availability zone][region_docs] to use. Only request
|
97
|
+
the letter designation - will attach this to the region used.
|
77
98
|
|
78
|
-
|
99
|
+
The default is `"#{region}b"`.
|
79
100
|
|
80
|
-
|
81
|
-
|
101
|
+
### aws\_access\_key\_id
|
102
|
+
|
103
|
+
**Deprecated** It is recommended to use the `AWS_ACCESS_KEY_ID` or the
|
104
|
+
`~/.aws/credentials` file instead.
|
105
|
+
|
106
|
+
The AWS [access key id][credentials_docs] to use.
|
107
|
+
|
108
|
+
### aws\_secret\_access\_key
|
109
|
+
|
110
|
+
**Deprecated** It is recommended to use the `AWS_SECRET_ACCESS_KEY` or the
|
111
|
+
`~/.aws/credentials` file instead.
|
112
|
+
|
113
|
+
The AWS [secret access key][credentials_docs] to use.
|
114
|
+
|
115
|
+
### shared\_credentials\_profile
|
82
116
|
|
83
|
-
|
117
|
+
The EC2 [profile name][credentials_docs] to use when reading credentials out
|
118
|
+
of `~/.aws/credentials`. If it is not specified AWS will read the `Default`
|
119
|
+
profile credentials (if using this method of authentication).
|
120
|
+
|
121
|
+
Can also be specified as `ENV['AWS_PROFILE']`.
|
122
|
+
|
123
|
+
### aws\_ssh\_key\_id
|
84
124
|
|
85
125
|
**Required** The EC2 [SSH key id][key_id_docs] to use.
|
86
126
|
|
87
127
|
The default will be read from the `AWS_SSH_KEY_ID` environment variable if set,
|
88
128
|
or `nil` otherwise.
|
89
129
|
|
90
|
-
###
|
130
|
+
### aws\_session\_token
|
91
131
|
|
92
|
-
|
132
|
+
**Deprecated** It is recommended to use the `AWS_SESSION_TOKEN` or the
|
133
|
+
`~/.aws/credentials` file instead.
|
93
134
|
|
94
|
-
The
|
135
|
+
The AWS [session token][credentials_docs] to use.
|
95
136
|
|
96
|
-
###
|
137
|
+
### flavor\_id
|
97
138
|
|
98
|
-
|
139
|
+
**Deprecated** See [instance_type](#config-instance_type) below.
|
99
140
|
|
100
|
-
|
141
|
+
### <a name="config-instance_type"></a> instance\_type
|
101
142
|
|
102
|
-
|
103
|
-
|
104
|
-
Option to launch EC2 instance with optimized EBS volume. See
|
105
|
-
[Amazon EC2 Instance Types](http://aws.amazon.com/ec2/instance-types/) to find
|
106
|
-
out more about instance types that can be launched as EBS-optimized instances.
|
143
|
+
The EC2 [instance type][instance_docs] (also known as size) to use.
|
107
144
|
|
108
|
-
The default is `
|
145
|
+
The default is `"m1.small"`.
|
109
146
|
|
110
|
-
###
|
147
|
+
### security_group_ids
|
111
148
|
|
112
149
|
An Array of EC2 [security groups][group_docs] which will be applied to the
|
113
150
|
instance.
|
114
151
|
|
115
152
|
The default is `["default"]`.
|
116
153
|
|
117
|
-
###
|
154
|
+
### image\_id
|
118
155
|
|
119
156
|
**Required** The EC2 [AMI id][ami_docs] to use.
|
120
157
|
|
@@ -122,13 +159,126 @@ The default will be determined by the `aws_region` chosen and the Platform
|
|
122
159
|
name, if a default exists (see [amis.json][ami_json]). If a default cannot be
|
123
160
|
computed, then the default is `nil`.
|
124
161
|
|
125
|
-
###
|
162
|
+
### region
|
163
|
+
|
164
|
+
**Required** The AWS [region][region_docs] to use.
|
165
|
+
|
166
|
+
If the environment variable `AWS_REGION` is populated that will be used.
|
167
|
+
Otherwise the default is `"us-east-1"`.
|
168
|
+
|
169
|
+
### subnet\_id
|
170
|
+
|
171
|
+
The EC2 [subnet][subnet_docs] to use.
|
172
|
+
|
173
|
+
The default is unset, or `nil`.
|
174
|
+
|
175
|
+
### tags
|
176
|
+
|
177
|
+
The Hash of EC tag name/value pairs which will be applied to the instance.
|
178
|
+
|
179
|
+
The default is `{ "created-by" => "test-kitchen" }`.
|
180
|
+
|
181
|
+
### user_data
|
182
|
+
|
183
|
+
The user_data script or the path to a script to feed the instance.
|
184
|
+
Use bash to install dependencies or download artifacts before chef runs.
|
185
|
+
This is just for some cases. If you can do the stuff with chef, then do it with
|
186
|
+
chef!
|
187
|
+
|
188
|
+
The default is unset, or `nil`.
|
189
|
+
|
190
|
+
### iam\_profile\_name
|
191
|
+
|
192
|
+
The EC2 IAM profile name to use.
|
193
|
+
|
194
|
+
The default is `nil`.
|
195
|
+
|
196
|
+
### price
|
197
|
+
|
198
|
+
The price you bid in order to submit a spot request. An additional step will be required during the spot request process submission. If no price is set, it will use an on-demand instance.
|
199
|
+
|
200
|
+
The default is `nil`.
|
201
|
+
|
202
|
+
## Disk Configuration
|
203
|
+
|
204
|
+
### ebs\_volume\_size
|
205
|
+
|
206
|
+
**Deprecated** See [block_device_mappings](#config-block_device_mappings) below.
|
126
207
|
|
127
|
-
|
208
|
+
Size of ebs volume in GB.
|
128
209
|
|
129
|
-
|
210
|
+
### ebs\_delete\_on\_termination
|
130
211
|
|
131
|
-
|
212
|
+
**Deprecated** See [block_device_mappings](#config-block_device_mappings) below.
|
213
|
+
|
214
|
+
`true` if you want ebs volumes to get deleted automatically after instance is terminated, `false` otherwise
|
215
|
+
|
216
|
+
### ebs\_device\_name
|
217
|
+
|
218
|
+
**Deprecated** See [block_device_mappings](#config-block_device_mappings) below.
|
219
|
+
|
220
|
+
name of your ebs device, for example: `/dev/sda1`
|
221
|
+
|
222
|
+
### <a name="config-block_device_mappings"></a> block\_device\_mappings
|
223
|
+
|
224
|
+
A list of block device mappings for the machine. An example of all available keys looks like:
|
225
|
+
```yaml
|
226
|
+
block_device_mappings:
|
227
|
+
- ebs_device_name: /dev/sda1
|
228
|
+
ebs_volume_size: 20
|
229
|
+
ebs_delete_on_termination: true
|
230
|
+
- ebs_device_name: /dev/sda2
|
231
|
+
ebs_volume_type: gp2
|
232
|
+
ebs_virtual_name: test
|
233
|
+
ebs_volume_size: 15
|
234
|
+
ebs_delete_on_termination: true
|
235
|
+
ebs_snapshot_id: snap-0015d0bc
|
236
|
+
```
|
237
|
+
|
238
|
+
The keys `ebs_device_name`, `ebs_volume_size` and `ebs_delete_on_termination` are required for every mapping.
|
239
|
+
For backwards compatiability a default `block_device_mappings` will be created if none are listed and the deprecated
|
240
|
+
storage config keys are present.
|
241
|
+
|
242
|
+
The keys `ebs_volume_type`, `ebs_virtual_name` and `ebs_snapshot_id` are optional. See
|
243
|
+
[Amazon EBS Volume Types](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) to find out more about
|
244
|
+
volume types. `ebs_volume_type` defaults to `standard` but can also be `gp2` or `io1`.
|
245
|
+
|
246
|
+
If you have a block device mapping with a `ebs_device_name` equal to the root storage device name on your
|
247
|
+
[image](#config-image-id) then the provided mapping will replace the settings in the image.
|
248
|
+
|
249
|
+
If this is not provided it will use the default block_device_mappings from the AMI.
|
250
|
+
|
251
|
+
### ebs\_optimized
|
252
|
+
|
253
|
+
Option to launch EC2 instance with optimized EBS volume. See
|
254
|
+
[Amazon EC2 Instance Types](http://aws.amazon.com/ec2/instance-types/) to find
|
255
|
+
out more about instance types that can be launched as EBS-optimized instances.
|
256
|
+
|
257
|
+
The default is `false`.
|
258
|
+
|
259
|
+
## Network and Communication Configuration
|
260
|
+
|
261
|
+
### associate\_public\_ip
|
262
|
+
|
263
|
+
AWS does not automatically allocate public IP addresses for instances created
|
264
|
+
within non-default [subnets][subnet_docs]. Set this option to `true` to force
|
265
|
+
allocation of a public IP and associate it with the launched instance.
|
266
|
+
|
267
|
+
If you set this option to `false` when launching into a non-default
|
268
|
+
[subnet][subnet_docs], Test Kitchen will be unable to communicate with the
|
269
|
+
instance unless you have a VPN connection to your
|
270
|
+
[Virtual Private Cloud][vpc_docs].
|
271
|
+
|
272
|
+
The default is `true` if you have configured a [subnet_id](#config-subnet-id),
|
273
|
+
or `false` otherwise.
|
274
|
+
|
275
|
+
### private\_ip\_address
|
276
|
+
|
277
|
+
The primary private IP address of your instance.
|
278
|
+
|
279
|
+
If you don't set this it will default to whatever DHCP address EC2 hands out.
|
280
|
+
|
281
|
+
### interface
|
132
282
|
|
133
283
|
The place from which to derive the hostname for communicating with the instance. May be `dns`, `public` or `private`. If this is unset, the driver will derive the hostname by failing back in the following order:
|
134
284
|
|
@@ -138,32 +288,53 @@ The place from which to derive the hostname for communicating with the instance.
|
|
138
288
|
|
139
289
|
The default is unset.
|
140
290
|
|
291
|
+
### ssh\_key
|
141
292
|
|
142
|
-
|
143
|
-
|
144
|
-
**Required** The AWS [region][region_docs] to use.
|
145
|
-
|
146
|
-
The default is `"us-east-1"`.
|
293
|
+
**Deprecated** Instead use the `transport.ssh_key` like
|
147
294
|
|
148
|
-
|
295
|
+
```ruby
|
296
|
+
transport:
|
297
|
+
ssh_key: ~/.ssh/id_rsa
|
298
|
+
```
|
149
299
|
|
150
300
|
Path to the private SSH key used to connect to the instance.
|
151
301
|
|
152
302
|
The default is unset, or `nil`.
|
153
303
|
|
154
|
-
###
|
304
|
+
### ssh\_timeout
|
155
305
|
|
156
|
-
|
306
|
+
**Deprecated** Instead use the `transport.connection_timeout` like
|
157
307
|
|
158
|
-
|
308
|
+
```ruby
|
309
|
+
transport:
|
310
|
+
connection_timeout: 60
|
311
|
+
```
|
159
312
|
|
160
|
-
|
313
|
+
The number of seconds to sleep before trying to SSH again.
|
161
314
|
|
162
|
-
The
|
315
|
+
The default is `1`.
|
163
316
|
|
164
|
-
|
317
|
+
### ssh\_retries
|
318
|
+
|
319
|
+
**Deprecated** Instead use the `transport.connection_retries` like
|
320
|
+
|
321
|
+
```ruby
|
322
|
+
transport:
|
323
|
+
connection_retries: 10
|
324
|
+
```
|
325
|
+
|
326
|
+
The number of times to retry SSH-ing into the instance.
|
327
|
+
|
328
|
+
The default is `3`.
|
165
329
|
|
166
|
-
###
|
330
|
+
### username
|
331
|
+
|
332
|
+
**Deprecated** Instead use the `transport.username` like
|
333
|
+
|
334
|
+
```ruby
|
335
|
+
transport:
|
336
|
+
username: ubuntu
|
337
|
+
```
|
167
338
|
|
168
339
|
The SSH username that will be used to communicate with the instance.
|
169
340
|
|
@@ -171,7 +342,7 @@ The default will be determined by the Platform name, if a default exists (see
|
|
171
342
|
[amis.json][amis_json]). If a default cannot be computed, then the default is
|
172
343
|
`"root"`.
|
173
344
|
|
174
|
-
##
|
345
|
+
## Example
|
175
346
|
|
176
347
|
The following could be used in a `.kitchen.yml` or in a `.kitchen.local.yml`
|
177
348
|
to override default configuration.
|
@@ -180,45 +351,29 @@ to override default configuration.
|
|
180
351
|
---
|
181
352
|
driver:
|
182
353
|
name: ec2
|
183
|
-
aws_access_key_id: KAS...
|
184
|
-
aws_secret_access_key: 3UK...
|
185
354
|
aws_ssh_key_id: id_rsa-aws
|
186
|
-
ssh_key: /path/to/id_rsa-aws
|
187
355
|
security_group_ids: ["sg-1a2b3c4d"]
|
188
356
|
region: us-east-1
|
189
|
-
availability_zone:
|
357
|
+
availability_zone: b
|
190
358
|
require_chef_omnibus: true
|
191
359
|
subnet_id: subnet-6d6...
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
```yaml
|
211
|
-
---
|
212
|
-
driver:
|
213
|
-
name: ec2
|
214
|
-
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY'] %>
|
215
|
-
aws_secret_access_key: <%= ENV['AWS_SECRET_KEY'] %>
|
216
|
-
aws_ssh_key_id: <%= ENV['AWS_SSH_KEY_ID'] %>
|
217
|
-
ssh_key: <%= File.expand_path('~/.ssh/id_rsa') %>
|
218
|
-
security_group_ids: ["sg-1a2b3c4d"]
|
219
|
-
region: us-east-1
|
220
|
-
availability_zone: us-east-1b
|
221
|
-
require_chef_omnibus: true
|
360
|
+
iam_profile_name: chef-client
|
361
|
+
instance_type: t2.micro
|
362
|
+
associate_public_ip: true
|
363
|
+
private_ip_address: 10.0.0.27
|
364
|
+
interface: dns
|
365
|
+
block_device_mappings:
|
366
|
+
- ebs_device_name: /dev/sda0
|
367
|
+
ebs_volume_type: gp2
|
368
|
+
ebs_virtual_name: test
|
369
|
+
ebs_volume_size: 15
|
370
|
+
ebs_delete_on_termination: true
|
371
|
+
|
372
|
+
transport:
|
373
|
+
ssh_key: /path/to/id_rsa-aws
|
374
|
+
connection_timeout: 10
|
375
|
+
connection_retries: 5
|
376
|
+
username: ubuntu
|
222
377
|
|
223
378
|
platforms:
|
224
379
|
- name: ubuntu-12.04
|
@@ -268,11 +423,12 @@ Apache 2.0 (see [LICENSE][license])
|
|
268
423
|
[amis_json]: https://github.com/test-kitchen/kitchen-ec2/blob/master/data/amis.json
|
269
424
|
[ami_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html
|
270
425
|
[aws_site]: http://aws.amazon.com/
|
271
|
-
[credentials_docs]: http://
|
272
|
-
[
|
426
|
+
[credentials_docs]: http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs
|
427
|
+
[aws_sdk_gem]: http://docs.aws.amazon.com/sdkforruby/api/index.html
|
273
428
|
[group_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
|
274
429
|
[instance_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
|
275
430
|
[key_id_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verifying-your-key-pair.html
|
276
431
|
[kitchenci]: http://kitchen.ci/
|
277
432
|
[region_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
|
278
433
|
[subnet_docs]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html
|
434
|
+
[vpc_docs]: http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/ExerciseOverview.html
|