Skip to content

Foundation AMIs for Aminator

Peter Sankauskas edited this page Aug 14, 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-bb72e2ba snap-00000000
ap-southeast-1 Singapore ami-62a6ee30 snap-00000000
ap-southeast-2 Sydney ami-0974e633 snap-00000000
eu-west-1 Ireland ami-d30119a7 snap-00000000
sa-east-1 São Paulo ami-3d70d420 snap-00000000
us-east-1 N. Virginia ami-6637760f snap-00000000
us-west-1 N. California ami-eab59eaf snap-00000000
us-west-2 Oregon ami-2cac311c snap-4ae7f470

Details

The Foundation AMI is just the latest LTS release from Ubuntu, running on XFS (rather than ext3 or ext4) with Git and Ansible 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.

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

Clone this wiki locally