Sign inSign up

edza78/ansibledeployec2

By edza78

•Updated almost 8 years ago

Container with Ansible and Boto used to deploy Docker in an EC2 instance.

Image
0

251

edza78/ansibledeployec2 repository overview

This container will deploy Docker in Amazon EC2 using an Ubuntu AMI.

⁠** Example:**

docker container run --rm --name=ansibleEC2
-h ansibleEC2.dev
-v $PWD/aws_full.bash:/ec2user/aws.bash
-v $PWD/varsec2.yml:/ec2user/varsec2.yml
-v $PWD/ec2remote.pem:/ec2user/ec2remote.pem
-v $PWD/deploy.log:/ec2user/deploy.log
--rm -itd edza78/ansibledeployec2:1.0

⁠** Requirements: **

⁠Create IAM User.

⁠Store EC2 credentials (.pem file) in file ec2remote.pem

⁠** Required files: **

⁠aws.bash: File with the keys for CLI access.

Default values # EC2 CLI account key. export AWS_ACCESS_KEY_ID='YOUR_ACCESS_KEY_HERE' export AWS_SECRET_ACCESS_KEY='YOUR_SECRET_KEY_HERE'

⁠varsec2.yml: File with EC2 specific values.

Default values # Region to use aws_region: "us-east-2" # Security group with port 22 and 443 enabled sec_group: "default" # EC2 Key aws_key: "ec2remote" # Ubuntu AMI-ID, must exists in selected Region. aws_image: "ami-0f65671a86f061fcd" # Instances to start count: 1 # Instance type ins_type: "t2.micro" # Tag for EC2 console tag: ansibleec2 # Live time in minutes for the Instances, Amazon charges 1 hour for every boot. # Define it as (Hours*60)-10. ie. 1 Hour=50, 2 Hours=110. livetime: 50

⁠ec2remote.pem: Certificate file for EC2_KEY.

⁠deploy.log: Log file to register deploy status.

Tag summary

Content type

Image

Digest

Size

88.1 MB

Last updated

almost 8 years ago

docker pull edza78/ansibledeployec2:1.0