2015-04-11 16:15:49 +02:00
|
|
|
EC2
|
|
|
|
===
|
|
|
|
|
|
|
|
The `EC2 <http://aws.amazon.com/ec2/>`__ provider automatically creates
|
|
|
|
a volume for bootstrapping (be it EBS or S3), makes a snapshot of it
|
|
|
|
once it is done and registers it as an AMI. EBS volume backing only
|
|
|
|
works on an EC2 host while S3 backed volumes *should* work locally (at
|
|
|
|
this time however they do not, a fix is in the works).
|
|
|
|
|
2015-04-19 13:05:58 +02:00
|
|
|
Unless `the cloud-init plugin <../../plugins/cloud_init>`__
|
2015-04-12 14:32:47 +02:00
|
|
|
is used, special startup scripts will be installed that automatically fetch the
|
2015-04-11 16:15:49 +02:00
|
|
|
configured authorized\_key from the instance metadata and save or run
|
|
|
|
any userdata supplied (if the userdata begins with ``#!`` it will be
|
|
|
|
run).
|
|
|
|
|
|
|
|
Credentials
|
|
|
|
-----------
|
|
|
|
|
|
|
|
The AWS credentials can be configured in two ways: Via the manifest or
|
|
|
|
through environment variables. To bootstrap S3 backed instances you will
|
|
|
|
need a user certificate and a private key in addition to the access key
|
|
|
|
and secret key, which are needed for bootstraping EBS backed instances.
|
|
|
|
|
|
|
|
The settings describes below should be placed in the ``credentials`` key
|
|
|
|
under the ``provider`` section.
|
|
|
|
|
2015-04-28 01:21:07 -03:00
|
|
|
- ``access-key``: AWS access-key.
|
2015-04-11 16:15:49 +02:00
|
|
|
May also be supplied via the environment variable
|
|
|
|
``$AWS_ACCESS_KEY``
|
2015-04-28 01:21:07 -03:00
|
|
|
``required for EBS & S3 backing``
|
|
|
|
- ``secret-key``: AWS secret-key.
|
2015-04-11 16:15:49 +02:00
|
|
|
May also be supplied via the environment variable
|
|
|
|
``$AWS_SECRET_KEY``
|
2015-04-28 01:21:07 -03:00
|
|
|
``required for EBS & S3 backing``
|
|
|
|
- ``certificate``: Path to the AWS user certificate. Used for
|
2015-04-11 16:15:49 +02:00
|
|
|
uploading the image to an S3 bucket.
|
|
|
|
May also be supplied via the environment variable
|
|
|
|
``$AWS_CERTIFICATE``
|
2015-04-28 01:21:07 -03:00
|
|
|
``required for S3 backing``
|
|
|
|
- ``private-key``: Path to the AWS private key. Used for uploading
|
2015-04-11 16:15:49 +02:00
|
|
|
the image to an S3 bucket.
|
|
|
|
May also be supplied via the environment variable
|
|
|
|
``$AWS_PRIVATE_KEY``
|
2015-04-28 01:21:07 -03:00
|
|
|
``required for S3 backing``
|
|
|
|
- ``user-id``: AWS user ID. Used for uploading the image to an S3
|
2015-04-11 16:15:49 +02:00
|
|
|
bucket.
|
|
|
|
May also be supplied via the environment variable ``$AWS_USER_ID``
|
2015-04-28 01:21:07 -03:00
|
|
|
``required for S3 backing``
|
2015-04-11 16:15:49 +02:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
.. code:: yaml
|
|
|
|
|
|
|
|
---
|
|
|
|
provider:
|
|
|
|
name: ec2
|
|
|
|
virtualization: hvm
|
|
|
|
enhanced_networking: simple
|
|
|
|
credentials:
|
|
|
|
access-key: AFAKEACCESSKEYFORAWS
|
|
|
|
secret-key: thes3cr3tkeyf0ryourawsaccount/FS4d8Qdva
|
|
|
|
|
|
|
|
Dependencies
|
|
|
|
------------
|
|
|
|
|
|
|
|
To communicate with the AWS API `boto <https://github.com/boto/boto>`__
|
|
|
|
is required (version 2.14.0 or higher) you can install boto with
|
|
|
|
``pip install boto`` (on wheezy, the packaged version is too low). S3
|
|
|
|
images are chopped up and uploaded using
|
|
|
|
`euca2ools <https://github.com/eucalyptus/euca2ools>`__ (install with
|
|
|
|
``apt-get install euca2ools``).
|