Skip to content
Bootstrap AWS account with an ECS cluster running jenkins
HCL Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
container_definitions
jenkins-plugins
policies
scripts
user_data
.gitignore
LICENSE
README.md
ecs.tf
iam.tf
jenkins-plugins.txt
jenkins.tf
loggroup.tf
outputs.tf
provider.tf
repository.tf
security-groups.tf
templates.tf
terraform.tfvars.example
variables.tf

README.md

terraform-ecs-jenkins

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

### Usage

  1. Clone the repo
  2. cp terraform.tfvars.example terraform.tfvars
  3. edit terraform.tfvars with your details
  4. Run the plan -
terraform apply

For a full list of overridable variables see variables.tf

Jenkins backup

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

You can’t perform that action at this time.