Skip to content
No description, website, or topics provided.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Lab1-Getting-Started-with-ECS added cloud9 pic Nov 10, 2019
Lab2-Create-Service-with-FarGate added final typescript Nov 10, 2019
.DS_Store
CODE_OF_CONDUCT.md Initial commit Nov 5, 2019
CONTRIBUTING.md Initial commit Nov 5, 2019
LICENSE
README.md initial release Nov 7, 2019
ecs-workshop-stack.ts

README.md

Getting Started with ECS

Overview

This lab introduces the basics of working with microservices and ECS. This includes: setting up the initial ECS cluster, deploying the sample application, service discovery via Route53 and deployment of the containers with traffic routed through an ALB. The sample application that will be running on ECS requires a couple Docker images built and placed in an ECR repository that your ECS cluster has access to.

Note: You should have containers and Docker knowledge before attempting this lab. You should know the basics of creating a Docker file and a Docker image, and checking in the image into a Docker registry. Otherwise, please complete part 1 and 2 of the Get Started with Docker tutorial.

The sample application consists of ColorGateway and ColorTeller applications.

ColorGateway

Color-gateway is a simple http service written in go that is exposed to external clients and responds to http://service-name:port/color that responds with color retrieved from color-teller and histogram of colors observed at the server that responded so far. For e.g.

$ curl -s http://colorgateway.default.svc.cluster.local:9080/color
{"color":"blue", "stats": {"blue":"1"}}

color-gateway app runs as a service in ECS, and exposed via external load-balancer (ALB).

ColorTeller

Color-teller is a simple http service written in go that is configured to return a color. This configuration is provided as environment variable and is run within a task. Multiple versions of this service are deployed each configured to return a specific color.

At the microservice level the application looks like this:

img1

They shall be deployed using AWS Fargate, which allows you to run containers without managing servers. We shall deploy two instances of Gateway container and 2 instances of ColorTeller. ColorTeller containers register with a Route53 private hosted zone. ColorGateway discovers the ColorTeller via a service lookup to Route53. We will use an Application load balancer to route the requests to ColorGateway.

The lab architecture on AWS is shown below:

img2

Note: You'll need to have a working AWS account to use this lab.

Start on Lab1

License

This library is licensed under the MIT-0 License. See the LICENSE file.

You can’t perform that action at this time.