Skip to content

Self-assembling microservices demo for Container Summit NYC 2016

License

Notifications You must be signed in to change notification settings

ceepeeuk/workshop-autopilotpattern

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Applications on Autopilot

A demonstration of the autopilot pattern for self-operating microservices, designed as a workshop or tutorial.

Microservices and Docker go together like chocolate and peanut butter: microservice architectures provide organizations a tool to manage complexity of the development process, and application containers provide a new means to manage the dependencies and deployment of those microservices. But deploying and connecting those services together is still a challenge because it forces developers to design for operationalization.

Autopiloting applications are a powerful design pattern to solving this problem. By pushing the responsibility for understanding startup, shutdown, scaling, and recovery from failure into the application, we can build intelligent architectures that minimize human intervention in operation. But we can't rewrite all our applications at once, so we need a way to build application containers that can knit together legacy and greenfield applications alike.

This project demonstrates this design pattern by applying it to a simple microservices deployment using Nginx and two Node applications.

Getting started

This project requires a Docker host and client, as well as Docker Compose. The Docker Toolbox will provide a suitable environment for users on OS X or Windows.

Project architecture

The project is broken into 4 subsystems. Web clients communicate only with Nginx, which serves as a reverse proxy and load balancer to two microservices -- Customers and Sales. The microservices should be able to be scaled to arbitrary numbers of nodes and the virtualhost configuration in Nginx will be updated to suit. Also, the Customers application needs data from Sales and the Sales application needs data from Customers. This means that when we scale up Sales nodes, all the Customer nodes must learn of the change (and vice-versa). We use Joyent's Containerbuddy to orchestrate this process and Hashicorps' Consul as a discovery service.

Completed project architecture

The master branch of this repo contains only an incomplete skeleton of services as a starting point. The configuration for Nginx and the Sales microservice are left incomplete, whereas the Customer microservice is complete and already includes the Containerbuddy configuration. You can find an up-to-date version of the complete application on the working tag.

Releases will include the completed application as demonstrated at various workshops:

About

Self-assembling microservices demo for Container Summit NYC 2016

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 72.5%
  • HTML 16.0%
  • Nginx 11.5%