Provisioning and deployment - CloudFormation and ECS

As described in Chapter 10, Containerized Services, there are many different ways to provision and deploy your Docker containers in the cloud, and tools like Kubernetes can be used on AWS to manage all your running instances.

AWS also offers its service to deploy clusters of containerized applications; it is called EC2 Container Service-ECS (https://aws.amazon.com/ecs) and leverages another service called CloudFormation (https://aws.amazon.com/cloudformation/).

CloudFormation lets you describe the different instances you want to run on Amazon via JSON files, and drives everything automatically on AWS, from deploying instances to autoscaling.

ECS is, basically, a set of dashboards to visualize and operate clusters deployed via CloudFormation using predefined templates. The AMI used for running the Docker daemon is tweaked for that purpose, such as CoreOS.

What's convenient with ECS is that you can create and run a cluster for a given Docker image in a matter of minutes by simply filling a couple of forms. The ECS console provides some basic metrics for the cluster, and offers features like scheduling new deployments depending on the CPU or memory usage.

Beyond the initial form-based setup, clusters deployed via ECS are driven by Task Definitions that define the whole lifecycle for your instances. Those definitions describe the Docker containers to run, and the behavior for some events.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset