Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oddnetworks/terraform-amazon-ecs
Terraform files for deploying and running Amazon ECS (+ Private Docker Registry)
https://github.com/oddnetworks/terraform-amazon-ecs
Last synced: 3 months ago
JSON representation
Terraform files for deploying and running Amazon ECS (+ Private Docker Registry)
- Host: GitHub
- URL: https://github.com/oddnetworks/terraform-amazon-ecs
- Owner: oddnetworks
- License: mit
- Fork: true (Capgemini/terraform-amazon-ecs)
- Created: 2016-02-04T16:08:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-02-04T17:30:00.000Z (over 8 years ago)
- Last Synced: 2024-06-28T09:32:21.444Z (4 months ago)
- Language: HCL
- Size: 12.7 KB
- Stars: 5
- Watchers: 13
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: security-groups.tf
Awesome Lists containing this project
README
# Terraform AWS ECS (+ Docker Registry)
**Note** - This is still a work in progress, so expect issues and bugs .. Feel free to jump in and start fixing things.
This repo contains a [Terraform](https://www.terraform.io) plan to run up an [Amazon ECS](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) cluster with a private Docker registry.
Inspired from [http://blog.codeship.com/running-a-private-docker-registry-on-ec2/](http://blog.codeship.com/running-a-private-docker-registry-on-ec2/)
Includes -
* Private S3 bucket for container registry data
* Docker container running allingeek/registry:2-s3 (by default)
* ECS cluster, launch configuration and autoscaling group### Prerequisites
* Terraform installed, recommended (>= 0.6.3). Head on over to [https://www.terraform.io/downloads.html](https://www.terraform.io/downloads.html) to grab the latest version.
* An AWS account [http://aws.amazon.com/](http://aws.amazon.com/)### Usage
1. Clone the repo
2. Set some required variables -```
export TF_VAR_key_name=name of ssh key
export TF_VAR_key_file=the ssh key file to use
export TF_VAR_aws_access_key=The AWS access key ID
export TF_VAR_aws_secret_key=The AWS secret key
```
Run the plan -```
terraform apply
```Alternatively the variables can be passed on the command line e.g. -
```
terraform apply -var 'key_name=name' -var 'key_file=path_to_file' -var 'aws_access_key=access_key' -var 'aws_secret_key=secret_key'
```For a full list of overridable variables see ```variables.tf```
### Known issues
If you are using terraform v0.6.3 and encounter this error -
```
* aws_ecs_service.s3-registry-elb: InvalidParameterException: Unable to assume role and validate the listeners configured on your load balancer. Please verify the role being passed has the proper permissions.
status code: 400, request id: []
```This is probably down to this bug / issue with waits/timeouts - [https://github.com/hashicorp/terraform/issues/2869](https://github.com/hashicorp/terraform/issues/2869).
You can either compile terraform from the latest master branch, or re-run the terraform
apply again which should succeed the second time.