WO2017041613A1 - 镜像部署方法、装置 - Google Patents

镜像部署方法、装置 Download PDF

Info

Publication number
WO2017041613A1
WO2017041613A1 PCT/CN2016/095533 CN2016095533W WO2017041613A1 WO 2017041613 A1 WO2017041613 A1 WO 2017041613A1 CN 2016095533 W CN2016095533 W CN 2016095533W WO 2017041613 A1 WO2017041613 A1 WO 2017041613A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
deployed
identifier
container
node
Prior art date
Application number
PCT/CN2016/095533
Other languages
English (en)
French (fr)
Inventor
王航
李金成
王喆
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017041613A1 publication Critical patent/WO2017041613A1/zh
Priority to US15/916,895 priority Critical patent/US10877772B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/184Distributed file systems implemented as replicated file system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a mirror deployment method and apparatus, and a computer system.
  • one or more containers are generally deployed on one node or a host, and the types of the containers generally correspond to applications, that is, containers running the same application can be considered as containers of the same type.
  • containers running the same application can be considered as containers of the same type.
  • a major feature of deploying applications through container technology is that the startup is fast. Before any node or host starts a container of an application, it must first obtain the image corresponding to the application. Generally, the hot or latest image is stored in the image library. When a user needs to start a container corresponding to an application on a node or a host, the time taken to obtain the image corresponding to the application often limits the startup speed of the container.
  • the present invention has been made in view of the above prior art, and the problem of reducing the efficiency of container startup caused by the acquisition of a mirror in the prior art solution can be solved by the present invention.
  • a first aspect of the embodiments of the present invention provides a mirroring deployment method, including: acquiring a configuration policy of a container, where the configuration policy of the container includes an automatic scaling policy or a replication control policy, where the automatic scaling policy includes a first image identifier, The maximum number of deployments of the container corresponding to the first image identifier and the current deployment number of the container corresponding to the first image identifier, where the replication control policy includes the second image identifier and the deployment of the container corresponding to the second image identifier Quantity; determines the identity of the image to be deployed according to the configuration policy of the container.
  • the method further includes: acquiring heat information of the image, where the heat information of the image includes a third image identifier and the third image label
  • the identifier of the image to be deployed is determined according to the configuration policy of the container, and the identifier of the image to be deployed is determined according to the heat information of the image.
  • the method further includes: determining, according to a configuration policy of a container corresponding to the identifier of the image to be deployed, The pre-deployed number of containers corresponding to the image to be deployed.
  • the method further includes: a configuration policy of the container corresponding to the identifier of the image to be deployed, and the to-be-deployed The hotness information of the image determines the pre-deployed quantity of the container corresponding to the image to be deployed.
  • the method further includes: acquiring load state information of each node and a list of mirrors deployed by each node; Determining, by the number of deployed containers of the to-be-deployed image, the number of the pre-deployed quantity of the container corresponding to the image to be deployed; The pre-deployed number of the container corresponding to the image to be deployed is selected according to the load status information of each node, and the node with the lowest load that is not deployed is deployed to deploy the image to be deployed.
  • these deployed nodes can quickly start the container without having to obtain the image when the container is started. It should be noted that, in the fourth implementation manner of the first aspect, in addition to acquiring load state information of each node and a list of mirrors deployed by each node, the deployment of the containers of each node is obtained, including Information about how many mirrored containers are deployed on each node.
  • a second aspect of the embodiments of the present invention provides a mirroring deployment apparatus, including: a receiving unit, configured to acquire a configuration policy of a container, where the configuration policy of the container includes an automatic scaling policy or a replication control policy, where the automatic scaling policy includes a first image identifier, a maximum number of deployments of the container corresponding to the first image identifier, and a current deployment number of the container corresponding to the first image identifier, where the replication control policy includes a second image identifier and the second image identifier The number of deployments of the corresponding containers; the processing unit is configured to determine an identifier of the image to be deployed according to the configuration policy of the container.
  • the receiving unit is further configured to obtain the hotness information of the mirroring, where the hot information of the mirroring includes a third image identifier and a corresponding image of the third image identifier.
  • the processing unit is further configured to determine an identifier of the image to be deployed according to the heat information of the image.
  • the processing unit is further configured to: according to a configuration policy of the container corresponding to the identifier of the image to be deployed, The pre-deployment quantity of the container corresponding to the image to be deployed is determined.
  • the processing unit is further configured to: configure a policy of the container corresponding to the identifier of the image to be deployed, and the to-be-deployed The hotness information of the mirroring determines the pre-deployed quantity of the container corresponding to the image to be deployed.
  • the image deployment apparatus further includes: a selecting unit, configured to acquire load state information of each node, and each node has a list of the deployed images, a size of the pre-deployed number of the containers corresponding to the image to be deployed, and a container corresponding to the image to be deployed. If the deployed number is smaller than the pre-deployed number of the container corresponding to the image to be deployed, the node with the lowest load that is not deployed is configured to deploy the image to be deployed according to the load status information of each node. .
  • the deployment of the containers of each node is obtained, including Information about how many mirrored containers are deployed on each node.
  • a third aspect of the embodiments of the present invention provides a computer system comprising: a processor, a memory and a bus, wherein the processor and the memory communicate via the bus; the memory is configured to store a computer execution instruction, The processor is configured to execute the computer to execute an instruction; the processor is further configured to acquire a configuration policy of the container, where the configuration policy of the container includes an automatic scaling policy or a replication control policy, where the automatic scaling policy includes a first image identifier The maximum number of deployments of the container corresponding to the first image identifier and the current deployment quantity of the container corresponding to the first image identifier, where the replication control policy includes a second image identifier and a container corresponding to the second image identifier. The number of deployments; the identity of the image to be deployed is determined according to the configuration policy of the container.
  • the processor is further configured to obtain heat information of the image, where the heat information of the image includes a third image identifier and the third image label
  • the identifier of the image to be deployed is determined according to the configuration policy of the container, and the identifier of the image to be deployed is determined according to the heat information of the image.
  • the processor is further configured to: according to a configuration policy of a container corresponding to the identifier of the image to be deployed, The pre-deployment quantity of the container corresponding to the image to be deployed is determined.
  • the processor is further configured to: configure a policy of the container corresponding to the identifier of the image to be deployed, and the to-be-deployed The hotness information of the image determines the pre-deployed quantity of the container corresponding to the image to be deployed.
  • the processor is further configured to obtain load state information of each node and a list of mirrors deployed by each node The size of the pre-deployed quantity of the container corresponding to the image to be deployed, and the number of the pre-deployed quantity of the container corresponding to the image to be deployed; For the pre-deployed number of the containers corresponding to the deployed image, the node with the lowest load that is not deployed is configured to deploy the image to be deployed according to the load status information of each node.
  • the deployment of the containers of each node is obtained, including Information about how many mirrored containers are deployed on each node.
  • the image deployment method, the device, and the computer system provided by the embodiment of the present invention obtain the image of the image to be deployed, and determine the node where the image is to be deployed, by acquiring the automatic scaling policy or the copying control policy of the container corresponding to each image. So that these nodes can obtain the corresponding image from the mirror library before starting the corresponding container, which avoids the time required for the node to download the image from the mirror library when the node starts the container, thereby improving the efficiency of starting the container.
  • FIG. 1 is a schematic flowchart of a mirroring deployment method applied to an embodiment of a method according to the present invention
  • FIG. 2 is a schematic structural diagram of a mirror deployment device applied to an embodiment of a device according to the present invention
  • FIG. 3 is a schematic structural diagram of a computer system to which an embodiment of a system of the present invention is applied.
  • mirror in this specification generally includes a file system that can be used to support an application running on a container, such as the popular application container engine Docker, a Docker file that is commonly developed by Docker-based container developers, and Docker based on Dockerfile. Mirror, and the node or host creates the Docker container after getting the Docker image.
  • mirror library in this specification refers to a database that stores images, also commonly known as Docker Hub.
  • the mirror libraries are mostly public and are generally maintained by the publisher of the image, such as the Facebook Cloud Docker image library.
  • container resource management platform in this specification generally refers to a platform for deploying and scheduling containers of various nodes, and its functions include managing resource views of respective nodes (CPU, memory utilization, network, storage utilization, etc.) ), the container distribution view of each node, and so on.
  • the method embodiment of the present invention elaborates a method for deploying a mirror.
  • the method is commonly used in the deployment and application system of a container.
  • the schematic diagram of the process is as shown in FIG. 1 and includes:
  • Step 202 Acquire a configuration policy of the container, including a container auto-scaling (Auto Scaling) policy or a replication control (Replication Controller) policy.
  • the automatic scaling policy of the container includes: a first image identifier, a maximum number of deployed containers corresponding to the first image identifier, and a current deployment number of the container corresponding to the first image identifier, as shown in Table 1.
  • the container's automatic scaling policy is generally used to manage the deployment of a container corresponding to a mirror in the system.
  • the maximum number of containers that can be deployed, the minimum number, and the current number of deployments; and the replication control policy of the container including: The second image identifier, the number of deployments of the container corresponding to the second image identifier, as shown in Table 2, where the container is deployed The quantity is the preset number of deployments expected for this container.
  • the container's replication control policy is also used to manage the deployment of a container corresponding to a mirror, such as the number of hosts that need to be deployed in the system, and the number of hosts or nodes that need to deploy the container.
  • the container corresponding to the first image identifier refers to the container that runs the mirror image corresponding to the first image identifier, and the other mirror corresponding container.
  • Step 204 Determine an identifier of the image to be deployed according to a configuration policy of the container.
  • the configuration policy of the container includes the mirroring identifier of the container. Therefore, the identifier of the mirror to be deployed can be directly determined.
  • the configuration policy of the container is an automatic scaling policy
  • the maximum number of deployed containers is greater than the preset.
  • the mirroring ID of the container is the identifier of the mirror to be deployed.
  • the mirroring ID of the container is set to be the number of the container.
  • the mirroring ID of the container is set to be deployed. The identity of the image.
  • the mirroring identifiers of all the containers with the configured policies are also the identifiers of the mirrors to be deployed.
  • the step 202 further includes: obtaining hotness information of the mirroring, where the hotness information of the mirroring is used to indicate a hot index of each image in the mirroring library, such as the number of downloads, the number of clicks, the rating of the comment, etc., and the heat information of the mirror includes the third The mirrored identifier and the hot index of the mirror corresponding to the third image identifier.
  • the hotness information of the mirror in step 202 may also be the identifier of the n most popular mirrors in the mirror library, where n is a preset number.
  • the configuration policy of the container and the heat information of the image can be obtained in any order, or can be obtained periodically.
  • the heat information of the general image is from the image library.
  • the step 204 further includes: determining, according to the hotness information of the mirror, the identifier of the image to be deployed.
  • the configuration information of the container or the hot information of the mirror includes the image identifier. Therefore, in addition to determining the identifier of the image to be deployed according to the configuration policy of the container, the image of the mirror to be deployed may be determined according to the heat information of the mirror.
  • the identifier for example, selects the most popular m mirrored identifiers, where m is a preset number.
  • the configuration policy of the container and the heat information of the mirror may be comprehensively determined to determine the identifier of the image to be deployed.
  • step 206 is further included.
  • the pre-deployment quantity of the container corresponding to the image to be deployed is determined according to the configuration policy of the container corresponding to the identifier of the image to be deployed.
  • the containers corresponding to the mirrors to be deployed may be determined according to the parameters of the configuration policy of the container corresponding to the identifiers of the mirrors to be deployed.
  • the number of pre-deployments For example, if the maximum number of deployed containers is 50, you can set the pre-deployment quantity of the container to 50 ⁇ Q.
  • the value of Q can be designed according to actual needs.
  • the parameters and the heat information of the configuration policy of the container corresponding to the identifier of each mirror to be deployed may be obtained in step 206, for example, the mirror image A is deployed.
  • the quantity f (the configuration policy parameter of the mirroring A, the heat information of the mirroring A) determines the pre-deployment quantity of the container corresponding to the mirror to be deployed.
  • f is a preset function.
  • the configuration policy of the container corresponding to the identifier of a certain image may exist, and the hotness information of the mirror corresponding to the identifier of the image does not exist.
  • the heat information of the mirror is for f (mirror A) The effect of configuring the policy parameters and mirroring the heat information of A can be eliminated.
  • step 206 further includes step 208.
  • step 208 in addition to obtaining the load state information of each node and the list of mirrors deployed by each node, the deployment of the containers of the respective nodes is obtained, which includes the containers about the deployment of each node.
  • the quantity, and the type of these containers that is, the type of image that these containers correspond to.
  • the number of pre-deployed containers A is determined to be 50, and the number of containers A that have been deployed on each node is obtained. If the number is less than 50, a new node needs to be selected for deployment. If the number of deployed containers of the image to be deployed is not less than the pre-deployed number of the container corresponding to the image to be deployed, the node to be deployed is not required to be deployed.
  • step 208 after the node with the lowest load among the nodes to be deployed is selected, if the remaining resources of the node are insufficient to support the P containers, the P here is the pre-deployment of the container corresponding to the image to be deployed. For the difference between the number of deployed containers and the number of the containers to be deployed, the node with the second lowest load that does not deploy the image to be deployed is used to deploy the image to be deployed. The selection process is repeated until the remaining resources of the selected node for deploying the image to be deployed are sufficient to support the activation of P containers.
  • the load status information of each node includes the identifier of the node, and the load status corresponding to the node, such as CPU utilization, memory utilization, etc., as shown in Table 3; the list of mirrors deployed by each node includes the identifier of the node and the Correspondence between the identifiers of the mirrors that have been deployed by the node, as shown in Table 4.
  • the deployed number of mirrors corresponding to each image ID can be obtained from the list of mirrors that have been deployed on each node.
  • Steps 202 to 208 may all be performed by the image deployment device.
  • the load state information of each node and the list of mirrors deployed by each node are obtained from the container resource management platform, and then the image deployment device acquires each to be deployed.
  • the table is sent to the container resource management platform, so that the container resource management platform indicates the node 1 and the node 3 from the mirror library according to the table.
  • Node 1 and node 5 obtain a mirror image with the mirror ID F from the mirror library.
  • the step 202 to the step 206 can be performed by the image resource management platform, and the step 208 is performed by the container resource management platform. Then, the pre-deployed quantity of the container corresponding to the image to be deployed is obtained, and then sent to the container resource management platform. After the step 208 is performed, the container resource management platform obtains the identifiers of the mirrors to be deployed, and the identifiers of the nodes to be deployed, as shown in Table 5, indicating that node 1 and node 3 obtain mirror images from the mirror library. The image of E, node 1, node 5 obtains the image with mirror image F from the mirror library.
  • the foregoing embodiment provides a method for deploying a mirror.
  • the auto-scaling policy or the copy control policy of the container corresponding to each mirror is used to select the identifiers of the mirrors to be deployed, and the nodes that deploy the mirrors are determined to make the nodes.
  • the corresponding mirror can be obtained from the mirror library before the corresponding container is started, which avoids the time required for the node to download the image from the mirror library when the node starts the container, thereby improving the efficiency of starting the container.
  • the device embodiment details a mirroring deployment device 400, which is commonly used in a container deployment and application system.
  • the schematic structure of the device is as shown in FIG. 2, including:
  • the receiving unit 402 is configured to obtain a configuration policy of the container, where the configuration policy of the container includes an automatic scaling policy or a replication control policy, where the automatic scaling policy includes a first image identifier, a maximum number of deployed containers corresponding to the first image identifier, and a first image identifier. The number of the current deployment of the corresponding container.
  • the replication control policy includes the second image identifier and the number of deployed containers corresponding to the second image identifier.
  • the receiving unit 402 is configured to perform all the optional methods of step 202 and step 202 in the method embodiment.
  • the receiving unit 402 is further configured to obtain the hotness information of the mirroring, where the hot information of the mirroring includes a third image identifier and a hot index of the mirror image corresponding to the third image identifier.
  • the processing unit 404 is configured to determine, according to a configuration policy of the container acquired by the receiving unit 402, an identifier of the image to be deployed.
  • the processing unit 404 is configured to perform all optional methods of step 204 and step 204 in the method embodiment, and all optional methods of step 206 and step 206.
  • the processing unit 404 is further configured to determine the identifier of the image to be deployed according to the heat information of the image.
  • the processing unit 404 further determines the pre-deployed quantity of the container corresponding to the image to be deployed according to the configuration policy of the container corresponding to the identifier of the image to be deployed.
  • the processing unit 404 is further configured to use the configuration policy of the container corresponding to the identifier of the image to be deployed after acquiring the identifier of the image to be deployed.
  • the hot information of the image to be deployed determines the pre-deployed quantity of the container corresponding to the image to be deployed.
  • the image deployment device 400 further includes a selection unit 406 for performing all the details of step 208, step 208, in the method embodiment.
  • the selecting unit 406 is configured to obtain the load status information of each node and the list of the mirrors that have been deployed by the respective nodes; determine the deployed quantity of the container corresponding to the image to be deployed, and the pre-requisite of the container corresponding to the image to be deployed If the number of deployed containers of the image to be deployed is less than the pre-deployed number of the container corresponding to the image to be deployed, the undistributed is selected according to the load status information of each node. The least loaded node of the deployed image is used to deploy the image to be deployed.
  • the selection unit 406 acquires the deployment status of the containers of the respective nodes, including the number of containers deployed for each node. And the types of these containers, ie the type of mirrors that these containers correspond to.
  • each unit of the image deployment device 400 can be performed in the following two ways:
  • Mode 1 The receiving unit 402 and the processing unit 404 and the selecting unit 406 are both located in a single management device, and the management device needs to acquire the load status information of each node from the container resource management platform periodically or triggered, and the nodes are deployed.
  • the mirroring list the management device obtains the identifier of each mirror to be deployed, and after the identifier of the node that needs to deploy the mirror to be deployed, as shown in Table 5, the table is sent to the container resource management platform, so that the container resource management The platform indicates node 1 according to the table.
  • Node 3 obtains the image with the image ID as E from the mirror library, and node 1 and node 5 obtain the image with the mirror image as F from the mirror library.
  • Mode 2 The receiving unit 402 and the processing unit 404 are located in a single management device, and the selecting unit 406 is located in the container resource management platform, and the processing unit 404 obtains the pre-deployed quantity of the container corresponding to the image to be deployed, and then sends the The selecting unit 406, the selecting unit 406 directly obtains the identifier of each mirror to be deployed from the resource management platform, and after the identifier of the node that needs to be deployed, as shown in Table 5, the node 1 and the node 3 are obtained from the mirror library.
  • the mirror image is the mirror image of E. Node 1 and node 5 obtain the mirror image ID from the mirror library.
  • the foregoing embodiment provides a mirroring deployment device, which selects an identifier of a mirror to be deployed by acquiring an automatic scaling policy or a replication control policy of a container corresponding to each image, and determines a node that deploys the mirrors, so that These nodes can obtain the corresponding image from the mirror library before starting the corresponding container.
  • the use of the device avoids the time required for the node to download the image from the mirror library when the node starts the container, thereby improving the efficiency of starting the container.
  • the system embodiment details a computer system 600, which is commonly used in a container deployment and application system.
  • a schematic structural diagram of the system is shown in FIG. 3, including: a processor 602, a memory 604, and a bus 606, wherein the processor 602 and memory 604 communicate via bus 606.
  • the memory 604 is configured to store computer execution instructions, and the processor 602 is configured to execute computer execution instructions stored in the memory 604;
  • the processor 602 is further configured to obtain a configuration policy of the container, where the configuration policy of the container includes an automatic scaling policy or a replication control policy, where the automatic scaling policy includes a first image identifier, and a maximum deployment of the container corresponding to the first image identifier.
  • the quantity, the current deployment quantity of the container corresponding to the first image identifier, the copy control policy includes a second image identifier, a deployment quantity of the container corresponding to the second image identifier, and a to-be-deployed according to the configuration policy of the container The identity of the image.
  • the processor 602 runs steps 202 through 204 of the method embodiment, and various optional actions of step 202 and various optional actions of step 204.
  • the processor 602 is further configured to obtain the hotness information of the mirror, where the hot information of the mirror includes a third image identifier and a hot index of the mirror corresponding to the third image identifier; and the configuration policy according to the container Determining the identifier of the image to be deployed further includes: according to the heat information of the mirror, Determining an identifier of the image to be deployed.
  • the processor 602 is further configured to determine, according to a configuration policy of the container corresponding to the identifier of the image to be deployed, a pre-deployed quantity of the container corresponding to the image to be deployed. That is, the processor 602 is further configured to perform step 206 in the method embodiment and its various optional actions.
  • the processor 602 is further configured to determine, according to the configuration policy of the container corresponding to the identifier of the image to be deployed, and the heat information of the image to be deployed, the pre-deployed quantity of the container corresponding to the image to be deployed. .
  • the processor 602 is further configured to obtain the load status information of each node and the list of the mirrors that have been deployed by the nodes, and determine the deployed number of the containers corresponding to the to-be-deployed image, corresponding to the image to be deployed. If the number of deployed containers corresponding to the image to be deployed is smaller than the pre-deployed number of the container corresponding to the image to be deployed, select not according to the load status information of each node. The node with the lowest load that deploys the image to be deployed is used to deploy the image to be deployed. That is, the processor 602 is further configured to perform step 208 in the method embodiment.
  • the processor 602 in addition to obtaining the load state information of each node and the list of mirrors deployed by each node, the processor 602 also obtains the deployment of the containers of the respective nodes, including the containers about the deployment of each node. The quantity, and the type of these containers, that is, the type of image that these containers correspond to.
  • the foregoing embodiment provides a computer system, which selects an identifier of a mirror to be deployed by acquiring an automatic scaling policy or a replication control policy of a container corresponding to each image, and determines nodes for deploying the mirrors to make the nodes
  • the corresponding image can be obtained from the mirror library before the corresponding container is started.
  • the use of the system avoids the time required for the node to download the image from the mirror library when the node starts the container, thereby improving the efficiency of starting the container.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Facsimiles In General (AREA)

Abstract

一种镜像部署方法,包括:获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略(202),所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;根据所述容器的配置策略确定待部署的镜像的标识(204)。该方法通过对待部署的镜像进行确定,避免了容器在启动时还需获取镜像造成的时延。

Description

镜像部署方法、装置 技术领域
本发明涉及计算机技术领域,尤其涉及一种镜像部署方法与装置,以及计算机系统。
背景技术
现有技术中,一般一个节点或主机上部署一个或多个容器,容器的类型一般与应用对应,即运行相同应用的容器可以认为是同一类容器。当用户需要在节点或主机上部署某一个应用的容器时,首先需要获取该应用对应的镜像,再根据该镜像创建对应的容器,用户可以根据某一应用对应的镜像在节点或主机上创建多个运行该应用的容器。
通过容器技术来部署应用的一大特点就是启动快速,而任一节点或主机启动某一应用的容器前必须先获取该应用对应的镜像,一般的热门或最新的镜像都存储在镜像库中,当用户需要在节点或主机上启动某一应用对应的容器时,获取该应用对应的镜像的耗时往往制约了容器的启动速度。
发明内容
针对上述现有技术而提出本发明,利用本发明可以解决现有技术方案中部署容器时需要获取镜像带来的容器启动的效率降低的问题。
本发明实施例的第一方面提供了一种镜像部署方法,包括:获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;根据所述容器的配置策略确定待部署的镜像的标识。
结合第一方面,在第一方面的第一种实现方式中,所述方法还包括:获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标 识对应的镜像的热门指数;所述根据所述容器的配置策略确定待部署的镜像的标识还包括:根据所述镜像的热度信息,确定所述待部署的镜像的标识。
结合第一方面或第一方面的第一种实现方式,在第一方面的第二种实现方式中,所述方法还包括:根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
结合第一方面的第一种实现方式,在第一方面的第三种实现方式中,所述方法还包括:根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。通过确定待部署的镜像对应的容器的预部署数量,可以得知该待部署的镜像需要在多少个节点上预部署,使得如果需要启动该待部署的镜像对应的节点的之后,可以在这些预部署了镜像的节点上直接启动容器,无须在启动容器时再从镜像库获取镜像,有效提升了容器的启动速度。
结合第一方面的第二种或第三种实现方式,在第一方面的第四种实现方式中,所述方法还包括:获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。在确定了待部署的镜像的预部署数量后,通过选取合适的节点用于部署镜像,使得这些部署了镜像的节点能够快速启动容器,无须在启动容器的时候去获取镜像。需要说明的是,在第一方面的第四种实现方式中,除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署了多少个何种镜像对应的容器的信息。
本发明实施例的第二方面提供了一种镜像部署装置,包括:接收单元,用于获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;处理单元,用于根据所述容器的配置策略确定待部署的镜像的标识。
结合第二方面,在第二方面的第一种实现方式中,所述接收单元还用于获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标识对应的镜像的热门指数;所述处理单元还用于根据所述镜像的热度信息,确定所述待部署的镜像的标识。
结合第二方面或第二方面的第一种实现方式,在第二方面的第二种实现方式中,所述处理单元还用于根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
结合第二方面的第一种实现方式,在第二方面的第三种实现方式中,所述处理单元还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
结合第二方面的第二或第三种实现方式,在第二方面的第四种实现方式中,所述镜像部署装置还包括:选择单元,用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。需要说明的是,在第二方面的第四种实现方式中,除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署了多少个何种镜像对应的容器的信息。
本发明实施例的第三方面提供了一种计算机系统,包括:处理器,存储器和总线,其中,所述处理器和所述存储器通过所述总线通信;所述存储器用于存储计算机执行指令,所述处理器用于执行所述计算机执行指令;所述处理器还用于获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;根据所述容器的配置策略确定待部署的镜像的标识。
结合第三方面,在第三方面的第一种实现方式中,所述处理器还用于获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标 识对应的镜像的热门指数;所述根据所述容器的配置策略确定待部署的镜像的标识还包括:根据所述镜像的热度信息,确定所述待部署的镜像的标识。
结合第三方面或第三方面的第一种实现方式,在第三方面的第二种实现方式中,所述处理器还用于根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
结合第三方面的第一实现方式,在第三方面的第三种实现方式中,所述处理器还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
结合第三方面的第二种或第三种实现方式,在第三方面的第四种实现方式中,所述处理器还用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。需要说明的是,在第三方面的第四种实现方式中,除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署了多少个何种镜像对应的容器的信息。
本发明实施例提供的镜像的部署方法、装置以及计算机系统,通过获取各个镜像对应的容器的自动伸缩策略或复制控制策略,来选择出待部署的镜像的标识,并确定部署这些镜像的节点,以使得这些节点能够在启动对应的容器之前,就能够从镜像库中获取对应的镜像,避免了节点启动容器时需要从镜像库中下载镜像的耗时,提升了启动容器的效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作以简单地介绍,显而易见的,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明方法实施例所应用的镜像部署方法的流程示意图;
图2为本发明装置实施例所应用的镜像部署装置的组成结构示意图;
图3为本发明系统实施例所应用的计算机系统的组成结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本说明书中的术语“镜像”,一般包括可以用于支撑容器运行的某一应用的文件系统,例如热门的应用容器引擎Docker,基于Docker的容器开发人员一般常开发应用的Dockerfile,基于Dockerfile生成Docker镜像,而节点或主机在获取Docker镜像后,再建立Docker容器。
本说明书中的术语“镜像库”,指代存储镜像的数据库,也常称为Docker Hub,镜像库多为公有的,一般由镜像的发布方维护,例如阿里云Docker镜像库。
本说明书中的术语“容器资源管理平台”,一般指代对各个节点的容器的部署和调度的平台,其功能包括管理各个节点的资源视图(CPU、内存利用率、网络、存储的利用情况等)、各个节点的容器分布视图等。
方法实施例
本方法实施例详细阐述一种镜像的部署方法,该方法常用于容器的部署及应用系统中,其流程示意图如图1所示,包括:
步骤202,获取容器的配置策略,包括容器的自动伸缩(Auto Scaling)策略或复制控制(Replication Controller)策略。其中,容器的自动伸缩策略包括:第一镜像标识,第一镜像标识对应的容器的最大部署数量,第一镜像标识对应的容器的当前部署数量,如表1。容器的自动伸缩策略一般用于管理系统中某一镜像对应的容器的部署情况,例如该容器能够部署的最大数量,最小数量,当前的部署数量;容器的复制控制(Replication Controller)策略,包括:第二镜像标识,第二镜像标识对应的容器的部署数量,如表2,此处的容器的部署 数量为预设的该容器期望的部署数量。容器的复制控制策略也用于管理某一镜像对应的容器的部署情况,例如该容器在系统中需要部署的数量,需要部署该容器的主机或节点的数量。其中,第一镜像标识对应的容器,指代运行第一镜像标识对应的镜像的容器,其它镜像对应的容器以此类推。
镜像标识 容器的最大部署数量 容器的当前部署数量
A 30 5
B 40 10
表1
镜像标识 容器的部署数量
C 20
D 50
表2
步骤204,根据容器的配置策略确定待部署的镜像的标识。
具体的,容器的配置策略中包括该容器对应的镜像标识,因此可以直接确定待部署的镜像的标识,例如容器的配置策略为自动伸缩策略时,可以设置为容器的最大部署数量大于预设的阈值时,该容器对应的镜像标识为待部署的镜像的标识;容器的配置策略为复制控制策略时,可以设置为容器部署数量大于预设的阈值时,该容器对应的镜像标识为待部署的镜像的标识。由于容器的部署及应用系统中,并不是所有类型的容器都有对应的配置策略,因此也可以设置为所有的有配置策略的容器对应的镜像标识,均为待部署的镜像的标识。
可选的,步骤202中还包括:获取镜像的热度信息,镜像的热度信息用于表示镜像库中各个镜像的热门指数,例如下载次数、点击次数、评论打分等,镜像的热度信息包括第三镜像标识以及第三镜像标识对应的镜像的热门指数。步骤202中的镜像的热度信息,也可以为镜像库中热门程度最高的n个镜像的标识,此处的n为预设的数字。
需要说明的是,容器的配置策略以及镜像的热度信息可以按照任意顺序获取,也可以周期性的获取,一般镜像的热度信息来源于镜像库。
可选的,步骤202中还获取了镜像的热度信息的情况下,步骤204还包括:根据镜像的热度信息,确定待部署的镜像的标识。
具体的,无论容器的配置策略或镜像的热度信息均包含镜像标识,因此步骤204中除了根据容器的配置策略确定待部署的镜像的标识外,还可以根据镜像的热度信息确定待部署的镜像的标识,例如从中选出热门程度最高的m个镜像的标识,此处的m为预设的数字。步骤204中还可以综合考虑容器的配置策略、镜像的热度信息来确定待部署的镜像的标识。
可选的,步骤204后还包括步骤206。步骤206,根据待部署的镜像的标识对应的容器的配置策略,确定该待部署的镜像对应的容器的预部署数量。
具体的,如果步骤204中确定了多个待部署的镜像的标识,则步骤206中可以根据各个待部署的镜像的标识对应的容器的配置策略的各个参数,确定各个待部署的镜像对应的容器的预部署数量。例如,已知某一容器的最大部署数量为50个,则可以设置该容器的预部署数量为50×Q,Q的取值可以根据实际需要自行设计。
可选的,如果步骤202中还获取了镜像的热度信息的情况下,则步骤206中可以根据各个待部署的镜像的标识对应的容器的配置策略的各个参数和热度信息,例如部署镜像A的数量=f(镜像A的配置策略参数,镜像A的热度信息),确定待部署的镜像对应的容器的预部署数量,此处的f为预设的函数。
需要说明的是,可能出现某一镜像的标识对应的容器的配置策略存在,而该镜像的标识对应的镜像的热度信息不存在的情况,此时将该镜像的热度信息对于f(镜像A的配置策略参数,镜像A的热度信息)的影响消除即可。
可选的,步骤204后执行了步骤206的情况下,步骤206后还包括步骤208。步骤208,获取各个节点的负载状态信息、各个节点已部署的镜像的列表;判断该待部署的镜像对应的容器的已部署数量,与待部署的镜像对应的容器的预部署数量的大小关系;若该待部署的镜像对应的容器的已部署数量小于该待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署该待部署的镜像的负载最低的节点用于部署该待部署的镜像。需要说明的是,步骤208中,除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署的容器的数量,以及这些容器的类型,即这些容器对应的镜像的类型。
例如,步骤206中确定容器A的预部署数量为50个,获取各个节点上已经部署了的容器A的数量,如果该数量少于50个,则还需要选取新的节点用于部署该待部署的镜像,如果该待部署的镜像对应的容器的已部署数量不小于该待部署的镜像对应的容器的预部署数量,则无须再选取节点来部署该待部署的镜像。
步骤208中,选取了未部署该待部署的镜像的节点中负载最低的节点后,如果该节点的剩余资源不够支撑P个容器,此处的P为该待部署的镜像对应的容器的预部署数量与该待部署的镜像对应的容器的已部署数量之差,则步骤208中还需再次选取未部署该待部署的镜像的负载次低的节点用于部署该待部署的镜像。该选取过程不断重复,直至选取的用于部署该待部署的镜像的节点的剩余资源足够支撑P个容器的启用。
上述各个节点的负载状态信息包括了节点的标识,以及该节点对应的负载状态,例如CPU利用率,内存利用率等,如表3;各个节点已部署的镜像的列表包括了节点的标识与该节点已经部署了的镜像的标识的对应关系,如表4。通过各个节点已部署的镜像的列表可以获得各个镜像标识对应的镜像的已部署数量。
节点标识 CPU利用率 内存利用率
1 30% 50%
3 40% 60%
表3
节点标识 镜像标识
1 A、E
3 B、C
表4
步骤202至步骤208可以均由镜像部署装置执行,则步骤208中需要从容器资源管理平台获取各个节点的负载状态信息、各个节点已部署的镜像的列表,随后镜像部署装置获取了各个待部署的镜像的标识,与需要部署该待部署的镜像的节点的标识后,如表5,将该表发送至容器资源管理平台,以使得容器资源管理平台根据该表指示节点1、节点3从镜像库中获取镜像标识为E的镜像, 节点1、节点5从镜像库中获取镜像标识为F的镜像。
步骤202至步骤206可以均由镜像部署装置执行,步骤208由容器资源管理平台执行,则步骤206中获取了该待部署的镜像对应的容器的预部署数量后将其发送至容器资源管理平台,容器资源管理平台执行步骤208后获取了各个待部署的镜像的标识,与需要部署该待部署的镜像的节点的标识后,如表5,指示节点1、节点3从镜像库中获取镜像标识为E的镜像,节点1、节点5从镜像库中获取镜像标识为F的镜像。
镜像标识 节点标识
E 节点1、节点3
F 节点1、节点5
表5
上述实施例提供了一种镜像的部署方法,通过获取各个镜像对应的容器的自动伸缩策略或复制控制策略,来选择出待部署的镜像的标识,并确定部署这些镜像的节点,以使得这些节点能够在启动对应的容器之前,就能够从镜像库中获取对应的镜像,避免了节点启动容器时需要从镜像库中下载镜像的耗时,提升了启动容器的效率。
装置实施例
本装置实施例详细阐述一种镜像部署装置400,该装置常用于容器的部署及应用系统中,其组成结构示意图如图2所示,包括:
接收单元402,用于获取容器的配置策略,容器的配置策略包括自动伸缩策略或复制控制策略,自动伸缩策略包括第一镜像标识、第一镜像标识对应的容器的最大部署数量、第一镜像标识对应的容器的当前部署数量,复制控制策略包括第二镜像标识、第二镜像标识对应的容器的部署数量。
具体的,接收单元402用于执行方法实施例中的步骤202及步骤202的所有可选方法。
可选的,接收单元402还用于获取镜像的热度信息,镜像的热度信息包括第三镜像标识以及第三镜像标识对应的镜像的热门指数。
处理单元404,用于根据接收单元402获取的容器的配置策略确定待部署的镜像的标识。
具体的,处理单元404用于执行方法实施例中的步骤204及步骤204的所有可选方法,以及步骤206及步骤206的所有可选方法。
可选的,接收单元402获取了镜像的热度信息的情况下,处理单元404还用于根据镜像的热度信息,确定待部署的镜像的标识。
可选的,处理单元404在获取了待部署的镜像的标识后,还根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
可选的,接收单元402获取了镜像的热度信息的情况下,处理单元404在获取了待部署的镜像的标识后,还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
可选的,镜像部署装置400还包括选择单元406,用于执行方法实施例中的步骤208即步骤208的所有细节。
选择单元406,用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。
需要说明的是,选择单元406除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署的容器的数量,以及这些容器的类型,即这些容器对应的镜像的类型。
实际使用中,镜像部署装置400的各个单元的部署可以有以下两种方式:
方式1:接收单元402和处理单元404和选择单元406均位于一个单独的管理装置中,该管理装置需要定期或触发性的从容器资源管理平台获取各个节点的负载状态信息、各个节点已部署的镜像的列表,该管理装置获取了各个待部署的镜像的标识,与需要部署该待部署的镜像的节点的标识后,如表5,将该表发送至容器资源管理平台,以使得容器资源管理平台根据该表指示节点1、 节点3从镜像库中获取镜像标识为E的镜像,节点1、节点5从镜像库中获取镜像标识为F的镜像。
方式2:接收单元402和处理单元404位于一个单独的管理装置中,选择单元406位于容器资源管理平台,则处理单元404获取了该待部署的镜像对应的容器的预部署数量后将其发送至选择单元406,选择单元406从资源管理平台直接获取各个待部署的镜像的标识,与需要部署该待部署的镜像的节点的标识后,如表5,指示节点1、节点3从镜像库中获取镜像标识为E的镜像,节点1、节点5从镜像库中获取镜像标识为F的镜像。
上述实施例提供了一种镜像的部署装置,该装置通过获取各个镜像对应的容器的自动伸缩策略或复制控制策略,来选择出待部署的镜像的标识,并确定部署这些镜像的节点,以使得这些节点能够在启动对应的容器之前,就能够从镜像库中获取对应的镜像,该装置的使用避免了节点启动容器时需要从镜像库中下载镜像的耗时,提升了启动容器的效率。
系统实施例
本系统实施例详细阐述一种计算机系统600,该系统常用于容器的部署及应用系统中,其组成结构示意图如图3所示,包括:处理器602,存储器604和总线606,其中,处理器602和存储器604通过总线606通信。
存储器604用于存储计算机执行指令,处理器602用于执行存储器604存储的计算机执行指令;
处理器602还用于获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;根据所述容器的配置策略确定待部署的镜像的标识。实际使用中,处理器602执行存储器604存储的计算机执行指令后,运行了方法实施例中的步骤202至步骤204,以及步骤202的各个可选动作和步骤204的各个可选动作。
可选的,处理器602还用于获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标识对应的镜像的热门指数;所述根据所述容器的配置策略确定待部署的镜像的标识还包括:根据所述镜像的热度信息, 确定所述待部署的镜像的标识。
可选的,处理器602还用于根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。即处理器602还用于执行方法实施例中的步骤206及其各个可选动作。
可选的,处理器602还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
可选的,处理器602还用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。即处理器602还用于执行方法实施例中的步骤208。需要说明的是,处理器602,除了获取各个节点的负载状态信息以及各个节点已部署的镜像的列表之外,还获取了各个节点的容器的部署情况,其中包括了关于各个节点部署的容器的数量,以及这些容器的类型,即这些容器对应的镜像的类型。
上述实施例提供了一种计算机系统,该系统通过获取各个镜像对应的容器的自动伸缩策略或复制控制策略,来选择出待部署的镜像的标识,并确定部署这些镜像的节点,以使得这些节点能够在启动对应的容器之前,就能够从镜像库中获取对应的镜像,该系统的使用避免了节点启动容器时需要从镜像库中下载镜像的耗时,提升了启动容器的效率。
需要说明的是:对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和单元并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (15)

  1. 一种镜像部署方法,其特征在于,包括:
    获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;
    根据所述容器的配置策略确定待部署的镜像的标识。
  2. 如权利要求1所述的镜像部署方法,其特征在于,所述方法还包括:获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标识对应的镜像的热门指数;
    所述根据所述容器的配置策略确定待部署的镜像的标识还包括:根据所述镜像的热度信息,确定所述待部署的镜像的标识。
  3. 如权利要求1或2所述的镜像部署方法,其特征在于,所述方法还包括:根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
  4. 如权利要求2所述的镜像部署方法,其特征在于,所述方法还包括:根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
  5. 如权利要求3或4所述的镜像部署方法,其特征在于,所述方法还包括:
    获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;
    判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;
    若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据所述各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。
  6. 一种镜像部署装置,其特征在于,包括:
    接收单元,用于获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数 量;
    处理单元,用于根据所述容器的配置策略确定待部署的镜像的标识。
  7. 如权利要求6所述的镜像部署装置,其特征在于,所述接收单元还用于获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标识对应的镜像的热门指数;
    所述处理单元还用于根据所述镜像的热度信息,确定所述待部署的镜像的标识。
  8. 如权利要求6或7所述的镜像部署装置,其特征在于,所述处理单元还用于根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
  9. 如权利要求7所述的镜像部署装置,其特征在于,所述处理单元还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
  10. 如权利要求8或9所述的镜像部署装置,其特征在于,所述镜像部署装置还包括:
    选择单元,用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据所述各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。
  11. 一种计算机系统,其特征在于,包括:处理器,存储器和总线,其中,所述处理器和所述存储器通过所述总线通信;
    所述存储器用于存储计算机执行指令,所述处理器用于执行所述计算机执行指令;
    所述处理器还用于获取容器的配置策略,所述容器的配置策略包括自动伸缩策略或复制控制策略,所述自动伸缩策略包括第一镜像标识、所述第一镜像标识对应的容器的最大部署数量、所述第一镜像标识对应的容器的当前部署数量,所述复制控制策略包括第二镜像标识、所述第二镜像标识对应的容器的部署数量;根据所述容器的配置策略确定待部署的镜像的标识。
  12. 如权利要求11所述的计算机系统,其特征在于,所述处理器还用于获取镜像的热度信息,所述镜像的热度信息包括第三镜像标识以及所述第三镜像标识对应的镜像的热门指数;所述根据所述容器的配置策略确定待部署的镜像的标识还包括:根据所述镜像的热度信息,确定所述待部署的镜像的标识。
  13. 如权利要求11或12所述的计算机系统,其特征在于,所述处理器还用于根据所述待部署的镜像的标识对应的容器的配置策略,确定所述待部署的镜像对应的容器的预部署数量。
  14. 如权利要求12所述的计算机系统,其特征在于,所述处理器还用于根据所述待部署的镜像的标识对应的容器的配置策略和所述待部署的镜像的热度信息,确定所述待部署的镜像对应的容器的预部署数量。
  15. 如权利要求13或14所述的计算机系统,其特征在于,所述处理器还用于获取各个节点的负载状态信息以及各个节点已部署的镜像的列表;判断所述待部署的镜像对应的容器的已部署数量,与所述待部署的镜像对应的容器的预部署数量的大小关系;若所述待部署的镜像对应的容器的已部署数量小于所述待部署的镜像对应的容器的预部署数量,则根据所述各个节点的负载状态信息,选取未部署所述待部署的镜像的负载最低的节点用于部署所述待部署的镜像。
PCT/CN2016/095533 2015-09-10 2016-08-16 镜像部署方法、装置 WO2017041613A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/916,895 US10877772B2 (en) 2015-09-10 2018-03-09 Image deployment method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510572458.9 2015-09-10
CN201510572458.9A CN106528262B (zh) 2015-09-10 2015-09-10 镜像部署方法、装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/916,895 Continuation US10877772B2 (en) 2015-09-10 2018-03-09 Image deployment method and apparatus

Publications (1)

Publication Number Publication Date
WO2017041613A1 true WO2017041613A1 (zh) 2017-03-16

Family

ID=58240559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095533 WO2017041613A1 (zh) 2015-09-10 2016-08-16 镜像部署方法、装置

Country Status (3)

Country Link
US (1) US10877772B2 (zh)
CN (2) CN110806920B (zh)
WO (1) WO2017041613A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180131723A1 (en) * 2016-11-10 2018-05-10 International Business Machines Corporation Security Policy Inclusion with Container Deployment

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2018248330A1 (en) 2017-04-07 2019-10-31 BXB Digital Pty Limited Systems and methods for tracking promotions
US10832208B2 (en) 2017-05-02 2020-11-10 BXB Digital Pty Limited Systems and methods for facility matching and localization
WO2018204499A1 (en) 2017-05-02 2018-11-08 BXB Digital Pty Limited Systems and methods for pallet identification
US10878366B2 (en) 2017-05-05 2020-12-29 BXB Digital Pty Limited Placement of tracking devices on pallets
US11100243B2 (en) * 2017-06-06 2021-08-24 Microsoft Technology Licensing, Llc Selective persistence of data utilized by software containers
EP3673426B1 (en) 2017-08-21 2024-03-06 BXB Digital PTY Limited Systems and methods for pallet tracking using hub and spoke architecture
EP3698270B1 (en) * 2017-10-20 2022-05-11 BXB Digital PTY Limited Systems and methods for tracking goods carriers
US11340933B2 (en) 2017-11-14 2022-05-24 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for secrets injection into containers for 5G network elements
US10761871B2 (en) * 2017-11-14 2020-09-01 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparratus for secrets injection into containers
CN111190608B (zh) * 2018-11-14 2022-09-16 佛山市顺德区顺达电脑厂有限公司 用于待测装置的作业系统布署方法
CN111290776B (zh) * 2018-12-10 2023-05-16 航天信息股份有限公司 一种用于管理区块链节点的管理装置及方法
US10816637B2 (en) 2018-12-27 2020-10-27 Chep Technology Pty Limited Site matching for asset tracking
US11726758B2 (en) * 2019-02-07 2023-08-15 Microsoft Technology Licensing, Llc Efficient scaling of a container-based application in a distributed computing system
US11062256B2 (en) 2019-02-25 2021-07-13 BXB Digital Pty Limited Smart physical closure in supply chain
CN111078402A (zh) * 2019-12-03 2020-04-28 广州西麦科技股份有限公司 一种快速提供实验环境的资源池系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307241A (zh) * 2011-09-27 2012-01-04 上海忠恕物联网科技有限公司 一种基于动态预测的云计算资源部署方法
CN102521014A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 虚拟机的部署方法及装置
US20140195490A1 (en) * 2009-04-30 2014-07-10 Netapp, Inc. Unordered idempotent logical replication operations
CN104503882A (zh) * 2014-12-25 2015-04-08 北京京东尚科信息技术有限公司 容器管理方法及装置
CN104539708A (zh) * 2014-12-29 2015-04-22 杭州华为数字技术有限公司 一种云平台资源的缩容方法、装置与系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7302609B2 (en) * 2003-03-12 2007-11-27 Vladimir Matena Method and apparatus for executing applications on a distributed computer system
US9210040B2 (en) * 2009-09-03 2015-12-08 C3Dna Apparatus and methods for cognitive containters to optimize managed computations and computing resources
US8661120B2 (en) * 2010-09-21 2014-02-25 Amazon Technologies, Inc. Methods and systems for dynamically managing requests for computing capacity
EP2764436A4 (en) * 2011-10-04 2015-12-09 Tier 3 Inc PREDICTIVE TWO-DIMENSIONAL AUTOSCALING
US8863129B2 (en) * 2011-12-06 2014-10-14 International Business Machines Corporation Automated caching and mirroring of immutable data in distributed virtual machines via native interface components
CN103197952B (zh) * 2012-01-09 2017-08-25 华为技术有限公司 基于云基础设施的针对应用系统维护部署的管理系统和方法
US8965921B2 (en) * 2012-06-06 2015-02-24 Rackspace Us, Inc. Data management and indexing across a distributed database
CN103905508B (zh) * 2012-12-28 2017-07-28 华为技术有限公司 云平台应用部署方法及装置
US9973375B2 (en) * 2013-04-22 2018-05-15 Cisco Technology, Inc. App store portal providing point-and-click deployment of third-party virtualized network functions
EP3095031B1 (en) * 2014-01-17 2021-09-15 Fair Isaac Corporation Cloud-based decision management platform
US9672120B2 (en) * 2014-06-28 2017-06-06 Vmware, Inc. Maintaining consistency using reverse replication during live migration
CN104618164B (zh) * 2015-02-12 2018-12-21 北京航空航天大学 云计算平台应用快速部署的管理方法
US10243793B1 (en) * 2018-08-13 2019-03-26 Nefeli Networks, Inc. Modular system framework for software network function automation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195490A1 (en) * 2009-04-30 2014-07-10 Netapp, Inc. Unordered idempotent logical replication operations
CN102307241A (zh) * 2011-09-27 2012-01-04 上海忠恕物联网科技有限公司 一种基于动态预测的云计算资源部署方法
CN102521014A (zh) * 2011-12-06 2012-06-27 北京航空航天大学 虚拟机的部署方法及装置
CN104503882A (zh) * 2014-12-25 2015-04-08 北京京东尚科信息技术有限公司 容器管理方法及装置
CN104539708A (zh) * 2014-12-29 2015-04-22 杭州华为数字技术有限公司 一种云平台资源的缩容方法、装置与系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180131723A1 (en) * 2016-11-10 2018-05-10 International Business Machines Corporation Security Policy Inclusion with Container Deployment
US10554690B2 (en) * 2016-11-10 2020-02-04 International Business Machines Corporation Security policy inclusion with container deployment

Also Published As

Publication number Publication date
CN110806920A (zh) 2020-02-18
CN106528262B (zh) 2019-10-22
US10877772B2 (en) 2020-12-29
CN106528262A (zh) 2017-03-22
US20180196680A1 (en) 2018-07-12
CN110806920B (zh) 2022-12-13

Similar Documents

Publication Publication Date Title
WO2017041613A1 (zh) 镜像部署方法、装置
TWI752994B (zh) 應用的擴容方法、裝置和系統
WO2017045424A1 (zh) 一种应用程序部署系统及部署方法
JP7292786B2 (ja) ハイブリッド・コンピューティング環境におけるパッチ管理
US20210216360A1 (en) Virtual machine migration method and apparatus
US10805363B2 (en) Method, device and system for pushing file
JP6363796B2 (ja) 動的コードデプロイメント及びバージョニング
WO2017113374A1 (zh) 镜像部署方法和装置
US9645808B1 (en) Integrating software updates with the testing and deployment of software
US20180219877A1 (en) Security-based container scheduling
US10491704B2 (en) Automatic provisioning of cloud services
US11188561B2 (en) Prioritizing microservices on a container platform for a restore operation
US20150277952A1 (en) Rapid creation and reconfiguration of virtual machines on hosts
US9591094B2 (en) Caching of machine images
US20130275968A1 (en) Application management methods and systems
WO2017181830A1 (zh) 一种服务器同步扩容的方法、装置及存储介质
JP6215481B2 (ja) クラウド環境におけるitインフラ管理のための方法とその装置
US9729610B2 (en) Method for intercepting an instruction produced by an application on a computer
EP3191948A1 (en) Computing instance launch time
WO2018036104A1 (zh) 一种布署虚拟机的方法、系统以及物理服务器
US20150019722A1 (en) Determining, managing and deploying an application topology in a virtual environment
JP6668658B2 (ja) ジョブ管理方法、ジョブ管理装置及びプログラム
JP2016006608A (ja) 管理方法、仮想マシン、管理サーバ、管理システム、及びコンピュータプログラム
JP6221701B2 (ja) 制御プログラム、制御装置及び制御方法
WO2023160418A1 (zh) 资源处理方法及资源调度方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16843551

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16843551

Country of ref document: EP

Kind code of ref document: A1