|
Odyssey
|
Parent: ../README.md "Overview README.md"
The machine layer, or hardware layer, represents the platforms that run docker containers along with any auxiliary components/services used to enable application runtime. In a development environment this is accomplished in its entirety with a single machine running Docker. For production and staging this is a combination of standard AWS services including the EC2 container service (ECS) run and manage application's docker containers.
For both dev and prod platforms the machine layer is agnostic about application requirements and configuration. The application code is isolated into containers and the machine layer ensures that they are running/healthy. All forms of update, be it distro packages, library updates, and application fixes are done by versioning containers. In other words, the machine layer tracks versions of containers and not code. A deploy consists of uploading a new set of containers with an updated version number and instructing the ECS service to phase over to the new containers. This is done incrementally to allow for health checking the new containers as they are brought online. If for some reason the new container version does not pass health checks performed by an Amazon ELB, ECS will halt the roll-out to prevent an overall service outage.
ECS runs containers on a cluster of EC2 instances which are managed by an [auto scaling group] (ASG). The ASG monitors the health and capacity of the cluster making adjustments to the number of instances in service as needed. In addition, the ASG will add new instances and terminate old instances on a regular basis as a form of large-scale garbage collection.
ECS Instance Notes:
The production machine layer employees a homogeneous cluster design where each EC2 instance in the cluster is identical. The instances are bootstrapped at startup with homecu/ecsextender to extend the stock capabilities of an ECS cluster.
Extensions to ECS:
1.8.15