container-service-discovery
container-service-discovery copied to clipboard
Service Discovery in Container Orchestration Frameworks on AWS
:toc:
= Service Discovery in Containers on AWS
This repo has a simple example that shows service discovery for different container orchestration frameworks.
The sample application uses three services:
image::images/services.png[]
. webapp: Web application microservice uses greeter and name microservice to generate a greeting for a person.
. greeter: A microservice returns a greeting based upon greet name/value keypair in the URL.
. name: A microservice that returns person's name based upon id name/value keypair in the URL.
These services are built as Docker image and deployed in Docker, Amazon ECS, Kubernetes and DC/OS.
All services are built as Node.js application. webapp service need to be configured using the following parameters:
. NAME_SERVICE_HOST
. NAME_SERVICE_PORT
. NAME_SERVICE_PATH
. GREETER_SERVICE_HOST
. GREETER_SERVICE_PORT
. GREETER_SERVICE_PATH
== Build services
Build Docker images for different services:
docker-compose build
== Setup cluster and deploy application
. link:docker.adoc[Docker] . link:ecs.adoc[Amazon ECS] . link:k8s.adoc[Kubernetes] . link:dcos.adoc[DC/OS]
== Access application
Access the following URLs using curl or in browser:
http://<host>:<port>
http://<host>:<port>0?greet=ho
http://<host>:<port>?id=1
http://<host>:<port>?greet=ho&id=1
[options="header"]
|=======
|Framework |80
| ECS | External ALB Address | 80
| Kubernetes | Load Balancer Ingress | 80
| DC/OS | Public Slave Address | 80
|=======