Sign inSign up

sungardas/aws-cfn-bootstrap

By sungardas

Updated over 8 years ago

Bootstrap AWS ec2 with CloudFormation and Docker

Image
0

9.8K

sungardas/aws-cfn-bootstrap repository overview

aws-cfn-bootstrap

Bootstrap AWS ec2 with CloudFormation and Docker

GitHub | DockerHub

Summary

The host is requried to have docker installed. This can be done with UserData either through cloud-init or a shell script.

Once docker is available this image can be run with:

docker run \
  -v /var/run/docker.sock:/var/run/docker.sock
  -e [AWS_DEFAULT_REGION=] -e [CFN_METADATA_RESOURCE=] -e ...
  sungardas/aws-cfn-bootstrap

The container will interface with CloudFormation, can access CloudFormation Metadata and is able to respond to a CreationPolicy or WaitCondition.

Useful for implementations that only run Docker containers and for minimal operating systems like rancheros

AWS::CloudFormation::Init can contain run docker which is linked to the host. Images will be pulled and run by the host docker engine.

Docker Version

This project creates tags for different versions of docker. Use a tag that matches the version of docker the host is running.

sungardas/aws-cfn-bootstrap:1.9
sungardas/aws-cfn-bootstrap:1.10
sungardas/aws-cfn-bootstrap:1.11
sungardas/aws-cfn-bootstrap:1.12

Available Commands

The image contians the latest cfn-bootstrap scripts, the ec2-metadata query tool and the aws cli.

Environment Variables

AWS_DEFAULT_REGION - The AWS region to run against.

CFN_CONFIG_SETS - List of config sets to run.

CFN_METADATA_RESOURCE - The resource containing AWS::CloudFormation::Init

CFN_NOTIFY_RESOURCE - The resource to send notification to when complete. Usually one with CreationPolicy defined.

CFN_STACK_NAME - The name of the CloudFormation Stack

ECR_REGISTRY_IDS - If set, will run aws ecr get-login and populate the host docker engine with credentials for ECR. Recommened to use with an ec2 instance profile.

Credits

Inspired by docker-aws

License

Apache-2.0 ©

Sungard Availability Services | Labs

Sungard Availability Services | Labs

This project is maintained by the Labs team at Sungard Availability Services

GitHub: https://sungardas.github.io

Blog: http://blog.sungardas.com/CTOLabs/

Tag summary

Content type

Image

Digest

Size

60.1 MB

Last updated

over 8 years ago

docker pull sungardas/aws-cfn-bootstrap