EC2 Container Service

Build, Run, and Scale

Docker-based applications

Features

  • Run any number of docker containers across a managed cluster of EC2 instances
  • Run the same Docker daemon that you would run on-premises. 
  • Run multiple, unrelated containers on the same EC2 instance in order to make good use of all available resources. 
  • Applications can make use of AWS features such as Elastic IP addresses, resource tags, and Virtual Private Cloud (VPC).
  • The containers are, in effect, a new base-level building block in the same vein as EC2 and S3.

Container Instance

  • Amazon EC2 instance 
  • Has docker daemon
  • Has amazon ECS Agent

Cluster

  • Regional
  • Resource Pool
  • Grouping of Container Instances
  • Start empty, dynamically scalable

 

Container &Task

  • Container – A Docker container that was created as part of a Task
  • Task – An instantiation of a Task Definition.
  • Task Definition – 
  • A description of a set of Containers. 
  • The information contained in a Task Description defines one or more Containers.
  • All of the Containers defined in a particular Task Definition are run on the same Container Instance
  • could be linked or not linked
  • could have shared volumes
  • container definition names and identifies your image
  • includes default runtime attributes for your container

Container Instance & Cluster

  • Container Instance –
    • An EC2 instance
    • Runs the ECS Container Agent and that has been registered into a Cluster.
    • The set of instances running within a Cluster create a pool of resources that can be used to run Tasks.
  • Cluster – A logical grouping of Container Instances that is used to run Tasks.
    • provides pool of resources to the task
    • grouping of all your container instances
    • starts empty, dynamically scalable

EC2 Container Agent

  • Runs on Container Instances.
  • Responsible for starting Containers on behalf of ECS.
  • Itself runs within a Docker container and communicates with the Docker daemon running on the Instance.
  • ECS container agent is available on Docker Hub

Scheduling options

Scheduling refers to the process of assigning tasks to instances

  • Automated – The RunTask function will start a Task (as specified by a Task Definition) on a Cluster using random placement.
  • Manual – The StartTaskfunction will start a Task (again, as specified by a Task Definition) on a specified Container Instance (or Instances).
  • Custom – You can  use the available information to choose a suitable Container Instance and then call StartTask to start a task on the Instance i.e. creating your own implementation of RunTask.

Other Container Management tools

Mesos

Chronos

http://nerds.airbnb.com/introducing-chronos/

References

Made with Slides.com