All Projects → turnerlabs → terraform-ecs-fargate-nlb

turnerlabs / terraform-ecs-fargate-nlb

Licence: Apache-2.0 license
A Terraform template used for provisioning network application stacks on AWS ECS Fargate

Programming Languages

HCL
1544 projects

Projects that are alternatives of or similar to terraform-ecs-fargate-nlb

xilution-selenium-grid
A Selenium Grid that Runs in AWS ECS Fargate.
Stars: ✭ 22 (-56%)
Mutual labels:  ecs, fargate
Containers Roadmap
This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
Stars: ✭ 4,132 (+8164%)
Mutual labels:  ecs, fargate
fargate-game-servers
This repository contains an example solution on how to scale a fleet of game servers on AWS Fargate on Elastic Container Service and route players to game sessions using a Serverless backend. Game Server data is stored in ElastiCache Redis. All resources are deployed with Infrastructure as Code using CloudFormation, Serverless Application Model,…
Stars: ✭ 30 (-40%)
Mutual labels:  ecs, fargate
ecsgo
Provides an interactive prompt to connect to ECS Containers using the ECS ExecuteCommand API.
Stars: ✭ 30 (-40%)
Mutual labels:  ecs, fargate
ddd-practitioners-ref
EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Stars: ✭ 276 (+452%)
Mutual labels:  ecs, fargate
terraform-aws-fargate
Terraform module to provision a Fargate-ready AWS infrastructure 🚀
Stars: ✭ 77 (+54%)
Mutual labels:  ecs, fargate
herogate
Heroku + AWS Fargate = Herogate 🚀 Deploy and manage containerized applications like Heroku on AWS
Stars: ✭ 17 (-66%)
Mutual labels:  ecs, fargate
ecs-taskmetadata-cloudwatch
An example sidecar container for Amazon ECS and AWS Fargate to enable task/container-level metrics on CloudWatch
Stars: ✭ 17 (-66%)
Mutual labels:  ecs, fargate
terraform-fargate-tutorial
A minimal set of Terraform to create a Fargate service
Stars: ✭ 32 (-36%)
Mutual labels:  ecs, fargate
aws-ecs-orb
An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
Stars: ✭ 48 (-4%)
Mutual labels:  ecs, fargate
container-demo
How can I manage microservices using ecs-cli?
Stars: ✭ 30 (-40%)
Mutual labels:  ecs, fargate
terraform-aws-ecs-alb-service-task
Terraform module which implements an ECS service which exposes a web service via ALB.
Stars: ✭ 108 (+116%)
Mutual labels:  ecs, fargate
harmony-ecs
A small archetypal ECS focused on compatibility and performance
Stars: ✭ 33 (-34%)
Mutual labels:  ecs
fargate-create
A CLI tool for scaffolding out new AWS ECS/Fargate applications based on Terraform templates and Fargate CLI
Stars: ✭ 103 (+106%)
Mutual labels:  fargate
neo4j-aws-causal-cluster
Neo4j Enterprise Causal Cluster on AWS ECS by GetSocial
Stars: ✭ 24 (-52%)
Mutual labels:  ecs
container-service-discovery
Service Discovery in Container Orchestration Frameworks on AWS
Stars: ✭ 45 (-10%)
Mutual labels:  ecs
hk-independent-bus-eta
獨立無廣告巴士預報 App
Stars: ✭ 20 (-60%)
Mutual labels:  nlb
ecs
A dependency free, lightweight, fast Entity-Component System (ECS) implementation in Swift
Stars: ✭ 79 (+58%)
Mutual labels:  ecs
ECSCombat
A space battle simulation, based around Unity ECS framework
Stars: ✭ 81 (+62%)
Mutual labels:  ecs
apecs
A petite entity component system
Stars: ✭ 17 (-66%)
Mutual labels:  ecs

Terraform ECS Fargate NLB

A set of Terraform templates used for provisioning network application stacks on AWS ECS Fargate using an NLB (network load balancer) rather than ALB.

diagram

The templates are designed to be customized. The optional components can be removed by simply deleting the .tf file.

The templates are used for managing infrastructure concerns and, as such, the templates deploy a default backend docker image. We recommend using the fargate CLI for managing application concerns like deploying your actual application images and environment variables on top of this infrastructure. The fargate CLI can be used to deploy applications from your laptop or in CI/CD pipelines.

Components

base

These components are shared by all environments.

Name Description Optional
main.tf AWS provider, output
state.tf S3 bucket backend for storing Terraform remote state
ecr.tf ECR repository for application (all environments share)

env/dev

These components are for a specific environment. There should be a corresponding directory for each environment that is needed.

Name Description Optional
main.tf Terrform remote state, AWS provider, output
ecs.tf ECS Cluster, Service, Task Definition, ecsTaskExecutionRole, CloudWatch Log Group
nlb.tf NLB, Target Group, Listener
nsg.tf NSG for NLB and Task
dashboard.tf CloudWatch dashboard: CPU, memory, and HTTP-related metrics Yes
role.tf Application Role for container Yes
cicd.tf IAM user that can be used by CI/CD systems Yes
autoscale-perf.tf Performance-based auto scaling Yes
autoscale-time.tf Time-based auto scaling Yes
logs-logzio.tf Ship container logs to logz.io Yes

Usage

Typically, the base Terraform will only need to be run once, and then should only need changes very infrequently. After the base is built, each environment can be built.

# Move into the base directory
$ cd base

# Sets up Terraform to run
$ terraform init

# Executes the Terraform run
$ terraform apply

# Now, move into the dev environment
$ cd ../env/dev

# Sets up Terraform to run
$ terraform init

# Executes the Terraform run
$ terraform apply

fargate-create

Alternatively you can use the fargate-create CLI to scaffold new projects based on this template.

install

curl -s get-fargate-create.turnerlabs.io | sh

create an input vars file (terraform.tfvars)

# app/env to scaffold
app = "my-app"
environment = "dev"

internal = true
container_port = "8080"
replicas = "1"
region = "us-east-1"
aws_profile = "default"
saml_role = "admin"
vpc = "vpc-123"
private_subnets = "subnet-123,subnet-456"
public_subnets = "subnet-789,subnet-012"
tags = {
  application   = "my-app"
  environment   = "dev"
  team          = "my-team"
  customer      = "my-customer"
  contact-email = "[email protected]"
}
$ fargate-create -f terraform.tfvars -t [email protected]:turnerlabs/terraform-ecs-fargate-nlb

Additional Information

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].