CN106302632B - Downloading method of basic mirror image and management node - Google Patents

Downloading method of basic mirror image and management node Download PDF

Info

Publication number
CN106302632B
CN106302632B CN201610586890.8A CN201610586890A CN106302632B CN 106302632 B CN106302632 B CN 106302632B CN 201610586890 A CN201610586890 A CN 201610586890A CN 106302632 B CN106302632 B CN 106302632B
Authority
CN
China
Prior art keywords
node
container
computing node
started
image
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610586890.8A
Other languages
Chinese (zh)
Other versions
CN106302632A (en
Inventor
周敬滨
王必成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610586890.8A priority Critical patent/CN106302632B/en
Publication of CN106302632A publication Critical patent/CN106302632A/en
Application granted granted Critical
Publication of CN106302632B publication Critical patent/CN106302632B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the invention discloses a downloading method of a basic mirror image, which is realized in a management node in a container cluster management architecture, wherein the container cluster management architecture also comprises a remote mirror image warehouse and at least one computing node, and the method comprises the following steps: acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a base image used by the container which is started; screening out target computing nodes of which the state information meets preset conditions from all the computing nodes; sending a pre-download command to the target computing node, the pre-download command being used to instruct the target computing node to download, in advance from the remote image repository, an identification of a base image used by a container that the target computing node has started. Correspondingly, the embodiment of the invention also discloses a management node. By adopting the invention, the starting time of the container can be accelerated.

Description

Downloading method of basic mirror image and management node
Technical Field
The invention relates to the technical field of computers, in particular to a downloading method of a basic mirror image and a management node.
Background
The virtualization technology is a resource management technology applied to a computer, and can abstract and present various physical resources (such as network, memory and storage) of the computer, break the boundary between physical structures and realize the maximum utilization of the physical resources. As traditional virtualization technologies have grown mature, performance and resource utilization have approached bottlenecks, and a new type of virtualization technology called container technology has been proposed in the industry. Compared with the traditional virtualization technology, the container technology has the advantages of less resource loss, higher resource utilization rate and higher running speed.
Referring to fig. 9, when a host starts a container, it needs to determine a base image corresponding to the container to be started, then download the base image from a remote image repository, and then start the container using the base image. However, when the size of the base image is large, or the download speed is slow, the time to start the container will be greatly extended.
Disclosure of Invention
The embodiment of the invention provides a downloading method of a basic mirror image and a management node, which can accelerate the starting time of a container.
A first aspect of an embodiment of the present invention provides a method for downloading a basic image, where the method is implemented in a management node in a container cluster management architecture, where the container cluster management architecture further includes a remote image repository and at least one computing node, and the method includes: acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a basic mirror image used by the container which is started; screening out target computing nodes of which the state information meets preset conditions from all the computing nodes; sending a pre-download command to the target computing node, the pre-download command including the used base image of the started container, the pre-download command being used for instructing the target computing node to download the used base image of the started container from the remote image repository in advance. The basic mirror image can be downloaded in advance by the computing node, so that the container can be started by directly using the basic mirror image downloaded in advance in the following process, and the starting time of the container is shortened.
In a first possible implementation form of the first aspect, the usage information further comprises a usage frequency of a base image used by the container that was started. Correspondingly, before the control node screens out the target computing node with the operating condition meeting the preset condition from all the computing nodes, the following steps are also executed: sequencing the basic images used by the containers which are started by each computing node according to the sequence of the use frequency of the basic images from high to low; the pre-download command further includes a sorting result of the used base images of the started containers, and the pre-download command is used for instructing the target computing node to download the used base images of the started containers from the remote image warehouse in advance according to the sorting result. The method has the advantages that the computing node can preferentially download the basic mirror image with higher use frequency, and the probability of using the downloaded basic mirror image is improved.
In a second possible implementation manner of the first aspect, the state information includes processor usage, memory usage, and local mirror repository usage of the compute node. Correspondingly, the specific operation of the control node for screening out the target computing node of which the state information meets the preset condition from all the computing nodes is as follows: and screening out target computing nodes of which the processor utilization rate is lower than a first preset threshold, the memory utilization rate is lower than a second preset threshold and the local mirror image warehouse utilization rate is lower than a third preset threshold from all the computing nodes. The method has the advantages that the method can avoid that the computing node of which the state information does not meet the condition downloads the basic mirror image in advance, and further avoid the problem of download failure or overload.
With reference to the first aspect or any one of the first to the second possible implementation manners of the first aspect, in a third possible implementation manner, before the control node sends the pre-download command to the target computing node, the method further performs: it is determined that there is no base image in the local image repository of the target compute node that was used by a container that the target compute node started. The advantage is that the computing node can be prevented from downloading duplicate base images.
With reference to the first aspect or any one of the first to the second possible implementation manners of the first aspect, in a fourth possible implementation manner, before the control node sends the pre-download command to the target computing node, the method further performs: it is determined that the target computing node is not downloading the base image. The advantage is that the computing node can be prevented from downloading duplicate base images.
A second aspect of an embodiment of the present invention provides a method for starting a container, where the method is implemented in a management node in a container cluster management architecture, where the container cluster management architecture further includes a remote mirror warehouse and at least one computing node, and the method includes: acquiring a container to be started and specification information of the container; searching a computing node of which the state information meets the operating condition required by the specification information; screening out target computing nodes with basic images downloaded in advance from the searched computing nodes; and sending a container starting command to the target computing node, wherein the container starting command is used for instructing the target computing node to start the container by using the base image which is downloaded in advance. The container can be started by the computing node with the basic mirror image downloaded in advance, and the starting time of the container is shortened.
In a first possible implementation form of the second aspect, the state information comprises processor usage and memory usage of the compute node. Correspondingly, the specific operation of the management node for searching the computing node of which the state information meets the operating condition required by the specification information is as follows: and searching for the computing nodes with the processor utilization rate higher than a first preset threshold and the memory utilization rate higher than a second preset threshold. The method has the advantages that the condition that the computing nodes which do not meet the operating conditions start the container can be avoided, and the feasibility is enhanced.
In a second possible implementation manner of the second aspect, before the control node sifts out the target computing nodes from the searched computing nodes, where the target computing nodes have been downloaded with the base image in advance, the following is further performed: and determining the residual resources of each computing node according to the state information of each computing node. Correspondingly, the specific operation of the control node for screening out the target computing node which is downloaded with the basic mirror image in advance from the searched computing nodes is as follows: and screening out the target computing node with the highest residual resources and downloaded with the basic mirror image in advance from the searched computing nodes. The method has the advantages that the computing node with the highest residual resources can be preferentially started, and the utilization efficiency of the computing node is improved.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, after the control node determines the remaining resources of each computing node according to the state information of each computing node, the method further performs: and if no target computing node with the basic mirror image downloaded in advance exists in the searched computing nodes, screening the computing node with the highest residual resource from the searched computing nodes as the target computing node.
A third aspect of the embodiments of the present invention provides a method for deleting a base mirror image, where the method is implemented in a compute node in a container cluster management architecture, and the container cluster management architecture further includes a remote mirror image warehouse and a management node, and the method includes: querying unused base images in a local image warehouse; judging whether the self is in a high load state or not according to the self state information; and if so, deleting the unused base mirror image in the local mirror image warehouse. The compute node may be enabled to delete the base image to reduce the load.
In a first possible implementation manner of the third aspect, the state information includes processor usage, memory usage, and local mirror repository usage. Correspondingly, the specific operation that the computing node judges whether the computing node is in the high-load state according to the state information of the computing node is as follows: and judging whether the utilization rate of the processor is higher than a first preset threshold, whether the utilization rate of the memory is higher than a second preset threshold, and whether the utilization rate of the local mirror image warehouse is higher than a third preset threshold. The method has the advantage that the basic mirror can be deleted by the computing node in a high-load state.
In a first possible implementation manner of the third aspect, before the computing node deletes the unused base image in the local image repository, the following is further performed: querying the idle duration of the unused base image; and sequencing the basic mirror images according to the sequence of the idle time lengths of the basic mirror images from long to short. Correspondingly, the specific operation of deleting the unused base image in the local image warehouse by the computing node is as follows: and sequentially deleting the unused base images in the local image warehouse according to the sequence of the sequencing result until the base images are not in a high-load state. The method has the advantage that the computing node can preferentially delete the basic mirror image with longer idle time.
A fourth aspect of the embodiments of the present invention provides a management node, where the management node has a behavior function for implementing the method provided in the first aspect, and the function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
A fifth aspect of the embodiments of the present invention provides a management node, where the management node has a behavior function for implementing the method provided in the second aspect, and the function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
A sixth aspect of the present invention provides a computing node, where the management node has a behavior function for implementing the method provided in the third aspect, and the function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.
A seventh aspect of the embodiments of the present invention provides a management node, including a communication interface, a processor, and a memory, where the memory stores a group of programs, and the processor is configured to call the programs stored in the memory, and is configured to perform the following operations:
acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a base image used by the container which is started;
screening out target computing nodes of which the state information meets preset conditions from all the computing nodes;
sending a pre-download command to the target computing node, the pre-download command including an identification of the once-started used base image of the container, the pre-download command being used to instruct the target computing node to download the once-started used base image of the container from a remote image repository in advance.
Or, to perform the following operations:
acquiring a container to be started and specification information of the container;
searching for a computing node of which the state information meets the operating condition required by the specification information;
screening out target computing nodes with basic images downloaded in advance from the searched computing nodes;
sending a container start command to the target computing node, wherein the container start command is used for instructing the target computing node to start the container by using the pre-downloaded base image.
An eighth aspect of the embodiments of the present invention provides a computing node, including a communication interface, a processor, and a memory, where the memory stores a group of programs, and the processor is configured to call the programs stored in the memory, and is configured to perform the following operations:
querying unused base images in a local image warehouse;
judging whether the self is in a high load state or not according to the self state information;
and if so, deleting the unused basic mirror image in the local mirror image warehouse.
As can be seen from the above, the container cluster management architecture in the embodiment of the present invention includes a management node, a remote mirror repository, and at least one computing node, where the management node first obtains state information of each computing node and usage information of a container that each computing node has started, where the usage information includes a basic mirror that the container that has been started has used, then screens out target computing nodes whose state information satisfies a preset condition from all the computing nodes, and then sends a pre-download command to the target computing nodes, where the pre-download command is used to instruct the target computing nodes to download the basic mirror from the remote mirror repository in advance, so that the target computing nodes subsequently and directly use the pre-downloaded basic mirror to start the container, thereby accelerating start time of the container.
Drawings
In order to illustrate the embodiments of the invention more clearly, the drawings that are needed for describing the embodiments or prior art will be briefly described below, it being apparent that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic flowchart of a method for downloading a basic image according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for starting a container according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for deleting a base image according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a management node according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another management node according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a compute node according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another management node according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another compute node according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a basic image download according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a container cluster management architecture according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 10 is a schematic structural diagram of a container cluster management architecture according to an embodiment of the present invention, where the container cluster management architecture at least includes a management node, a computing node, and a remote mirror repository, and communication connections are established between the management node, the computing node, and the remote mirror repository. The management node is a central hub of the whole cluster and is mainly responsible for management, transmission and scheduling related to the container; the computing node is provided with a local mirror image warehouse capable of storing the basic mirror image and is mainly responsible for starting the container by using the basic mirror image; and the remote image warehouse is mainly responsible for providing the downloadable basic images to the computing nodes.
Fig. 1 is a flowchart illustrating a method for downloading a base image, which is implemented in a management node in a container cluster management architecture according to an embodiment of the present invention. As shown in the figure, the flow of the method for downloading a base image in this embodiment may include:
s101, acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a basic image used by the container which is started and the use frequency of the basic image.
The state information is used for representing the running state of the computing node, and the use information is used for representing the record of the container in the historical use process. In embodiments of the present invention, the usage information includes base images used by containers that the compute node has started and the frequency of use of those base images.
It should be understood that since all the compute nodes start the container and require the management node to issue the command, the management node knows the usage information of the containers that all the compute nodes have started, and the information is stored in the container scheduling module of the management node.
Specifically, the management node acquires the state information of each computing node through communication connection with each computing node, and acquires the use information of the container which has been started by each computing node by querying the record in the local container scheduling module.
S102, sorting the basic images used by the containers started by the computing nodes according to the sequence of the use frequency of the basic images from high to low.
For example: assuming that the container that the computing node a has started uses the base image x and the base image y, the container that the computing node B has started uses the base image x, and the container that the computing node C has started uses the base image z, and assuming that the frequency of use of the base image x is 6 times/hour, the frequency of use of the base image y is 2 times/hour, and the frequency of use of the base image z is 4 times/hour, the ranking result of the base images is the base image x → the base image z → the base image y.
It should be noted that the advantage of the management node sorting the basic images is that the computing node can preferentially download the basic images with higher use frequency, thereby increasing the probability of using the downloaded basic images.
S103, screening out target computing nodes of which the state information meets preset conditions from all the computing nodes.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate of the compute node. The processor utilization rate refers to the usage percentage of the CPU (Central Processing Unit) computing resources, the memory utilization rate refers to the usage percentage of the memory resources, and the local mirror image warehouse utilization rate refers to the storage percentage of the local mirror image warehouse. It should be understood that the higher the processor utilization, memory utilization, and local mirror repository utilization of a compute node, the higher the load on the compute node.
Specifically, the management node screens out target computing nodes, from all the computing nodes, of which the processor utilization rate is lower than a first preset threshold, the memory utilization rate is lower than a second preset threshold, and the local mirror warehouse utilization rate is lower than a third preset threshold. In the embodiment of the present invention, the first preset threshold, the second preset threshold, and the third preset threshold may be preset by a manager, and values thereof are not specifically limited here. For example: the first, second and third preset thresholds may be set to 60%, 60% and 80%, respectively.
It should be noted that the advantage of screening out the target computing nodes whose state information satisfies the preset condition is that the computing nodes whose state information does not satisfy the condition can be prevented from downloading the basic image in advance, and further the problem of download failure or overload is avoided.
It should be further noted that, since there may be a plurality of computing nodes whose state information satisfies the preset condition, there may also be a plurality of screened target computing nodes.
S104, judging whether a basic mirror image used by the container started by the target computing node exists in the local mirror image warehouse of the target computing node.
Specifically, the management node determines whether a base mirror used by a container that has been started up exists in the local mirror repository of the target computing node, and if so, the management node ends the process, and if not, step S105 is executed.
For example: assuming that the container that the target compute node has started uses base image x, base image y, and base image z, and that only base image w exists in the local image store of the current target compute node, step S105 is performed.
It is noted that an advantage of determining whether there is a base image that has been used by a container that the target compute node has started is that the compute node can be prevented from downloading duplicate base images.
S105, judging whether the target computing node is downloading the basic mirror image.
Specifically, the management node determines whether the target computing node is downloading the base image, if yes, the process is terminated, and if no, step S106 is executed.
It should be noted that an advantage of determining whether a base image is being downloaded is that the computing node may be prevented from downloading duplicate base images.
S106, sending a pre-download command to the target computing node, wherein the pre-download command comprises the identifier of the basic mirror image used by the started container and the sequencing result of the basic mirror image.
Specifically, the management node sends a pre-download command to the target computing node through the established communication connection, the pre-download command includes an identifier of a used base image of the started container and a sorting result of the base images, and the target computing node downloads the used base images of the started container from the remote image warehouse in advance according to the sorting result after receiving the pre-download command.
The container cluster management architecture in the embodiment of the invention comprises a management node, a remote mirror image warehouse and at least one computing node, wherein the management node firstly acquires state information of each computing node and use information of a container which is started by each computing node, the use information comprises an identifier of a basic mirror image used by the started container, then a target computing node of which the state information meets a preset condition is screened out from all the computing nodes, and then a pre-download command is sent to the target computing node, and the pre-download command is used for indicating the target computing node to download the basic mirror image from the remote mirror image warehouse in advance so that the target computing node can subsequently and directly use the pre-downloaded basic mirror image to start the container, thereby realizing the purpose of accelerating the starting time of the container.
Fig. 2 is a flowchart illustrating a method for starting a container according to an embodiment of the present invention, where the method is implemented in a management node in a container cluster management architecture. As shown in the figure, the flow of the starting method of the container in this embodiment may include:
s201, acquiring a container to be started and specification information of the container.
Specifically, the management node obtains a container start instruction input by a user or other equipment, wherein the container start instruction comprises a container to be started and specification information of the container.
S202, searching for the computing nodes of which the state information meets the operating conditions required by the specification information.
The operating conditions required by the specification information can be represented by the utilization rate of the processor and the utilization rate of the memory, and the larger the utilization rate of the processor and the utilization rate of the memory is, the better the operating conditions are. That is, the state information may include processor usage and memory usage of the compute node.
Specifically, the management node searches for a computing node whose processor utilization rate is higher than a first preset threshold and whose memory utilization rate is higher than a second preset threshold. In the embodiment of the present invention, the first preset threshold and the second preset threshold may be preset by a manager, and values thereof are not specifically limited herein.
It should be noted that the advantage of the management node searching for the compute node that satisfies the operating condition is that the compute node that does not satisfy the operating condition can be prevented from starting the container, thereby enhancing the feasibility.
S203, judging whether a target computing node which is downloaded with a basic mirror image in advance can be screened out from the searched computing nodes.
It should be understood that as can be appreciated from the embodiment depicted in FIG. 1, portions of the compute nodes are pre-downloaded with the base image. Specifically, the management node determines whether a target computing node, to which a basic image has been downloaded in advance, can be screened from the searched computing nodes, if so, step S205 is executed, and if not, step S204 is executed.
Optionally, before step S203, the management node may determine the remaining resources of each computing node according to the state information of each computing node, for example: assuming that the state information of the computing node includes "processor utilization is 30% and memory utilization is 20%", the remaining resources of the technology node may be determined as "processor idle 70% and memory idle 80%". Correspondingly, the specific operation of the management node for screening the target computing node may be: and screening out the target computing node with the highest residual resources and downloaded with the basic mirror image in advance from the searched computing nodes.
It should be noted that the advantage of screening out the target computing node with the highest remaining resource by the management node is that the computing node with the highest remaining resource can preferentially start the container, thereby improving the utilization efficiency of the computing node.
S204, screening out the computing nodes with the highest residual resources from the searched computing nodes as target computing nodes.
The introduction of the remaining resources may refer to the content in step S203, which is not described herein. Specifically, the management node screens out a computing node with the highest residual resource from the searched computing nodes as a target computing node.
S205, sending a container starting command to the target computing node.
Specifically, the management node sends a container start command to the target computing node through the established communication connection, and the target computing node starts the container by using the pre-downloaded basic image after receiving the container start command. The used base mirror image is the base mirror image matched with the container, and certainly, if the base mirror image matched with the container is not downloaded by the target computing node in advance, the matched base mirror image needs to be downloaded from the remote mirror image warehouse.
The container cluster management architecture in the embodiment of the invention comprises a management node, a remote mirror image warehouse and at least one computing node, wherein the management node firstly acquires the container to be started and the specification information of the container, then searches the computing node of which the state information meets the operating condition required by the specification information, then screens out a target computing node with a basic mirror image downloaded in advance from the searched computing node, and then sends a container starting command to the target computing node, so that the computing node with the basic mirror image downloaded in advance can be used for starting the container, and the starting time of the container is shortened.
Fig. 3 is a flowchart illustrating a method for deleting a base image, which is implemented in a compute node in a container cluster management architecture according to an embodiment of the present invention. As shown in the figure, the flow of the deletion method of the base image in this embodiment may include:
s301, an unused base mirror image in the local mirror image warehouse is inquired.
It should be understood that as can be appreciated from the embodiment depicted in FIG. 1, portions of the compute nodes are pre-downloaded with the base image. It should also be understood that the computing node may use the base image boot container to indicate that the base image is used less frequently if the base image is not used for a long time. Specifically, the computing nodes query the unused base images in the local image warehouse every a preset time interval. The preset time period may be preset by a manager, and the value of the preset time period is not specifically limited herein.
S302, judging whether the self is in a high load state or not according to the self state information.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate. Specifically, the specific operation of the computing node, according to the state information of the computing node, judging whether the computing node is in the high-load state is as follows: and judging whether the utilization rate of the processor is higher than a first preset threshold, whether the utilization rate of the memory is higher than a second preset threshold, and whether the utilization rate of the local mirror image warehouse is higher than a third preset threshold. In the embodiment of the present invention, the first preset threshold, the second preset threshold, and the third preset threshold may be preset by a manager, and values thereof are not specifically limited here. For example: the first, second and third preset thresholds may be set to 70%, 70% and 90%, respectively.
And S303, if yes, deleting the unused basic mirror image in the local mirror image warehouse.
Specifically, if the computing node determines that the computing node is in a high-load state, the unused base mirror image in the local mirror image warehouse is deleted.
Optionally, before step S303, the computing node queries the idle durations of the unused base images, and sorts the base images according to the order of the idle durations of the base images from long to short. Correspondingly, the specific operation of deleting the unused base image in the local image warehouse by the computing node is as follows: and sequentially deleting the unused base images in the local image warehouse according to the sequence of the sequencing result until the base images are not in a high-load state.
It should be noted that the advantage of the compute node deleting the base images in sequence according to the order of the sorting results is that the base images with longer idle time can be deleted preferentially.
The container cluster management architecture in the embodiment of the invention comprises a management node, a remote mirror image warehouse and at least one computing node, wherein the computing node firstly inquires an unused basic mirror image in a local mirror image warehouse, then judges whether the computing node is in a high-load state according to the state information of the computing node, and then deletes the unused basic mirror image in the local mirror image warehouse if the computing node is judged to be in the high-load state, so that the computing node in the high-load state can delete the basic mirror image to reduce the load.
Fig. 4 is a schematic structural diagram of a management node according to an embodiment of the present invention, where the management node is implemented in a container cluster management architecture, and the container cluster management architecture further includes a remote mirror repository and at least one computing node. As shown in the figure, the management node in the embodiment of the present invention at least includes an information obtaining module 410, a node screening module 420, and a command sending module 430, where:
an information obtaining module 410, configured to obtain status information of each of the computing nodes and usage information of a container that has been started by each of the computing nodes, where the usage information includes a base image that the container that has been started has used.
And the node screening module 420 is configured to screen out target computing nodes, of which the state information meets a preset condition, from all the computing nodes.
A command sending module 430, configured to send a pre-download command to the target computing node, where the pre-download command includes an identifier of a used base image of a container that the target computing node has started, and the pre-download command is used to instruct the target computing node to download, in advance, the used base image of the container that the target computing node has started from the remote image repository.
Optionally, the usage information further includes a usage frequency of the used base image of the started container. Correspondingly, referring to fig. 4, as shown in the figure, the management node in the embodiment of the present invention may further include a mirror sorting module 440, configured to sort the base mirrors used by the containers that have been started by each of the computing nodes, in order from high use frequency to low use frequency of the base mirrors.
The pre-download command further includes a sorting result of the base images used by the started containers, and the pre-download command is used for instructing the target computing node to download the base images used by the started containers from the remote image warehouse in advance according to the sorting result.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate of the compute node. Correspondingly, the node screening module 420 is specifically configured to screen out, from all the computing nodes, target computing nodes whose processor utilization is lower than a first preset threshold, memory utilization is lower than a second preset threshold, and local mirror image warehouse utilization is lower than a third preset threshold.
Optionally, referring to fig. 4, as shown in the figure, the management node in the embodiment of the present invention may further include an image determining module 450, configured to determine that there is no base image used by the container that was started by the target computing node in the local image repository of the target computing node.
Optionally, the image determining module 450 may be further configured to determine that the target computing node is not downloading the base image.
Fig. 5 is a schematic structural diagram of another management node according to an embodiment of the present invention, where the management node is implemented in a container cluster management architecture, and the container cluster management architecture further includes a remote mirror repository and at least one computing node. As shown in the figure, the management node in the embodiment of the present invention may at least include:
an information obtaining module 510, configured to obtain a container to be started and specification information of the container.
And a node searching module 520, configured to search for a computing node whose state information meets the operating condition required by the specification information.
And the node screening module 530 is configured to screen out a target computing node from the searched computing nodes, where the target computing node has been downloaded with the basic image in advance.
A command sending module 540, configured to send a container start command to the target computing node, where the container start command is used to instruct the target computing node to start the container using the pre-downloaded base image.
Optionally, the state information includes a processor utilization rate and a memory utilization rate of the compute node. Correspondingly, the node searching module 520 is specifically configured to search for a computing node whose processor utilization rate is higher than a first preset threshold and whose memory utilization rate is higher than a second preset threshold.
Optionally, referring to fig. 5, as shown in the figure, the management node in the embodiment of the present invention may further include a resource determining module 550, configured to determine the remaining resources of each of the computing nodes according to the state information of each of the computing nodes. Correspondingly, the node screening module 530 is specifically configured to screen out a target computing node, which has been downloaded with a basic image in advance and has the highest remaining resources, from the searched computing nodes.
Optionally, the node screening module 530 is further configured to screen a computing node with the highest remaining resource from the searched computing nodes as a target computing node if there is no target computing node with a base image downloaded in advance in the searched computing nodes.
Fig. 6 is a schematic structural diagram of a compute node implemented in a container cluster management architecture, where the container cluster management architecture further includes a management node and a remote mirror repository in an embodiment of the present invention. As shown in the figure, the management node in the embodiment of the present invention may at least include:
a mirror query module 610 for querying unused base mirrors in the local mirror repository.
And the state judgment module 620 is configured to judge whether the device is in a high load state according to the state information of the device.
A mirror deleting module 630, configured to delete the unused base mirror in the local mirror repository if the base mirror is not used.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate. Correspondingly, the state determining module 620 is specifically configured to determine whether the utilization rate of the processor is higher than a first preset threshold, whether the utilization rate of the memory is higher than a second preset threshold, and whether the utilization rate of the local mirror warehouse is higher than a third preset threshold.
Still optionally, referring to fig. 6, as shown in the figure, the computing node in the embodiment of the present invention may further include a duration query module 640 and a mirror sorting module 650, where:
a duration query module 640, configured to query the idle duration of the unused base image.
And the mirror image sorting module 650 is configured to sort the basic mirror images according to a sequence of the idle durations of the basic mirror images from long to short.
Correspondingly, the mirror deleting module 630 is specifically configured to delete unused base mirrors in the local mirror warehouse in sequence according to the sequence of the sorting result until the base mirrors are not in the high-load state.
Fig. 7 is a schematic structural diagram of another management node in the embodiment of the present invention, and as shown in fig. 7, the management node may include: at least one processor 701, such as a CPU, at least one communication bus 702, at least one communication interface 703, and memory 704. Wherein, the communication bus 702 is used for realizing the connection communication between the components; the communication interface 703 is used for communicating with other node devices; the memory 704 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). Optionally, the memory 704 may be at least one storage device located remotely from the processor 701, and the memory 704 may store a set of program codes. The processor 701 is configured to call the program code stored in the memory 704 to perform the following operations:
acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a base image used by the container which is started;
screening out target computing nodes of which the state information meets preset conditions from all the computing nodes;
sending a pre-download command to the target computing node, the pre-download command including an identification of a used base image of a container that the target computing node has started, the pre-download command being used to instruct the target computing node to download in advance from the remote image repository a used base image of a container that the target computing node has started.
Optionally, the usage information further includes a usage frequency of the used base image of the started container. Correspondingly, before the processor 701 selects a target computing node with an operating condition meeting a preset condition from all the computing nodes, the following steps are further performed:
sequencing the used base images of the containers started by each computing node according to the sequence of the use frequency of the base images from high to low;
the pre-download command further includes a sorting result of the base images used by the started containers, and the pre-download command is used for instructing the target computing node to download the base images used by the started containers from the remote image warehouse in advance according to the sorting result.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate of the compute node. Correspondingly, the specific operation of the processor 701 for screening out the target computing node of which the state information meets the preset condition from all the computing nodes is as follows:
and screening out target computing nodes of which the processor utilization rate is lower than a first preset threshold, the memory utilization rate is lower than a second preset threshold and the local mirror image warehouse utilization rate is lower than a third preset threshold from all the computing nodes.
Optionally, before the processor 701 sends the pre-download command to the target computing node, the following steps are further performed:
determining that a base image used by a container that the target computing node has started does not exist in the local image repository of the target computing node.
Optionally, before the processor 701 sends the pre-download command to the target computing node, the following steps are further performed:
determining that the target computing node is not downloading a base image.
Alternatively, the processor 701 is configured to call the program code stored in the memory 704, and perform the following operations:
acquiring a container to be started and specification information of the container;
searching for a computing node of which the state information meets the operating condition required by the specification information;
screening out target computing nodes with basic images downloaded in advance from the searched computing nodes;
sending a container start command to the target computing node, wherein the container start command is used for instructing the target computing node to start the container by using the pre-downloaded base image.
Optionally, the state information includes a processor utilization rate and a memory utilization rate of the compute node. Accordingly, the specific operation of the processor 701 for searching the computing node whose state information meets the operating condition required by the specification information is as follows:
and searching for the computing nodes with the processor utilization rate higher than a first preset threshold and the memory utilization rate higher than a second preset threshold.
Optionally, before the processor 701 selects the target computing node from the searched computing nodes, where the base image has been downloaded in advance, the following steps are further performed:
and determining the residual resources of each computing node according to the state information of each computing node.
Correspondingly, the specific operation of the processor 701 for screening out the target computing node which is downloaded with the basic image in advance from the searched computing nodes is as follows:
and screening out the target computing node with the highest residual resources and downloaded with the basic mirror image in advance from the searched computing nodes.
Optionally, after determining the remaining resources of each computing node according to the state information of each computing node, the processor 701 further performs:
and if no target computing node with the basic mirror image downloaded in advance exists in the searched computing nodes, screening the computing node with the highest residual resource from the searched computing nodes as the target computing node.
Fig. 8 is a schematic structural diagram of another computing node in the embodiment of the present invention, and as shown in fig. 8, the computing node may include: at least one processor 801, such as a CPU, at least one communication bus 802, at least one communication interface 803, and memory 804. Wherein, the communication bus 802 is used for realizing the connection communication between the components; a communication interface 803 for communicating with other node devices; the memory 804 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). Optionally, the memory 804 may also be at least one storage device located remotely from the processor 801, the memory 804 storing a set of program codes. The processor 801 is configured to call the program code stored in the memory 804, and perform the following operations:
querying unused base images in a local image warehouse;
judging whether the self is in a high load state or not according to the self state information;
and if so, deleting the unused basic mirror image in the local mirror image warehouse.
Optionally, the state information includes a processor utilization rate, a memory utilization rate, and a local mirror repository utilization rate. Accordingly, the specific operation of the processor 801 determining whether itself is in the high load state according to its state information is:
and judging whether the utilization rate of the processor is higher than a first preset threshold, whether the utilization rate of the memory is higher than a second preset threshold, and whether the utilization rate of the local mirror image warehouse is higher than a third preset threshold.
Optionally, before the processor 801 deletes the unused base image in the local image repository, the following steps are further performed:
querying the unused idle duration of the base image;
and sequencing the basic mirror images according to the sequence of the idle time lengths of the basic mirror images from long to short.
Accordingly, the specific operation of the processor 801 to delete the unused base image in the local image repository is:
and sequentially deleting the unused base images in the local image warehouse according to the sequence of the sequencing result until the base images are not in a high-load state.
The container cluster management architecture in the embodiment of the invention comprises a management node, a remote mirror image warehouse and at least one computing node, wherein the management node firstly acquires state information of each computing node and use information of a container which is started by each computing node, the use information comprises a basic mirror image which is used by the started container, then a target computing node of which the state information meets a preset condition is screened out from all the computing nodes, and then a pre-download command is sent to the target computing node, and the pre-download command is used for indicating the target computing node to download the basic mirror image from the remote mirror image warehouse in advance so that the target computing node can subsequently and directly use the pre-downloaded basic mirror image to start the container, thereby realizing the acceleration of the start time of the container.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (12)

1. A method for downloading a base image, the method implemented in a management node in a container cluster management architecture, the container cluster management architecture further comprising a remote image repository and at least one computing node, the method comprising:
acquiring state information of each computing node and use information of a container which is started by each computing node, wherein the use information comprises a base image used by the container which is started;
screening out target computing nodes of which the state information meets preset conditions from all the computing nodes;
sending a pre-download command to the target computing node, the pre-download command including an identification of the once-started used base image of the container, the pre-download command being used to instruct the target computing node to download the once-started used base image of the container from the remote image repository in advance.
2. The method of claim 1, wherein the usage information further comprises a frequency of use of the base image used by the once-started container;
before the step of screening out the target computing node with the operating condition meeting the preset condition from all the computing nodes, the method further includes:
sequencing the used base images of the containers started by each computing node according to the sequence of the use frequency of the base images from high to low;
the pre-download command further includes a sorting result of the base images used by the started containers, and the pre-download command is used for instructing the target computing node to download the base images used by the started containers from the remote image warehouse in advance according to the sorting result.
3. The method of claim 1, wherein the state information includes processor usage, memory usage, and local mirror store usage of the compute node;
the screening out the target computing nodes of which the state information meets the preset condition from all the computing nodes comprises the following steps:
and screening out target computing nodes of which the processor utilization rate is lower than a first preset threshold, the memory utilization rate is lower than a second preset threshold and the local mirror image warehouse utilization rate is lower than a third preset threshold from all the computing nodes.
4. The method of any of claims 1-3, wherein prior to sending the pre-download command to the target computing node, further comprising:
determining that a base image used by a container that the target computing node has started does not exist in the local image repository of the target computing node.
5. The method of any of claims 1-3, wherein prior to sending the pre-download command to the target computing node, further comprising:
determining that the target computing node is not downloading a base image.
6. A management node implemented in a container cluster management architecture further comprising a remote mirror repository and at least one compute node, the management node comprising:
an information obtaining module, configured to obtain status information of each computing node and usage information of a container that has been started by each computing node, where the usage information includes a base image that has been used by the container that has been started;
the node screening module is used for screening out target computing nodes of which the state information meets preset conditions from all the computing nodes;
a command sending module, configured to send a pre-download command to the target computing node, where the pre-download command includes an identifier of the base image that was used by the started container, and the pre-download command is used to instruct the target computing node to download, in advance, the base image that was used by the started container from the remote image repository.
7. The management node of claim 6, wherein the usage information further comprises a frequency of usage of a base image used by the container that was started;
the management node further comprises:
the mirror image sorting module is used for sorting the basic mirror images used by the containers which are started by the computing nodes according to the sequence of the use frequency of the basic mirror images from high to low;
the pre-download command further includes a sorting result of the base images used by the started containers, and the pre-download command is used for instructing the target computing node to download the base images used by the started containers from the remote image warehouse in advance according to the sorting result.
8. The management node of claim 6, wherein the state information includes processor usage, memory usage, and local mirror repository usage of the compute node;
the node screening module is specifically configured to screen out, from all the computing nodes, target computing nodes whose processor utilization is lower than a first preset threshold, memory utilization is lower than a second preset threshold, and local mirror warehouse utilization is lower than a third preset threshold.
9. The management node according to any of claims 6-8, wherein the management node further comprises:
and the mirror image determining module is used for determining that a base mirror image used by the container started by the target computing node does not exist in the local mirror image warehouse of the target computing node.
10. The management node according to any of claims 6-8, wherein the management node further comprises:
a mirror determination module to determine that the target compute node is not downloading a base mirror.
11. A management node, characterized in that the management node comprises: at least one processor and memory;
wherein the processor is configured to call program code stored in the memory to perform the method of any of claims 1 to 5.
12. A computer-readable storage medium storing a computer program for instructing associated hardware to perform the method of any one of claims 1 to 5.
CN201610586890.8A 2016-07-21 2016-07-21 Downloading method of basic mirror image and management node Active CN106302632B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610586890.8A CN106302632B (en) 2016-07-21 2016-07-21 Downloading method of basic mirror image and management node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610586890.8A CN106302632B (en) 2016-07-21 2016-07-21 Downloading method of basic mirror image and management node

Publications (2)

Publication Number Publication Date
CN106302632A CN106302632A (en) 2017-01-04
CN106302632B true CN106302632B (en) 2020-02-14

Family

ID=57652226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610586890.8A Active CN106302632B (en) 2016-07-21 2016-07-21 Downloading method of basic mirror image and management node

Country Status (1)

Country Link
CN (1) CN106302632B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911777A (en) * 2017-02-24 2017-06-30 郑州云海信息技术有限公司 A kind of data processing method and server
CN109104451A (en) * 2017-06-21 2018-12-28 阿里巴巴集团控股有限公司 The pre-heating mean and node of the method for down loading and node of Docker mirror image, Docker mirror image
CN107493191B (en) * 2017-08-08 2020-12-22 深信服科技股份有限公司 Cluster node and self-scheduling container cluster system
CN109062658B (en) * 2018-06-29 2021-06-04 优刻得科技股份有限公司 Scheduling method, device, medium, equipment and system for realizing computing resource servitization
CN109343859A (en) * 2018-08-17 2019-02-15 咪咕文化科技有限公司 A kind of information processing method, device and storage medium
CN109413069B (en) * 2018-10-29 2021-11-12 北京百悟科技有限公司 Application method and device of virtual website firewall based on block chain
CN111290776B (en) * 2018-12-10 2023-05-16 航天信息股份有限公司 Management device and method for managing blockchain nodes
CN109947438B (en) * 2018-12-28 2022-09-13 广州卓动信息科技有限公司 Game installation method based on machine learning, electronic equipment and readable storage medium
CN110008006B (en) * 2019-04-11 2021-04-02 中国联合网络通信集团有限公司 Container-based big data tool deployment method and system
CN110287004B (en) * 2019-07-05 2021-07-30 中国工商银行股份有限公司 Basic environment mirror image preheating method and device based on docker container technology
CN111078402A (en) * 2019-12-03 2020-04-28 广州西麦科技股份有限公司 Resource pool system capable of rapidly providing experimental environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932408B (en) * 2012-09-21 2016-02-03 中国电信股份有限公司 A kind of management method of server cluster and platform
CN105227374B (en) * 2015-10-23 2018-05-29 浪潮(北京)电子信息产业有限公司 The failure moving method and system of a kind of cluster application
CN105468362B (en) * 2015-11-17 2019-03-08 广州杰赛科技股份有限公司 Using dispositions method and cloud computing system
CN105677479B (en) * 2015-12-30 2019-05-10 北京奇艺世纪科技有限公司 The implementation method and device of parallel operation GPU operation program
CN105763545B (en) * 2016-02-04 2019-05-07 新华三技术有限公司 A kind of BYOD method and device

Also Published As

Publication number Publication date
CN106302632A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN106302632B (en) Downloading method of basic mirror image and management node
CN109688222B (en) Shared computing resource scheduling method, shared computing system, server and storage medium
CN110896404B (en) Data processing method and device and computing node
CN107769949B (en) Application component deployment method and deployment node
CN113568884B (en) File management method and device, electronic equipment and storage medium
CN107832100B (en) APK plug-in loading method and terminal thereof
CN108121511B (en) Data processing method, device and equipment in distributed edge storage system
CN108572845B (en) Upgrading method of distributed micro-service cluster and related system
CN104219316A (en) Method and device for processing call request in distributed system
CN109617996B (en) File uploading and downloading method, server and computer readable storage medium
CN104899049A (en) File deletion method and device
CN111580948A (en) Task scheduling method and device and computer equipment
CN101667139A (en) Service program invocation method based on aggregate type object, device and system therefor
CN106911741B (en) Method for balancing virtual network management file downloading load and network management server
CN109697117B (en) Terminal control method, terminal control device and computer-readable storage medium
CN110377430B (en) Data migration method, device, storage medium and device
CN112685102B (en) Gateway plug-in hot loading method, device, equipment and medium
CN115643276A (en) Data transmission method, device, system and computer readable storage medium
CN107493315B (en) Behavior data collection method, resource server and storage medium
CN112230936A (en) Container group deployment method and device and server
CN113691628A (en) Task switching method and device, system, electronic equipment and computer medium
CN113434171A (en) Resource package updating method and device, storage medium and electronic device
CN111459653A (en) Cluster scheduling method, device and system and electronic equipment
CN114546522B (en) Picture configuration method and device for application, electronic equipment and storage medium
CN115114361B (en) Resource retrieval method and system based on unified interface of container cloud platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant