Foundation AMIs for Aminator

Peter Sankauskas edited this page Nov 11, 2013 · 8 revisions

Answers for AWS maintains a set of Foundation AMIs for use with Aminator and the Ansible Provisioner.

List of Foundation AMIs

Region Region Name AMI Snapshot
ap-northeast-1 Tokyo ami-1592f614 snap-bf0e019a
ap-southeast-1 Singapore ami-20a7f272 snap-b96c328c
ap-southeast-2 Sydney ami-431b8779 snap-c148d0f2
eu-west-1 Ireland ami-cdae43ba snap-4c7d7f52
sa-east-1 São Paulo ami-ab59ffb6 snap-41e3f8a8
us-east-1 N. Virginia ami-c9cb91a0 snap-a39bbaa5
us-west-1 N. California ami-86c0f6c3 snap-4dfe0547
us-west-2 Oregon ami-62c75c52 snap-d0019fef

Details

The Foundation AMI is just the latest LTS release from Ubuntu with Git and Ansible and installed. Nothing more.

The basis for these AMIs are the Ubuntu 12.04 LTS 'precise' Cloud Images. The images are all 64-bit and EBS backed.

Create your own Foundation AMI

You can easily create your own Foundation AMI by using the scripts provided here, or modifying them to your needs. There is also a CloudFormation Template called foundation-ami-maker.json that does all of the heavy lifting for you. The basic flow is:

  1. Bring up an EC2 instance using the CloudFormation script provided

$ aws cloudformation create-stack
--stack-name Foundation-maker
--template-url http://answers4aws.s3.amazonaws.com/foundation-ami-maker.json
--parameters ParameterKey=InstanceType,ParameterValue=t1.micro,ParameterKey=KeyName,ParameterValue=mykey

This script creates an IAM Role with the necessary permissions needed for AMI making.

__NOTE:__ Change _mykey_ to be your KeyPair

1. Poll the CloudFormation stack progress until you see the 3 steps in the output. It will look something like this:

``` bash
$ aws cloudformation describe-stacks
...
         "Outputs": [
             {
                 "Description": "Step 1: SSH to this instance using your KeyPair",
                 "OutputKey": "step001",
                 "OutputValue": "ssh -i mykey.pem ubuntu@ec2-12-12-12-12.compute.amazonaws.com"
             },
             {
                 "Description": "Step 2: Create a Foundation EBS volume",
                 "OutputKey": "step002",
                 "OutputValue": "./foundation-create-volume"
             },
             {
                 "Description": "Step 3: Create your Foundation AMI from the Foundation EBS volume",
                 "OutputKey": "step003",
                 "OutputValue": "./foundation-create-ami"
             }
         ],
         "StackName": "Foundation-maker",
         "StackStatus": "CREATE_COMPLETE",
  1. Then just follow the steps: 1) SSH into the instance, 2) Create the EBS Volume, 3) Create the Foundation AMI from the volume.

Between Steps 2 and 3, you can go into the chroot environment and make further customizations to the Foundation AMI. It is highly recommended to script that if you do.

Once you are done, you can delete the CloudFormation stack. The entire process is complete in under 30 minutes.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.