6. Amazon Elastic Container Service

Overview

  • Amazon ECS is a regional service that simplifies running containers in a highly available manner across multiple Availability Zones within a Region
  • Amazon ECS enables you to launch and stop your container-based applications by using simple API calls
  • You can create Amazon ECS clusters within a new or existing VPC. After a cluster is up and running, you can create task definitions that define which container images run across your clusters. Your task definitions are used to run tasks or create services. Container images are stored in and pulled from container registries
  • Diagram showing architecture of an Amazon ECS environment using the                     Fargate launch type.

Features of Amazon ECS

Containers and images

  • To deploy applications on Amazon ECS, your application components must be architected to run in containers. A container is a standardized unit of software development that contains everything that your software application needs to run, including relevant code, runtime, system tools, and system libraries. Containers are created from a read-only template called an image.
  • Images are typically built from a Dockerfile, which is a plaintext file that specifies all of the components that are included in the container. After being built, these images are stored in a registry where they then can be downloaded and run on your cluster. 

Task definitions

  • To prepare your application to run on Amazon ECS, you must create a task definition.
  • The task definition is a text file (in JSON format) that describes one or more containers (up to a maximum of ten) that form your application.
  • The task definition can be thought of as a blueprint for your application. It specifies various parameters for your application. 

Tasks and scheduling

  • task is the instantiation of a task definition within a cluster. After you have created a task definition for your application within Amazon ECS, you can specify the number of tasks to run on your cluster.
  • The Amazon ECS task scheduler is responsible for placing tasks within your cluster. There are several different scheduling options available.

Clusters

  • An Amazon ECS cluster is a logical grouping of tasks or services. You can register one or more Amazon EC2 instances (also referred to as container instances) with your cluster to run tasks, Or, you can use the serverless infrastructure that Fargate provides to run tasks. 

Container agent

  • The container agent runs on each container instance within an Amazon ECS cluster. The agent sends information about the resource's current running tasks and resource utilization to Amazon ECS. It starts and stops tasks whenever it receives a request from Amazon ECS.

Clusters

  • An Amazon ECS cluster is a logical grouping of tasks or services.
  • Your tasks and services are run on infrastructure that is registered to a cluster.
  • The infrastructure capacity can be provided by AWS Fargate, which is serverless infrastructure that AWS manages, Amazon EC2 instances that you manage, or an on-premise server or virtual machine (VM) that you manage remotely.
  • you can create multiple clusters in an account to keep your resources separate
  • Clusters are Region-specific
  • A cluster may contain a mix of both Auto Scaling group capacity providers and Fargate capacity providers, however when specifying a capacity provider strategy they may only contain one or the other but not both.
  • For tasks using the EC2 launch type, clusters can contain multiple different container instance types, but each container instance may only be registered to one cluster at a time.
  • Custom IAM policies may be created to allow or restrict user access to specific clusters.

Capacity providers

  • capacity provider is associated with a cluster and is used in a capacity provider strategy to determine the infrastructure that a task runs on.
  • Amazon ECS capacity providers are used to manage the infrastructure the tasks in your clusters use.
  • Each cluster can have one or more capacity providers and an optional default capacity provider strategy.
  • The capacity provider strategy determines how the tasks are spread across the cluster's capacity providers.
  • When you run a standalone task or create a service, you may either use the cluster's default capacity provider strategy or specify a capacity provider strategy that overrides the cluster's default strategy.
  • A service using an Auto Scaling group capacity provider can't be updated to use a Fargate capacity provider and vice versa.
  • In a capacity provider strategy, only one capacity provider can have a base value defined. If no base value is specified, the default value of 0 is used.
  • A cluster may contain a mix of both Auto Scaling group capacity providers and Fargate capacity providers, however a capacity provider strategy may only contain one or the other but not both.
  • When you specify a capacity provider strategy, the number of capacity providers that can be specified is limited to six.

Amazon ECS clusters in Local Zones, Wavelength Zones, and AWS Outposts

  • Amazon ECS supports workloads that take advantage of Local Zones, Wavelength Zones and AWS Outposts when low latency or local data processing requirements are needed.
    •  Local Zones have their own connections to the internet and support AWS Direct Connect, so resources created in a Local Zone can serve local users with low-latency communications.
    • AWS Wavelength allows developers to build applications that deliver ultra-low latencies to m
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值