All Projects → brikis98 → Infrastructure As Code Talk

brikis98 / Infrastructure As Code Talk

Sample code for the talk "Infrastructure-as-code: running microservices on AWS with Docker, ECS, and Terraform"

Projects that are alternatives of or similar to Infrastructure As Code Talk

Intro To Terraform
Sample code for the blog post series "A Comprehensive Guide to Terraform."
Stars: ✭ 550 (+5.77%)
Mutual labels:  samples, aws, terraform, hcl
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-89.81%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Aws Ecs Fargate
Terraform module which creates ECS Fargate resources on AWS.
Stars: ✭ 35 (-93.27%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Ecs Autoscale Alb
ECS cluster with instance and service autoscaling configured and running behind an ALB with path based routing set up
Stars: ✭ 60 (-88.46%)
Mutual labels:  aws, ecs, terraform, hcl
Ecs Pipeline
☁️ 🐳 ⚡️ 🚀 Create environment and deployment pipelines to ECS Fargate with CodePipeline, CodeBuild and Github using Terraform
Stars: ✭ 85 (-83.65%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Fargate Example
Example repository to run an ECS cluster on Fargate
Stars: ✭ 206 (-60.38%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Examples
Terraform samples for all the major clouds you can copy and paste. The future, co-created.
Stars: ✭ 256 (-50.77%)
Mutual labels:  samples, aws, terraform, hcl
Terraform Aws Ecs Codepipeline
Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS https://cloudposse.com/
Stars: ✭ 85 (-83.65%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Ecs Fargate
A Terraform template used for provisioning web application stacks on AWS ECS Fargate
Stars: ✭ 293 (-43.65%)
Mutual labels:  aws, ecs, terraform, hcl
Aws Ecs Airflow
Run Airflow in AWS ECS(Elastic Container Service) using Fargate tasks
Stars: ✭ 107 (-79.42%)
Mutual labels:  aws, ecs, terraform, hcl
Terraform Aws Ecs Container Definition
Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
Stars: ✭ 217 (-58.27%)
Mutual labels:  aws, ecs, terraform, hcl
Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (-25.96%)
Mutual labels:  aws, terraform, hcl
Terraform Up And Running Code
Code samples for the book "Terraform: Up & Running" by Yevgeniy Brikman
Stars: ✭ 1,739 (+234.42%)
Mutual labels:  samples, terraform, hcl
Terraform Aws Tfstate Backend
Terraform module that provision an S3 bucket to store the `terraform.tfstate` file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption.
Stars: ✭ 229 (-55.96%)
Mutual labels:  aws, terraform, hcl
Eventstormingworkshop
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: ✭ 184 (-64.62%)
Mutual labels:  microservices, aws, ecs
Designing Cloud Native Microservices On Aws
Introduce a fluent way to design cloud native microservices via 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: ✭ 131 (-74.81%)
Mutual labels:  microservices, aws, ecs
Inframap
Read your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.
Stars: ✭ 430 (-17.31%)
Mutual labels:  aws, terraform, hcl
Cloudblock
Cloudblock automates deployment of secure ad-blocking for all of your devices - even when mobile. Step-by-step text and video guides included! Compatible clouds include AWS, Azure, Google Cloud, and Oracle Cloud. Cloudblock deploys Wireguard VPN, Pi-Hole DNS Ad-blocking, and DNS over HTTPS in a cloud provider - or locally - using Terraform and Ansible.
Stars: ✭ 257 (-50.58%)
Mutual labels:  aws, terraform, hcl
Azure arc
Automated Azure Arc environments
Stars: ✭ 224 (-56.92%)
Mutual labels:  aws, terraform, hcl
Terraform Aws Eks Cluster
Terraform module for provisioning an EKS cluster
Stars: ✭ 256 (-50.77%)
Mutual labels:  aws, terraform, hcl

Infrastructure as Code Talk

This repo contains the sample code for the talk Infrastructure-as-code: running microservices on AWS with Docker, Terraform, and ECS. It includes a couple sample Dockerized microservices and the Terraform code to deploy them on AWS:

Architecture

Note: This repo is for demonstration purposes only and should NOT be used to run anything important. For production-ready version of this code and many other types of infrastructure, check out Gruntwork.

Quick start

Running the microservices locally

To run the rails-frontend and sinatra-backend on your local dev box:

  1. Install Docker.
  2. docker-compose up
  3. Test sinatra-backend by going to http://localhost:4567.
  4. Test the rails-frontend (and its connectivity to the sinatra-backend) by going to http://localhost:3000.

The docker-compose.yml file mounts rails-frontend and sinatra-backend folders as volumes in each Docker image, so any changes you make to the apps on your host OS will automatically be reflected in the running Docker container. This lets you do iterative "make-a-change-and-refresh" style development.

Deploying the microservices in AWS

To deploy the microservices to your AWS account, see the terraform-configurations README.

Using your own Docker images

By default, docker-compose.yml and the terraform-configurations are using the gruntwork/rails-frontend and gruntwork/sinatra-backend Docker images. These are images I pushed to the Gruntwork Docker Hub account to make it easy for you to try this repo quickly. Obviously, in the real world, you'll want to use your own images instead.

Follow Docker's documentation to create your own Docker images and fill in the new image id and tag in:

  1. docker-compose.yml: the image attribute for rails_frontend or sinatra_backend.
  2. terraform-configurations/terraform.tfvars: the rails_frontend_image and rails_frontend_version or sinatra_backend_image and sinatra_backend_version variables.

Overview of the repo

Here's an overview of what's in this repo:

  1. An example sinatra-backend microservice that just returns the text "Hello, World". This app includes a Dockerfile to package it as a Docker container.

  2. An example rails-frontend microservice that makes an HTTP call to the sinatra-backend and renders the result as HTML. This app includes a Dockerfile to package it as a Docker container.

  3. A docker-compose.yml file to deploy both Docker containers so you can see how the two microservices work together in the development environment. To allow the services to talk to each other, we are using Docker Links as a simple "service discovery" mechanism.

  4. Terraform configurations to deploy both Docker containers on Amazon's EC2 Container Service (ECS) so you can see how the two microservices work together in the production environment. To allow the services to talk to each other, we deploy an Elastic Load Balancer (ELB) in front of each service and use Terraform to pass the ELB URLs between services. We are using the same environment variables as Docker Links, so this acts as a simple "service discovery" mechanism that works in both dev and prod.

More info

For more info, check out the talk Infrastructure-as-code: running microservices on AWS with Docker, Terraform, and ECS, including the video and slides. For a deeper look at Terraform, check out the book Terraform: Up & Running.

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].