一千萬個為什麽

搜索

Amazon ECS基本定義和術語



我是一名初學者,開始學習亞馬遜EC2,如果任何人都可以提供一個基本定義,並且可能將它們聯系在一起,這將是非常驚人的,我想要清楚地了解以下條款:

任務, 服務, 容器, 例如, 集群(集裝箱), 狀態(一個集群,最有可能), ECS。

部分答案也是有價值的。

轉載註明原文: Amazon ECS基本定義和術語

一共有 2 個回答:

AWS根據計算,存儲,數據庫,管理,分析,消息,開發人員工具等提供不同的服務和類別。

ECS comes under the computing services.

亞馬遜EC2容器服務(ECS) - AWS雲的容器管理

運行打包為Docker containers.EC2 Container Service(或ECS)的應用程序。此服務將使您可以輕松地使用強大的API和其他工具在托管群集的Amazon Elastic Compute Cloud(EC2)實例中運行任意數量的Docker容器。使用ECS時,無需安裝集群管理軟件,購買和維護集群硬件,也無需將硬件資源清冊與您的軟件需求相匹配。

在這裏,我將解釋在ECS和術語中設置基於docker的應用程序的步驟。

  1. Cluster: A cluster is a pool of EC2 instances in a particular AWS Region, all managed by ECS. One cluster can contain multiple instance types and sizes, and can reside within one or more Availability Zones.

這是創建ECS的第一步。在任何您需要的群集之前,它可以是默認的,或者您可以創建新群集。

  1. EC2 Instance type: In cluster you need to choose the Amazon EC2 instance type for your container instances. The instance type that you select determines the resources available for your tasks to run on.

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud.it's like your PC you can install mongo, MySQL (for MySQL RDS is best), PHP, node or whatever you want in it.While Creating EC2 you have to define which OS you want to use in ec2.You can access EC2 using pem file that will be provided by AWS during creating ec2.https://aws.amazon.com/ec2/

    容器:- 容器是一個打包的(或“Dockerized”,就像很酷的孩子們喜歡說的那樣)應用程序組件。群集中的每個EC2實例都可以充當一個或多個容器的主機。 對於每個任務定義,您都需要指定容器,以告知CPU,內存和其他資源。ECR註冊中心Amazon EC2容器註冊中心(Amazon ECR)是一個托管的AWS Docker註冊中心服務,它的安全性,可擴展性和可靠性。 Amazon ECR使用AWS IAM支持具有基於資源權限的私人Docker存儲庫,以便特定用戶或Amazon EC2實例可以訪問存儲庫和映像。開發人員可以使用Docker CLI推送,拉取和管理圖像。

一旦上述環境準備就緒,您可以放置​​任務或啟動服務。

  1. 任務定義:任務定義就像您的應用程序的藍圖。在這一步中,您將指定任務定義,以便Amazon ECS知道哪個Docker映像用於容器,要在該任務中使用多少個容器以及每個容器的資源分配。

  2. 服務服務管理您創建的任務。只要您創建了任務定義,您就可以配置Amazon ECS服務。服務啟動並維護群集中任務定義的副本。例如,通過將應用程序作為服務運行,Amazon ECS將自動恢復任何已停止的任務並保持您指定的副本數量。

NOTE: Elastic load Balancing can be setup before any thing done. when you want to create services you can configure with load balancer.load balancer conttain target group and container which need to be balanced.https://aws.amazon.com/elasticloadbalancing/

  1. Elastic Load Balancing Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances. It enables you to achieve fault tolerance in your applications, seamlessly providing the required amount of load balancing capacity needed to route application traffic
  • EC2 (Elastic Compute Cloud) Instance - A Virtual Machine server
  • ELB (Elastic Load Balancer) - A service in EC2 which manages incoming traffic using DNS and managed instances (not seen to the user). Redirects HTTP/TCP requests to instances registered in the ELB. Includes health-check mechanism to include/exclude EC2 instances.
  • ALB Target Group - A group of EC2 instances, usually containing duplicates of a service listening on a specific TCP port. Includes health-check mechanism.
  • ALB (Application Load Balancer) - A new generation of ELB. Allows to map multiple URL paths, and Host: headers to Target Groups of EC2 instances.
  • EBS (Elastic Block Storage) - An attachable disk for EC2 instances
  • ASG (Auto Scaling Group) - A mechanism to create/increase/decrease the number of EC2 instances in a group.
  • Launch Configuration - Template describing how to create EC2 in ASG.
  • Image (Usually Docker Image) - A special format of file you can "pull" and "push" to a Docker Registry. Contains "user-space" executables, libraries and files.
  • Container (Usually Docker Container) - An execution of an Image, running under a Docker Daemon service.
  • ECS (Elastic Container Service) - Orchestrator for Docker containers in EC2.
  • ECS Cluster - Collection of EC2 (usually in ASG) that ECS uses for running containers.
  • ECS Host - One EC2 instances out of all the instances registered in ECS Cluster.
  • ECS Task Definition - A template on how to run a specific container. Includes most of the arguments/parameters you can find with docker run command.
  • ECS Task - A running container somewhere in the ECS cluster. Usually used to run containers on a schedule, or one-offs.
  • ECS Service - A service that manages running of ECS Tasks. Can also register listening ports of containers in a specific ALB Target Group.
  • ECS Agent - Opensource service, running as a container on each ECS Host. Responsible to receive commands from ECS service regarding containers to run/stop/etc...
  • ECR (Elastic Container Registry) - A managed service in ECS used to store/push/pull Docker images. Similar to Docker Hub, Quay, and other artifact storage services used to manage images as a service.