Amazon ECS is a regional service that simplifies running application containers in a highly available manner across multiple Availability Zones within a region. You can create Amazon ECS clusters within a new or existing VPC. After a cluster is up and running, you can define task definitions and services that specify which Docker container images to run across your clusters. Container images are stored in and pulled from container registries, which may exist within or outside of your AWS infrastructure.
The following section aims at taking a deep dive into each of ECS features shown above.
ECS makes use of docker as core underlying technology to drive the deployment engine and mechanism using docker containers and images. A container is like a running instance of app whereas an image is immutable form of container, when its not started yet. To deploy applications on Amazon ECS, your application components must be architected to run in containers. A Docker container is a standardized unit of software development, containing everything that your software application needs to run. Images are typically built from a Dockerfile, a plain text file that specifies all of the components that are included in the container. These images are then stored in a registry from which they can be downloaded and run on your container instances.
Task definitions are textual description of the actual tasks that need to run for your webapp. You define various parameters in a YAML or JSON file about what docker images its going to use, what ports should be open, what data volumes need to be mounted etc. To prepare your application to run on Amazon ECS, you create a task definition. The task definition is a text file in JSON format that describes one or more containers that form your application. It can be thought of as a blueprint for your application
Clusers are a logical grouping of EC2 instances, where you running tasks are placed by ECS. An application images are downloaded from whatever the registry specified to the EC2 instances within the cluster and containers are then started from those images.
ECS task scheduler is responsible for placing tasks on container instances. A task is simply an instantiated, running form of task definition on a container instance. There are several different scheduling options available. For example, you can define a service that runs and maintains a specified number of tasks simultaneously.
A container agent is a process that runs on each instance with the cluster and is responsible for sending information to ECS about our tasks. It runs in the form of a container and is responsible for sending information received from client about start/stop of tasks.
CS6320 Project 2 ECS Tutorial.
Submitted By:Harkirat Singh, Harman Gill,Muhammad Imran Malik, Mauro Pappatera