System for managing and scheduling containers
By creating and managing containerized software container instance clusters, the problems of computing resource management and scaling are solved, flexible allocation and monitoring of resources are achieved, and the efficiency and portability of virtualized systems are improved.
Patent Information
- Application Number
- CN202411064283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2014-11-11
- Filing Date
- 2015-11-10
- Publication Date
- 2024-11-22
AI Technical Summary
Enterprises and individuals face high expenses and complexity in managing and maintaining computing resources, especially when running applications on multiple virtual machine instances, which are difficult to port to other computing systems or fail to scale resources on demand.
Provides a system and method to create and manage clusters of software container instances, allowing containerized virtual machine instance registration or deregistration to meet customer needs, perform tasks through container agents, and optimize resource allocation and monitoring through schedulers and telemetry services.
Improve the manageability and portability of computing resources, provide multi-tenant services and automatic resource adjustments, reduce management complexity and cost, and enhance the flexibility and efficiency of virtualized systems.
Smart Images

Figure CN119003167A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese invention patent application with Chinese application number 201580061134.7 and invention name “System for Managing and Scheduling Containers”.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority to co-pending U.S. Patent Application No. 14 / 538,663, filed on November 11, 2014, entitled “SYSTEM FOR MANAGING AND SCHEDULING CONTAINERS,” the entire contents of which are incorporated herein by reference. Background Art
[0004] Businesses and individuals seeking to reduce the costs and expenses associated with maintaining their own computing resources have turned to purchasing remote computing services, such as remote program execution on multiple virtual machine instances and remote data repositories provided to customers by computing resource service providers. Such remote computing services are typically configurable and scalable to meet the various computing needs of the computing resource service provider's customers. However, it may be difficult for customers to manage the various applications running on multiple virtual machine instances, and such applications may not be portable to other computing systems or may not be scalable to meet more demands for resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Various embodiments according to the present disclosure will be described with reference to the accompanying drawings, in which:
[0006] Figure 1 illustrates an example of client and container service interaction according to an embodiment;
[0007] Figure 2 shows an example of a container service according to an embodiment;
[0008] Figure 3 illustrates an example of virtualization of a container service according to an embodiment;
[0009] Figure 4 shows an example of a container instance according to an embodiment;
[0010] Figure 5 illustrates an example of resource allocation within a container instance according to an embodiment;
[0011] Figure 6 is a block diagram illustrating an exemplary workflow for launching a task on a cluster, according to an embodiment;
[0012] Figure 7 is a block diagram showing an example of creating a cluster according to an embodiment;
[0013] Figure 8 is a block diagram illustrating an example of registering a container instance, according to an embodiment;
[0014] Fig. 9 is a block diagram illustrating an example of a registration task according to an embodiment;
[0015] Fig.10 is a block diagram illustrating an example of a start task according to an embodiment;
[0016] Fig.11 is a block diagram illustrating an example of a stop task according to an embodiment;
[0017] Fig.12 is a block diagram illustrating an example of a logout task according to an embodiment;
[0018] Fig.13 is a block diagram illustrating an example of a logout container according to an embodiment;
[0019] Fig.14 is a block diagram illustrating an example of deleting a cluster, according to an embodiment;
[0020] Fig.15 illustrates an exemplary service design for a system for managing and scheduling containers according to an embodiment; and
[0021] Fig.16 An environment is shown in which various embodiments may be implemented. DETAILED DESCRIPTION
[0022] In the following description, various embodiments will be described. For the purpose of explanation, specific configurations and details will be set forth in order to provide a thorough understanding of each embodiment. However, it will also be apparent to those skilled in the art that each embodiment may be practiced without the specific details. In addition, in order not to obscure the described embodiments, well-known features may be omitted or simplified.
[0023] The described and proposed technologies include systems and methods for creating a cluster of software container instances for running software containers for customers of a computing resource service provider. The software container instance can be a virtual machine instance configured to support containerization, and the software container instance can be registered or unregistered from the cluster as needed to adapt to customer needs. Each software container instance can include a container agent, which is an application configured to use software containers and software container instances to perform various tasks when executed by one or more processors of a computer system, including registering container instances, unregistering container instances, starting tasks, stopping tasks, providing task status, issuing task heartbeat signals, and reporting task events. The software container may include data and one or more processes, which, when executed in a computer system instance configured to support containerization, can be isolated from other processes running in the same computer system instance.
[0024] The software container may be configured to run as a task according to a task definition, and the task definition may be stored as a task definition file. The task definition file may describe one or more software containers that are assigned to start with a group. The software image of the software container may be provided to a computing resource service provider or a location specified in the task definition, and the software image of the software container may represent an entire copy of a specific state of the software container when the software image is generated, and the software container has been configured to execute within the software container instance. The task definition may also specify resource requirements, relationships between containers, network ports used, and shared resources.
[0025] Upon receiving a request to start a task defined by a task, the scheduler may determine which software container instances within the cluster to run the task according to the layout scheme. In some cases, a computing resource service provider may provide a multi-tenant scheduler for determining the location of the running software container, and in some cases, the computing resource service provider may allow customers to provide and configure their own scheduler to customize how the scheduler operates. In some cases, the scheduler may be configured to use a random selection scheme to randomly (according to a certain random allocation scheme) or in a round-robin manner to select a container instance to host a given software container, taking into account the resource requirements specified in the task definition. The container agent may be configured to start tasks within their respective software container instances. In some embodiments, the telemetry agent may be configured to collect data, such as control group metrics and log event information about the running software container, and report this data to the telemetry service. The telemetry service may allow customers to monitor the status of the software container within their container instance, and customers may specify actions to be performed in response to various container events and criteria for raising alarms based on the collected data through the telemetry service.
[0026] The described and proposed techniques improve the computing field, and in particular the virtualization and containerization fields, by providing a set of multi-tenant containerization services for managing software containers. Furthermore, the described and proposed techniques improve the functionality of computer systems by allowing the resources of the computing system to be efficiently allocated and isolating software applications so that they do not compete with each other for resources. Furthermore, the described and proposed techniques provide meaningful advantages for virtualization systems in general by improving portability, providing multi-tenant services, and automatically adjusting resources as demand increases or decreases.
[0027] Figure 1 1 shows one aspect of an environment 100 in which embodiments may be implemented. Figure 1 As shown, environment 100 may include client 102, which sends a task definition file 104 for a software container 118 along with a request to start a task through network 106 to container service 108 of computing resource service provider 110. Figure 2 The scheduler 208 of the scheduler can determine which container instance 114 in the cluster 116 of container instances the software container 118 specified in the task definition file 104 should be started. In some embodiments, the software container can be configured to share resources 120 provided by other services 122 of the computing resource service provider 110, such as storage volumes provided by a block-level data storage service of the computing resource service provider 110.
[0028] Customer 102 may be an individual associated with a customer account of a container service, or may be an individual, system, resource computing device, or other entity authorized to act on behalf of an individual associated with a customer account. In addition, resources of customer 102 may be available to other users. For example, customer 102 may utilize container instance 114 to provide an online marketplace for other users, and these other users may then purchase and / or sell goods and services through the online marketplace provided by customer 102 through the container service. Customer 102 may communicate with container service 108 of computing resource service provider 110 through network 106, which may be a communication network such as the Internet, an intranet, an Internet service provider (ISP) network, and / or some other such network as described below.
[0029] In some examples, a "task definition" or "task definition file" may refer to a file that specifies a set of linked containers that are assigned to start with a group (i.e., a set of containers that are associated with each other when running on a host computing system). The task definition file 104 may also specify disk and network locations that containers 118 can share on a single physical machine. Subsequently, the task definition file 104 can be used to start this set of containers 118. In some implementations, the task definition file 104 may define and link containers 118 that are spread across multiple physical machines. One task definition file 104 may contain and schedule many tasks. In some examples, a "task" may refer to an instantiation of a task definition file 104, and may consist of one or more containers 118. A task may be modified by applying a new task definition to the task.
[0030] The task definition file 104 may contain all the information needed to place the containers 118 in the cluster 116 and may manage the cluster 116 through application programming interface calls.
[0031] An example of a task definition could be:
[0032] {'db':
[0033] {
[0034] 'image': 'forest / postgresql',
[0035] 'port': ['5432'],
[0036] 'CPU': 1000,
[0037] 'Memory': 1073741824
[0038] },
[0039] 'web':
[0040] {
[0041] 'image': 'hub.web.com / rails:latest',
[0042] 'port': ['8000:8000'],
[0043] 'Link': ['db'],
[0044] 'CPU': 1000,
[0045] 'Memory': 1073741824
[0046] }
[0047] }
[0048] The exemplary task definition specifies a first task named "db," with a software image located at the path "forest / postgresql." The first task is assigned to handle 1,000 shares and 1 gigabyte of memory, and the first task uses port 5432. Similarly, the task definition also specifies a second task named "web," with a software image located at the path "hub.web.com / rails:latest." The second task is assigned to handle 1,000 shares and 1 gigabyte of memory, and the second task uses port 8000:8000. The task definition notes that the second task ("web") is allowed to link to the first task ("db"). It should be noted that although some of the units used in this example are given as fixed quantities, such as processing power given as a fixed number of central processing unit shares, it is contemplated that other units and other types of values (e.g., percentage of total processing power, percentage of total memory) may be used instead to allow dynamic resource allocation.
[0049] Container service 108 may be a service provided by computing resource service provider 110 to allow customer 102 to execute container 118 within cluster 116. Container service 108 may be similar to a service provided by computing resource service provider 110. Figure 2 The computing resource service provider 110 may be similar to the container service 200 described in the embodiment of the present invention. Fig.15 The computing resource service provider 1502 described herein may be a computing resource service provider, and may provide one or more computing resource services to its customers, either alone or as a combination of services for a distributed computer system. The one or more computing resource services of the computing resource service provider 110 may be accessed via the network 106, and may include services such as virtual computer system services, block-level data storage services, cryptographic services, on-demand data storage services, notification services, authentication services, policy management services, task services, and / or other such services. Not all of the embodiments described include all of the services described, and additional services may be provided in addition to or in lieu of the services explicitly described.
[0050] As an example, the computing resource service provider 110 may be an entity that provides computing resources, such as data storage services, virtual computer system services, and / or web services. Customers of the computing resource service provider 110 may communicate with one or more services via an interface, which may be a web service interface or any other type of client interface. Each service provided by the computing resource service provider may have its own interface, and in addition to or as an alternative to a common interface, a subset of the services may have corresponding separate interfaces.
[0051] In some examples, a "container instance" may refer to an instance of a computer system (virtualized or non-virtualized, such as a physical computer system running an operating system) that is configured to launch and run a software container. Thus, container instance 114 may be configured to run container 118 according to task definition file 104 provided by customer 102. One or more container instances may include a cluster. In some examples, a "cluster" may refer to a collection of one or more container instances that have been registered with (i.e., associated with) a cluster. Thus, container instance 114 may be one of many different container instances registered with cluster 116, and other container instances of cluster 116 may be configured to run containers of the same or different types as container 118. Container instances within a cluster may have different instance types or the same instance type, and customer 102 may have more than one cluster. Thus, customer 102 may launch one or more clusters and subsequently manage user and application isolation of containers 118 within each cluster through application programming interface calls. More details about clusters may be found at Figure 2 Found in the description.
[0052] A container (also referred to as a software container or an isolated user space instance) can be a lightweight virtualized instance running under a computer system instance including programs, data, and system libraries. When a container is running, the running program (i.e., process) is isolated from other processes running in the same computer system instance. Therefore, the container 118 can each run on the operating system of the container instance 114 (e.g., using memory, CPU, and storage devices allocated by the operating system) operating system, and execute in isolation from each other (e.g., each container can be in an isolated view of the file system of the operating system). Each container 118 can have its own namespace, and the application running in the container 118 is isolated only by accessing the resources available in the container namespace. Therefore, the container 118 can be an effective way to run one or more single applications in its own namespace. The container encapsulation system allows one or more containers to run in a single operating instance without the overhead associated with starting and maintaining a virtual machine for running a separate user space instance. An exemplary container encapsulation system is the Docker container engine.
[0053] Container 118 can be started to have only specified resources from the resources allocated to container instance 114; that is, the container can be started to have a certain amount of memory and not utilize more than the specified amount of processing power. Resource allocation for container 118 can be specified in task definition file 104. Multiple containers can run simultaneously on a single host computer or host container instance, and host resources can be efficiently allocated between containers. In some embodiments, a host can support running containers in container instances from only one customer. In other embodiments, a single host can allow multiple customers to have container instances running on the host. In the latter case, the container service can provide security to ensure that customers cannot access other containers, clusters, or container instances.
[0054] Different types of tasks may have different resource requirements and may have different life cycles. Therefore, container 118 may be dynamically scheduled to run independently of the underlying operating system of the container instance by a scheduler service in container service 110, and thus the underlying operating system of container instance 114 may be very basic. Alternatively, container 118 may be scheduled to run by a scheduler installed within container instance 114 of cluster 116.
[0055] Other services 122 may be such as combining Fig.15 The services 1508-20 and 1524 of the computing resource service provider 1502 are depicted. Likewise, the other resources 120 may include resources that may be shared between virtualized instances of storage volumes such as block-level data storage services.
[0056] Figure 2 An exemplary container service 200 of an embodiment of the present disclosure is shown. Figure 2As shown, environment 200 may include a customer 202 of a computing resource service provider communicating through a front-end service 204 managing one or more containers within one or more container instances 218. As described above, a container packaging system provided by or interfacing with container service 200 may allow a customer to configure one or more applications within a container of an operating system that supports a container. Processes and resources running within a container may be isolated from other processes of a parent container instance and from processes and resources running within other containers of the same host system. Customers may specify the amount of memory and processing power allocated to the container. The base container and the applications and data within it may then be packaged into an image, including one or more programs, data, and any system dependencies (e.g., libraries, files, etc.) required for the program to run on the operating system of the container instance. In some examples, an "image" may refer to an entire copy of a specific state of a base container when the image is generated. The image thereafter may be used to start one or more identical containers, each of which may be allocated a specified amount of resources and may be isolated from each other. The container may be started on the same or different physical machines, and each container may be expected to run in exactly the same manner as the base container.
[0057] Each container instance 218 can be configured to include a pair of agents (container agent 222 and telemetry agent 224) that can allow containers to be managed, can provide cluster status information, and can enable logging and telemetry data collection. The container service 200 may include a set of services, including a template service 206, one or more schedulers 208, a router service 210, and a telemetry service 212. Because the container service 200 can be configured as a multi-tenant service (i.e., the resources of the container service 200 can serve multiple customers at the same time), and because the services provided by the container service 200 exist outside of the container instance 218 and are separate from the container instance 218, the customer 202 does not need to install a separate software application in its respective container instance 218 to provide the functionality provided by the service. The customer 202 can utilize the functionality provided by these services by making a web service application programming interface function call through the front-end service 204, which can be configured to receive requests from the customer 202 and forward the request to the appropriate service, such as the appropriate container manager back-end service 214.
[0058] As described above, a customer may launch one or more clusters, and then manage user and application isolation within each cluster through front-end service 204. For example, a customer may specify that "instances 1-10" should include a first cluster, and "instances 11-15" should include a second cluster. Thereafter, when a customer submits a launch request for a container, the customer may specify whether the container should be launched in the first cluster or the second cluster.
[0059] Each cluster may have a cluster identifier (ID) that uniquely distinguishes the clusters from one another. Clusters may be specified by reference to their respective cluster IDs. Customers may use different clusters for different types of tasks. For example, a customer may use a first cluster to launch services and a second cluster to perform batch jobs. The instances in the first cluster may be optimized for running servers, and the instances of the second server may be optimized for submitting short, transient jobs such as batch jobs.
[0060] The application programming interface function calls available for the cluster may include CreateCluster, DescribeCluster, ListClusters, and DeleteCluster. The CreateCluster application programming interface call may cause the creation of a cluster. In some cases, after the cluster is created, the front-end service 204 may provide the customer with a cluster ID of the newly created cluster. The cluster ID allows the customer to register a container instance with the cluster; for example, the customer may cause the container instance to be registered with the cluster by passing the cluster ID as a parameter to the RegisterContainerInstance application programming interface call. In addition or alternatively, the customer may specify one or more existing container instances belonging to the customer as parameters of the CreateCluster application programming interface call to cause one or more existing container instances to be registered with the cluster while creating the cluster. Similarly, in some cases, the customer may specify the number of container instances to be created and registered with the cluster in the parameters of the CreateCluster application programming interface call when creating the cluster. Figure 7 The CreateCluster application programming interface function call is further shown in FIG.
[0061] Once a cluster is created and running, the DescribeCluster API call can be used by clients 202 or applications to request information about the cluster. The information returned in response to the DescribeCluster API call may include a list of applications running in the cluster, resources available to the cluster and their types. The information returned from the DescribeCluster API call can then be used as a parameter to a StartTask API call to start a task within the cluster.
[0062] Scheduler 208 may be configured to launch tasks within the described cluster. Alternatively, customer 208 may implement its own scheduler instead of scheduler 208, and use the information retrieved by the DescribeCluster application programming interface call in conjunction with the customer scheduler's placement logic to make placement decisions for scheduling tasks. A customer may design and / or upload a placement algorithm to be used by his / her own scheduler, or may select from a list of possible placement algorithms provided to the customer by a computing resource service provider. Container service 200 may determine whether to accept or reject a placement decision made by a customer scheduler based on available resources.
[0063] The scheduler 208 can be a multi-tenant service configured to optimally schedule a set of tasks to run with the cluster. In this way, the client 202 does not need to select the location where the task should be executed. The layout scheme of the scheduler 208 can be configured to evenly distribute tasks on the cluster (e.g., a round-robin manner, a random distribution scheme, etc.), and can be configured to distribute tasks based on the current or expected resource consumption of the cluster so as to use the available resources most efficiently. The scheduler 208 can obtain cluster manager metadata and other information about the availability of container instances 218 in the cluster through the container manager backend service 214. The cluster manager metadata and other information may include data about the current state of the container instance 218 assigned to the cluster, the available resources within the container instance, the containers running within the container instance, and other information that can be used by the scheduler 208 to make layout decisions. The DescribeCluster application programming interface call can cause the cluster manager backend service to provide cluster metadata for the specified cluster.
[0064] The scheduler 208 may assign tasks based at least in part on security rules, security groups, and / or security roles, with affinity and anti-affinity. For example, tasks in a certain security group may be configured to be launched on the same container instance when possible or feasible, or conversely may be scheduled to be launched in separate container instances. As another example, tasks may be assigned to certain security groups or designated as having certain security roles, and based on the specific security groups assigned or the security roles designated, tasks may be assigned to run in a specific cluster or a specific cluster instance, or may have priority over resources on other tasks. Affinity / anti-affinity-based task assignment includes assigning "tags" indicating the relationship between containers, container instances, and tasks. As an example of an assignment based at least in part on affinity, two container instances may be labeled "generic" and one container instance may be labeled "database." In a task definition, a "generic" launch constraint may be used to specify a task, thereby providing an affinity that the task is to be launched into one (or more) of the container instances labeled as generic. As an example of anti-affinity task assignment, certain container instances may be tagged as "secure credit card processing" and certain other container instances may be tagged as "http-website". Because the http-website container may be serving traffic from untrusted external entities, it may not be desirable to share such a container with the credit card processing task. Therefore, the task definition is configured to indicate that "http-website" has anti-affinity for the credit card processing task to ensure that the credit card processing container is not started in the "http-website" tagged container instance. In this example, the scheduler 208 may be configured to parse any tags in the task definition and use it to filter container instances that do not meet the criteria associated with the tag. Next, the scheduler 208 may select a container instance from the filtered set to host the container.
[0065] In some embodiments, the scheduler 208 may communicate directly with the container agent 222 to initiate the task. In other embodiments, the scheduler 208 may communicate with the agent communication service 220, which then relays the communication to the container agent 222. In other embodiments, the scheduler 208 may communicate the placement decision to the container manager backend service 214, which may relay the communication directly to the container agent 222 or the agent communication service 220. As described above, in some embodiments, the client 202 may alternatively implement its own scheduler for task management rather than using the scheduler 208.
[0066] In some cases, containers may be configured to compete for resources, and containers associated with certain security roles may have priority over other containers in the event of a conflict. It should be noted that in all cases, the placement scheme may take into account the available resources in the container instance and the resource requirements of the container. For example, if the resource requirements of a particular task exceed the available resources in the container instance, then the container instance may not be selected for the particular task. However, in some implementations, the container instance may still be selected, but the launch of the particular task may be delayed until sufficient resources are available within the container instance to support running the particular task.
[0067] The container may also be configured to utilize other resources provided by the computing resource service provider. For example, each container may be configured with a virtual network interface to allow the container to communicate with other containers and / or other resources of the computing resource service provider through the virtual network. Similarly, security credentials may be allocated on a per-container basis so that the container has its own security credentials to access other resources provided by the computing resource service provider. In addition, the container service may be configured to integrate with a load balancing service that load balances workloads directed at the container. For example, a customer may present a list of Internet Protocol addresses associated with the virtual network of the customer's container and / or customer instance to the load balancer of the load balancing service, and instruct the load balancer to balance the workload between the Internet Protocol addresses. In addition, the container service may be integrated with an automatic scaling service to allow the resources utilized by the container to be dynamically adjusted as needed.
[0068] For example, a customer may implement multiple schedulers for a single cluster, and the multiple schedulers determine which instances within the cluster are used to launch containers. Multiple schedulers may compete with each other according to a placement scheme, such as by using optimistic concurrency control methods to determine where to launch containers. For example, generally speaking, each scheduler using optimistic concurrency may assume that containers will not interfere with each other, and in the event that one container has modified data that another container has read, the reading container may restart and re-read the modified data.
[0069] In some cases, the scheduler may be configured to maximize available resources. For example, a cluster may be used primarily to run long-running services and may need to run one or more short-lived batch jobs. In such an example, a scheduler configured to maximize available resources may look for an instance that has just enough processing power to support the batch job as the best fit for the batch job. Alternatively, the scheduler may look for an instance that utilizes its minimum processing power and use this instance to schedule the batch job.
[0070] In some implementations, the meta-scheduler may be configured to run hierarchically on top of one or more schedulers, and the meta-scheduler may decide where to launch a batch job. For example, in one implementation, there may be two types of tasks: short-term batch job tasks and long-term services. The two types of tasks may have different layout rules, such as it may be desirable to evenly distribute service tasks among available container instances in one or more specified clusters, while batch job tasks may be configured to run in any available container instance with space processing cycles. In some cases, a different scheduler may be assigned to each set of layout rules. However, in cases where such layout rules compete or conflict with each other, or where an appropriate scheduler must be determined and assigned to a particular task, the meta-scheduler may determine which competing task should dominate, synchronize information between schedulers, or determine an appropriate scheduler for layout tasks.
[0071] Clusters can be managed through API calls made to the front-end service 204. For example, an API call can be made to request a list of available clusters and what containers can run on which clusters. The ListClusters API call can list all clusters accessed by the client. The DeleteCluster API call can delete a specified cluster and reference the cluster. Fig.14 To further describe.
[0072] Available application programming interface function calls for container instances may include RegisterContainerInstance, DescribeContainerInstance, and DeregisterContainerInstance. The container agent of the container instance can use the RegisterContainerInstance application programming interface call to register the container instance with the cluster manager once the container instance is instantiated. In some implementations, the cluster manager consists of metadata about the cluster (e.g., groupings of container instances). In other implementations, the cluster manager may include configuration management software installed by the customer or available to a computing resource service provider. The scheduler may then refer to the container instance 218 registered with the cluster manager when determining which container instance a container should be launched into. Reference Figure 8 RegisterContainerInstance is further described. The DescribeContainerInstance API call can return information about a container instance, including the resources available to the container instance and the tasks running within the container instance.
[0073] Because containers can run in any available container instance in the cluster that has sufficient resources, containers can be scaled up or down within the cluster as needed, as long as enough container instances are available. If the number of container instances in the cluster is insufficient, additional container instances can be created and registered with the cluster by the cluster manager. If there are too many container instances in the cluster, some container instances can be deregistered from the cluster by the cluster manager. The DeregisterContainerInstance API call can be used to deregister a container instance that was registered using the RegisterContainerInstance API call from a specified cluster. About Fig.13 DeregisterContainerInstance is described further.
[0074] Available API function calls for task definitions may include RegisterTaskDefinition, DescribeTaskDefinition, ListTaskDefinitions, and DeregisterTaskDefinition. The RegisterTaskDefinition API call may be used to register a task definition for launching a task, and in conjunction with Fig. 9 The DescribeTaskDefinition API call can be used to return information about a task definition, including the contents of a task definition file. The ListTaskDefinitions API call can return a list of task definitions available to a client, or can return a list of task definitions associated with a particular cluster ID or container instance ID. The DeregisterTaskDefinition API call can unregister a task definition registered using the RegisterTaskDefinition API call, and further information about Fig.12 to describe.
[0075] The application programming interface function calls for tasks may include StartTask, DescribeTask, ListTasks, and StopTask. Customers may pass a task definition file (or their respective identifiers) as a parameter to the StartTask application programming interface call, and may further specify a container instance or cluster to start one or more tasks within the container instance or cluster. For example, a customer may have obtained one or more container instance IDs of a cluster in response to the DescribeCluster application programming interface call, and may specify that the task definition file be executed on one or more identified container instances. If the customer runs the task directly, they may call the StartTask application programming interface and specify the container instance to be started. Alternatively, the scheduler 208 may use the StartTask application programming interface to start the task. In addition, customers 202 may configure their own scheduler to use the StartTask application programming interface to start tasks.
[0076] Scheduler 208 or a customer-installed scheduler may also be configured to start tasks within a task definition file and determine where to place the tasks within the cluster. For example, scheduler 208 may determine to distribute tasks evenly among the container instances in the cluster, distribute tasks in some chi-square distribution, or distribute tasks among the container instances in the cluster based on some other set of heuristics or constraints. Parameters passed to the StartTask application programming interface call may specify that multiple tasks should be started, for example by passing a task definition file that outlines multiple tasks. In some implementations, customer 202 may specify a list of clusters or container instances rather than a single cluster or container instance, and scheduler 208 may determine in which container instance to execute the task. Reference Fig.10 The StartTask API call is described in more detail.
[0077] The DescribeTask API call can be used to return information about running tasks from the container agent 222, including information about allocated resources, age, and running status. The ListTasks API call can be used to return a list of all running tasks, or a list of all tasks running in a specified cluster or container instance. The StopTask API call can be used to instruct the container agent 222 to stop a specified running task that was started using the StartTask API call. Fig.11 Describes the StopTask API call.
[0078] The container service 200 can communicate with the authentication system of the computing resource service provider (such as Fig.151518) to authenticate the application programming interface calls made to the front-end service 204. In some embodiments, separate security groups and security roles can be configured and assigned to different containers on a single host. The container service 200 can also be configured to launch containers and container instances 218 within a virtual private cloud.
[0079] In some embodiments, the container may be configured to attach to other services of the computing resource service provider, such as block-level data storage services and / or on-demand data storage services. In some cases, the container may be configured to share attachment services with other containers. As an example, a customer's container instance may be mapped to a block-level storage volume of a block-level storage service of a computing resource service provider, and each container within the instance may be configured to be able to read and / or write to a block-level storage volume from a block-level storage volume. In some examples, a block-level storage volume may be shared between multiple container instances, such as all container instances or multiple clusters within a cluster, so that container instances within one or more clusters may all be able to share block-level storage volumes with their running containers. As another example, a container instance may be mapped to 20 different block-level storage volumes, but only two block-level storage volumes are specified for the container.
[0080] Template service 206 may be configured to allow clients 202 to define task definitions for their containers. In some examples, a "task definition" may refer to a script or set of metadata that may define a set of containers; for example, the number of containers, their types, their components, their relationships to other containers, information describing associated instances, and other metadata. A task definition may also specify a group of containers that will be coordinated for launch. Template service 206 may receive task definitions from clients 202, store the task definitions in database 216, and allow clients 202 to create, view, update, delete, and otherwise manage their task definitions.
[0081] The template service 206 may grant the client 202 the ability to define a task definition. The template service 206 may allow the client the ability to provide a task definition by uploading a task definition file, or may provide a task definition by dynamically creating a task definition file by allowing the client to select from various options and / or change default settings. The template service 206 may allow the client to register a task definition. The template service 206 may also provide an editing interface for editing currently registered task definitions. The template service 206 may register a task definition at least in part by providing the task definition to the container manager backend service 214 to be stored in the database 216.
[0082] In some examples, a "cluster" may refer to a group of computer systems (virtual or physical) running instances, such as container instances of the present disclosure or other applications of container service 200. A cluster may be divided into sub-clusters, and each sub-cluster may be supported by a container manager backend service and an agent communication service dedicated to this sub-cluster. Agent communication service 220 may be configured to communicate with container agent 222 and telemetry agent 224 running on container instances within a sub-cluster.
[0083] The container manager backend service 214 can be configured to provide other management services and resources to the sub-machine cluster on the backend, such as cluster management software or cluster manager metadata described in this disclosure. The container manager backend service can be configured to receive task definitions from the template service 206, store the task definitions in the database 216, receive cluster manager metadata from the container instance 218 or the proxy communication service 220, and provide the task definition information and cluster manager metadata to the scheduler 208 or a customer-installed scheduler upon request. In response to the DescribeCluster application programming interface call, the container manager backend service can be configured to provide information about the specified cluster, such as cluster manager metadata.
[0084] The proxy communication service 220 and the container manager backend 214 may be implemented on separate computer systems within a sub-cluster, separate virtual machine instances within a sub-cluster, may share the same computer system and / or virtual machine instance within a sub-cluster, or may run on a computer system separate from its respective sub-cluster but communicate with its respective sub-cluster. Multiple container instances 218 may exist for each sub-cluster. In some cases, each sub-cluster may represent a single cluster. In other cases, a cluster may span multiple sub-clusters. In other cases, each sub-cluster may host more than one cluster. The router service 210 may be configured to route requests from the front-end service 204 to the appropriate sub-cluster. In some embodiments, the router service 210 may route requests to a single sub-cluster. In other embodiments, the router service may route requests between multiple sub-clusters.
[0085] Telemetry service 212 can be configured to aggregate control group metrics (e.g., information about processes running within containers) and container logs, and provide the aggregated metrics and logs to resource monitoring service to allow client 202 to monitor resource utilization, such as processor, storage, and network usage of their respective container instances. Control group metrics include information such as the amount of memory used by container processes, the number of times a process triggers a page fault, central processing unit usage of container processes, the duration of a central processing unit executing a system call on behalf of a container process, the number of reads and writes by a container process, and the number of input / output operations queued for a container process.
[0086] The container manager backend service 214 may be configured to receive layout requests for its containers from the client 202 through the frontend service 204, and may ensure that the requested resources are available for the container. The container manager backend service 214 may then write the required container state to the database 216. In some implementations, the container manager backend service is responsible for cluster manager metadata that may be stored in the database 216 and provided to the scheduler 208 or the scheduler installed by the customer upon request. In addition, the container manager backend service may periodically receive information from the individual container agents 222, such as information related to lifecycle events and heartbeats (e.g., periodic signals sent by the container agent 222 to indicate normal operation). In some cases, this information may be communicated to the appropriate components or entities through the frontend service 204. In some implementations, the container agent transmits this information through the agent communication service 220, which may then communicate the information directly to the container manager backend service 214, or in other implementations, the information is stored in the database 216, which may then be read by the container manager backend service 214.
[0087] Database 216 can be a data store located within the distributed computing system of container service 200, or can be a data store of a different service of a computing resource service provider such as a relational database service. In some embodiments, database 216 can be a set of distributed databases that share a transaction log. Agent communication service 220 can be configured to track the status of all agents in the cluster, and can push run commands and state transitions to their respective instances. In some embodiments, communication between other components of the container service and containers and container instances 218 is performed through agent communication service 220. Each cluster can have at least one agent communication service that relays messages between container agents 222 of the cluster.
[0088] The container agent 222 can be a software application configured to run in an instance owned by the customer 202, and can act as an interface between their respective container instances 218 and other services and entities, such as the container manager backend service 214. For example, the container agent 222 can act as an intermediary between the running tasks of its respective container instance 218 and other entities and services, so that all communications to or from the container pass through the container agent. In this way, the container agent can be configured to interpret and translate commands between the container and the specific container packaging system running with the container service 200. This can allow changes to be made to the specific container packaging system without requiring updates to the tasks or task definitions; that is, only the container agent 222 may need to be updated to reflect changes to the specific packaging system.
[0089] Therefore, each container instance 218 may have a respective container agent running therein, which communicates with the respective container manager backend service. The container agent itself may be a container configured to monitor its respective container instance, and may provide information to a system that can be used to start a container, track containers, and monitor cluster status. The container agent may also perform the functions of registering and deregistering its respective container instance, starting and stopping tasks within its respective container instance. The container agent may also be configured to respond to requests to describe its respective container instance, requests to list tasks running in its respective container instance, and requests to describe tasks running in its respective container instance. The container agent 222 may be configured to monitor the health status of the containers within the respective container instance 218 (e.g., reporting a heartbeat signal that the container instance is operating, reporting the life of the container, and reporting the container status and the occurrence of container errors), and may be further configured to perform actions based on the occurrence of certain events. For example, if the container agent detects that the container encounters an error and stops operating, the container agent may automatically generate a new container to replace the failed container. In other embodiments, the scheduler 208 may take certain actions in response to events reported to it by the container agent 222. In the above example, it may be that scheduler 208 causes a new container to be generated to replace a failed container. The customer owner of the container may specify conditions, events, and actions for scheduler 208 and / or the container agent. For example, the customer may specify that if the customer's container ceases to operate, such as due to an error or power outage, scheduler 208 or the container agent does not generate a replacement container for the invalid container. Conversely, the customer may specify that scheduler 208 or the container agent notify the customer of a problem (e.g., by changing a status indicator, providing an email message, etc.).
[0090] The container agent 222 and / or telemetry agent 224 may be configured to automatically start when their respective container instances 218 are instantiated. If a new container packaging system is implemented by the container service 200, the only changes required for the container instances 218 and containers may be to a new container agent that is configured to be compatible with the new container packaging system to be created and the container agent 222 that is to be swapped out for the new container agent. In this case, the client 202 should be able to use the same application programming interface as the container service 200, and the new container agent should be configured to support the same application programming interface without the client 202 being aware of the changes to the new packaging system.
[0091] The container agent 222 can poll the container packaging system to communicate information to the container packaging system. The container agent 222 can register or unregister the container instance 218, receive instructions from the container manager backend service 214, and ensure that the telemetry agent 224 is started and running. The container agent 222 can also update the container in the container instance 218 and monitor the status of the container running in the container instance 218 through the event stream.
[0092] The telemetry agent 224 may be configured to collect telemetry data, such as a set of control group metrics and container encapsulation system logs, and provide such telemetry data to the telemetry service 212. The telemetry service 212 may be configured to aggregate the data received from the telemetry agent 224 for use in a resource monitoring service of a computing resource service provider, which in turn may be configured to trigger an alarm or take some other action based on the aggregated data. For example, if the telemetry agent 224 communicates a log indicating an error state of a container to the telemetry service 212, the telemetry service 212 may provide the error state to the resource monitoring service, which reacts by triggering an alarm notifying the client that the container has experienced an error. As another example, if one of the metrics provided by the telemetry service 212 (e.g., central processing unit usage by a container process) exceeds a threshold, the resource monitoring service may trigger an alarm. Note that in some implementations, the telemetry service 212 may be configured to specify alarm conditions and thresholds. Examples of triggering an alert include providing a text message to the customer owner of the container, sending an email to the customer owner of the container, and / or displaying a visual indicator (e.g., a red icon, a pop-up window, etc.) on an interface displaying the status of the container.
[0093] The container service 200 may also allow data volumes to be linked to a container. Such a data volume may be a designated directory within a container and may be shared with one or more other containers that may bypass the default file system of the container instance. In this way, data may be stored persistently and shared between other containers within the container instance. Data volumes may be configured through entries in a task definition file. In some implementations, creation and selection of one or more data volumes for a container may be accomplished through a user interface configured for the purpose of communicating with the front-end service 204. The container service 200 may utilize other data storage services of computing resource service providers, such as Figure 2 The on-demand data storage service 1514 or the block-level data storage service 1510 of the data volume is used to provide storage for the data volume. In other implementations, the data volume can utilize the local storage of the container instance of the data volume.
[0094] The container service 200 can be integrated with other services of the computing resource service provider. For example, a container instance can be tagged and / or assigned to an autoscaling group of an autoscaling service of the computing resource service provider. In this way, the autoscaling service can monitor the resource usage of the container instance and can dynamically adjust / allocate resources as needed (such as a sudden increase in resource demand for the container instance). Similarly, the container service 200 can be integrated with a load balancer service of the computing resource service provider. For example, a load balancer service can distribute traffic to containers or container instances in order to balance the workload between container instances.
[0095] As an example, a customer may operate a website using container instances 218 assigned to an autoscaling group. The website may receive requests from multiple users over the Internet, and a load balancer of a load balancer service may distribute the requests to container instances 218 according to a load balancing distribution scheme. A load balancer service may be a computer system or virtual computer system configured to distribute requests to container instances 218 assigned to a load balancer in order to optimize resource utilization and / or avoid overloading of any particular host computer. For example, a load balancer may include physical hardware connected to a server rack or otherwise included in a data center. In another example, a load balancer may include one or more virtual machines supported by a host computer. At the same time, the autoscaling service may detect whether a container instance 218 requires more or fewer resources due to incoming requests, and may allocate more or fewer resources to the container instance 218 as needed.
[0096] Figure 3 1 shows one aspect of an environment 300 in which an embodiment may be implemented. Specifically, Figure 3 A container service similar to container service 1522 is depicted according to at least one embodiment, which executes multiple virtual machines configured as container instances 320. The container service may provide system hardware 340 to customers 302 of computing resource service providers 304, thereby providing container services to perform computing services within containers 310. System hardware 340 may include one or more hosts 342, also referred to as host computer systems. Each host 342 can be any device or equipment, such as a computer or server, configured to execute instructions for performing data computing, manipulation, or storage tasks. Host 342 can be equipped with any desired processing capabilities, including one or more processors, such as a central processing unit, a graphics processing unit, or a digital signal processor. Host 342 may also be equipped with memory (e.g., static and dynamic memory), a bus, and input and output ports that conform to any handshake, communication, or data transfer protocol. System hardware 340 may also include storage devices such as storage disks and tapes, and network devices. The storage device may be a network storage device managed by a data storage service, such as a storage device in conjunction with a server. Fig.15 Described block level data storage service 1510.
[0097] The virtualization layer 344 in the system hardware 340 enables the system hardware 340 to be used to provide computing resources on which one or more container instances 320 can operate. The virtualization layer 344 can be any device, software, or firmware for providing a virtual computing platform for the container instance 320. The virtualization layer 344 executed on the host 342 enables the use of this set of system hardware 340 to provide the computing resources required to support the container instance 320. In addition, the physical host 342 can host multiple virtualization layers of the same or different types on the same system hardware 340. Each container instance 320 may include various virtual computer components, such as one or more virtual processors, virtual memory, and virtual storage devices. The container instance 320 can be provided to customers of the computing resource service provider 304, and the customer can run the operating system 306 and applications on each container instance 320. Examples of the virtualization layer 344 include a hypervisor.
[0098] Requests can be made by Figure 2 The request interface 314 can direct the request to the appropriate container instance. Each container instance 320 can include one or more software agents 308. The software agent 308 can be configured to allow customers 302 to manage their respective containers 310 and container instances. The software agent 308 can be further configured to perform event logging and collect telemetry data related to the container 310 and container instance 320. An example of such a software agent 308 is a combination of Figure 2 Container agent 222 and telemetry agent 224 are described.
[0099] The operating system 306 can be any operating system suitable for running within a container instance 320 and providing isolation technology that enables a containerization scheme to isolate a virtualized instance such as a container 310 from other processes running under the operating system 306. Examples of such operating systems include various implementations of the Linux operating system that support resource isolation features in the Linux kernel. As described above, a container 310 can be a virtualized instance within an operating system 306 that is launched from an application image according to one or more task definitions and can be allocated resources from its respective container instance 320.
[0100] Figure 4 4 shows one aspect of an environment 400 in which embodiments may be implemented. Figure 4As shown, environment 400 may include a set of containers 402 launched within container instance 418, which are monitored by container agent 422 and provide metrics and log information to telemetry agent 424. Container agent 422 may then transmit monitoring information through an agent communication service (such as agent communication service 420, similar to agent communication service 220). Container agent 422 may also communicate with telemetry agent 424, and container agent 422 may periodically monitor the health of telemetry agent 424 to ensure that telemetry agent 424 is running. If telemetry agent 424 stops running or otherwise encounters an error, container agent 424 may restart telemetry agent 424 as needed. In some embodiments, monitoring information from container agent 222 may be provided to front-end service 204 in response to an application programming interface call. Telemetry agent 424 may communicate metrics and log information to telemetry service 412, similar to telemetry service 212. In some embodiments, the telemetry agent communicates directly with the telemetry service 412 , while in other embodiments, the telemetry agent 424 may communicate with the telemetry service 412 through the front-end service 404 .
[0101] Similar to containers discussed elsewhere in this disclosure, container 402 may run virtualized instances (also referred to as tasks) of varying lifespans (e.g., short-lived batch jobs, long-lived background processes, etc.) that are isolated from other processes within the container instance. Metrics about container 402 may be collected, aggregated, and provided to telemetry service 412 by telemetry agent 424. Container agent 422 acts as an intermediary between container 402 and resources, services, and other entities outside the namespace of container 402. In some implementations, container 402 may be configured to share external resources, such as block-level data storage volumes. In some of these implementations, accessing and communicating with shared external resources through container 402 may be performed through container agent 422. In other implementations, container instance 418 or the operating system of container instance 418 may support allowing container 402 to access or communicate with shared resources without going through container agent 422.
[0102] The cluster manager 406 can be metadata or cluster management software configured with a set of rules for determining within which container instance 418 the container 402 should be started. For example, when a container instance 418 is instantiated, its container agent 422 can update the cluster manager 406 with information indicating that the container instance 418 can be used to host containers for customers. Thereafter, if a request to start a container is received from a customer or from a scheduler through the front-end service 404, the scheduler can refer to the cluster manager 406 to select a container instance 418 and inform the container agent 422 of the container instance 418 to start the container. The cluster manager 406 can also be configured to specify what actions should be taken in response to certain types of container events. For example, if one of the containers 402 fails and / or stops operating, the container agent 422 can refer to the cluster manager 406 to determine whether to restart the failed or invalid container.
[0103] Note that in some embodiments, the scheduler may communicate with the agent communication service 420 or directly with the container agent 422 to instruct the container agent 422 to launch tasks. In other embodiments, the scheduler communicates this layout and launch instructions to the container manager backend 414, which then launches the containers according to the layout order from the scheduler, such as by communicating the launch instructions directly or through the agent communication service to the container agent 422. The cluster manager 406 can be multi-tenant; for example, the cluster manager 406 can be configured with information for managing clusters for multiple customers of a computing resource service provider.
[0104] As described above, the container manager backend 414 can be configured to provide an environment for other processes that support containers and container instances in a particular sub-cluster, such as the cluster manager 406. The container agent 422 can be configured to provide the cluster manager 406 with lifecycle and health information about the container 402 monitored by the container agent 422. In some implementations, the container agent 422 collects metrics and log information and passes this information to the telemetry agent 424 or directly to the telemetry service. Similarly, in some implementations, the container agent 422 can update the cluster manager 406 through the agent communication service 420. In some embodiments, the communication between the container agent and the external components can be a one-way communication from the container agent 422 to the agent communication service 420 and the external components. In other embodiments, the communication between the container agent 422 and the agent communication service 420 is bidirectional. In other implementations, the container agent 422 can directly update the cluster manager 406 without going through the agent communication service 420. Note that container agent 422 may be a software container that is started when a container instance is created, and in other cases, container agent 422 may be a process running under the operating system of the container instance that communicates with container 402 .
[0105] As described above, telemetry agent 424 can be configured to collect metrics and log information about container 402 running within container instance 418 and pass the collected metrics and log information to telemetry service 412. In some implementations, telemetry agent 424 can be its own independent container that is started when container instance 418 is created. In other implementations, telemetry agent can be a process running under the operating system of container instance 418 and configured to receive metrics and log information directly through container 402 or through container agent 422. Note that not all implementations of the present disclosure require telemetry agent 424 and / or telemetry service 412.
[0106] Figure 5 An example 500 of resource allocation between a container instance 502 and containers 504A-504B within the container instance is shown. Container instance 502 may be a computer system instance (virtual or non-virtual) configured to support a container instance (containerization). Container instance 502 is depicted as having an amount of allocated processing resources 506 and an amount of memory resources 508. Each of containers 504A-504C may be launched within container instance 502 via a software image and an amount of resources allocated from a resource pool of container instance 502, such as processing resources 506 and memory resources 508. As shown, container 506A has been allocated 35% of the processing resources 506 and 15% of the memory resources 508 of container instance 502 to run its process 510A. Similarly, container 506B has been allocated 40% of the processing resources 506 and 50% of the memory resources 508 of container instance 502 to run its process 510B. Likewise, container 504C has been allocated 10% of processing resources 506 and 20% of memory resources 508 of container instance 502 to run its process 510C. In summary, 85% of processing resources 506 and 85% of memory resources of container instance 502 have been allocated to containers 504A through 504C.
[0107] The container instance may include a container agent 512. As described above, the container agent 512 may be a separately running container configured to interface between the containers 504A-504C and entities external to the container instance 502. The amount of resources to be allocated to the containers 504A-504C may be specified within the task definition. As described in this specification, the scheduler may determine the container instance 502 in which to launch the container 504A-504C based on a layout scheme and / or available resources within a group of container instances (of which the container instance 502 is a member). Subsequently, the scheduler may notify the container instance 502 or the container agent 512 to allocate the amount of resources specified by the task definition to the containers 504A-504C, and the container agent 512 may allocate the resources to the containers 504A-504C as directed by the scheduler. In addition, once resources are allocated to each of the containers 504A to 504C, the scheduler can notify the container instance 502 or the container agent 512 to start each of the containers 504A to 504C as a container (i.e., task) running in its own namespace and exclusively using its respectively allocated resources. After being notified, the container agent 512 can start the containers 504A to 504C within the container instance 502 as instructed by the scheduler.
[0108] Figure 6 600 for launching a task into a cluster. The process 600 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or ... Fig.16 The electronic client device 1602 is described. The process 600 includes a series of operations in which a software image and a task definition for a container are obtained, a cluster is created and a container instance is registered with the cluster, the cluster is described, the image is started within a determined container instance according to the task definition, and the description of the cluster is updated.
[0109] In 602, the computing resource service provider receives a software image from a customer of the computing resource service provider. As described above, a software image may refer to data representing the entire state of a software application at the time it was imaged, such that the software application may be restored at this point by restoring / launching the software image. In some cases, the operation in 602 may be to obtain an executable installation or application file rather than an image. Note that in some cases, receiving the software image includes making the software image accessible to the computing resource service provider, such as through a resource location specified in a task definition file. In some cases, the software image may be stored in a resource such as a server of the computing resource service provider. Figure 2 In the data storage area of the database 216.
[0110] At 604, the computing resource service provider may receive a task definition that describes a task / container that is to be run within one or more instances. The task definition may be in the form of a task definition file, or may be generated by the computing resource service provider in response to an option selected by the customer via a user interface. The task definition may specify information such as a description of the task / container, a location where an image of the task / container is found, an amount of resources allocated to the task / container, shared resources, relationships between other containers, and other information. As described above, the task definition may be stored in a file such as a computing resource service provider's Figure 2 In the data storage area of the database 216.
[0111] At 606, a container instance may be instantiated. As described above, the container instance may be a virtual machine instance that supports containerization. In some cases, instantiating the container instance includes launching a container agent within the container instance. The container agent may run under the operating system of the container instance, and the container agent itself may be a container.
[0112] In 608, one or more clusters may be created. As described above, a cluster may be a logical grouping of one or more container instances. Clusters may be used for various purposes, including separating tasks by function, grouping different types of container instances together, and grouping container instances based on the location of physical host machines within a computing resource service provider infrastructure. Once a cluster is created, one or more container instances may be registered as members of the cluster through a cluster manager. As described above, in some cases, a container instance may be a member of more than one cluster. Note that operations 606 to 608 may occur together or in any order. For example, a cluster may be created before a container instance, and when a container instance is instantiated, a container agent within the container instance may automatically cause the container instance to register with the cluster.
[0113] In 610, the computing resource service provider provides the cluster or cluster ID to the customer or other entity that may be responsible for requesting the task launch. In some cases, this other entity may be a scheduler, such as provided by a container service. Figure 2 The scheduler 208 of the system or the scheduler installed by the customer. The cluster ID may be provided in response to a request to create a cluster in 608. At other times, the cluster ID may be provided to a requesting entity making a ListClusters application programming interface call.
[0114] In 612, a DescribeCluster application programming interface call may be received from a customer or other entity (e.g., a scheduler) responsible for requesting task launches, thereby specifying a cluster to describe (e.g., by passing the cluster ID of 610 as a parameter). In response to the DescribeCluster application programming interface call, the computing resource service provider may provide information about the cluster in 614, including the number and IDs of container instances within the cluster, resources available within the cluster, resources used in the cluster, running tasks, etc. This information can be used by the customer or scheduler to determine where (e.g., which container instance) a particular task should be launched (e.g., to achieve certain performance goals, to balance load, etc.).
[0115] In 616, the computing resource service provider receives a request to run one or more tasks according to the information specified in the task definition obtained in 604. In some cases, the request may specify in which container instances to run the one or more tasks. In other cases, the request may specify in which cluster to run the one or more tasks, and such as Figure 2 The scheduler of the scheduler 216 can determine which container instance the task should be launched into according to a placement scheme. The placement scheme can include a round-robin placement scheme based on resource usage or other criteria, a random allocation placement, or a heuristic method.
[0116] Once the target location of the task is determined (e.g., after determining the instance ID of the container instance in which the task is to be launched), in 618, the task corresponding to the software image of 602 can be launched into one or more container instances according to the task definition of 604. In some cases, the launch of the task can be performed by a container agent running in the determined container instance. The dashed line between 618 and 620 indicates that the operations below the dashed line may not be integral to the launch of the task in the cluster, but provide information about the running task launched in 602 to 618.
[0117] In 620, similar to the request in 612, a request to describe the cluster may be received. In 622, the computing resource service provider may query one or more container agents of the container instance running the task for status information about the running task in the container instance. In 624, similar to the operation of 614, the computing resource service provider may provide information describing the cluster in response to the request of 620. However, unlike 614, the information should now reflect the effect of the resources allocated to the running task 618 launched into the cluster and / or allocated to the running task. Note that one or more operations performed in 602 to 620 may be performed in various orders and combinations, including in parallel.
[0118] Figure 7700 for creating a cluster according to various embodiments. Process 700 may be performed by any suitable system, such as a server in a data center, multiple computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or ... Fig.16 Depicted electronic client device 1602. Process 700 includes a series of operations in which a CreateCluster application programming interface call is received from a requester, the requester is authenticated, cluster metadata is then stored in a database if authenticated, and a cluster ID is generated and provided to the requester.
[0119] In 702, the computing resource service provider receives an application programming interface call from a customer or other entity to create a cluster. Creating a cluster may include generating a cluster ID for the cluster and storing the cluster ID in a database along with other metadata about the cluster. In some cases, the requester may indicate through a CreateCluster application programming interface call that a container instance be registered with the cluster when the cluster is created. In this case, a specified container instance (e.g., one or more container instance IDs passed as parameters in the application programming interface call) or an available container instance may be registered in association with the cluster ID during cluster creation. In other such cases, if an existing container instance is not specified and no container instance is available, a new container instance may be instantiated and registered with the cluster during cluster creation. It should be noted that in some implementations, the computing resource service provider may provide a default cluster to the customer; in this case, the customer does not need to utilize the CreateCluster application programming interface and may only register the container instance with the default cluster unless an additional cluster is required or if the default cluster is deleted.
[0120] In 704, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials proving identity and ownership as parameters to the CreateCluster API call. For example, the requester may provide information sufficient to prove the right to use the credentials as credentials corresponding to the identity proving ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as credentials proving ownership corresponding to the identity. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0121] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 700 may not proceed further in process 700. The system performing process 700 may respond to the authentication failure with an error message to the requester and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the CreateCluster request, then the system performing process 700 may proceed to 706.
[0122] At 706, the system executing process 700 may store the cluster ID and cluster metadata in a data store, such as in conjunction with Figure 2 Database 216 described. As described above, in some cases, a cluster can be metadata stored in association with one or more container instances (e.g., container instances registered to a cluster). The scheduler can refer to the cluster manager to determine in which container instance in the cluster to start a container. In some examples, a "cluster manager" refers at least in part to cluster metadata. In other examples, a cluster manager can be a software application or service that manages cluster metadata and communicates with the scheduler. It should be noted that in some implementations, storing cluster metadata in a data store may result in the generation of a cluster ID. The cluster metadata may include information such as the geographic region of the hosts of the container instances in the cluster, the number of container instances assigned or allowed to be assigned to the cluster, and the date / time when the cluster was created.
[0123] Once stored, at 708, the system executing process 700 may notify the requestor that the cluster was successfully created. In some cases, this notification may include additional information / metadata about the cluster, including the IDs of any container instances registered with the cluster and available resources (e.g., memory and / or processing power). Thereafter, the requestor, if authenticated, may utilize the DescribeCluster application programming interface call, passing the cluster ID as a parameter, and the computing resource service provider may respond by providing information including metadata information, a list of container instances registered with the specified cluster, a list of tasks running within the cluster container instances, available resources in the cluster, resources used in the cluster, information about the cluster as provided by the telemetry service (e.g., Figure 2 The telemetry service 212 collects metrics of the cluster's container instances, task definitions associated with the cluster or cluster container instances, and other status information about the cluster.
[0124] Figure 8800 for registering a container instance according to various embodiments. Process 800 may be performed by any suitable system, such as a server in a data center, multiple computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in a data center, a computing resource service provider, or a server in a distributed system of a computing resource service provider, or a server in a data center ... Fig.16 The electronic client device 1602 is described. Process 800 includes a series of operations, in which the system executing process 800 receives an application programming interface call from a requester to register a container instance. The system then authenticates the requester, registers the container instance, and notifies the requester of a successful registration.
[0125] At 802, a computing resource service provider receives an application programming interface call for registering a container instance. In some cases, this request may be received from a customer or other entity external to the container service. In some of these cases, the request is received by a front-end service and communicated to a container agent, which registers the container instance. In other cases, this request may be from a container agent to a front-end service. For example, when a container instance is instantiated with a container agent, the container agent may automatically attempt to register the container instance with a specified cluster or a default cluster. Registering a container instance may include associating an existing virtual machine instance that has been specifically configured to support containerization with a particular cluster, or associating an existing virtual machine instance that has support for containerization with a particular cluster. This association may be stored in a database such as Figure 2 In the database of the database 216, the relationship between the instance ID and the cluster ID is provided. In this case, the requester can provide the instance ID (or other identification attributes) and the cluster ID as parameters in the RegisterContainerInstance function call.
[0126] In some cases, the requester may not specify a specific existing container instance, and in this case, the computing resource service provider may select a container from a set of pre-instantiated container instances suitable for containerization. In other cases, if a suitable pre-instantiated container instance is not available, the computing resource service provider may instantiate a new container instance suitable for the container instance and register the newly instantiated container instance to the specified cluster. In some implementations, the RegisterContainerInstance application programming interface call can be used to register an existing container instance to a cluster different from the currently registered cluster. In this case, the requester can specify the container instance ID and the cluster ID as parameters of the application programming interface call.
[0127] At 804, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials that prove identity and ownership as parameters of the RegisterContainerInstance application programming interface call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential that corresponds to the identity, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential that corresponds to the identity, such as a password, a cryptographic hash / digest of the password, a cryptographic ... Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the request to be fulfilled.
[0128] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 800 may not proceed further in process 800. The system performing process 800 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the RegisterContainerInstance request, then the system performing process 800 may proceed to 806.
[0129] At 806, the system performing process 800 may attempt to look up the container instance ID in a relevant database, such as database 216, if specified. If it is discovered and determined that the container instance ID is already associated with a different cluster ID, then in some cases, the system performing process 800 may, at 806, deregister the container instance from its currently registered cluster and register it with the specified cluster. In some of these cases, this deregistration / reregistration may be performed automatically after authenticating the requester. In other cases, the system performing process 800 may prompt the requester for confirmation to deregister the container instance from its currently registered cluster before the system performs the deregistration / reregistration operation. In other implementations, the container instance may be registered to multiple clusters simultaneously, and in such implementations, the registered container instance may not be deregistered from its currently registered cluster.
[0130] If the container instance has not been registered with the cluster, has been deregistered from the cluster, or if the implementation supports registration of the container instance with multiple clusters, the system executing process 800 may store the container instance ID in a database associated with the specified cluster. The system executing process 800 may then notify the requester that the container instance has been successfully registered with the specified cluster, and in some cases, particularly when a new container instance is created, the system may include the container instance ID in the response. In a subsequent DescribeContainerInstance application programming interface call, the computing resource service provider may provide the requester (if authenticated) with information about the container instance, including available resources, tasks running within the container instance, and which cluster or clusters the container instance is registered with.
[0131] Fig. 9 900 is a block diagram illustrating an example of a process 900 for registering a task according to various embodiments. The process 900 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 The electronic client device 1602 described. Process 900 includes a series of operations in which the system executing process 900 receives an application programming interface call from a requester to register a task definition. Subsequently, the system authenticates the requester, registers the task definition, and responds with a task definition ID. In some implementations, the task definition can be registered with the ID of the requester. For example, if the requester is a customer of a computing resource service provider, the task definition can be registered in association with the customer's account ID. In other implementations, the task definition can be publicly available, such as through an online marketplace, and can be registered in association with an online marketplace, a buyer, or some other entity or service.
[0132] In 902, the computing resource service provider receives an application programming interface call from a customer or other entity to register a task. Registering a task may include storing a task definition or a task definition file in a database. In some implementations, the requester does not need to create and upload a separate task definition, but can select various options from a user interface provided by the computing resource service provider, and the computing resource service provider can dynamically generate a task definition based on the selected options. In some cases, the computing resource service provider may provide a text input interface to allow customers to type or cut / paste task definitions through the interface. In some cases, the request to register a task may be accompanied by one or more software images corresponding to the software image specified in the task definition. In some implementations, the request may specify one or more cluster IDs to be associated with the task definition. In other implementations, the request may specify one or more container instance IDs to be associated with the task definition. In other implementations, the task definition can be registered independently of any specified cluster or container instance.
[0133] At 904, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials of identity and proof of ownership as parameters of the RegisterTaskDefinition application programming interface call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0134] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 900 may not proceed further in process 900. The system performing process 900 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the RegisterTaskDefinition request, then the system performing process 900 may proceed to 906.
[0135] At 906, the system executing process 900 may store the task definition in a data store, such as in conjunction with Figure 2 Database 216 described. In some implementations, the task definition may be registered in association with a customer ID of an account of a computing resource service provider. In other implementations, the task definition may be registered to the identity of a user who obtains the task definition from a website, a computing resource service provider, or a computing resource service provider (e.g., a buyer of a task definition from an online marketplace). In other implementations, the task definition may be stored and linked to one or more cluster IDs and / or container instance IDs. Once stored, a task definition ID unique to the task definition may be generated by the computing resource service provider or by a database. It should also be noted that in some implementations, the task definition ID may be provided with a RegisterTaskDefinition application programming interface call to update a task definition already stored in a database. That is, the requester may submit an updated task definition and an existing task definition ID as parameters of the RegisterTaskDefinition application programming interface call, and the computing resource service provider may locate the task definition entry corresponding to the existing task definition ID and update the task definition corresponding to the task definition ID with the updated task definition.
[0136] Thus, at 908, the system performing process 900 may provide this task definition ID to the requester as confirmation of successful registration of the task definition and also as a way for the requester to later specify a task definition stored in a database. In some cases, one or more software images may accompany the RegisterTaskDefinition application programming interface call, and these software images may be stored in the same or different data storage area as the task definition. In some cases, these software images may be referenced by the task definition ID, while in other cases, the software images may receive a software image ID that may be provided to the requester along with the task definition ID of the stored task definition.
[0137] Fig.10 1 is a block diagram illustrating an example of a process 1000 for starting a task according to various embodiments. The process 1000 may be performed by any suitable system, such as a server in a data center, multiple computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 Depicted electronic client device 1602. Process 1000 includes a series of operations in which a request to start a task is received, the requestor is authenticated, and if authenticated then the appropriate location to initiate the task is determined and the task is initiated.
[0138] In 1002, the computing resource service provider receives an application programming interface call for starting a task. In some cases, this application programming interface call may be received from a customer or other entity outside the container service through a front-end service. In other cases, this application programming interface call may be made through a container agent in response to a communication from a scheduler to start a task. The StartTask application programming interface can be used to start running a software container from, for example, an image of a software container or from one or more executable application files. The StartTask application programming interface call may include parameters for one or more task definition IDs of a task definition stored in a data storage area such as database 216. In some cases, the task definition itself, rather than the task definition ID, may be passed as a parameter to the StartTask application programming interface call. In other cases, a parameter indicating the location of one or more task definition files (e.g., a uniform resource locator, a network resource locator, a file path, etc.) may be passed as a parameter to the StartTask application programming interface. In other cases, the container service may be configured to start a task without a separate program definition; for example, the StartTask application programming interface may have default parameters, and any information required by the requester for starting the task or deviating from the default value may be passed as a parameter to the StartTask application programming interface call.
[0139] The StartTask application programming interface may also accept as parameters one or more image IDs of software images representing the base container image. In some cases, a parameter indicating the location of an image file may be passed instead of an image file. In other cases, the task definition may contain information for locating container software to start running as a task. The requester may also specify one or more cluster IDs as parameters to the StartTask application programming interface call to indicate which clusters the one or more tasks should start in. Similarly, the requester may specify one or more container instance IDs as parameters to the StartTask application programming interface call to indicate which container instances the one or more tasks should start in. The ID of the cluster may be obtained through a ListClusters application programming interface call. The ID of the registered container instance may be obtained from a DescribeCluster application programming interface call.
[0140] At 1004, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials of identity and proof of ownership as parameters of the StartTask API call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0141] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system executing process 1000 may not proceed further in process 1000. The system executing process 1000 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in a security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the StartTask request, then the system executing process 1000 may proceed to 1006.
[0142] At 1006, the system executing process 1000 may determine a container instance into which to start the task. In some embodiments, a scheduler (such as a scheduler) of a container service Figure 2The scheduler 208 of the system may determine which container instance in the list of specified clusters and / or container instances one or more tasks should be started to according to the layout scheme. The layout scheme may be any of a variety of layout schemes, including a cyclic, pseudo-random layout scheme, or a layout scheme that takes container status (e.g., the current number of available resources, etc.) into account. In some implementations, the customer of the account may have installed a scheduler application within the virtual machine instance. In this implementation, the StartTask application programming interface call may receive an ID or resource locator indicating the location of the installed scheduler as a parameter, and the process 1000 may also include the system executing the process 1000 communicating with the installed scheduler to determine which container instance one or more tasks should be started to. In some cases, the specified task may have already started. In this case, the system executing the process 1000 may stop the running task and restart the task. In some of these cases, the system executing the process 1000 may notify the requester that the task has started, and may request confirmation whether to stop the running task and restart the task.
[0143] In some cases, the system executing process 1000 may determine that the resources available in the list of clusters or container instances are insufficient to start one or more tasks. For example, the task definition file may have specified that more memory is to be allocated to the software container (than the memory currently available in the container instances of the specified cluster). In some of these cases, the system executing process 1000 may wait a predetermined period of time (e.g., 10 milliseconds) and try to start the task again, repeating until the system is able to start the task or until a threshold number of attempts have occurred.
[0144] If the system executing process 1000 cannot start the task, the system may notify the requester that the task cannot be started due to a specific problem. In some implementations, if there are not enough resources available to start the task, the container service may interact with the autoscaling service to generate additional resources to support starting the task. For example, the system executing process 1000 may instantiate one or more new container instances and register them with the cluster, and start one or more tasks in the new container instances. As another example, the system executing process 1000 may obtain a snapshot of the container instance, restart the container instance using upgraded resources (e.g., processing power and memory), and restore the container instance from the snapshot.
[0145] At 1008, the system executing process 1000 may launch the container image or the specified application into the determined container instance. As described above, launching the container image or the specified application into the container instance may include generating one or more task IDs for the task, storing the task ID in association with the determined container instance ID in a file such as a local disk, and storing the task ID in a local disk such as a local disk. Figure 2The task definition may also indicate links between containers; for example, a container configured to be used as a web service may be linked to a container configured to be used as a database, and the two containers may be configured to communicate with each other at startup. Similarly, in some implementations, containers may share specified resources of other services of a computing resource service provider. For example, a task definition file may specify that two containers share a specific block-level data storage volume.
[0146] Once started, the system executing this process can notify the requester that one or more tasks have been successfully started. In some cases, this can be a matter of changing the icon of the monitoring interface to indicate that the task has started and that the task is now running within a particular cluster or instance. In other cases, this can be a matter of logging the event. In other cases, the requester can be notified by receiving a valid task ID from the system corresponding to the running task. A list of running tasks can be obtained from the ListTasks application programming interface call. Data about the task, such as the health of the container, the age of the container, and the resource usage of the container, can be obtained by using the DescribeTask application programming interface and specifying the task ID.
[0147] Fig.11 1 is a block diagram illustrating an example of a process 1100 for stopping a task according to various embodiments. The process 1100 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 The electronic client device 1602 is depicted. The process 1100 includes a series of operations in which a stop task request is received to specify a task to stop, the requestor is authenticated, and the specified task is stopped to release resources allocated to the task.
[0148] In 1102, the computing resource service provider receives an application programming interface call for stopping a running task. In some cases, the application programming interface call may be received from a customer or other entity external to the container service as a front-end service. In other cases, the container agent may make an application programming interface call in response to a communication from the scheduler to stop the task. StopTask may receive one or more task IDs of the running tasks as parameters. In 1104, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials proving identity and ownership as parameters to the StopTask application programming interface call. For example, the requester may provide information sufficient to prove the right to use the credentials as credentials proving ownership corresponding to the identity, such as a password, a cryptographic hash / digest of a password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide a request to a provider such as Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0149] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 1100 may not proceed further in process 1100. The system performing process 1100 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the StopTask request, then the system performing process 1100 may proceed to 1106.
[0150] At 1106, the specified one or more running tasks may be stopped, and resources previously allocated to the one or more tasks may be released / garbage collected and added to the available resources of the host container instance. In some cases, the task ID may be disabled, archived, or removed from the data store. In other cases, the status of the task may be updated to "stopped", and this change in status may be reflected in any interface for viewing the status of running tasks. The requestor may also be notified that the task associated with the task ID has been successfully stopped.
[0151] Fig.121 is a block diagram illustrating an example of a process 1200 for deregistering a container instance according to various embodiments. The process 1200 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 Depicted electronic client device 1602. Process 1200 includes a series of operations in which a request to deregister a task definition is received, the requestor is authenticated, and if the requestor has sufficient permissions, the task definition may be deregistered.
[0152] At 1202, the computing resource service provider receives an application programming interface call for deregistering a task. In some cases, this request may be received from a customer or other entity to the container service. Deregistering a task may include disabling, archiving, or removing the task from a data store that has been registered according to process 900 for registering tasks. Thus, the task definition ID generated in process 900 may be provided with the DeregisterTaskDefinition application programming interface call to identify which task is to be deregistered.
[0153] At 1204, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials of identity and proof of ownership as parameters of the DeregisterTaskDefinition API call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0154] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 1200 may not proceed further in process 1200. The system performing process 1200 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the DeregisterTaskDefinition request, then the system performing process 1200 may proceed to 1206.
[0155] At 1206, the system executing process 1200 may disable, archive, or remove the task definition from the data store storing the task definition at 906. Any data entry indicating a relationship between the task definition and a cluster, container instance, software image, or other container may also be disabled, archived, or removed. In some cases, if one or more tasks associated with the task definition are running, the task may be stopped according to process 1100 for stopping a task. Once the task is deregistered, the requestor may be notified of the successful deregistration of the task.
[0156] Fig.13 1 is a block diagram illustrating an example of a process 1300 for deregistering a container instance according to various embodiments. The process 1300 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 The electronic client device 1602 is depicted. The process 1300 includes a series of operations in which a request to deregister a registered container instance from a cluster is received, the requestor is authenticated, and the container instance is deregistered from the cluster.
[0157] At 1302, a computing resource service provider receives an application programming interface call from a customer or other entity to deregister a container instance. Deregistering a container instance may include detaching a container instance registered according to process 800 for registering a container instance from a specified cluster. Figure 2Such an association is found in the database of database 216 of the process 1300, such as the relationship between the ID of the registered container instance and the cluster ID passed as a parameter of the DeregisterContainerInstance application programming interface call. In this case, this request can be received from the front-end service and communicated with the container agent, which deregisters its respective container instance. In other cases, this request can be from the container agent to the front-end service. For example, when a container instance is to be revoked, removed from a cluster, and transferred to a different cluster, the container agent can automatically attempt to deregister the container instance from the cluster to which it is currently registered. In some of these cases, the requester can specify the instance ID of the registered container, such as can be revealed by the DescribeCluster application programming interface call, and the system executing process 1300 can deregister the specified container instance from all clusters to which it is registered. In some cases, if the container instance is registered to multiple clusters, the system executing process 1300 can prompt the requester to confirm which cluster or clusters the container instance should be deregistered from. In other cases, both the instance ID and the cluster ID may be passed as parameters to the DeregisterContainerInstance application programming interface call, and assuming the requester has sufficient permissions as determined in 1304, the container instance may be deregistered from the specified cluster.
[0158] At 1304, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials of identity and proof of ownership as parameters of the DeregisterContainerInstance API call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0159] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 1300 may not proceed further in process 1300. The system performing process 1300 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the RegisterContainerInstance request, then the system performing process 1300 may proceed to 1306.
[0160] In 1306, the system executing process 1300 may look up the specified instance ID in the data store where the container instance is registered. It should be noted that the tasks running in the specified container instance may be stopped according to the process 1100 for stopping the tasks before the container instance is deregistered. In some cases, if the tasks are running in the specified container instance, the system executing process 1300 may request confirmation from the requester to stop the running tasks before the system will deregister the container instance. As described above, in some implementations, the container instance may be registered to multiple clusters, and the requester may specify that the container instance is to be deregistered from only a subset of the clusters. In such an implementation, if tasks associated with a specified subset of the cluster are running within the container instance and are confirmed by the requester to be stopped, only the tasks associated with the specified subset of the cluster may be stopped, and only the remaining running tasks may remain.
[0161] At 1308, after the instance ID has been found in the database and the associated tasks have been stopped, the instance ID may be disabled, archived, or removed from the data store. In some cases, the state of the instance may be updated to "deregistered", and this change in state may be reflected in any interface for viewing cluster status. If the container instance is registered to multiple clusters, then the specified container instance may be detached from only a specified subset of the clusters, and the container instance may remain registered to the remaining clusters. Upon deregistration, the requestor may also be notified that the container instance associated with this instance has been successfully deregistered in one or more clusters from which it was deregistered.
[0162] In some implementations of the present disclosure, a container instance that is not registered with any cluster may be revoked, and any resources allocated to the container instance may be released. Alternatively, the container instance may be added to a queue of instances available for registration with a cluster. In this way, when a container instance is needed to register with a cluster according to the process 800 for registering a container instance, the container instance may be selected from the available container instances without the overhead of providing a new container instance for registration.
[0163] Fig.141400 is a block diagram illustrating an example of a process 1400 for deleting a cluster according to various embodiments. The process 1400 may be performed by any suitable system, such as a server in a data center, a plurality of computing devices in a distributed system of a computing resource service provider, or any electronic client device, such as a server in conjunction with a server. Fig.16 Depicted electronic client device 1602. Process 1400 includes a series of operations in which a request to delete a cluster is received, the requestor is authenticated, any container instances in the cluster are deregistered, and the cluster is deleted or otherwise disabled.
[0164] At 1402, the computing resource service provider receives an API call from a customer or other entity to delete a cluster. The cluster to be deleted may be a default cluster provided by the computing resource service provider, or may be a cluster created according to the process 700 for creating a cluster. The DeleteCluster API may receive as a parameter the cluster ID of the cluster to be deleted. Thus, the cluster ID and cluster metadata may be stored in a database such as Figure 2 The cluster ID may be provided to the requester when the cluster is created, or may be determined through a ListClusters application programming interface call.
[0165] At 1404, the computing resource service provider determines whether the requester has sufficient authority to fulfill the request. For example, the requester may have provided credentials of identity and proof of ownership as parameters of the DeleteCluster API call. For example, the requester may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership, such as a password, a cryptographic hash / digest of the password, an encrypted digital signature generated by a signing key, or other keys that the computing resource service provider can verify to authorize the requester's identity. The computing resource service provider may provide information sufficient to prove the right to use the credentials as a credential corresponding to the identity proof of ownership. Fig.15 The identity and proof are provided by the authentication service of the authentication system 1518 of the computing resource service provider, which can then verify the identity and credential proof of the requester. Once the identity of the requester is verified, the computing resource service provider or the authentication service can determine whether the security policy and / or role associated with this identity grants sufficient permissions to allow the fulfillment of this request.
[0166] If the computing resource service provider cannot determine the identity (e.g., not found in the security database), the credentials prove insufficient to prove the identity (e.g., incorrect password), or otherwise the identity of the requester may not be confirmed, then the system performing process 1400 may not proceed further in process 1400. The system performing process 1400 may respond with an error message to the requester for the authentication failure and / or register the authentication failure in the security log. Otherwise, if the requester is authenticated and determined to have sufficient permissions to fulfill the DeleteCluster request, then the system performing process 1400 may proceed to 1406.
[0167] At 1406, if any container instances are registered to the specified cluster, then each container instance may be deregistered from the cluster according to process 1300 for deregistering container instances. At 1408, one or more entries for the cluster associated with the specified cluster ID may be located in the data store and disabled, archived, or removed from the data store. If the cluster is disabled or archived, metadata about the cluster may be retained and the cluster may be reactivated by an entity with authority to do so. The requester may then be notified that the cluster has been successfully deleted and that container instances can no longer be registered to the cluster ID. For example, an interface displaying cluster status may be updated to reflect "deleted" for the specified cluster, and the cluster may no longer be reflected in a ListClusters application programming interface call response.
[0168] Fig.15 An example of a client connecting to a computing resource service provider according to at least one embodiment is shown. Computing resource service provider 1502 can provide various services to client 1504, and client 1504 can communicate with computing resource service provider 1502 via interface 1526, which can be a web service interface or any other type of client interface. Fig.15 One interface 1526 is shown for the services of computing resource service provider 1502, but each service may have its own interface, and typically a subset of services may have corresponding interfaces in addition to or as an alternative to interface 1526. Customer 1504 may be an organization that may utilize one or more services provided by computing resource service provider 1502 to maintain and deliver information for its employees (who may be located in various geographic locations). Additionally, customer 1504 may be an individual that utilizes the services of computing resource service provider 1502 to deliver content to a remotely located workgroup. Fig.15As shown, customers 1504 can communicate with computing resource service providers 1502 via network 1506, whereby network 1506 can be a communication network such as the Internet, an intranet, or an Internet service provider (ISP) network. Some communications from customers 1504 to computing resource service providers 1502 can cause computing resource service providers 1502 to operate in accordance with one or more of the described embodiments or variations thereof.
[0169] The computing resource service provider 1502 may provide a variety of computing resource services to its customers. In this example, the services provided by the computing resource service provider 1502 include a virtual computer system service 1508, a block-level data storage service 1510, a cryptographic service 1512, an on-demand data storage service 1514, a notification service 1516, an authentication system 1518, a policy management service 1520, a container service 1522, and one or more other services 1524. It should be noted that not all embodiments described include reference to Fig.15 The services 1508-24 described herein may include, and additional services may be provided in addition to or in lieu of the services explicitly described. As described, each of the services 1508-24 may include one or more web service interfaces that enable clients 1504 to submit appropriately configured API calls to the various services via web service requests. In addition, each service may include one or more service interfaces that enable services to access each other (e.g., enabling a virtual computer system of the virtual computer system service 1508 to store data in or retrieve data from an on-demand data storage service 1514, and / or access one or more block-level data storage devices provided by a block-level data storage service 1510).
[0170] The virtual computer system service 1508 may be a collection of computing resources configured to instantiate virtual machine instances on behalf of the customer 1504. The customer 1504 may interact with the virtual computer system service 1508 (through appropriately configured and authenticated API calls) to provide and operate a virtual computer system instantiated on a physical computing device hosted and operated by the computing resource service provider 1502. The virtual computer system may be used for a variety of purposes, such as operating as a server to support a website, operating a business application, or generally, acting as a computing capability for a customer. Other applications for the virtual computer system may be used to support database applications, e-commerce applications, business applications, and / or other applications. Although in Fig.15A virtual computer system service 1508 is shown, but any other computer system or computer system service may be utilized in the computing resource service provider 1502, such as a computer system or computer system service that is not virtualized or instantiated but instead provides computing resources on dedicated or shared computers / servers and / or other physical devices.
[0171] The block-level data storage service 1510 may include one or more computing resources that operate together to use block-level storage devices (and / or virtualizations thereof) to store data for customers 1504. The block-level storage devices of the block-level data storage service 1510 may, for example, be operably attached to a virtual computer system provided by the virtual computer system service 1508 to serve as a logical unit (e.g., a virtual drive) of the computer system. The block-level storage devices may enable permanent storage of data used / generated by the corresponding virtual computer system, where the virtual computer system service 1508 may only provide ephemeral data storage.
[0172] The computing resource service provider 1502 also includes a cryptographic service 1512. The cryptographic service 1512 can utilize one or more storage services of the computing resource service provider 1502 to store the customer's keys in encrypted form, whereby the keys can be used to decrypt the customer's 1504 keys that are accessible only by a specific device of the cryptographic service 1512.
[0173] The computing resource service provider 1502 also includes an on-demand data storage service 1514. The on-demand data storage service 1514 can be a collection of computing resources configured to synchronously process requests for storage and / or access to data. The on-demand data storage service 1514 can operate using computing resources (e.g., databases) that enable the on-demand data storage service 1514 to quickly locate and retrieve data, so as to allow data to be provided in response to requests for data. For example, the on-demand data storage service 1514 can maintain stored data in a manner that when a request for a data object is retrieved, the data object can be provided in response to the request (or the streaming of the data object can be started). As described above, the data stored in the on-demand data storage service 1514 can be organized into data objects. Except for possible certain restrictions on size, the data object can have any size. Therefore, the on-demand data storage service 1514 can store multiple data objects of different sizes. The on-demand data storage service 1514 may operate as a key-value store that associates data objects with identifiers of the data objects, which may be used by the clients 1504 to retrieve or perform other operations related to data objects stored by the on-demand data storage service 1514 .
[0174] exist Fig.15In the environment shown, a notification service 1516 is included. The notification service 1516 may include a collection of computing resources that are configured together to provide a web service or other interface and a browser-based management console. The management console can be used to configure the subject that the client seeks to receive notifications, configure applications (or personnel), subscribe to client topics, publish messages, or configure the message delivery of the protocol selected by the client (i.e., Hypertext Transfer Protocol (HTTP), email, and short message service (SMS) etc.). The notification service 1516 can use a "push" mechanism to provide notifications to the client without the need for regular checks or "polling" for new information and updates. The notification service 1516 can also be used for various purposes, such as monitoring applications executed in the virtual computer system service 1508, workflow systems, updates to time-sensitive information, mobile applications, and many other applications.
[0175] like Fig.15 As shown in , in various embodiments, computing resource service provider 1502 includes authentication system 1518 and policy management service 1520. In an embodiment, authentication system 1518 is a computer system configured to perform operations involving authenticating users of a customer (i.e., a collection of computing resources). For example, one of services 1508-1516 and 1520-24 may provide information from a user to authentication system 1518 in order to receive in return information indicating whether the user request is authentic.
[0176] Policy management service 1520, in an embodiment, is a computer system configured to manage policies on behalf of customers (such as customer 1504) of computing resource service provider 1502. Policy management service 1520 may include an interface that enables customers to submit requests related to policy management. Such requests may be, for example, requests to add, delete, change, or otherwise modify policies for a customer, or requests for other management actions (such as providing an inventory of existing policies, etc.).
[0177] In various embodiments, the computing resource service provider 1502 is also equipped with a container service 1522. The container service 1522 is configured to Figure 2 The container service 200 describes a method for creating and managing software containers and container instances for customers 1504 of a computing resource service provider. The container service 1522 can be configured to use other resources of the computing resource service provider 1502, such as the block-level data storage service 1510. For example, the container service 1522 can allow tasks running within a container instance to share one or more specified block-level data storage volumes.
[0178] The computing resource service provider 1502 additionally maintains one or more other services 1524 based at least in part on the needs of its customers 1504. For example, the computing resource service provider 1502 may maintain a database service for its customers 1504. A database service may be a collection of computing resources that operate together to run one or more databases for one or more customers 1504. Customers 1504 may operate and manage databases from the database service by utilizing appropriately configured API calls. This in turn may allow customers 1504 to maintain and potentially scale operations in the database. Other services include, but are not limited to, object-level archival data storage services, and services that manage and / or monitor other services.
[0179] It should be noted that, unless otherwise specified, in the context of describing the disclosed embodiments, expressions relating to executable instructions (also referred to as code, applications, agents, etc.) are used to express that the execution of operations (e.g., data transfer, computation, etc.) that are not typically performed independently of the instructions indicate that the instructions are being executed by a machine, thereby causing the machine to perform the specified operations.
[0180] Various embodiments of the present disclosure may be described in terms of the following:
[0181] 1. A computer-implemented method comprising:
[0182] Under the control of one or more computer systems configured with executable instructions,
[0183] creating a cluster and a cluster identifier identifying the cluster, wherein the cluster represents a set of container instances associated with a customer of a computing resource service provider that are registered with the cluster and configured to run one or more software containers;
[0184] obtaining an image of a software container configured to execute within a computer system instance, wherein the software container includes data and one or more processes that, when executed within the computer system instance, are isolated from other processes running within the computer system instance, and wherein the image is an entire copy of a particular state of the software container at a time when the image was generated;
[0185] receiving a request to launch a set of images including the image of the software container according to a task definition, wherein the task definition identifies a set of software containers including the software container, the set of software containers being allocated to start with a group and specifying a resource allocation for the set of software containers, wherein the request specifies the cluster identifier of the cluster; and
[0186] In response to the request to launch the one or more images,
[0187] determining a subset of the set of container instances represented by the cluster specified by the cluster identifier that launches the set of software containers, wherein one or more container instances are determined according to a placement scheme; and
[0188] The group image is launched as a running software container within the subset of the group container instances such that the running software containers are allocated resources according to the resource allocation specified in the task definition.
[0189] 2. A computer-implemented method as described in clause 1, wherein the subset of the group container instances is determined by a multi-tenant scheduler service, and the multi-tenant scheduler service is configured to determine the subset of the group container instances based at least in part on the layout scheme and the task definition.
[0190] 3. A computer-implemented method as described in clause 1 or 2, wherein the group image is caused to be launched by separate container agents running within the subset of the group container instances, wherein the separate container agents are software applications that are each configured to run in a respective container instance and act as an intermediary between the running software containers and entities external to the respective container instances.
[0191] 4. A computer-implemented method as described in any of clauses 1 to 3, wherein the method further comprises providing metrics and log information about the running software container to a telemetry service, wherein the telemetry service can be configured to aggregate the metrics and log information and provide the aggregated metrics and log information to a resource monitoring service.
[0192] 5. A system comprising:
[0193] one or more processors;
[0194] a memory comprising instructions that, when executed by the one or more processors, cause the system to at least:
[0195] Backend service, the backend service:
[0196] receiving a placement request for a set of container instances, wherein the set of container instances hosts a set of corresponding container agents,
[0197] Ensure that the resources specified by the task definition are available in the set of container instances, and
[0198] receiving information from the group container agent regarding a state of a set of running containers in the group container instance,
[0199] providing the information to a scheduler; and
[0200] The scheduler, based at least in part on a layout scheme, the task definition, and the information provided by the backend service:
[0201] determining a subset of instances of the group container registered with the cluster, placing a separate container of the group container within the subset,
[0202] informing the container agent to allocate resources to the individual containers within the subset according to the resources to be allocated to the individual containers specified by the task definition, and
[0203] The container agent is notified to launch the group of containers as the group of running containers within the subset and from the location of the software image specified by the task definition.
[0204] 6. The system of clause 5, wherein the subset of the group container instances is determined by a multi-tenant scheduler service of a computing resource service provider.
[0205] 7. The system of clause 5 or 6, wherein the subset of the group container instances is determined by a scheduler application installed by a customer of a computing resource service provider.
[0206] 8. A system as described in any of clauses 5 to 7, wherein the instructions also include instructions that, when executed by the one or more processors, cause the system to implement a telemetry agent, wherein the telemetry agent collects data about processes running within the group of running containers for a telemetry service, wherein the telemetry service aggregates the data and provides the aggregated data to a resource monitoring service.
[0207] 9. A system as described in any of clauses 5 to 8, wherein the instructions that cause the system to determine the subset of the group container instances include instructions that, when executed by the one or more processors, cause the system to determine the subset of the group container instances based at least in part on the resources to be allocated to the individual containers in the group container and the amount of available resources within the individual container instances of the group container instances registered with the cluster.
[0208] 10. A system as described in any of clauses 5 to 9, wherein the instructions also include instructions that, when executed by the one or more processors, cause the system to implement a template service that generates the task definition so that the task definition specifies for the group container the location of the software image for a separate container in the group container and the resources to be allocated to the separate container in the group container.
[0209] 11. The system of any of clauses 5 to 10, wherein the instructions further comprise instructions that, when executed by the one or more processors, cause the system to implement the group container agent running within the group container instance, the group container agent:
[0210] registering the group container instance with the cluster,
[0211] In response to a notification from the scheduler to allocate the resource, allocating the resource to the group container instance,
[0212] In response to a notification from the scheduler to start the group container, starting the group container as the group running container,
[0213] monitoring the status of the set of running containers in the set of container instances, and
[0214] The information about the status is provided to the backend service.
[0215] 12. The system of clause 11, wherein the group container agent is further configured to provide one or more periodic signals to indicate normal operation of the individual containers, status of the individual containers, and errors occurring by the individual containers.
[0216] 13. The system of clause 11 or 12, wherein the instructions to implement the group container agent further comprise instructions that, when executed by the one or more processors, cause the system to implement the group container agent to:
[0217] Stopping the group of running containers;
[0218] deregistering the group of container instances from the cluster; and
[0219] Delete the cluster.
[0220] 14. A non-transitory computer-readable storage medium having executable instructions stored thereon, which, when executed by one or more processors of a computer system, cause the computer system to at least:
[0221] obtaining a software image of a software container configured to execute within the computer system instance;
[0222] receiving a request to launch the software image according to a task definition, wherein the task definition specifies resource allocation for the software container;
[0223] determining a set of container instances to launch the software image according to the task definition, wherein the set of container instances is determined according to a layout scheme; and
[0224] The software image is launched as one or more running software containers in the set of container instances according to the task definition.
[0225] 15. The non-transitory computer-readable storage medium of clause 14, wherein the placement scheme is one of a round-robin placement scheme or a random assignment placement scheme.
[0226] 16. A non-temporary computer-readable storage medium as described in clause 14 or 15, wherein the instructions also include instructions that, when executed by the one or more processors, cause the computer system to create a cluster representing a group of computer system instances in response to an application programming interface call, wherein the computer system instances are members of the group.
[0227] 17. A non-transitory computer-readable storage medium as described in any of clauses 14 to 16, wherein the instructions that cause the computer system to determine the group container instance also include instructions that, when executed by the one or more processors, cause the computer system to determine the group container instance based at least in part on one or more security groups or security roles assigned to the software image.
[0228] 18. A non-transitory computer-readable storage medium as described in any of clauses 14 to 17, wherein the instructions also include instructions that, when executed by the one or more processors, cause the computer system to register the computer system instance with a cluster representing a group of computer system instances in response to an application programming interface call.
[0229] 19. A non-transitory computer-readable storage medium as described in any of clauses 14 to 18, wherein the instructions also include instructions that, when executed by the one or more processors, cause the computer system to register the task definition to an account of a customer of a computing resource service provider in response to an application programming interface call.
[0230] 20. The non-transitory computer-readable storage medium of any of clauses 14-19, wherein the request to launch the software image is a request received through an application programming interface call to launch the software image according to the task definition.
[0231] 21. A non-transitory computer-readable storage medium as described in any of clauses 14-20, wherein the group container instance is a subset of the container instances registered with the cluster, and the instructions also include instructions that, when executed by the one or more processors, cause the computer system to return information about what software images are running in the container instances registered with the cluster and what resources are available in the container instances registered with the cluster in response to an application programming interface call.
[0232] Fig.16 Various aspects of an exemplary environment 1600 for implementing various aspects according to various embodiments are shown. As will be appreciated, although a web-based environment is used for explanation purposes, various embodiments may be implemented using different environments as appropriate. The environment includes an electronic client device 1602, which may include any appropriate device operable to send and / or receive requests, messages or information through an appropriate network 1604 and transmit information back to the device user in some embodiments. Examples of such client devices include personal computers, mobile phones, handheld messaging devices, laptop computers, tablet computers, set-top boxes, personal data assistants, embedded computer systems, e-book readers, etc. The network may include any appropriate network, including an intranet, the Internet, a cellular network, a local area network, a satellite network, or any other network and / or a combination of the above networks. The components used for such a system may depend at least in part on the type of the selected network and / or environment. The protocols and components used for communicating through such networks are well known and will not be discussed in detail. Communication through a network may be achieved through wired or wireless connections and combinations thereof. In this example, the network includes the Internet because the environment includes a web server 1606 for receiving requests and providing content in response to the requests, but for other networks, alternative devices serving similar purposes may be used, as will be apparent to one of ordinary skill in the art.
[0233] The illustrative environment includes an application server 1608 and a data storage area 1610. It should be understood that there may be several application servers, layers or other elements, processes or components that can be linked or otherwise configured, which can interact to perform tasks such as obtaining data from an appropriate data storage area. As used, the server can be implemented in various ways, such as a hardware device or a virtual computer system. In some contexts, a server may refer to a programming module executed on a computer system. As used, unless otherwise indicated or clearly known from the context, the term "data storage area" refers to any device or device combination that can store, access and retrieve data, which may include any combination and any number of data servers, databases, data storage devices and data storage media in any standard, distributed, virtual or clustered environments. The application server may include any appropriate hardware, software and firmware, which may be integrated with the data storage area and process some or all data access and business logic of the application depending on the needs of various aspects of one or more applications of the execution client device. The application server can provide access control services that cooperate with the data storage area and can generate content that can be provided to users, including text, pictures, audio, video and / or other content, which can be provided to users by the web server in the form of hypertext markup language ("HTML"), extensible markup language ("XML"), JavaScript, cascading style sheets ("CSS"), or another suitable client-side structured language. The content transmitted to the client device can be processed by the client device to provide content in one or more forms, including forms that can be perceived by the user through hearing, vision and / or through other senses (including touch, taste and / or smell). The processing of all requests and responses and the delivery of content between the electronic client device 1602 and the application server 1608 can be handled by the web server using PHP: in this example, a hypertext preprocessor ("PHP"), Python, Ruby, Perl, Java, HTML, XML, or another suitable server-side structured language. It should be understood that the web server and application server are not necessary and are merely exemplary components, as the structured code discussed can be executed on any suitable device or host as discussed elsewhere. Furthermore, unless the context clearly dictates otherwise, operations described as being performed by a single device may be collectively performed by multiple devices, which may form a distributed and / or virtual system.
[0234] The data storage area 1610 may include several separate data tables, databases, data files, dynamic data storage schemes, and / or other data storage mechanisms and media for storing data related to specific aspects of the present disclosure. For example, the data storage area shown may include mechanisms for storing generated data 1612 and user information 1616, which can be used to provide content for the production side. The data storage area is also shown as including a mechanism for storing log data 1614, which can be used for reporting, analysis, or other purposes. It should be understood that there may be many other aspects that may need to be stored in the data storage area, such as page image information and access rights information, which may be stored in any of the mechanisms listed above or in additional mechanisms stored in the data storage area 1610 as appropriate. The data storage area 1610 can be operated by logic associated therewith so as to receive instructions from the application server 1608 and obtain, update, or otherwise process data in response to the instructions. The application server 1608 can provide static data, dynamic data, or a combination of static data and dynamic data in response to the received instructions. Dynamic data (such as data used in web logs (blogs), shopping applications, news services, and other applications) can be generated by a server-side structured language as described, or can be provided by a content management system ("CMS") operating on an application server or under its control. In one example, a user can submit a search request for a certain type of item through a device operated by the user. In this case, the data storage area may access user information to verify the identity of the user, and can access directory details to obtain information about the type of item. Subsequently, the information can be returned to the user, such as in the form of a list of results on a web page, and the user can view the web page through a browser on an electronic client device 1602. Information about a specific item of interest can be viewed in a dedicated page or window of the browser. However, it should be noted that the embodiments of the present disclosure are not necessarily limited to the content of a web page, but can be more generally applicable to processing basic requests, wherein the request is not necessarily a request for content.
[0235] Each server will typically include an operating system that provides executable program instructions for basic management and operation of the server, and will typically include a computer-readable storage medium (e.g., hard disk, random access memory, read-only memory, etc.) that stores instructions that, when executed by the server's processor, allow the server to perform its intended functions. Suitable implementations of the server's operating system and basic functionality are known or commercially available and are readily implemented by one of ordinary skill in the art, particularly in light of the present disclosure.
[0236] In one embodiment, the environment is a distributed and / or virtual computing environment utilizing multiple computer systems and components interconnected by communication links, using one or more computer networks or direct connections. However, it should be appreciated by those of ordinary skill in the art that such a system may be used in a variety of environments having more than Fig.16 The system may operate equally well with fewer or more components than shown. Fig.16 The depiction of exemplary environment 1600 in FIG. 1 should be regarded as illustrative in nature and not limiting the scope of the present disclosure.
[0237] Various embodiments may also be implemented in a variety of operating environments, which may include one or more user computers, computing devices, or processing devices that can be used to operate any one of a plurality of applications in some cases. A user or client device may include any one of many general-purpose personal computers, such as a desktop, laptop, or tablet computer running a standard operating system, and cellular, wireless, and handheld devices running mobile software and capable of supporting a plurality of networks and messaging protocols. Such a system may also include many workstations running any one of a plurality of commercially available operating systems and other known applications, for purposes such as development and database management. These devices may also include other electronic devices, such as virtual terminals, thin clients, gaming systems, and other devices capable of communicating over a network. These devices may also include virtual devices, such as virtual machines, hypervisors, and other virtual devices capable of communicating over a network.
[0238] Various embodiments of the present disclosure utilize networks that may be familiar to those skilled in the art to support communications using any of a variety of commercially available protocols, such as Transmission Control Protocol / Internet Protocol ("TCP / IP"), User Datagram Protocol ("UDP"), protocols operating in various layers of the Open Systems Interconnection ("OSI") model, File Transfer Protocol ("FTP"), Universal Plug and Play ("UPnP"), Network File System ("NFS"), Common Internet File System ("CIFS"), and AppleTalk. The network can be, for example, a local area network, a wide area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network, a satellite network, and any combination of the above networks.
[0239] In embodiments utilizing a web server, the web server may run any of a variety of server or middle-tier applications, including a Hypertext Transfer Protocol ("HTTP") server, an FTP server, a Common Gateway Interface ("CGI") server, a data server, a Java server, an Apache server, and a business application server. The server may also execute programs or scripts in response to requests from user devices, such as by executing a program that may be implemented in any programming language (such as C, C# or C++) or any scripting language (such as Ruby, PHP, Perl, Python or TCL) and their combinations. The server may also include a database server, which includes and Commercially available database servers, as well as open source servers such as MySQL, Postgres, SQLite, MongoDB, and any other server capable of storing, retrieving, and accessing structured or unstructured data. The database server may include a table-based server, a document-based server, an unstructured server, a relational server, a non-relational server, or a combination of these and / or other database servers.
[0240] The environment may include various data storage areas and other memories and storage media as discussed above. These may reside in various locations, such as on a storage medium that is local to (and / or resides in) one or more computers, or away from any or all computers in the network. In a specific set of embodiments, information may reside in a storage area network ("SAN") familiar to those skilled in the art. Similarly, any necessary files for performing functions attributed to a computer, server, or other network device may be stored locally and / or remotely, where appropriate. In the case where the system includes a computerized device, each such device may include hardware elements that may be electrically coupled by a bus, including, for example, a central processing unit ("CPU" or "processor"), an input device (e.g., a mouse, keyboard, controller, touch screen, or keypad), and an output device (e.g., a display device, printer, or speaker). Such a system may also include one or more storage devices such as a disk drive, an optical storage device, and a solid-state storage device such as a random access memory ("RAM") or a read-only memory ("ROM"), as well as removable media devices, memory cards, flash memory cards, etc.
[0241] Such a device may also include a computer-readable storage medium reader, a communication device (e.g., a modem, a wireless or wired network card, an infrared communication device, etc.) and a working memory as described above. A computer-readable storage medium reader may be connected to or configured to receive a computer-readable storage medium representing a remote, local, fixed and / or removable storage device and a storage medium for temporarily and / or more permanently containing, storing, sending and retrieving computer-readable information. The system and various devices will also typically include many software applications, modules, services or other elements located in the working memory device, including operating systems and applications such as client applications or web browsers. It should be understood that alternative embodiments may have many changes from the above. For example, custom hardware and / or specific elements may also be used to implement hardware, software (including portable software, such as applets) or both. In addition, connections with other computing devices (such as network input / output devices) may be adopted.
[0242] Storage media and computer-readable media for containing code or code portions may include any suitable media known or used in the art, including storage media and communication media, such as volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing and / or transmitting information, such as computer-readable instructions, data structures, program modules or other data, including RAM, ROM, electrically erasable programmable read-only memory ("EEPROM"), flash memory or other memory technology, compact disk read-only memory ("CD-ROM"), digital versatile disk (DVD) or other optical storage device, magnetic cassette, magnetic tape, magnetic disk storage device or other magnetic storage device, or any other medium that can be used to store the desired information and can be accessed by the system device. Based on the disclosure and teachings provided, a person of ordinary skill in the art will understand other ways and / or methods to implement various embodiments.
[0243] The specification and drawings are accordingly to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made without departing from the broader spirit and scope of the invention as set forth in the claims.
[0244] Other variations are within the spirit of the present disclosure. Thus, while the technology is susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described in detail above. However, it should be understood that it is not intended to limit the invention to the specific form or forms disclosed, but rather, the invention is intended to cover all modifications, alternative constructions, and equivalents that fall within the spirit and scope of the invention, as defined in the appended claims.
[0245] The use of the terms "a," "an," and "the" and similar designators in the context of describing embodiments (particularly in the context of the appended claims) should be interpreted to cover both the singular and the plural, unless otherwise indicated or clearly contradicted by the context. The terms "include," "have," "include," and "contain" are all interpreted as open-ended terms (i.e., meaning "including, but not limited to") unless otherwise indicated. The term "connected," when unmodified and referring to a physical connection, should be interpreted as being partially or wholly contained within, attached to, or joined together, even if there are some objects in between. Unless otherwise indicated, the recitation of a range of values is used merely as a shorthand method of individually referring to each individual value falling within the range, and each individual numerical value is incorporated into the specification as if each individual numerical value were listed separately. The use of the term "set" (e.g., "set of items") or "subset" should be interpreted as a non-empty set including one or more members, unless otherwise indicated or contradicted by the context. Furthermore, unless otherwise noted or contradicted by context, the term "subset" of a corresponding set does not necessarily mean a proper subset of the corresponding set, but a subset and a corresponding set may be equivalent.
[0246] Unless otherwise specifically provided or otherwise clearly contradicted by context, connective language, such as phrases of the form "at least one of A, B, and C" or "at least one of A, B, and C," is generally used with context to be understood as presenting that an item, term, etc. can be A or B or C, or any non-empty subset of the set of A and B and C. For example, in the illustrative example of a set having three members, the connective phrases "at least one of A, B, and C" and "at least one of A, B, and C" refer to any of the following sets: {A}, {B}, {C}, {A,B}, {A,C}, {B,C}, {A,B,C}. Thus, such connective language is generally not intended to imply that certain embodiments require that at least one of A, at least one of B, and at least one of C each be present.
[0247] The operations of the described processes may be performed in any suitable order unless otherwise specified or clearly contradicted by the context. The described processes (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed together on one or more processors, by hardware implementation, or a combination thereof. The code may be stored on a computer-readable storage medium, for example, in the form of a computer program that includes instructions that can be executed by one or more processors. The computer-readable storage medium may be non-transitory.
[0248] The use of any examples or exemplary language (e.g., "such as") provided is intended only to better illustrate the embodiments of the present invention and does not limit the scope of the present invention unless otherwise specified. No language in the specification should be construed as indicating that any non-claimed element is essential to the practice of the present invention.
[0249] Embodiments of the present disclosure are described, including the best mode known to the inventor for carrying out the present invention. After reading the foregoing description, variations of these embodiments may become apparent to those of ordinary skill in the art. The inventors expect those skilled in the art to use such variations where appropriate, and the inventors intend that the embodiments of the present disclosure be implemented in a manner different from that specifically described. Therefore, the scope of the present disclosure includes all modifications and equivalents of the subject matter described in the appended claims as permitted by applicable law. In addition, unless otherwise specified or otherwise the context is clearly contradictory, any combination of the above elements of all possible variations is included within the scope of the present disclosure.
[0250] All references, including publications, patent applications, and patents, cited are hereby incorporated by reference to the same extent as if each reference were individually and specifically indicated to be incorporated by reference and were set forth in its entirety.
Claims
1. A computer-implemented method, include: receiving one or more application programming interface (API) calls from a customer of a computing resource service provider to create a cluster of virtual machines to run a process; as well as In response to the one or more API calls: Instantiate multiple virtual machines; associating the plurality of virtual machines with a cluster identifier; obtaining a task definition indicating a location of a software image associated with the process; and For each virtual machine in the plurality of virtual machines: obtaining the software image from the location; Allocating computing resources of the virtual machine instance to a software container; Starting the software container in the virtual machine, the software container running in isolation from other software containers running on the virtual machine; and At least a portion of the process is executed within the software container based at least in part on the software image. 2 . The computer-implemented method of claim 1 , wherein the cluster is associated with a plurality of virtual machines including the virtual machine. 3 . The computer-implemented method of claim 1 , wherein instantiating the plurality of virtual machines further comprises instantiating the plurality of virtual machines within a virtual private cloud.
4. The computer-implemented method of claim 1, wherein the software container is linked to another software container in a manner specified by a task definition.
5. The computer-implemented method of claim 1, wherein the task definition includes information usable to determine an amount of computing resources of the virtual machine to be allocated to the software container.
6. The computer-implemented method of claim 5, wherein the software image is data representing a state of the software container when the software image was created.
7. The computer-implemented method of claim 1, wherein the cluster identifier distinguishes the cluster from a plurality of virtual machine clusters hosted by the computing resource service provider.
8. A system, include: one or more processors; and A memory, the memory comprising executable instructions, which, if executed by the one or more processors, cause the system to perform the following operations: obtaining a task definition indicating a name of a task to be performed, a location of a container image for the task, and a port for the task; receiving a request to run one or more containers within the virtual machine cluster to perform the task, the request also indicating an amount of resources to be allocated to the task, the one or more containers being isolated from each other by separate namespaces; selecting, via a scheduler, an available virtual machine from the cluster in which to run the one or more containers; as well as Running the one or more containers based at least in part on the container image, within the available virtual machine and in accordance with the task definition, by causing the system to: obtaining the software image from the location based at least in part on the task definition; allocating the amount of computing resources to the one or more containers; assigning the port to the one or more containers; as well as The one or more containers are run to perform the tasks.
9. The system of claim 8, wherein the amount of resources is a portion of the amount of resources allocated to the available virtual machines.
10. The system of claim 8, in: The task definition also includes affinity information indicating affinity or anti-affinity for certain types of virtual machines; and The executable instructions that cause the system to select the available virtual machine also include instructions that cause the system to select the available virtual machine based at least in part on the affinity information.
11. The system of claim 8, wherein a load balancer balances traffic across the virtual machines of the cluster.
12. The system of claim 8, wherein a Docker container engine manages the one or more containers running in the available virtual machines.
13. The system of claim 8, wherein the task definition further specifies: The one or more containers are assigned to a group; and The members of the group are coordinated to run on the same virtual machine.
14. The system of claim 8, wherein the executable instructions further comprise instructions for causing the system to: obtaining metrics associated with the one or more containers running within the available virtual machine; and The metrics are provided to a resource monitoring service.
15. The system of claim 14, wherein the metric comprises at least one of: the processor usage of the one or more containers, the processor time used by the one or more containers, the amount of storage used by the one or more containers, or The amount of storage space used by the one or more containers.
16. A non-transitory computer-readable storage medium having executable instructions stored thereon, which, if executed by one or more processors of a computer system, causes the computer system to perform at least the following operations: receiving a communication from a scheduler to execute the task as a result of scheduling the task for execution in a virtual machine in the virtual machine cluster according to the task definition; In response to receiving the communication, instantiating a container in the virtual machine to perform the task; monitoring the container to obtain health information about the container; as well as As a result of a determination made at least in part based on the health information that the container has experienced an error, the following operations are performed: Instantiating a new container in the virtual machine; as well as replacing the container that experienced the error; and The amount of virtual machines in the cluster is dynamically increased or decreased by an automatic scaling service depending at least in part on resources required by containers in the virtual machines in the cluster.
17. The non-transitory computer-readable storage medium of claim 16, wherein the virtual machines of the cluster are located within a virtual private cloud.
18. The non-transitory computer-readable storage medium of claim 16, wherein the health information comprises at least one of: The heartbeat of the container, the life of the container, the state of the container, or An error occurred in the container.
19. The non-transitory computer-readable storage medium of claim 16, wherein the executable instructions are executed in the virtual machine to operate an agent that launches and runs a container scheduled on the virtual machine.
20. A computer-implemented method, include: receiving one or more application programming interface (API) calls to delete a cluster of virtual machines executing one or more processes; as well as In response to the one or more API calls: For each virtual machine executing at least one of the one or more processes within a software container, performing the following operations, wherein the software container is an isolated user space instance that runs isolated from other software containers running on the virtual machine: stopping execution of the at least one process; terminating the software container; releasing the amount of computing resources allocated to the software container; as well as terminating the virtual machine; and Delete the cluster.
21. The computer-implemented method of claim 20, wherein the one or more API calls are provided by a computing resource scaling service that scales computing resources up or down.
22. The computer-implemented method of claim 20, wherein the at least one process is based at least in part on a software image stored at a location indicated by a task definition file associated with the at least one process.
23. The computer-implemented method of claim 20, in: The cluster is implemented by a computer system service provided by a computing resource service provider; and The one or more API calls are received by the computer system service.
24. The computer-implemented method of claim 20, further comprising: include: Further in response to the one or more API calls, a task associated with the at least one process is unregistered.
25. The computer-implemented method of claim 24, wherein deregistering the task further comprises updating an entry in a data store to indicate that the task is stopped.
26. A system, include: one or more processors; A memory including computer executable instructions that, as a result of being executed by the one or more processors, cause the system to: receiving one or more application programming interface (API) calls to delete the virtual machine cluster; and In response to the one or more API calls: For each virtual machine in the virtual machine cluster: Stop executing a process in a software container running on the virtual machine, wherein The process is based at least in part on a software image stored at a location indicated by a task definition file associated with the process; terminating the software container; releasing the amount of computing resources allocated to the software container; as well as terminating the virtual machine; and Delete the cluster.
27. The system of claim 26, further comprising: include: Further in response to the one or more API calls, a task associated with the process is unregistered.
28. The system of claim 26, wherein the software container is an isolated user space instance that runs in isolation from other software containers running on the virtual machine.
29. The system of claim 26, wherein the one or more API calls are received from a computing resource scaling service.
30. The system of claim 26, in: The cluster is implemented by a computer system service provided by a computing resource service provider; and The one or more API calls are received by the computer system service.
31. A non-transitory computer-readable storage medium storing executable instructions that, as a result of being executed by one or more processors of a computer system, cause the computer system to at least perform the following operations: Obtaining an application programming interface (API) call to delete a cluster of virtual machines running one or more software containers, wherein the one or more API calls are provided by a computing resource scaling service that scales computing resources up or down; and In response to the API call: For each virtual machine in the virtual machine cluster: stopping a process executing within a software container of the one or more software containers; terminating the software container; releasing the amount of computing resources allocated to the software container; as well as terminating the virtual machine; and Delete the cluster.
32. The non-transitory computer-readable storage medium of claim 31, wherein the software container is an isolated user space instance that runs in isolation from other software containers running on the virtual machine.
33. The non-transitory computer-readable storage medium of claim 31, wherein the process is based at least in part on a software image stored at a location indicated by a task definition file associated with the process.
34. The non-transitory computer readable storage medium of claim 31, in: The cluster is implemented by a computer system service provided by a computing resource service provider; and The API call is received by the computer system service.
35. The non-transitory computer-readable storage medium of claim 31, wherein the executable instructions further cause the computer system to unregister a task associated with the process in further response to the API call.
36. The non-transitory computer-readable storage medium of claim 35, wherein the executable instructions that cause the computer system to deregister the task further cause the computer system to update an entry in a data store to indicate that the task is stopped.
37. A computer-implemented method, include: grouping a plurality of virtual machines into the cluster to perform a plurality of tasks by associating the plurality of virtual machines with the cluster using a cluster identifier, the plurality of virtual machines being associated with a customer of a computing resource service provider running one or more software containers; Obtaining an image of a software container executing within a virtual machine, wherein the software container includes data and one or more processes that, when executed within the virtual machine, are isolated from other processes running within the virtual machine; receiving a request to launch a group of images to perform the plurality of tasks according to a task definition, the group of images comprising the images of the software container, wherein the task definition identifies a group of software containers including the software container, the group of software containers being allocated to be started in a group, wherein the request specifies the cluster identifier of the cluster; as well as In response to receiving the request to perform the plurality of tasks, the image group is started to generate running software containers within at least a subset of the plurality of virtual machines to perform the plurality of tasks according to the task definition.
38. The computer-implemented method of claim 37, wherein The request also include: a layout scheme, the layout scheme comprising instructions for distributing individual software containers in the software container group across the plurality of virtual machines; and The method further comprises: According to the layout scheme, the image group is started on the multiple virtual machines to execute the multiple tasks.
39. The computer-implemented method of claim 38, wherein the placement scheme distributes tasks of the plurality of tasks evenly across the plurality of virtual machines.
40. The computer-implemented method of claim 38, wherein At least some of the individual virtual machines in the plurality of virtual machines are associated with tags, The placement scheme distributes tasks of the plurality of tasks across the plurality of virtual machines based on the tags associated with at least some of the individual virtual machines.
41. The computer-implemented method of claim 38, wherein At least some of the individual virtual machines in the plurality of virtual machines are associated with tags, The placement scheme allocates at least two of the plurality of tasks to an individual virtual machine based on the tag associated with the individual virtual machine.
42. The computer-implemented method of claim 37, further comprising: include: In response to receiving a request to deregister a first virtual machine from the cluster: disassociating the cluster identifier from the first virtual machine; and The task among the plurality of tasks executed by the software container running in the virtual machine is terminated.
43. The computer-implemented method of claim 42, further comprising: include: In response to receiving a request to register the virtual machine with a second cluster: associating a second cluster identifier with the virtual machine; and At least one image in the image group or the second image group is loaded to generate at least one running software container on the first virtual machine.
44. The computer-implemented method of claim 37, further comprising: include: At least one of a number of the plurality of virtual machines or a resource allocation of at least one of the plurality of virtual machines associated with the cluster identifier is automatically scaled up or down based on resource usage of the plurality of virtual machines.
45. A system, include: one or more processors; A memory storing computer executable instructions that, when executed, cause the one or more processors to: associating a plurality of virtual machines into a cluster by using a cluster identifier, the plurality of virtual machines being associated with a customer of a computing resource service provider running one or more software containers; obtaining an image of a software container executing within a virtual machine; receiving a request to launch a group of images to perform the task according to a task definition, the group of images comprising the image of the software container, wherein the task definition identifies a group of software containers including the software container, the group of software containers being allocated to be started in a group, wherein the request specifies the cluster identifier of the cluster; as well as In response to receiving the request to perform the task, the image group is started to generate a running software container in at least a subset of the plurality of virtual machines to perform the task according to the task definition.
46. The system of claim 45, wherein The cluster is associated with a placement scheme, the placement scheme including instructions for distributing individual software containers in the group of software containers across the plurality of virtual machines; and The memory stores additional computer executable instructions which, when executed, cause the one or more processors to perform the following operations: According to the layout scheme, the image groups are allocated on the multiple virtual machines to execute the tasks.
47. The system of claim 46, wherein At least some of the plurality of virtual machines are associated with individual tags of the plurality of tags, The placement scheme distributes the sub-processes of the task across the plurality of virtual machines based on the tags associated with at least some of the individual virtual machines.
48. The system of claim 47, wherein the individual tags indicate a relationship between a software container, a virtual machine, and a task or a subprocess of a task.
49. The system of claim 47, wherein A first virtual machine among the plurality of virtual machines is associated with a first tag, wherein a second individual virtual machine among the plurality of virtual machines is associated with a second tag, The layout scheme allocates the subprocesses of the task to the first individual virtual machine and the second individual virtual machine based on the first label and the second label.
50. The system of claim 45, wherein the memory stores additional computer executable instructions that when executed cause the one or more processors to: In response to receiving a request to move a first virtual machine from the cluster to a second cluster: disassociating the cluster identifier from the first virtual machine; Ending a subprocess executed by at least one running software container of the first virtual machine in the task; associating a second cluster identifier with the virtual machine; as well as At least one image in the image group or a second image group is loaded to generate at least one running software container on the first virtual machine, wherein the second image group is associated with a second task definition.
51. The system of claim 45, wherein the memory stores additional computer executable instructions that, when executed, cause the one or more processors to: At least one of the number of the virtual machines or resource allocation of at least one of the virtual machines in the plurality of virtual machines associated with the cluster identifier is increased or decreased based on resource usage of the virtual machines.
52. A non-transitory computer-readable storage medium having executable instructions stored thereon, which, as a result of being executed by one or more processors of a computer system, cause the computer system to perform at least the following operations: associating a plurality of hosts into a cluster by using a cluster identifier, the plurality of hosts being associated with a customer of a computing resource service provider running one or more software containers; obtaining an image of a software container executing within a host; receiving a request to launch a group of images to perform the task according to a task definition, the group of images comprising the image of the software container, wherein the task definition identifies a group of software containers including the software container, the group of software containers being allocated to be started in a group, wherein the request specifies the cluster identifier of the cluster; as well as In response to receiving the request to perform the task, the image group is launched to generate a running software container within at least a subset of the plurality of hosts to perform the task according to the task definition.
53. The non-transitory computer readable storage medium of claim 52, wherein The cluster is associated with a placement scheme, the placement scheme including instructions for distributing individual software containers in the group of software containers across the plurality of hosts; and The executable instructions further cause the computer system to perform the following operations: According to the layout scheme, the image groups are dispatched on the plurality of hosts to execute the tasks.
54. The non-transitory computer-readable storage medium of claim 53, wherein at least some individual hosts of the plurality of hosts are associated with individual tags of the plurality of tags, wherein the executable instructions further cause the computer system to: Subprocesses of the task are distributed across a subset of the plurality of hosts based on the tags associated with at least some of the individual hosts.
55. The non-transitory computer-readable storage medium of claim 52, wherein the executable instructions further cause the computer system to: receiving a request to move a first host from the cluster to a second cluster; In response to the request: disassociating the cluster identifier from the first host; associating a second cluster identifier with the first host; as well as At least one image in the image group or a second image group is loaded to generate at least one running software container on the first host, wherein the second image group is associated with a second task definition.
56. The non-transitory computer-readable storage medium of claim 52, wherein the executable instructions further cause the computer system to: Based on at least one of detected resource usage of the plurality of hosts or receiving a request to adjust host allocation of the cluster, at least one of a number of the plurality of hosts or a resource allocation of at least one of the plurality of hosts associated with the cluster identifier is changed.
57. A computer-implemented method, include: A task definition is received, the task definition indicating at least: Where the software images are located; as well as information that can be used to determine an amount of resources to allocate to a software container for the software image, the software container being a user space instance that runs in isolation from other software containers that run on the same virtual machine instance; determining, based at least in part on the placement scheme and available resources in the group of virtual machine instances, at least by parsing the task definition via a scheduler application to obtain information indicating affinity or anti-affinity for certain types of virtual machine instances, a virtual machine instance from the group of virtual machine instances in which to launch a software container; as well as The software image is caused to be obtained from a location indicated by the task definition, and the software image is caused to be started in the software container within the virtual machine instance, wherein the software container is allocated the amount of resources.
58. The computer-implemented method of claim 57, wherein the group of virtual machine instances are one or more virtual machine instances that have been registered in association with each other as a cluster.
59. The computer-implemented method of claim 57, further comprising receiving a request to instantiate the task definition via an application programming interface, wherein the application programming interface is provided by a computing resource service provider.
60. The computer-implemented method of claim 57, in, Causing the software image to be launched further includes executing a scheduler specified by a customer of a computing resource service provider, the scheduler being configured to select the virtual machine instance from a group of virtual machine instances to run the software container.
61. The computer-implemented method of claim 57, wherein the information indicating affinity or anti-affinity for certain types of virtual machine instances is a tag.
62. The computer-implemented method of claim 57, in: The virtual machine instance is associated with a customer of a computing resource service provider; and The task definition is defined by the customer through an editing interface of a template service provided by the computing resource service provider.
63. A system, include: one or more processors; A memory including instructions that, as a result of being executed by one or more processors, cause the system to: A task definition is received, the task definition indicating at least: The location of the software image; and Information that can be used to determine an amount of resources to allocate to a software container for the software image, the software container: It is an isolated user space instance that runs in isolation from other software containers running on the virtual machine instance; Resource sharing with said virtual machine instance; determining, based at least in part on the placement scheme and available resources in a group of virtual machine instances, the virtual machine instance in which to launch the software container from the group of virtual machine instances by at least causing the system to parse the task definition to obtain information indicating affinity or anti-affinity for certain types of virtual machine instances; as well as The software image obtained from the location indicated by the task definition is launched in the software container within the virtual machine instance, the software container being allocated the resource share based on the amount of resources indicated by the task definition.
64. The system of claim 63, wherein the group of virtual machine instances operates within a virtual network of a customer of a computing resource service provider.
65. A system as described in claim 63, wherein the group of virtual machine instances is associated with an auto scaling group of an auto scaling service, wherein the auto scaling service causes virtual machine instances to be added to or removed from the auto scaling group based at least in part on an amount of available resources determined from information included in the task definition.
66. The system of claim 63, in: The software container is a second software container; and The task definition is received as a result of the first software container encountering an error while executing the software image.
67. The system of claim 63, wherein the instructions causing the system to determine the group of virtual machine instances further include instructions causing the system to further determine the virtual machine instances based at least in part on a load balancing distribution scheme of a load balancer service.
68. The system of claim 63, wherein the instructions further comprise instructions for causing the system to: aggregating metrics about the software container to form an aggregate metric; and Customers of a computing resource service provider hosting the system are enabled to monitor resource utilization of the software container by at least providing the aggregated metric to a resource monitoring service of the computing resource service provider.
69. The system of claim 68, wherein the metric comprises one or more of the following: the amount of storage used by the software container, the number of times an error occurs in executing said software image, or The processor usage of the software container.
70. A non-transitory computer-readable storage medium having executable instructions stored thereon, which, as a result of being executed by one or more processors of a computer system, cause the computer system to perform at least the following operations: A task definition is received, the task definition indicating at least: The location of the software image; and information usable to determine an amount of computing resources to allocate to a software container for the software image, the software container having a resource share of a computer system instance; determining, based at least in part on the placement scheme and available resources in a group of computer system instances, the computer system instance in which to launch the software container from the group of computer system instances by at least causing the computer system to parse the task definition to obtain information indicating affinity or anti-affinity for certain types of virtual machine instances; and The software image obtained from the location indicated by the task definition is launched in the software container within the computer system instance, the software container being allocated the resource share based on the amount indicated by the task definition.
71. The non-transitory computer-readable storage medium of claim 70, wherein the location where the software image is located is a location in a data storage area of a computing resource service provider that hosts the computer system.
72. The non-transitory computer-readable storage medium of claim 70, wherein the executable instructions further comprise instructions for causing the computer system to: aggregating metrics about the software container to form an aggregate metric; and The aggregated metrics are provided to a resource monitoring service of a computing resource service provider that hosts the computer system.
73. The non-transitory computer-readable storage medium of claim 72, wherein the aggregated metrics include one or more of: an amount of time the one or more processors spend executing system calls made by the software container, the number of read and write operations performed by the software container, or The number of multiple input / output operations queued for the software container.
74. The non-transitory computer readable storage medium of claim 72, in: The group of computer system instances is associated with customers of a computing resource service provider that hosts the computer systems; and The aggregate metric satisfies a predefined condition, which causes the resource monitoring service to trigger an alarm, notifying the client that the predefined condition has been met.
75. The non-transitory computer readable storage medium of claim 74, wherein the predefined condition is at least one of: an indication that an error condition has occurred with said software container, or At least one of the aggregate metrics has reached a value relative to a threshold.
76. The non-transitory computer-readable storage medium of claim 74, wherein the alert notifying the customer comprises one or more of: a text message sent to a device associated with said customer, an email sent to the email location associated with said customer, or A visual status indicator is displayed on a user interface accessible to the customer.
77. The computer-implemented method of claim 57, in: The software container is a second software container; and The task definition is received as a result of a first software container encountering an error while executing the software image.
Citation Information
Patent Citations
System and method for centralized software management in virtual machines
CN1818873A
Cloud platform architecture
US20140130038A1
Method and apparatus for managing system resources using a container model
US7814491B1
Optimized virtual machine specification for provisioning application specific runtime environment
US8219987B1
