Skip to content
Artem Chubchenko edited this page Feb 11, 2021 · 1 revision

Technology Stack

AWS Stack

  • ECR - storage for all Docker images
  • ECS - service for running containers on EC2 instances
  • EC2 - instance for running application
  • RDS - instance for running a cloud database (PostgreSQL)
  • ElastiCache - instance for running a key-value database (Redis)
  • ALB - tool for balancing all the requests pushed
  • S3 - object service storage
  • CloudWatch - storage for logs

How to setup?

  • Setup [Terraform CLI 12.X](https://learn.hashicorp.com/tutorials/terraform/install-cli)
  • Add next credentials (REGION, ACCESS_KEY, ACCESS_SECRET_KEY) to
    • ~/.aws/credentials
    • ~/.aws/config
  • Override all boilerplate name in .terraform
  • Sign up to Terraform Cloud -) Create two workspaces staging and production. In each workspace add terraform variables:
    • DB_PASSWORD
    • DB_USERNAME
    • AWS_DEFAULT_REGION
    • AWS_SERCET_ACCESS_KEY
    • AWS_ACCESS_KEY_ID
  • Attention!

Add your ssh public key to the

  • .terraform/staging/ssh_keys/boilerplate-api-staging.pub
  • .terraform/staging/ssh_keys/boilerplate-api-production.pub.
  • Move to .terraform/staging perform
    • terraform login
    • terraform init
    • terraform applay - to raise STAGING server
  • Move to .terraform/production perform
    • terraform login
    • terraform init
    • terraform applay to raise PRODUCTION server
  • Check AWS resources and terraform state on terraform cloud!
Clone this wiki locally