Giter Site home page Giter Site logo

aws-ecs-workshop's Introduction

AWS ECS Workshop completed infrastructure

Based on the AWS ECS workshop
Rewrite CloudFormation core stack and provision scripts into Terraform

  1. Used file-layout isolation (per services and per environment)
  2. Used S3 remote backends isolation (per services and per system)
  3. Used simple ALB module from example repo
  4. Used static files S3 and DynamoDB data fast deployment with terraform (not production-ready solution)

Prerequisites:

  • terraform >= 0.13
  • amazon-ecr-credential-helper (for push images into ECR)
  • tfsec >= v0.36.11 (for pre-commit usage)
  • tflint >= 0.23.0 (for pre-commit usage)
  • checkov >= 1.0.675 (for pre-commit usage)

Pre-commit installation:

git secrets --install
pre-commit install -f
pre-commit run -a

Deploy Monolith application with Like Microservice (Strangler pattern)

  1. Create buckets and DynamoDB table for Terraform remote backends (global/s3)
cd global/s3
make plan
make apply
  1. Configure backend.config and terraform.tfvars with details in each Staging dir

  2. Create Staging ECR (staging/ecr)

cd staging/ecr
make plan
make apply
  1. Build Docker images and push it to ECR via script:
cd app
./build_images.sh <aws account id>
  1. Create DynamoDB table with data (staging/dynamodb)
cd staging/dynamodb
make plan
make apply
  1. Create Staging VPC (staging/vpc)
cd staging/vpc
make plan
make apply
  1. Create Staging ECS cluster (staging/ecs) and check API ALB endpoint
cd staging/ecs
make plan
make apply
  1. Upload FrontEnd (staging/s3web) and check S3 website URL
cd staging/s3web
make plan
make apply
  1. Load testing example to check ECS Like service AutoScaling
ab -p data.json -c 20 -n 10000 <ALB FQDN>/mysfits/33e1fbd4-2fd8-45fb-a42f-f92551694506/like
  1. Destroy Infrastructure in strict reverse order, otherwise tfstate dependenices will be broken

aws-ecs-workshop's People

Contributors

silazare avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.