CN116521317A - Mirror image management method and device, electronic equipment and computer readable storage medium - Google Patents

Mirror image management method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN116521317A
CN116521317A CN202310453295.7A CN202310453295A CN116521317A CN 116521317 A CN116521317 A CN 116521317A CN 202310453295 A CN202310453295 A CN 202310453295A CN 116521317 A CN116521317 A CN 116521317A
Authority
CN
China
Prior art keywords
image
deployed
identifier
application node
mirror
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.)
Pending
Application number
CN202310453295.7A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310453295.7A priority Critical patent/CN116521317A/en
Publication of CN116521317A publication Critical patent/CN116521317A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a method and apparatus for managing images, an electronic device, and a computer-readable storage medium, which can be applied to the fields of computer technology, image management technology, and finance. The mirror image management method comprises the following steps: in response to receiving a mirror image deployment request from an application node, determining a mirror image matching result according to a mirror image identifier to be deployed indicated by the mirror image deployment request, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node; determining at least one candidate application node identification associated with the application node identification under the condition that the image matching result characterizes that no image to be deployed exists in an image warehouse corresponding to the image warehouse identification; determining a target application node identifier from at least one candidate application node identifier according to the image identifier to be deployed; acquiring a mirror image to be deployed according to the target application node identification; and storing the image identification to be deployed and the image association to be deployed in an image warehouse.

Description

Mirror image management method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the fields of computer technology, image management technology, and finance, and more particularly, to an image management method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the development of computer technology, application of container engine (Docker) technology has been developed. Dock may refer to a tool that is capable of creating and maintaining a container environment on a physical machine. A container may refer to a lightweight virtualized environment that has independent running spaces.
The management of the mirror image can be realized by adopting a mirror image warehouse. For example, a base image of Docker may be utilized, with dockerfile for secondary development, generating a new image to facilitate maintaining the tag and image pushing and static storage.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: because the mirror image warehouse can clean the mirror images regularly, the mirror images are easy to cause no problem in the process of pulling the mirror images, and therefore the efficiency and the accuracy of the mirror image management cannot be ensured.
Disclosure of Invention
In view of this, the present disclosure provides a mirror management method and apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
According to one aspect of the present disclosure, there is provided a mirror management method, applied to a server, including:
responding to a mirror image deployment request from an application node, and determining a mirror image matching result according to a mirror image identifier to be deployed indicated by the mirror image deployment request, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node;
determining at least one candidate application node identification associated with the application node identification under the condition that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identification according to the image matching result representation;
determining a target application node identifier from the at least one candidate application node identifier according to the image identifier to be deployed;
acquiring the mirror image to be deployed according to the target application node identifier; and
and storing the image identification to be deployed and the image association to be deployed into the image warehouse.
According to an embodiment of the present disclosure, the image repository includes at least one image identifier and images corresponding to the at least one image identifier.
According to an embodiment of the present disclosure, in response to receiving a mirror deployment request from an application node, determining, according to a to-be-deployed mirror identifier indicated by the mirror deployment request, a mirror matching result includes:
In response to receiving the mirror image deployment request, respectively matching the at least one mirror image identifier according to the mirror image identifier to be deployed;
under the condition that the image identification matched with the image identification to be deployed exists in the at least one image identification, the image matching result representing that the image to be deployed exists in the image warehouse is obtained; and
and under the condition that the image identification matched with the image identification to be deployed does not exist in the at least one image identification, obtaining the image matching result representing that the image to be deployed does not exist in the image warehouse.
According to an embodiment of the present disclosure, when the image matching result characterizes that the image to be deployed does not exist in the image repository corresponding to the image repository identifier, determining at least one candidate application node identifier associated with the application node identifier includes:
determining a control node identifier corresponding to the application node identifier under the condition that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identifier according to the image matching result representation;
determining a target cluster identifier corresponding to the target cluster according to the control node identifier; and
And determining the at least one candidate application node identifier according to the target cluster identifier by using a target process.
According to an embodiment of the present disclosure, the determining, according to the image identifier to be deployed, the target application node identifier from the at least one candidate application node identifier includes:
traversing the candidate application node corresponding to the candidate application node identifier by using an operation and maintenance tool aiming at each candidate application node identifier in the at least one candidate application node identifier to obtain at least one candidate mirror image identifier;
respectively matching the at least one candidate image identifier according to the image identifier to be deployed; and
and under the condition that the image identification matched with the image identification to be deployed exists in the at least one candidate image identification, determining the candidate application node identification as the target application node identification.
According to an embodiment of the present disclosure, the obtaining the image to be deployed according to the target application node identifier includes:
transmitting the image identification to be deployed to a target application node corresponding to the target application node identification; and
and receiving the image to be deployed from the target application node, wherein the image to be deployed is determined by the target application node according to the image to be deployed identifier.
According to an embodiment of the present disclosure, the image management method further includes, after the obtaining the image to be deployed according to the target application node identifier, the method further includes:
and sending the mirror image to be deployed to the application node so that the application node can complete mirror image deployment according to the mirror image to be deployed.
According to one aspect of the present disclosure, there is provided a mirror management method applied to a target application node, including:
receiving a mirror image identifier to be deployed from a server;
determining a target image identifier in at least one candidate image identifier according to the image identifier to be deployed, wherein the at least one candidate image identifier corresponds to a candidate image;
determining the candidate image corresponding to the target image identifier as the image to be deployed; and
and sending the mirror image to be deployed to the server.
According to another aspect of the present disclosure, there is provided a mirror management apparatus, applied to a server, including:
the first determining module is used for determining a mirror image matching result according to a mirror image identifier to be deployed indicated by the mirror image deployment request in response to receiving the mirror image deployment request from the application node, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node;
The second determining module is used for determining at least one candidate application node identifier associated with the application node identifier under the condition that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identifier according to the image matching result characterization;
a third determining module, configured to determine a target application node identifier from the at least one candidate application node identifier according to the image identifier to be deployed;
the acquisition module is used for acquiring the mirror image to be deployed according to the target application node identifier; and
and the storage module is used for storing the image identifier to be deployed and the image relationship to be deployed into the image warehouse.
According to another aspect of the present disclosure, there is provided a mirror management apparatus applied to a target application node, including:
the receiving module is used for receiving the image identification to be deployed from the server;
a fourth determining module, configured to determine a target image identifier from at least one candidate image identifier according to the image identifier to be deployed, where the at least one candidate image identifier corresponds to a candidate image;
a fifth determining module, configured to determine a candidate image corresponding to the target image identifier as the image to be deployed; and
And the sending module is used for sending the mirror image to be deployed to the server.
According to another aspect of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement a method as described in the present disclosure.
According to another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement a method as described in the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising computer executable instructions which, when executed, are adapted to carry out the method as described in the present disclosure.
According to the embodiment of the disclosure, the target application node identification is determined in at least one candidate application node identification according to the image to be deployed identification, the at least one candidate application node identification is determined when the image matching result characterizes that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identification, and the image matching result is determined according to the image to be deployed identification indicated by the image deployment request, so that the target application node on which the image to be deployed is deployed can be automatically determined when the image to be deployed does not exist in the image warehouse, and further the image management efficiency is ensured. On the basis, the mirror image to be deployed identification and the mirror image to be deployed obtained according to the target application node identification are stored in the mirror image warehouse, so that the problem that the mirror image is easy to cause in the process of pulling the mirror image due to the fact that the mirror image warehouse can clean the mirror image regularly in the related art is at least partially overcome, and further the accuracy of mirror image management is guaranteed.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates a system architecture to which a mirror management method may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of image management according to an embodiment of the disclosure;
FIG. 3 schematically illustrates an example schematic diagram of a process of determining a mirror match result according to a to-be-deployed mirror identification indicated by a mirror deployment request in response to receiving a mirror deployment request from an application node, according to an embodiment of the disclosure;
FIG. 4 schematically illustrates an example schematic diagram of a process of determining at least one candidate application node identification associated with an application node identification in the event that an image matching result characterizes that no image to be deployed exists in an image repository corresponding to an image repository identification in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates an example schematic diagram of a process of determining a target application node identification among at least one candidate application node identification according to an image identification to be deployed according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates an example schematic diagram of a mirror management process according to an embodiment of the disclosure;
FIG. 7 schematically illustrates an example schematic diagram of a mirror management process according to another embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow chart of a method of image management according to another embodiment of the present disclosure;
FIG. 9 schematically illustrates an example schematic diagram of a mirror management interaction process according to an embodiment of the disclosure;
FIG. 10 schematically illustrates a block diagram of a mirror management apparatus according to an embodiment of the disclosure;
FIG. 11 schematically illustrates a block diagram of a mirror management apparatus according to another embodiment of the present disclosure; and
fig. 12 schematically illustrates a block diagram of an electronic device adapted to implement a method of image management, according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related personal information of the user all conform to the regulations of related laws and regulations, necessary security measures are taken, and the public order harmony is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
The image repository may be used for image storage, image management, and image distribution. The mirror warehouse can realize the sharing of the mirror among a plurality of running environments.
Since the images have a storage period in the image repository, there may be fixed cleaning rules to clean the images at regular time in order to clean up images with expired time stamps, for example. However, since some images in the image warehouse have special use, the timing cleaning of the images easily causes no problem in the process of pulling the images, and the efficiency and accuracy of image management cannot be ensured.
In order to at least partially solve the technical problems in the related art, the present disclosure provides a method and apparatus for managing images, an electronic device, and a computer-readable storage medium, which can be applied to the fields of computer technology, image management technology, and finance. The mirror image management method comprises the following steps: in response to receiving a mirror image deployment request from an application node, determining a mirror image matching result according to a mirror image identifier to be deployed indicated by the mirror image deployment request, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node; determining at least one candidate application node identification associated with the application node identification under the condition that the image matching result characterizes that no image to be deployed exists in an image warehouse corresponding to the image warehouse identification; determining a target application node identifier from at least one candidate application node identifier according to the image identifier to be deployed; acquiring a mirror image to be deployed according to the target application node identification; and storing the image identification to be deployed and the image association to be deployed in an image warehouse.
It should be noted that the image management method and apparatus provided in the embodiments of the present disclosure may be used in the fields of computer technology, image management technology, and finance, for example, in the field of internet technology. The image management method and the device provided by the embodiment of the disclosure can also be applied to any field except the computer technology, the image management technology and the financial field, for example, the field of information security technology. The application fields of the image management method and the device provided by the embodiment of the disclosure are not limited.
Fig. 1 schematically illustrates a system architecture to which a mirror management method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the image management method provided by the embodiment of the present disclosure may be generally performed by the server 105. Accordingly, the image management apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The image management method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the image management apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
Alternatively, the image management method provided by the embodiment of the present disclosure may be performed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may be performed by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the image management apparatus provided by the embodiments of the present disclosure may also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the sequence numbers of the respective operations in the following methods are merely representative of the operations for the purpose of description, and should not be construed as representing the order of execution of the respective operations. The method need not be performed in the exact order shown unless explicitly stated.
Fig. 2 schematically illustrates a flow chart of a method of image management according to an embodiment of the present disclosure.
As shown in fig. 2, the image management method 200 includes operations S210 to S250.
In operation S210, in response to receiving the mirror deployment request from the application node, determining a mirror matching result according to the mirror identifier to be deployed indicated by the mirror deployment request, where the mirror deployment request includes the application node identifier and the mirror repository identifier corresponding to the application node.
In operation S220, in a case where the image matching result characterizes that the image to be deployed does not exist in the image repository corresponding to the image repository identification, at least one candidate application node identification associated with the application node identification is determined.
In operation S230, a target application node identifier is determined from the at least one candidate application node identifier according to the image identifier to be deployed.
In operation S240, the image to be deployed is obtained according to the target application node identifier.
In operation S250, the image identification to be deployed and the image association to be deployed are stored to the image repository.
According to an embodiment of the present disclosure, the image management method 200 may be applied to a server.
According to embodiments of the present disclosure, the image management method may be applied to image management in a distributed environment. The distributed environment may include at least one cluster. The at least one cluster may each correspond to a mirror repository, a control node, and at least one application node. The image repository may correspond to an image repository identification. The control node may correspond to a control node identification. The at least one application node may each correspond to an application node identification.
According to embodiments of the present disclosure, a script that generates a mirrored deployment request may be pre-stored in a client. In response to detecting a mirror image deployment operation for a mirror image to be deployed initiated by a user, the client can acquire an application node identifier and a mirror image warehouse identifier corresponding to the mirror image to be deployed. And generating a mirror deployment request according to the application node identifier and the mirror warehouse identifier. The client may send the mirror deployment request to the server, so that the server determines a mirror matching result according to the mirror deployment request.
According to embodiments of the present disclosure, the image to be deployed identification may correspond to the image to be deployed. The image identifier to be deployed may be determined according to the application node identifier and the image repository identifier. The image repository may include at least one image identifier and images corresponding to each of the at least one image identifier. Mirror (i.e., mirroring) may refer to an identical copy of data on one disk that exists on another disk.
According to the embodiment of the disclosure, after receiving the mirror deployment request, at least one mirror identifier in the mirror warehouse can be respectively matched according to the mirror identifier to be deployed, so as to obtain a mirror matching result. The image matching result can be used for representing whether at least one image identifier is matched with the image identifier to be deployed, namely whether an image to be deployed exists in an image warehouse.
According to the embodiment of the disclosure, when at least one mirror image identifier is represented by the mirror image matching result and is matched with the mirror image identifier to be deployed, that is, when the mirror image to be deployed exists in the mirror image warehouse corresponding to the mirror image warehouse identifier, the mirror image to be deployed can be directly sent to the application node, so that the application node can complete mirror image deployment according to the mirror image to be deployed.
According to the embodiment of the disclosure, when the image matching result characterizes that at least one image identifier does not have an image identifier matched with the image identifier to be deployed, that is, there is no image to be deployed in an image repository corresponding to the image repository identifier, a control node identifier corresponding to the application node identifier may be determined. And determining a target cluster identifier corresponding to the control node according to the control node identifier. And determining at least one candidate application node identifier according to the target cluster identifier.
According to an embodiment of the present disclosure, after obtaining at least one candidate application node identifier, the candidate application nodes corresponding to the at least one candidate application node identifier may be traversed respectively to obtain at least one candidate mirror image identifier corresponding to the at least one candidate application node identifier. The target application node identifier may be determined according to the image identifier to be deployed and at least one candidate image identifier corresponding to each of the at least one candidate application node identifier.
According to the embodiment of the disclosure, after the target application node identifier is obtained, the image to be deployed may be obtained according to the target application node identifier. For example, the image identifier to be deployed may be sent to a target application node corresponding to the target application node identifier. The target application node may be locally deployed with at least one application candidate image identification. The target application node may determine a target image identifier according to the image identifier to be deployed and the at least one application candidate image identifier. The target application node may send the image corresponding to the target image identifier to the server.
According to the embodiment of the disclosure, after the image to be deployed is obtained, the server may mirror the push operation of the image to be deployed. For example, the image to be deployed identification and the image to be deployed association may be stored to an image repository such that the image to be deployed reappears in the image repository to facilitate the application node pulling the image again. Alternatively, the image to be deployed may be directly sent to the application node, so that the application node completes image deployment according to the image to be deployed.
According to the embodiment of the disclosure, the target application node identification is determined in at least one candidate application node identification according to the image to be deployed identification, the at least one candidate application node identification is determined when the image matching result characterizes that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identification, and the image matching result is determined according to the image to be deployed identification indicated by the image deployment request, so that the target application node on which the image to be deployed is deployed can be automatically determined when the image to be deployed does not exist in the image warehouse, and further the image management efficiency is improved. On the basis, the mirror image to be deployed identification and the mirror image to be deployed obtained according to the target application node identification are stored in the mirror image warehouse, so that the problem that the mirror image is easy to cause in the process of pulling the mirror image due to the fact that the mirror image warehouse can clean the mirror image regularly in the related art is at least partially overcome, and the accuracy of mirror image management is further improved.
The image management method 200 according to an embodiment of the present invention is further described below with reference to fig. 2 to 7.
According to an embodiment of the present disclosure, the following operations may be included in operation S210.
And responding to the received mirror image deployment request, and respectively matching at least one mirror image identifier according to the mirror image identifier to be deployed. And under the condition that at least one image identifier is determined to have the image identifier matched with the image identifier to be deployed, obtaining an image matching result of representing that the image to be deployed exists in the image warehouse. And under the condition that at least one image identifier does not exist in the image identifiers matched with the image identifiers to be deployed, obtaining an image matching result representing that no image to be deployed exists in the image warehouse.
According to an embodiment of the present disclosure, the image repository may include at least one image identifier and images corresponding to each of the at least one image identifier.
According to embodiments of the present disclosure, the mirrored deployment request may also include development center identification and tag information. In this case, the image identifier to be deployed may be determined according to the application node identifier, the image repository identifier, the development center identifier, and tag information. In response to receiving the mirror deployment request, at least one mirror identifier can be respectively matched according to the mirror identifiers to be deployed, so as to obtain a matching result. The mirrored matching result may be determined from the matching result.
For example, in a case that the matching result characterizes at least one image identifier that has an image identifier matching the image identifier to be deployed, it may be determined that there is an image matching result of the image to be deployed in the image repository. Alternatively, in the case that the matching result characterizes that at least one image identifier does not have an image identifier matched with the image identifier to be deployed (for example, the image repository automatically cleans up the image to be deployed due to tag information expiration), it may be determined that the image matching result characterizing that the image repository does not have the image to be deployed.
Fig. 3 schematically illustrates an example schematic diagram of a process of determining a mirror match result according to a to-be-deployed mirror identifier indicated by a mirror deployment request in response to receiving a mirror deployment request from an application node according to an embodiment of the disclosure.
As shown in fig. 3, in 300, the image repository 302 may include at least one image identifier 3021 and images corresponding to each of the at least one image identifier 3021.
In response to receiving the mirror deployment request 301, at least one mirror identifier 3021 may be respectively matched according to the mirror identifiers 3011 to be deployed in the mirror deployment request 301.
In operation S310, there is a mirror identifier matching the mirror identifier to be deployed in the at least one mirror identifier?
If so, an image matching result 303 indicating that an image to be deployed exists in the image repository can be obtained.
If not, the image matching result 304 indicating that the image to be deployed does not exist in the image repository can be obtained.
According to an embodiment of the present disclosure, operation S220 may include the following operations.
And determining a control node identifier corresponding to the application node identifier under the condition that the image matching result characterizes that no image to be deployed exists in the image warehouse corresponding to the image warehouse identifier. And determining a target cluster identifier corresponding to the target cluster according to the control node identifier. And determining at least one candidate application node identifier according to the target cluster identifier by utilizing the target process.
According to the embodiment of the disclosure, the basic information of the control node corresponding to the application node can be checked through a/etc/kubernetes/kubelet instruction. And determining a control node identifier corresponding to the application node identifier according to the basic information of the control node. The control node interface of the PAAS (Platform As A Service ) cluster may be invoked, and a target cluster corresponding to the control node and a target cluster identifier corresponding to the target cluster are determined according to the control node identifier.
According to embodiments of the present disclosure, the target process may include a kubctl process. The kubectl process can realize cluster access configuration, cluster control, cluster viewing and problem debugging. After the target cluster identifier is obtained, a kubectl process can be utilized to execute a kubectl get node instruction, and all application nodes under the target cluster are searched to obtain at least one candidate application node identifier.
Fig. 4 schematically illustrates an example schematic diagram of a process of determining at least one candidate application node identification associated with an application node identification in the case where an image matching result characterizes that there is no image to be deployed in an image repository corresponding to an image repository identification, according to an embodiment of the present disclosure.
As shown in fig. 4, in 400, in a case where the image matching result characterizes that there is no image to be deployed in the image repository corresponding to the image repository identifier, a control node identifier 402 corresponding to the application node identifier 401 may be determined.
A target cluster identity 403 corresponding to the target cluster may be determined from the control node identity 402. With the target process 404, at least one candidate application node identification 405 is determined from the target cluster identification 403.
According to an embodiment of the present disclosure, operation S230 may include the following operations.
Traversing the candidate application nodes corresponding to the candidate application node identifiers by using an operation and maintenance tool aiming at each candidate application node identifier in the at least one candidate application node identifier to obtain at least one candidate mirror image identifier. And respectively matching at least one candidate mirror image identifier according to the mirror image identifier to be deployed. And under the condition that the image identification matched with the image identification to be deployed exists in the at least one candidate image identification, determining the candidate application node identification as a target application node identification.
According to an embodiment of the present disclosure, the operation tool may include at least one of: ansible, saltStack, puppet and Chef. Anstable and SaltStack were developed based on the Python language. Puppet and Chef were developed based on the Ruby language. Taking an example of an stable, the stable may include command module, shell module, script module, yum module, service module, and copy module.
According to the embodiment of the disclosure, an active node-m shell-a "dock images |grep image identifier" -k instruction may be executed for each candidate application node identifier in at least one candidate application node identifier by using an active batch tool, so as to obtain at least one candidate image identifier corresponding to the candidate application node identifier.
According to an embodiment of the present disclosure, after obtaining at least one candidate image identifier corresponding to each of the at least one candidate application node identifiers, the at least one candidate image identifier may be respectively matched according to the image identifier to be deployed. And under the condition that the image identification matched with the image identification to be deployed does not exist in the at least one candidate image identification, respectively matching the at least one candidate image identification corresponding to the next candidate application node identification can be continued. In the case that it is determined that there is a mirror image identifier matching the mirror image identifier to be deployed in the at least one candidate mirror image identifier, the candidate application node identifier may be determined as the target application node identifier.
According to the embodiment of the disclosure, under the condition that the image identifier matched with the image identifier to be deployed exists in at least one candidate image identifier, the at least one candidate image identifier is determined according to the candidate application node identifier, the candidate application node corresponding to the candidate application node identifier is obtained by traversing by using an operation and maintenance tool, and the target application node to be deployed with the image to be deployed can be automatically determined under the condition that the image to be deployed does not exist in the image warehouse by using a cloud computing Docker framework and combining with a K8s orchestration management function, so that the image management efficiency is ensured.
Fig. 5 schematically illustrates an example schematic diagram of a process of determining a target application node identification among at least one candidate application node identification according to an image identification to be deployed according to an embodiment of the present disclosure.
As shown in fig. 5, in 500, for each candidate application node identifier 501 of the at least one candidate application node identifier, an operation tool 502 may be utilized to traverse the candidate application node corresponding to the candidate application node identifier 501 to obtain at least one candidate mirror identifier 503. The at least one candidate image identifier 503 may be respectively matched according to the image identifier 504 to be deployed.
In operation S510, there is a mirror image identifier matching the mirror image identifier to be deployed in the at least one candidate mirror image identifier?
If so, the candidate application node identification 501 may be determined as the target application node identification 505. If not, the flow may end.
Fig. 6 schematically illustrates an example schematic diagram of a mirror management process according to an embodiment of the disclosure.
As shown in fig. 6, the image management method may be applied to an image management system at 600. The image management system may include an image matching unit 601, an image scheduling unit 602, a candidate image identification generating unit 603, a to-be-deployed image positioning unit 604, a to-be-deployed image acquiring unit 605, a distributed version control system 606, and a distributed environment.
The distributed environment may include clusters 607_1, 607_2, …, 607_m, …, and 607_m. M may be an integer greater than or equal to 1, M ε {1,2, …, (M-1), M }. Distributed version control system 606 may be used to manage the image repositories corresponding to each of the clusters.
The cluster 607_1 may include a control node 607_10, a mirror repository 607_100, an application node 607_11, application nodes 607_12, …, application nodes 607_1n, …, and an application node 607_1n. N may be an integer greater than or equal to 1, N ε {1,2, …, (N-1), N }.
In response to receiving the image deployment request from the application node 607_11, the image matching unit 601 may determine an image matching result according to the image identifier to be deployed indicated by the image deployment request. The mirror deployment request may include an application node identification corresponding to the application node 607_11 and a mirror repository identification corresponding to the mirror repository 607_100.
In case the image matching result characterizes that no image to be deployed exists in the image repository 607_100 corresponding to the image repository identity, the image scheduling unit 602 may determine that the at least one candidate application node associated with the application node identity comprises the application node 607_12, …, the application node 607_1n, …, the application node 607_1n.
For each candidate application node in the at least one candidate application node, the candidate image identifier generating unit 603 may traverse the application nodes 607_12, …, the application nodes 607_1n, …, and the application node 607_1n by using an operation tool to obtain at least one candidate image identifier corresponding to each of the application nodes 607_12, …, the application nodes 607_1n, …, and the application node 607_1n.
The image positioning unit to be deployed 604 may match at least one candidate image identifier corresponding to each of the application nodes 607_12, …, the application nodes 607_1n, …, and the application node 607_1n according to the image identifier to be deployed. In the case where it is determined that there is a mirror image identifier matching the mirror image identifier to be deployed among at least one candidate mirror image identifier corresponding to the application node 607_12, the application node 607_12 may be determined as the target application node.
The image to be deployed acquisition unit 605 may acquire the image to be deployed according to the application node 607_12. The image to be deployed identification and the image to be deployed association are stored to the image repository 607_100.
According to an embodiment of the present disclosure, operation S240 may include the following operations.
And sending the image identifier to be deployed to a target application node corresponding to the target application node identifier. And receiving the mirror image to be deployed from the target application node, wherein the mirror image to be deployed is determined by the target application node according to the mirror image identifier to be deployed.
According to the embodiment of the disclosure, the image identifier to be deployed can be sent to the target application node corresponding to the target application node identifier. The target application node may be locally deployed with at least one application candidate image identification. The target application node may determine a target image identifier according to the image identifier to be deployed and the at least one application candidate image identifier. The target application node may send the image corresponding to the target image identifier to the server. The server may receive the image to be deployed from the target application node.
According to the embodiment of the disclosure, a docker export operation can be performed on the mirror image to be deployed to obtain a tar package corresponding to the mirror image to be deployed. Based on the above, static transmission and recovery of the mirror image to be deployed can be performed according to the tar packet corresponding to the mirror image to be deployed. Alternatively, the target application node may be determined to be the application node that initiated the image deployment operation to eliminate the re-pulling operation of the image.
According to the embodiment of the disclosure, the image to be deployed is sent to the target application node corresponding to the target application node identifier, and the image to be deployed is determined by the target application node according to the image to be deployed, so that the image to be deployed can be automatically acquired under the condition that a user is not felt, the user experience is improved, and the image management efficiency is improved.
According to an embodiment of the present disclosure, the image management method 200 may further include the following operations.
And sending the mirror image to be deployed to the application node so that the application node can complete mirror image deployment according to the mirror image to be deployed.
According to embodiments of the present disclosure, the image to be deployed may be sent directly to the application node. The application node may receive the image to be deployed. The application node may deploy the image to be deployed to the local server to complete the image deployment.
According to the embodiment of the disclosure, the mirror image to be deployed is sent to the application node, so that the application node can complete mirror image deployment according to the mirror image to be deployed, and therefore mirror image and automatic compensation and normal deployment starting can be achieved under the condition that the current mirror image warehouse cleaning rule is not changed, and further accuracy of mirror image management is improved.
Fig. 7 schematically illustrates an example schematic diagram of a mirror management process according to another embodiment of the present disclosure.
As shown in fig. 7, the image management process may include operations S701 to S708 in 700.
In operation S701, the distributed version control system may be read according to the image identifier to be deployed indicated by the image deployment request, and an image matching result may be determined.
In operation S702, the image matching result characterizes that there is no image to be deployed in the image repository corresponding to the image repository identification? If not, operation S703 may be performed. If so, operation S704 may be performed.
In operation S703, the image to be deployed is sent to the application node, so that the application node completes the image deployment according to the image to be deployed.
In operation S704, a target process of the platform, i.e. the service cluster, is invoked, and at least one candidate application node identification is determined according to the target cluster identification.
In operation S705, the operation tool is used to traverse the candidate application node corresponding to the candidate application node identifier, so as to obtain at least one candidate mirror image identifier.
In operation S706, at least one candidate application node completes the traversal? If not, operation S705 may be performed. If so, operation S707 may be performed.
In operation S707, a target application node identifier is determined from the at least one candidate application node identifier according to the image identifier to be deployed.
In operation S708, the image to be deployed is obtained according to the target application node identifier. After the execution of operation S708 is completed, operation S703 may be performed.
The above is only an exemplary embodiment, but is not limited thereto, and other image management methods known in the art may be included as long as the efficiency and accuracy of image management can be improved.
Fig. 8 schematically illustrates a flow chart of a method of image management according to another embodiment of the present disclosure.
As shown in fig. 8, the image management method 800 includes operations S810 to S840.
In operation S810, an image identifier to be deployed from a server is received.
In operation S820, a target image identifier is determined from at least one candidate image identifier according to the image identifier to be deployed, where the at least one candidate image identifier corresponds to a candidate image.
In operation S830, a candidate image corresponding to the target image identification is determined as an image to be deployed.
In operation S840, the image to be deployed is sent to the server.
According to an embodiment of the present disclosure, the image management method 800 may be applied to a target application node.
According to the embodiment of the disclosure, the target application node may receive the image identifier to be deployed from the server. The target application node may be locally deployed with at least one application candidate image identification. The target application node can respectively match at least one application candidate image identifier according to the image identifier to be deployed, and the target image identifier is determined.
According to an embodiment of the present disclosure, after obtaining the target image identifier, the target application node may determine a candidate image corresponding to the target image identifier as the image to be deployed. The target application node can send the target application node to the server so that the server can store the image identification to be deployed and the image association to be deployed in the image warehouse.
A further description of a method 800 for image management according to an embodiment of the present invention is provided below with reference to fig. 9.
FIG. 9 schematically illustrates an example schematic diagram of a mirror management interaction process according to an embodiment of the disclosure.
As shown in fig. 9, the image management interaction process may include operations S901 to S915.
In operation S901, an application node may generate a mirror deployment request.
In operation S902, the application node may send a mirror deployment request to the server.
In operation S903, the server may receive the mirror deployment request.
In operation S904, the server may determine a mirror image matching result according to the to-be-deployed mirror image identifier indicated by the mirror image deployment request.
In operation S905, the server may determine at least one candidate application node identifier associated with the application node identifier in a case where the image matching result characterizes that the image to be deployed does not exist in the image repository corresponding to the image repository identifier.
In operation S906, the server may determine a target application node identifier from at least one candidate application node identifier according to the image identifier to be deployed.
In operation S907, the server may send the image identifier to be deployed to the target application node.
In operation S908, the target application node may receive the image identification to be deployed.
In operation S909, the target application node may determine a target image identifier from among at least one candidate image identifier according to the image identifier to be deployed.
In operation S910, the target application node may determine a candidate image corresponding to the target image identification as an image to be deployed.
In operation S911, the target application node may transmit the image to be deployed to the server.
In operation S912, the server may receive the image to be deployed.
In operation S913, the server may send the image to be deployed to the application node.
In operation S914, the application node may receive the image to be deployed.
In operation S915, the application node may complete the image deployment according to the image to be deployed.
Fig. 10 schematically illustrates a block diagram of a mirror management apparatus according to an embodiment of the present disclosure.
As shown in fig. 10, the image management apparatus 1000 may include a first determination module 1010, a second determination module 1020, a third determination module 1030, an acquisition module 1040, and a storage module 1050.
A first determining module 1010, configured to determine, in response to receiving a mirror deployment request from an application node, a mirror matching result according to a mirror identifier to be deployed indicated by the mirror deployment request, where the mirror deployment request includes an application node identifier and a mirror repository identifier corresponding to the application node.
A second determining module 1020, configured to determine at least one candidate application node identifier associated with the application node identifier, in a case where the image matching result characterizes that the image repository corresponding to the image repository identifier does not have the image to be deployed.
A third determining module 1030 is configured to determine, according to the image identifier to be deployed, a target application node identifier from at least one candidate application node identifier.
And the obtaining module 1040 is configured to obtain the mirror image to be deployed according to the target application node identifier.
The storage module 1050 is configured to store the image identifier to be deployed and the image relationship to be deployed in the image repository.
According to an embodiment of the present disclosure, the image management apparatus 1000 may be applied to a server side.
According to an embodiment of the present disclosure, the image repository includes at least one image identifier and images corresponding to each of the at least one image identifier.
According to an embodiment of the present disclosure, the first determination module 1010 may include a first matching unit, a first determination unit, and a second determination unit.
The first matching unit is used for responding to the received mirror image deployment request and respectively matching at least one mirror image identifier according to the mirror image identifier to be deployed.
The first determining unit is used for obtaining an image matching result representing that the image to be deployed exists in the image warehouse under the condition that at least one image identifier is determined to exist in the image identifiers matched with the image identifier to be deployed.
The second determining unit is used for obtaining an image matching result representing that the image to be deployed does not exist in the image warehouse under the condition that the image identifier matched with the image identifier to be deployed does not exist in the at least one image identifier.
According to an embodiment of the present disclosure, the second determining module 1020 may include a third determining unit, a fourth determining unit, and a fifth determining unit.
And the third determining unit is used for determining the control node identification corresponding to the application node identification under the condition that the image matching result represents that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identification.
And the fourth determining unit is used for determining the target cluster identification corresponding to the target cluster according to the control node identification.
And a fifth determining unit, configured to determine at least one candidate application node identifier according to the target cluster identifier by using the target process.
According to an embodiment of the present disclosure, the third determination module 1030 may include a traversal unit, a second matching unit, and a sixth determination unit.
And the traversing unit is used for traversing the candidate application nodes corresponding to the candidate application node identifiers by utilizing an operation and maintenance tool aiming at each candidate application node identifier in the at least one candidate application node identifier to obtain at least one candidate mirror image identifier.
And the second matching unit is used for respectively matching at least one candidate mirror image identifier according to the mirror image identifier to be deployed.
And a sixth determining unit, configured to determine, when it is determined that there is a mirror image identifier matching the mirror image identifier to be deployed in the at least one candidate mirror image identifier, the candidate application node identifier as the target application node identifier.
According to an embodiment of the present disclosure, the acquisition module 1040 may include a transmission unit and a reception unit.
And the sending unit is used for sending the image identification to be deployed to the target application node corresponding to the target application node identification.
The receiving unit is used for receiving the mirror image to be deployed from the target application node, wherein the mirror image to be deployed is determined by the target application node according to the mirror image identifier to be deployed.
According to an embodiment of the present disclosure, the image management apparatus 1000 may further include a second transmitting module.
And the second sending module is used for sending the mirror image to be deployed to the application node so that the application node can complete mirror image deployment according to the mirror image to be deployed.
Fig. 11 schematically illustrates a block diagram of a mirror management apparatus according to another embodiment of the present disclosure.
As shown in fig. 11, the image management apparatus 1100 may include a receiving module 1110, a fourth determining module 1120, a fifth determining module 1130, and a first transmitting module 1140.
And the receiving module 1110 is configured to receive the image identifier to be deployed from the server.
A fourth determining module 1120, configured to determine, according to the image identifier to be deployed, a target image identifier from at least one candidate image identifier, where the at least one candidate image identifier corresponds to a candidate image.
A fifth determining module 1130 is configured to determine the candidate image corresponding to the target image identifier as the image to be deployed.
The first sending module 1140 is configured to send the image to be deployed to a server.
According to an embodiment of the present disclosure, the image management apparatus 1100 may be applied to a target application node.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the first determination module 1010, the second determination module 1020, the third determination module 1030, the acquisition module 1040, and the storage module 1050 may be combined in one module/unit/sub-unit, or any of them may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the first determination module 1010, the second determination module 1020, the third determination module 1030, the acquisition module 1040, and the storage module 1050 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of any of the three implementations of software, hardware, and firmware. Alternatively, at least one of the first determination module 1010, the second determination module 1020, the third determination module 1030, the acquisition module 1040, and the storage module 1050 may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
It should be noted that, in the embodiment of the present disclosure, the image management device portion corresponds to the image management method portion in the embodiment of the present disclosure, and the description of the image management device portion specifically refers to the image management method portion and is not described herein again.
For example, any of the receiving module 1110, the fourth determining module 1120, the fifth determining module 1130, and the first transmitting module 1140 may be combined in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the receiving module 1110, the fourth determining module 1120, the fifth determining module 1130, and the first transmitting module 1140 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the receiving module 1110, the fourth determining module 1120, the fifth determining module 1130, and the first transmitting module 1140 may be at least partially implemented as a computer program module, which may perform the corresponding functions when being executed.
It should be noted that, in the embodiment of the present disclosure, the image management device portion corresponds to the image management method portion in the embodiment of the present disclosure, and the description of the image management device portion specifically refers to the image management method portion and is not described herein again.
Fig. 12 schematically illustrates a block diagram of an electronic device adapted to implement a method of image management, according to an embodiment of the disclosure. The electronic device shown in fig. 12 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 12, a computer electronic device 1200 according to an embodiment of the present disclosure includes a processor 1201 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1202 or a program loaded from a storage section 1209 into a Random Access Memory (RAM) 1203. The processor 1201 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 1201 may also include on-board memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 1203, various programs and data required for the operation of the electronic apparatus 1200 are stored. The processor 1201, the RQM 1202 and the RAM 1203 are connected to each other via a bus 1204. The processor 1201 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1202 and/or RAM 1203. Note that the program may be stored in one or more memories other than the ROM 1202 and the RAM 1203. The processor 1201 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1200 may also include an input/output (I/O) interface 1205, the input/output (I/O) interface 1205 also being connected to the bus 1204. The electronic device 1200 may also include one or more of the following components connected to an input/output (I/O) interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1208 including a hard disk or the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. The driver 1210 is also connected to an input/output (I/O) interface 1205 as required. A removable medium 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 1210 so that a computer program read out therefrom is installed into the storage section 1208 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1209, and/or installed from the removable media 1211. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1201. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include the ROM 1202 and/or the RAM 1203 and/or one or more memories other than the ROM 1202 and the RAM 1203 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, the program code for causing an electronic device to implement the image management methods provided by the embodiments of the present disclosure when the computer program product is run on the electronic device.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1201. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program can also be transmitted, distributed over a network medium in the form of signals, and downloaded and installed via a communication portion 1209, and/or from a removable medium 1211. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A mirror image management method is applied to a server and comprises the following steps:
responding to a mirror image deployment request from an application node, and determining a mirror image matching result according to a mirror image identifier to be deployed indicated by the mirror image deployment request, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node;
determining at least one candidate application node identification associated with the application node identification under the condition that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identification according to the image matching result characterization;
determining a target application node identifier from the at least one candidate application node identifier according to the image identifier to be deployed;
Acquiring the mirror image to be deployed according to the target application node identifier; and
and storing the image identification to be deployed and the image association to be deployed to the image warehouse.
2. The method of claim 1, wherein the image repository comprises at least one image identifier and images corresponding to each of the at least one image identifier;
the responding to the receiving of the mirror image deployment request from the application node, and the determining of the mirror image matching result according to the mirror image identifier to be deployed indicated by the mirror image deployment request comprises:
in response to receiving the mirror image deployment request, respectively matching the at least one mirror image identifier according to the mirror image identifier to be deployed;
under the condition that the image identification matched with the image identification to be deployed exists in the at least one image identification, obtaining an image matching result representing that the image to be deployed exists in the image warehouse; and
and under the condition that the image identification matched with the image identification to be deployed does not exist in the at least one image identification, obtaining an image matching result representing that the image to be deployed does not exist in the image warehouse.
3. The method according to claim 1 or 2, wherein the determining at least one candidate application node identification associated with the application node identification in case the image matching result characterizes that the image to be deployed is not present in an image repository corresponding to the image repository identification comprises:
determining a control node identification corresponding to the application node identification under the condition that the image to be deployed does not exist in an image warehouse corresponding to the image warehouse identification according to the image matching result characterization;
determining a target cluster identifier corresponding to the target cluster according to the control node identifier; and
and determining the at least one candidate application node identifier according to the target cluster identifier by utilizing a target process.
4. The method according to claim 1 or 2, wherein said determining a target application node identity among said at least one candidate application node identity according to said image identity to be deployed comprises:
for each of the at least one candidate application node identification,
traversing the candidate application nodes corresponding to the candidate application node identifiers by using an operation and maintenance tool to obtain at least one candidate mirror image identifier;
According to the image identifiers to be deployed, respectively matching the at least one candidate image identifier; and
and under the condition that the image identification matched with the image identification to be deployed exists in the at least one candidate image identification, determining the candidate application node identification as the target application node identification.
5. The method according to claim 1 or 2, wherein the obtaining the image to be deployed according to the target application node identifier comprises:
the image identification to be deployed is sent to a target application node corresponding to the target application node identification; and
and receiving the mirror image to be deployed from the target application node, wherein the mirror image to be deployed is determined by the target application node according to the mirror image identifier to be deployed.
6. The method of claim 1, further comprising, after the acquiring the image to be deployed according to the target application node identification:
and sending the mirror image to be deployed to the application node so that the application node can complete mirror image deployment according to the mirror image to be deployed.
7. A mirror image management method is applied to a target application node, and comprises the following steps:
Receiving a mirror image identifier to be deployed from a server;
determining a target image identifier in at least one candidate image identifier according to the image identifier to be deployed, wherein the at least one candidate image identifier corresponds to a candidate image respectively;
determining a candidate image corresponding to the target image identifier as the image to be deployed; and
and sending the mirror image to be deployed to the server.
8. A mirror image management device is applied to a server and comprises:
the first determining module is used for determining a mirror image matching result according to a mirror image identifier to be deployed indicated by a mirror image deployment request in response to receiving the mirror image deployment request from an application node, wherein the mirror image deployment request comprises an application node identifier and a mirror image warehouse identifier corresponding to the application node;
the second determining module is used for determining at least one candidate application node identifier associated with the application node identifier under the condition that the image to be deployed does not exist in the image warehouse corresponding to the image warehouse identifier according to the image matching result characterization;
a third determining module, configured to determine a target application node identifier from the at least one candidate application node identifier according to the image identifier to be deployed;
The acquisition module is used for acquiring the mirror image to be deployed according to the target application node identifier; and
and the storage module is used for storing the image identification to be deployed and the image association to be deployed to the image warehouse.
9. A mirror management apparatus for use in a target application node, comprising:
the receiving module is used for receiving the image identification to be deployed from the server;
a fourth determining module, configured to determine, according to the image identifier to be deployed, a target image identifier in at least one candidate image identifier, where the at least one candidate image identifier corresponds to a candidate image;
a fifth determining module, configured to determine a candidate image corresponding to the target image identifier as the image to be deployed; and
and the sending module is used for sending the mirror image to be deployed to the server.
10. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1 to 6 or claim 7.
11. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any one of claims 1 to 6 or claim 7.
12. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 6 or claim 7 when executed.
CN202310453295.7A 2023-04-25 2023-04-25 Mirror image management method and device, electronic equipment and computer readable storage medium Pending CN116521317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310453295.7A CN116521317A (en) 2023-04-25 2023-04-25 Mirror image management method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310453295.7A CN116521317A (en) 2023-04-25 2023-04-25 Mirror image management method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116521317A true CN116521317A (en) 2023-08-01

Family

ID=87405870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310453295.7A Pending CN116521317A (en) 2023-04-25 2023-04-25 Mirror image management method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116521317A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369952A (en) * 2023-12-08 2024-01-09 中电云计算技术有限公司 Cluster processing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369952A (en) * 2023-12-08 2024-01-09 中电云计算技术有限公司 Cluster processing method, device, equipment and storage medium
CN117369952B (en) * 2023-12-08 2024-03-15 中电云计算技术有限公司 Cluster processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9588738B2 (en) Supporting software application developers to iteratively refine requirements for web application programming interfaces
CN109062563B (en) Method and device for generating page
US9836534B2 (en) Using ontology to discover API requirements
US11586772B2 (en) Method and device for displaying information
CN111340220B (en) Method and apparatus for training predictive models
US11205138B2 (en) Model quality and related models using provenance data
US10915378B1 (en) Open discovery service
US11934287B2 (en) Method, electronic device and computer program product for processing data
US20150142786A1 (en) Modification of cloud application service levels based upon document consumption
CN116521317A (en) Mirror image management method and device, electronic equipment and computer readable storage medium
CN109428872B (en) Data transmission method, equipment, server, starting method and system
US11502822B2 (en) Static analysis of smart contract determinism
CN116560661A (en) Code optimization method, device, equipment and storage medium
US20220237448A1 (en) Resource constraint aware deep learning model optimization for serverless-based inference systems
US11375040B2 (en) Enhanced processing of user profiles using data structures specialized for graphical processing units (GPUs)
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium, and program product
CN113064987A (en) Data processing method, apparatus, electronic device, medium, and program product
US20180218064A1 (en) Method and system for the creation and maintenance of a web presence data store built automatically for all entities with a social media presence
CN114640585B (en) Resource updating method and device, electronic equipment and storage medium
US20230359807A1 (en) Distributed Actor-Based Information System and Method
US20230108982A1 (en) Data processing utilizing an asynchronous communication repository
CN117785336A (en) Task processing method, system, equipment and medium based on generalized linear model
CN117311845A (en) Memory refreshing method, device, equipment, medium and program product
CN117255028A (en) Model acquisition method and device, equipment and storage medium
CN114185811A (en) Test method, test device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination