README.md in kitchen-ec2-0.7.0 vs README.md in kitchen-ec2-0.8.0
- old
+ new
@@ -1,12 +1,12 @@
# <a name="title"></a> Kitchen::Ec2: A Test Kitchen Driver for Amazon EC2
[![Gem Version](https://badge.fury.io/rb/kitchen-ec2.png)](http://badge.fury.io/rb/kitchen-ec2)
-[![Build Status](https://travis-ci.org/opscode/kitchen-ec2.png)](https://travis-ci.org/opscode/kitchen-ec2)
-[![Code Climate](https://codeclimate.com/github/opscode/kitchen-ec2.png)](https://codeclimate.com/github/opscode/kitchen-ec2)
+[![Build Status](https://travis-ci.org/test-kitchen/kitchen-ec2.png)](https://travis-ci.org/test-kitchen/kitchen-ec2)
+[![Code Climate](https://codeclimate.com/github/test-kitchen/kitchen-ec2.png)](https://codeclimate.com/github/test-kitchen/kitchen-ec2)
-A Test Kitchen Driver for Amazon EC2.
+A [Test Kitchen][kitchenci] Driver for Amazon EC2.
This driver uses the [fog gem][fog_gem] to provision and destroy EC2
instances. Use Amazon's cloud for your infrastructure testing!
## <a name="requirements"></a> Requirements
@@ -25,37 +25,37 @@
supported:
```ruby
---
platforms:
-- name: ubuntu-10.04
-- name: ubuntu-12.04
-- name: ubuntu-12.10
-- name: ubuntu-13.04
-- name: centos-6.4
-- name: debian-7.1.0
+ - name: ubuntu-10.04
+ - name: ubuntu-12.04
+ - name: ubuntu-12.10
+ - name: ubuntu-13.04
+ - name: centos-6.4
+ - name: debian-7.1.0
```
This will effectively generate a configuration similar to:
```ruby
---
platforms:
-- name: ubuntu-10.04
- driver_config:
- image_id: ami-1ab3ce73
- username: ubuntu
-- name: ubuntu-12.04
- driver_config:
- image_id: ami-2f115c46
- username: ubuntu
-# ...
-- name: centos-6.4
- driver_config:
- image_id: ami-bf5021d6
- username: root
-# ...
+ - name: ubuntu-10.04
+ driver:
+ image_id: ami-1ab3ce73
+ username: ubuntu
+ - name: ubuntu-12.04
+ driver:
+ image_id: ami-2f115c46
+ username: ubuntu
+ # ...
+ - name: centos-6.4
+ driver:
+ image_id: ami-bf5021d6
+ username: root
+ # ...
```
For specific default values, please consult [amis.json][amis_json].
## <a name="config"></a> Configuration
@@ -85,19 +85,33 @@
**Required** The EC2 [SSH key id][key_id_docs] to use.
The default will be read from the `AWS_SSH_KEY_ID` environment variable if set,
or `nil` otherwise.
+### endpoint
+
+The API endpoint for executing EC2 commands.
+
+The default will be computed from the AWS region name for the instance.
+
### <a name="config-flavor-id"></a> flavor\_id
The EC2 [instance type][instance_docs] (also known as size) to use.
The default is `"m1.small"`.
-### <a name="config-groups"></a> groups
+### <a name="config-ebs-optimized"></a> ebs\_optimized
-An Array of EC [security groups][group_docs] which will be applied to the
+Option to launch EC2 instance with optimized EBS volume. See
+[Amazon EC2 Instance Types](http://aws.amazon.com/ec2/instance-types/) to find
+out more about instance types that can be launched as EBS-optimized instances.
+
+The default is `false`.
+
+### <a name="config-security-group-ids"></a> security_group_ids
+
+An Array of EC2 [security groups][group_docs] which will be applied to the
instance.
The default is `["default"]`.
### <a name="config-image-id"></a> image\_id
@@ -112,32 +126,27 @@
The SSH port number to be used when communicating with the instance.
The default is `22`.
-### <a name="config-region"></a> region
+### < name="interface"></a> interface
-**Required** The AWS [region][region_docs] to use.
+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:
-The default is `"us-east-1"`.
+1. DNS Name
+2. Public IP Address
+3. Private IP Address
-### <a name="config-require-chef-omnibus"></a> require\_chef\_omnibus
+The default is unset.
-Determines whether or not a Chef [Omnibus package][chef_omnibus_dl] will be
-installed. There are several different behaviors available:
-* `true` - the latest release will be installed. Subsequent converges
- will skip re-installing if chef is present.
-* `latest` - the latest release will be installed. Subsequent converges
- will always re-install even if chef is present.
-* `<VERSION_STRING>` (ex: `10.24.0`) - the desired version string will
- be passed the the install.sh script. Subsequent converges will skip if
- the installed version and the desired version match.
-* `false` or `nil` - no chef is installed.
+### <a name="config-region"></a> region
-The default value is unset, or `nil`.
+**Required** The AWS [region][region_docs] to use.
+The default is `"us-east-1"`.
+
### <a name="config-ssh-key"></a> ssh\_key
Path to the private SSH key used to connect to the instance.
The default is unset, or `nil`.
@@ -146,17 +155,10 @@
The EC2 [subnet][subnet_docs] to use.
The default is unset, or `nil`.
-### <a name="config-sudo"></a> sudo
-
-Whether or not to prefix remote system commands such as installing and
-running Chef with `sudo`.
-
-The default is `true`.
-
### <a name="config-tags"></a> tags
The Hash of EC tag name/value pairs which will be applied to the instance.
The default is `{ "created-by" => "test-kitchen" }`.
@@ -174,59 +176,61 @@
The following could be used in a `.kitchen.yml` or in a `.kitchen.local.yml`
to override default configuration.
```yaml
---
-driver_plugin: ec2
-driver_config:
+driver:
+ name: ec2
aws_access_key_id: KAS...
aws_secret_access_key: 3UK...
aws_ssh_key_id: id_rsa-aws
ssh_key: /path/to/id_rsa-aws
+ security_group_ids: ["sg-1a2b3c4d"]
region: us-east-1
availability_zone: us-east-1b
require_chef_omnibus: true
subnet_id: subnet-6d6...
platforms:
-- name: ubuntu-12.04
- driver_config:
- image_id: ami-fd20ad94
- username: ubuntu
-- name: centos-6.3
- driver_config:
- image_id: ami-ef5ff086
- username: ec2-user
+ - name: ubuntu-12.04
+ driver:
+ image_id: ami-fd20ad94
+ username: ubuntu
+ - name: centos-6.3
+ driver:
+ image_id: ami-ef5ff086
+ username: ec2-user
suites:
# ...
```
Both `.kitchen.yml` and `.kitchen.local.yml` files are pre-processed through
ERB which can help to factor out secrets and credentials. For example:
```yaml
---
-driver_plugin: ec2
-driver_config:
+driver:
+ name: ec2
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_SSH_KEY_ID'] %>
ssh_key: <%= File.expand_path('~/.ssh/id_rsa') %>
+ security_group_ids: ["sg-1a2b3c4d"]
region: us-east-1
availability_zone: us-east-1b
require_chef_omnibus: true
platforms:
-- name: ubuntu-12.04
- driver_config:
- image_id: ami-fd20ad94
- username: ubuntu
-- name: centos-6.3
- driver_config:
- image_id: ami-ef5ff086
- username: ec2-user
+ - name: ubuntu-12.04
+ driver:
+ image_id: ami-fd20ad94
+ username: ubuntu
+ - name: centos-6.3
+ driver:
+ image_id: ami-ef5ff086
+ username: ec2-user
suites:
# ...
```
@@ -253,21 +257,22 @@
Apache 2.0 (see [LICENSE][license])
[author]: https://github.com/fnichol
-[issues]: https://github.com/opscode/kitchen-ec2/issues
-[license]: https://github.com/opscode/kitchen-ec2/blob/master/LICENSE
-[repo]: https://github.com/opscode/kitchen-ec2
+[issues]: https://github.com/test-kitchen/kitchen-ec2/issues
+[license]: https://github.com/test-kitchen/kitchen-ec2/blob/master/LICENSE
+[repo]: https://github.com/test-kitchen/kitchen-ec2
[driver_usage]: http://docs.kitchen-ci.org/drivers/usage
-[chef_omnibus_dl]: http://www.opscode.com/chef/install/
+[chef_omnibus_dl]: http://www.getchef.com/chef/install/
-[amis_json]: https://github.com/opscode/kitchen-ec2/blob/master/data/amis.json
+[amis_json]: https://github.com/test-kitchen/kitchen-ec2/blob/master/data/amis.json
[ami_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html
[aws_site]: http://aws.amazon.com/
[credentials_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SettingUp_CommandLine.html#using-credentials-access-key
[fog_gem]: http://fog.io/
[group_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
[instance_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
[key_id_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verifying-your-key-pair.html
+[kitchenci]: http://kitchen.ci/
[region_docs]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
[subnet_docs]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html