Git Product home page Git Product logo

ecs-watch's Introduction

Description

CAVEAT! this is WIP for now - soon to be released

When you want to run microservices inside of an ECS cluster , the easiest/standard/recommended way is to register Services with ELBs. You can register the ELBs in DNS and each service is instanly available. No need for a service discovery.

As the number of microservices grow , so increases the cost of the ELBs. Especially in Test/Staging environment this can get quite costly where multiple environment are running on the same cluster.

The alternative is to use a discovery service and a reverse proxy like (Nginx, HaProxy, Traefik, Kong, Fabio). Most tools/examples I found used Consul. But then I thought, why duplicate the ECS state in consul? That way you can avoid running a consul cluster.

Report

NAME:
   ecs-watch report - reports all containers and ports

USAGE:
   ecs-watch report [command options] [arguments...]

OPTIONS:
   --ecs-cluster value  (default: "default") [$ECSWATCH_ECS_CLUSTER]
   --aws-region value   (default: "eu-west-1") [$ECSWATCH_AWS_REGION]

+-----------+----------+---------------+----------------+-----------+---------------------+-----------+-------------------------+---------+--------+----------+--------------------+
|   NAME    | HOSTPORT | CONTAINERPORT |    PUBLICIP    | PRIVATEIP |     INSTANCEID      |   IMAGE   |       VIRTUALHOST       | STATUS  | FAMILY | REVISION |      CLUSTER       |
+-----------+----------+---------------+----------------+-----------+---------------------+-----------+-------------------------+---------+--------+----------+--------------------+
| jenkins-a |    32778 |            80 | 52.209.248.211 | 10.0.4.42 | i-08d46a56b977b8a62 | httpd:2.4 | www.smalltownheroes.be  | RUNNING | apache |       12 |        staging-asg |
| jenkins-b |    32779 |            80 | 52.209.248.211 | 10.0.4.42 | i-08d46a56b977b8a62 | httpd:2.4 | www3.smalltownheroes.be | RUNNING | apache |       12 |        staging-asg |
+-----------+----------+---------------+----------------+-----------+---------------------+-----------+-------------------------+---------+--------+----------+--------------------+

Generate file using Template

The use of elb-watch to have a command similar to docker-gen/nginx-proxy where a template is populated and a signal is send to a container. instead of reading the state from Consul, it reads the state from ECS.

NAME:
   ecs-watch track - tracks changes inside an ecs cluster

USAGE:
   ecs-watch track [command options] [arguments...]

OPTIONS:
   --track-interval value        (default: 5s) [$ECSWATCH_TRACK_INTERVAL]
   --only-once                    [$ECSWATCH_ONLY_ONCE]
   --ecs-cluster value           (default: "default") [$ECSWATCH_ECS_CLUSTER]
   --aws-region value            (default: "eu-west-1") [$ECSWATCH_AWS_REGION]
   --template-generate            [$ECSWATCH_TEMPLATE_FILE]
   --template-input-file value    [$ECSWATCH_TEMPLATE_INPUT_FILE]
   --template-output-file value   [$ECSWATCH_TEMPLATE_OUTPUT_FILE]
   --docker-notify                [$ECSWATCH_NOTIFY_CONTAINER]
   --docker-signal value         (default: "SIGHUP") [$ECSWATCH_DOCKER_SIGNAL]
   --docker-container value       [$ECSWATCH_DOCKER_CONTAINER]
   --docker-endpoint value       (default: "unix:///var/run/docker.sock") [$ECSWATCH_DOCKER_ENDPOINT]

Route53 sidekick

The use of elb-watch to find the connection details of container (ip/port) and update a record in route53. This is useful as a side-kick for services that are not http based (for example your redis server)

Related projects

Reading

ecs-watch's People

Contributors

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