Code Monkey home page Code Monkey logo

aws-ecs-workshop's Introduction

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.

aws-ecs-workshop's People

Contributors

tohwsw avatar

Watchers

 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.