Bootstrap AWS account with an ECS cluster running jenkins
This repo contains a Terraform plan to run an Amazon ECS cluster with a private Amazon ECR Docker registry. And Jenkins 2.0 running from a container with ability to build and run more Docker images.
This project is based on material in Capgemini/terraform-amazon-ecs.git but has deviated to a point where a fork no longer makes sense.
Includes -
- ECS cluster, launch configuration and autoscaling group
- ECR repository for one Docker application
- Jenkins container service with an ELB
- CloudFormation log group
### Prerequisites
- Terraform installed, recommended (>= 0.6.16). Head on over to https://www.terraform.io/downloads.html to grab the latest version.
- An AWS account http://aws.amazon.com/
- Install and configure the AWS CLI tools
### Usage
- Clone the repo
- cp terraform.tfvars.example terraform.tfvars
- edit terraform.tfvars with your details
- Run the plan -
terraform apply
For a full list of overridable variables see variables.tf
You can preserve your Jenkins settings by copying your /var/jenkins_home to the s3 bucket path defined by the variable s3_jenkins_backup eg: aws s3 sync /var/jenkins_home/ $s3_jenkins_backup