CN109976667A - A kind of mirror image management method, apparatus and system - Google Patents

A kind of mirror image management method, apparatus and system Download PDF

Info

Publication number
CN109976667A
CN109976667A CN201910145316.2A CN201910145316A CN109976667A CN 109976667 A CN109976667 A CN 109976667A CN 201910145316 A CN201910145316 A CN 201910145316A CN 109976667 A CN109976667 A CN 109976667A
Authority
CN
China
Prior art keywords
node
mirror image
metadata
warehouse server
image data
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.)
Granted
Application number
CN201910145316.2A
Other languages
Chinese (zh)
Other versions
CN109976667B (en
Inventor
线超博
刘基
罗浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910145316.2A priority Critical patent/CN109976667B/en
Publication of CN109976667A publication Critical patent/CN109976667A/en
Application granted granted Critical
Publication of CN109976667B publication Critical patent/CN109976667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • 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/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the present invention provides a kind of mirror image management method, apparatus and system, is related to field of computer technology, can reduce the number of transmissions of mirror image data, and improve the utilization rate of memory space, to reduce the expense of docker system.The system includes: warehouse server and N number of node for being connected with the warehouse server, and the memory module of N number of node constitutes distributed memory system, and the mirror image data of mirror image is shared in the distributed memory system in N number of node;Wherein, first node is used for: generating the first mirror image, which includes the first metadata and the first mirror image data;First mirror image data is saved to the distributed memory system;And upload request is sent to the warehouse server, first metadata is carried in the upload request, which is any of N number of node;The warehouse server, is used for: receiving the upload request of first node transmission;And save first metadata in the upload request.

Description

A kind of mirror image management method, apparatus and system
Technical field
The present invention relates to field of computer technology more particularly to a kind of mirror image management methods, apparatus and system.
Background technique
Docker is an application hosting frame (application hosting framework), it can pass through class Application is disposed, managed like the same container of virtual machine.
In current docker system, docker registry (i.e. warehouse server) of each host with distal end It is connected, each host needs the mirror image needed for downloading (pull) in warehouse server when carrying out docker instantiation operation (i.e. image), and be stored in ware-house here;Correspondingly, if host is modified mirror image, when obtaining new mirror image, Also need to upload new mirror image (push) to warehouse server.
Specifically, mirror image can bedding storage be in warehouse server in the form of a tree, the branch of each node to root node Road constitutes a mirror image, binary tree as shown in Figure 1, comprising: the mirror image 1 that node 1 and node 2 form, node 1,2 and of node Multiple mirror images such as the mirror image 3 that the mirror image 2 that node 4 forms, node 1 and node 3 form, and mirror image number specifically can be used in each mirror image It is described according to metadata, wherein mirror image data contains the data of a complete (SuSE) Linux OS, and metadata is logical Often retouched by a kind of JSON (JavaScript Object Notation, data interchange format of a lightweight) file It states, for characterizing the attributive character of the mirror image, such as the information such as ID of the title of mirror image, leaf node.
In docker system, the number of mirror image can be very more, therefore, when multiple main frames download mirror image, should download The mirror image data of mirror image will also download the metadata of mirror image, and the expense of entire docker system is caused to increase, also, different main Machine may use identical mirror image, and in existing docker system, it is required to take from warehouse using the host of identical mirror image The mirror image is downloaded in business device, and is saved to local storage space, i.e., saves identical mirror image in a large amount of hosts, cause host The waste of memory space.
Summary of the invention
The embodiment of the present invention provides a kind of mirror image management method, apparatus and system, can reduce the transmission time of mirror image data Number, and the utilization rate of memory space is improved, to reduce the expense of docker system.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
In a first aspect, the embodiment of the present invention provides a kind of docker system, the system include: warehouse server and with The memory module of the connected N number of node of the warehouse server, N number of node constitutes distributed memory system, N number of node scope The mirror image data of picture is shared in the distributed memory system, and N is the integer more than or equal to 2;Wherein, first node is used for: The first mirror image is generated, which includes the first metadata and the first mirror image data;First mirror image data is saved to this Distributed memory system;And upload request is sent to the warehouse server, first metadata is carried in the upload request, The first node is any of N number of node;The warehouse server, is used for: receiving the upload of first node transmission Request;And save first metadata in the upload request.
As can be seen that since the mirror image data of mirror image is shared in the distributed storage system in N number of node in docker system In system, therefore, in mirror image upload procedure, first node only need to be to the metadata that warehouse server uploads the new mirror image generated Can, without uploading the mirror image data of new mirror image, so as to reduce the number of transmissions of mirror image data in docker system, and improves and deposit The utilization rate for storing up space, reduces the expense of entire docker system.
In a kind of possible design, which includes warehouse driving;Wherein, the first node, be also used to The warehouse server sends first mirror image data;The warehouse server, is also used to: receive the first node transmission this first Mirror image data;And warehouse driving is called to save first mirror image data to the distributed memory system.
In a kind of possible design, which includes mirror image management module, wherein the first node is also used to: Downloading request is sent to the warehouse server by the mirror image management module, the mark of the first metadata is carried in downloading request Know;Mould is managed by the mirror image and receives first metadata of warehouse server transmission, and searches the distributed memory system In whether be stored with the first mirror image data corresponding with first metadata;If be stored in the distributed memory system this first Mirror image data then obtains first mirror image data by the mirror image management module from the distributed memory system;Warehouse clothes Business device, is also used to: receiving the downloading request of first node transmission;According to the mark of the first metadata in downloading request Search first metadata;And first metadata is sent to the first node.
So, since the mirror image data of mirror image is shared in the distributed storage system in N number of node in docker system In system, therefore, during image download, only need to transmit the metadata of mirror image between first node and warehouse server, and The mirror image data for not needing transmission mirror image, can reduce the number of transmissions of mirror image data, and improve the utilization rate of memory space, thus Reduce the expense of docker system.
In a kind of possible design, which is also used to: will be in first meta-data preservation to the first node Ware-house here;And add 1 operation to executing for the preset reference counter of the first mirror image.
In a kind of possible design, which is also used to: deleting first metadata in the first node; To the reference counter execution operation that subtracts 1.
In a kind of possible design, which is also used to send removal request, the deletion to the warehouse server Request is used to indicate the first mirror image deleted in the warehouse server;The warehouse server, is also used to: receiving first node hair The removal request sent;According to the removal request, first metadata in the warehouse server is deleted;If each node is equal First mirror image is not used, then deletes first mirror image data being stored in the distributed memory system.
It so far, can mirror image data to mirror image and metadata difference in docker system provided in an embodiment of the present invention It is managed, the mirror image data of mirror image is uniformly stored in distributed memory system in each node, that is to say, that each node can It, so, not only can be to avoid being protected in great deal of nodes in the prior art to share the mirror image data in distributed memory system The problem of depositing identical mirror image and leading to the waste of memory space, also makes each node and warehouse server only need to manage The metadata of mirror image in itself reduces the expense of docker system so as to reduce the number of transmissions of mirror image data.
Second aspect, the embodiment of the present invention provide a kind of mirror image management method, and this method is applied in first aspect Any one docker system, this method comprises: first node generates the first mirror image, which includes the first metadata and the One mirror image data, the first node are any of N number of node in the docker system;The first node is to warehouse server Upload request is sent, first metadata is carried in the upload request, so that the warehouse server saves first yuan of number According to;The first node saves first mirror image data into the distributed memory system.
In a kind of possible design, which saves first mirror image data to the distributed memory system In, comprising: the first node sends first mirror image data to the warehouse server so that the warehouse server by this first Mirror image data is saved into the distributed memory system.
In a kind of possible design, this method further include: the first node sends downloading request to the warehouse server, The mark of the first metadata is carried in downloading request;The first node receive the warehouse server transmission with this first yuan Corresponding first metadata of the mark of data;The first node is searched in the distributed memory system according to first metadata Whether with first metadata corresponding first mirror image data is stored with;If being stored with first mirror in the distributed memory system As data, then the first node obtains first mirror image data from the distributed memory system.
In a kind of possible design, in the first metadata that the first node is sent according to the warehouse server, search Whether it is stored in the distributed memory system after the first mirror image data corresponding with first metadata, this method is also wrapped Include: if not stored in the distributed memory system have first mirror image data, which obtains from the warehouse server Take first mirror image data.
In a kind of possible design, the first node receive the warehouse server transmission the first metadata it Afterwards, this method further include: the first node is by the ware-house here in first meta-data preservation to the first node.
In a kind of possible design, in the first node by the local in first meta-data preservation to the first node After warehouse, this method further include: the first node is to the reference counter execution plus 1 operation preset for the first mirror image.
In a kind of possible design, if the first node determines the first mirror image deleted in the first node, the party Method further include: the first node deletes first metadata in the first node;The first node holds the reference counter Operation that row subtracts 1.
The third aspect, the embodiment of the present invention provide a kind of mirror image management method, and this method is applied in first aspect Any one docker system, this method comprises: warehouse server receives the removal request that first node is sent, which is used The first mirror image in the warehouse server is deleted in instruction, which includes the first metadata and the first mirror image data, is somebody's turn to do First node is any of N number of node in the docker system;The warehouse server deletes the storehouse according to the removal request First metadata in the server of library;If first mirror image is not used in each node, warehouse server deletion is deposited Store up first mirror image data in the distributed memory system.
In a kind of possible design, if first mirror image is not used in each node, which is deleted The first mirror image data being stored in the distributed memory system, comprising: the warehouse server judges the reference of first mirror image Whether counter is 0;If the reference counter of first mirror image is 0, warehouse server deletion is stored in the distribution and deposits First mirror image data in storage system.
Fourth aspect, the embodiment of the present invention provide a kind of node, which is applied to any one of first aspect Docker system, the node include: mirror image generation unit, and for generating the first mirror image, which includes the first metadata With the first mirror image data;Transmission unit, for sending upload request to warehouse server, carry in the upload request this first Metadata, so that the warehouse server saves first metadata;Storage unit, for by first mirror image data save to In the distributed memory system.
In a kind of possible design, which is also used to send first mirror image data to the warehouse server, So that the warehouse server saves first mirror image data into the distributed memory system.
In a kind of possible design, which further includes acquiring unit and searching unit, wherein the transmission unit, also For sending downloading request to the warehouse server, the mark of the first metadata is carried in downloading request;The acquiring unit, For receiving the first metadata corresponding with the mark of first metadata of warehouse server transmission;And if the distribution It is stored with first mirror image data in storage system, then obtains first mirror image data from the distributed memory system;This is looked into Unit is looked for, for searching and whether being stored in the distributed memory system and first metadata pair according to first metadata The first mirror image data answered.
In a kind of possible design, the acquiring unit, if be also used in the distributed memory system it is not stored have this One mirror image data then obtains first mirror image data from the warehouse server.
In a kind of possible design, which is also used in first meta-data preservation to the first node Ware-house here.
In a kind of possible design, the node further include: counting unit, by based on for the preset reference of the first mirror image Number device executes plus 1 operation.
In a kind of possible design, which further includes deleting unit, wherein the deletion unit, for delete this First metadata in one node;The counting unit is also used to subtract 1 to the reference counter execution operation.
5th aspect, the embodiment of the present invention provide a kind of warehouse server, which is applied to first aspect Any one of docker system, the warehouse server include: receiving unit, for receive first node transmission deletion ask Ask, the removal request be used to indicate delete the warehouse server in the first mirror image, first mirror image include the first metadata and First mirror image data, the first node are any of N number of node in the docker system;Unit is deleted, it should for basis Removal request deletes first metadata in the warehouse server;If first mirror image is not used in each node, delete Except first mirror image data being stored in the distributed memory system.
In a kind of possible design, which further includes judging unit, wherein the judging unit, for sentencing Whether the reference counter of first mirror image of breaking is 0;The deletion unit, if being specifically for the reference counter of first mirror image 0, then delete first mirror image data being stored in the distributed memory system.
6th aspect, the embodiment of the present invention provide a kind of node, comprising: processor, memory, bus and communication connect Mouthful;For storing computer executed instructions, which is connect with the memory by the bus memory, when the node is transported When row, which executes the computer executed instructions of memory storage, so that the node is executed as appointed in second aspect The mirror image management method of meaning one.
7th aspect, the embodiment of the present invention provides a kind of warehouse server, comprising: processor, memory, bus and logical Believe interface;The memory is for storing computer executed instructions, which is connect with the memory by the bus, when the storehouse When library server is run, which executes the computer executed instructions of memory storage, so that the warehouse server is held The mirror image management method of row any one of such as third aspect.
Eighth aspect, the embodiment of the invention provides a kind of computer storage mediums, for being stored as used in above-mentioned node Computer software instructions, it includes for execute above-mentioned aspect be node designed by program.
9th aspect, the embodiment of the invention provides a kind of computer storage mediums, for being stored as above-mentioned repository service Computer software instructions used in device, it includes be program designed by warehouse server for executing above-mentioned aspect.
In the present invention, the name of node and warehouse server does not constitute restriction to equipment itself, in practical implementations, this A little equipment can occur with other titles.As long as the function of each equipment is similar with the present invention, belong to the claims in the present invention and Within the scope of its equivalent technologies.
In addition, second aspect technical effect brought by any possible design method into the 9th aspect can be found in the Technical effect brought by different designs mode in one side, details are not described herein again.
The aspects of the invention or other aspects can more straightforwards in the following description.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.
Fig. 1 is the schematic diagram of mirror image in the prior art;
Fig. 2 is a kind of configuration diagram one of docker system provided in an embodiment of the present invention;
Fig. 3 is a kind of configuration diagram two of docker system provided in an embodiment of the present invention;
Fig. 4 is a kind of configuration diagram three of docker system provided in an embodiment of the present invention;
Fig. 5 is the architecture diagram of docker system interior joint in the prior art;
Fig. 6 is the architecture diagram of docker system interior joint provided in an embodiment of the present invention;
Fig. 7 is a kind of flow diagram of image download method provided in an embodiment of the present invention;
Fig. 8 is a kind of flow diagram of mirror image method for uploading provided in an embodiment of the present invention;
Fig. 9 is a kind of flow diagram of mirror image delet method provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram one of node provided in an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram two of node provided in an embodiment of the present invention;
Figure 12 is a kind of structural schematic diagram three of node provided in an embodiment of the present invention;
Figure 13 is a kind of structural schematic diagram four of node provided in an embodiment of the present invention;
Figure 14 is a kind of structural schematic diagram one of warehouse server provided in an embodiment of the present invention;
Figure 15 is a kind of structural schematic diagram two of warehouse server provided in an embodiment of the present invention;
Figure 16 is a kind of structural schematic diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include one or more of the features.In the description of the present invention, unless otherwise indicated, the meaning of " plurality " is two It is a or more than two.
Mirror image management method provided in an embodiment of the present invention, applied to docker system as shown in Figure 2, the docker system It include warehouse server 01 in system, and N (N is more than or equal to 2 integer) a node being connected with warehouse server 01 02, wherein warehouse server 01 is the warehouse of a memory image, and node 02 can obtain required from warehouse server 01 Mirror image, wherein each mirror image specifically includes mirror image data and metadata.The mirror image data of mirror image can be unified to store in node 02 In distributed memory system 03, i.e., each node 02 shares the mirror image data stored in distributed memory system 03, and each section The metadata of mirror image is saved and is safeguarded by each node 02 oneself in point 02.
Wherein, mirror image data contains the data of a complete (SuSE) Linux OS, and metadata usually passes through one A kind of JSON (JavaScript Object Notation, data interchange format of lightweight) file describes, for characterizing The attributive character of the mirror image, such as the information such as ID of the title of mirror image, leaf node.
It should be noted that in present example, the arbitrary node 02 in above-mentioned distributed memory system may be by one A entity device is realized, such as computer, portable mobile termianl or server, it is also possible to jointly real by multiple entity devices It is existing.It is understood that any functional node 02 in distributed memory system all may be a logic in entity device Functional module a, it is also possible to logic functional block being made of multiple entity devices.Therefore, implement in following present invention In example, each step in method provided in an embodiment of the present invention can be executed by an entity device, it can be by multiple entities Equipment cooperation executes each step in method provided in an embodiment of the present invention, is not construed as limiting to this present invention.
In addition, the specific structure of docker system interior nodes 02 will elaborate in subsequent embodiment, therefore herein no longer It repeats.
Illustratively, as shown in figure 3, being stored with the metadata 1 of mirror image 1 in first node, mirror is stored in second node As 1 metadata 1 and the metadata 2 of mirror image 2, and the mirror image data 2 of the mirror image data 1 of mirror image 1 and mirror image 2 is uniformly stored in In distributed memory system 03, then, when first node 1 needs to download the mirror image data of (pull) mirror image 2, first node is only The metadata 2 of mirror image 2 need to be obtained from warehouse server 01 and is saved to first node local, and then according to the metadata of mirror image 22 The mirror image data 2 of mirror image 2 is read from distributed memory system 03.
As can be seen that being based on above-mentioned docker system, node 02 is in the required mirror image of downloading, it is only necessary to from repository service Device 01 obtain the mirror image metadata, without as the prior art simultaneously from warehouse server 01 obtain mirror image metadata with Mirror image data, so as to reduce the expense of docker system.
Simultaneously as the mirror image data of mirror image is uniformly stored in distributed memory system 03 in each node 02, then, The mirror image data of each mirror image be only used in distributed memory system 03 save it is a, so as to avoid in the prior art, largely The problem of saving identical mirror image in node and leading to the waste of memory space.
Certainly, similarly to the prior art, the part of nodes 02 in docker system shown in Fig. 2, can also be by mirror The mirror image data of picture is stored in warehouse server 01, at this point, this part of nodes 02 still can be according to the method for the prior art, Xiang Cang Library server 01 uploads mirror image data and metadata, and downloads mirror image data and metadata, the present invention from warehouse server 01 This is not intended to be limited in any.
Further, the storage unit in warehouse server 01 for memory image data also can be set deposits in distribution In storage system 03, that is to say, that as shown in figure 4,04 can be driven by setting warehouse, the mirror image that will be stored in warehouse server 01 Data are saved into distributed memory system 03, so, when node 02 generates some mirror image, due to the mirror image number of the mirror image According to can directly be generated in distributed memory system 03, therefore, when node 02 uploads (push) mirror image to warehouse server 01, only The metadata of mirror image need to be sent to warehouse server 01, so that node 02 is avoided to upload mirror image data to warehouse server 01, It can be further reduced the number of transmissions of mirror image data, to reduce the expense of docker system.
Further, as shown in figure 5, being the architecture diagram of docker system interior joint 02.Wherein, docker system interior joint 02 specifically includes: client 11 (i.e. docker client), server 12, driving 13 (i.e. docker driver), container tube Manage library 14 (i.e. libcontainer), container 15 (i.e. Docker container) and the bottom module 16 for supporting above-mentioned framework (i.e. rootfs).
Wherein, client 11 (i.e. docker client) is that user is used in docker framework and server-side 12 is established and led to The client of letter.After user sends Container Management request using docker order line by client 11, received by server 12 And handle Container Management request.
Server-side 12 (i.e. docker daemon) specifically may include the runtime engine in docker framework, i.e. docker Engine and special service are in the docker server of client 11.
Wherein, docker server can receive and dispatch the various requests of the transmission of distribution customer terminal 11, specifically include HTTP server, router (Router) and processing module (Handler).
And docker engine is responsible for the life cycle management of mirror image and container, such as mirror image downloading (pull) and Upload (push) operation and instantiation operation of container etc..In addition, docker engine can be with the storehouse in Fig. 2 or Fig. 4 Library server 01 is communicated.
13 (i.e. docker driver) are driven, the setting to docker container performing environment may be implemented.Due to In the life cycle of docker operation, and all operation of non-user is both for the management of docker container, in addition also related In the acquisition etc. of docker operation information, therefore, in order to by the management of Docker container from the business inside docker engine It is distinguished in logic, the management request of the non-docker container in this part is managed provided with driving 13.Wherein, in docker In the realization of driver, can be divided into following three classes driving: graphdriver (figure driving), (network drives networkdriver It is dynamic) and execdriver (external drive).
Container Management library 14 (i.e. libcontainer) is a library realized using Go language design in docker framework, By calling libcontainer, namespace, cgroups, apparmor, the network equipment and the fire prevention of container can be manipulated Wall rule etc..
Container 15 (i.e. docker container) is the final avatar of service offering in docker framework, can be according to The demand and instruction of user, customized corresponding Docker container.
Bottom module 16, i.e. rootfs (root file system), comprising in typical linux system standard directories and File, also referred to as root file system.
Based on above-mentioned docker architecture diagram shown in fig. 5, as shown in fig. 6, node provided in an embodiment of the present invention 02 also increases If mirror image management module 100 (i.e. Images Manager), mirror image management module 100 can take with server-side 12 and warehouse respectively Business device 01 is communicated, and the agency of warehouse server 01 is accessed as client 11.
In addition, mirror image management module 100 is also used to safeguard that the metadata of the mirror image on node 02 and maintenance image are being divided Whether the reference number in cloth storage system 03, the mirror image data for judging that node 02 needs are deposited in distributed memory system 03 Wait.
Hereinafter, the docker system that will be provided in conjunction with Fig. 2-Fig. 6, elaborates a kind of mirror image provided in an embodiment of the present invention Management method, wherein mirror image management method provided in an embodiment of the present invention specifically can be related to downloading (pull) method of mirror image, mirror Upload (push) method of picture and deletion (delete) method of mirror image will be introduced one by one in following examples.
As shown in fig. 7, the embodiment of the present invention provides a kind of image download method, comprising:
101, first node sends downloading request to warehouse server, and the mark of the first metadata is carried in downloading request Know.
102, warehouse server searches the first metadata corresponding with the mark of the first metadata according to downloading request.
103, first node receives the first metadata that warehouse server is sent,
104, first node is by the ware-house here in first meta-data preservation to first node.
105, first node will execute for the preset reference counter of the first mirror image plus 1 operates.
106, whether first node is searched and is stored with and this first yuan in distributed memory system according to first metadata Corresponding first mirror image data of data.
If 107, being stored with the first mirror image data in distributed memory system, first node is from distributed memory system It obtains this and takes the first mirror image data.
In a step 101, when first node (first node is any node in above-mentioned docker system) needs to make With the first mirror image (first mirror image include the first mirror image data and the first metadata), and be not stored in first node this When the first metadata of one mirror image, first node sends downloading request to warehouse server, carries first in downloading request The mark of metadata, for example, the ID etc. of the first metadata.
For example, as shown in Fig. 2, be stored with the metadata of mirror image 1 in node 1, mirror image 1 and mirror image 2 are stored in node 2 Metadata, and the mirror image data of mirror image 1 and mirror image 2 is uniformly stored in distributed memory system 03, then, when node 1 needs When wanting the mirror image data of mirror image 2, however, it is determined that the metadata of itself not memory image 2 then sends downloading to warehouse server and asks It asks, the mark of the metadata of mirror image 2 is carried in downloading request.
Specifically, as shown in fig. 6, client 11 in first node generates downloading request, and it is sent to server-side 12, mirror Picture 100 agency service end 12 of management module is communicated with warehouse server, sends downloading request to warehouse server.
In a step 102, it after the downloading that warehouse server receives first node transmission is requested, is taken according in downloading request The mark of first metadata of band searches the first metadata corresponding with the mark of the first metadata.Wherein, in warehouse server It is stored with the metadata of all mirror images in docker system.
Further, the first metadata found is sent to the mirror image management module of first node by warehouse server 100。
In step 103, mirror image management module 100 receives first metadata of warehouse server transmission.
In turn, at step 104, first node is by the ware-house here in first meta-data preservation to first node, into And the first mirror image data is obtained by executing following step 105-106, the first mirror image is needed again in order to which first node is subsequent It, can be by searching for the first metadata being locally stored, directly according to the title or leaf of the first mirror image in the first metadata when data The attributes such as sub- ID obtain this from distributed memory system and take the first mirror image data.
In step 105, if mirror image management module 100 receive warehouse server transmission first metadata, first Node can also execute the reference counter of the first mirror image plus 1 operation.
Specifically, can be the preset reference counter of each mirror image, for recording the mirror in docker system The access times of picture, for the reference counter of some mirror image, which be may be provided in distributed memory system, N number of node in docker system can share the reference counter, and when node executes image download operation, mirror image manages mould Block 100 just carries out the reference counter of corresponding mirror image plus 1 operates, since the same mirror image can be made by multiple nodes simultaneously With therefore, the reference counter of the mirror image may be used to indicate the access times of the mirror image, and when counter is 0, then explanation does not have Node uses the mirror image.
It should be noted that step 104-105 is optional step, also, the execution sequence of step 104 and step 105 is not It limits.
In step 106, first metadata that mirror image management module 100 is sent according to warehouse server, can be with service Communication is established at end 12, and then searches in distributed memory system whether be stored with the first mirror image number corresponding with first metadata According to.
Due to giving two kinds of docker systems as shown in Figure 2 and Figure 4 respectively in the embodiment of the present invention, it is based on Docker system shown in Fig. 2, the storage unit due to being used for memory image data in warehouse server are not disposed on distribution In storage system, therefore, the first mirror image data of the first mirror image needed for first node is possible to be stored in the distributed storage In system, it is also possible to it is stored in warehouse server, at this point, after first node receives the first metadata, due to first yuan The attributive character such as title, the label of the first mirror image data are carried in data, therefore, first node can be according to the first mirror image number According to attributive character search distributed memory system in whether be stored with the first mirror image data corresponding with first metadata.
Further, if being stored with the first mirror image data, in step 107, first node in distributed memory system This is obtained from the distributed memory system and takes the first mirror image data, if not stored in distributed memory system have the first mirror image number According to then first node can obtain the first mirror image data corresponding with first metadata out of warehouse server.
In addition, docker system based on shown in Fig. 4, due to being used for the storage list of memory image data in warehouse server Member also can be set in distributed memory system, that is to say, that the mirror image data and each node stored in warehouse server Interior mirror image data, is respectively positioned in distributed memory system, therefore, can direct root after first node receives the first metadata This is obtained from the distributed memory system according to the attributive character of the first mirror image data carried in the first metadata takes the first mirror image Data.
So far, it is based on above-mentioned docker system, the embodiment of the present invention provides a kind of image download method, wherein first Node sends downloading request to warehouse server, the mark of the first metadata is carried in downloading request, so as to warehouse Server searches the first metadata corresponding with the mark of the first metadata according to downloading request;In turn, if receiving warehouse clothes The first metadata that business device is sent, then first node is obtained from distributed memory system and first yuan of number according to the first metadata According to corresponding first mirror image data, so, during image download, due to mirror image in each node in docker system Mirror image data is stored in distributed memory system, therefore, only needs to transmit mirror image between first node and warehouse server Metadata, without transmit mirror image mirror image data, the number of transmissions of mirror image data can be reduced, and improve memory space Utilization rate, to reduce the expense of docker system.
In addition, the step 101-107 in based on the above embodiment, the embodiment of the present invention also provides a kind of mirror image deletion side Method, this method are used to delete the mirror image in docker system in arbitrary node.
Illustratively, for deleting the first mirror image in above-described embodiment in first node, which includes the One metadata and the first mirror image data.
Specifically, the client 11 in first node sends the removal request for deleting the first mirror image, service to server-side 12 The removal request is forwarded to mirror image management module 100 by end 12, and mirror image management module 100 deletes first segment according to the removal request The first metadata stored in point, in turn, reference meter of the mirror image management module 100 to the first mirror image in distributed memory system Operation that number device execution subtracts 1, to indicate that the access times of first mirror image subtract 1.
As can be seen that since the first mirror image can be used by multiple nodes simultaneously in distributed memory system, the One node is not necessarily to delete the first mirror image data of the first mirror image, need to only delete the first metadata stored in first node, and will The reference counter of first mirror image subtracts 1.
Further, as shown in figure 8, by taking above-mentioned first node uploads the first mirror image to warehouse server as an example, the present invention Embodiment provides a kind of mirror image method for uploading, comprising:
201, first node generates the first mirror image, which includes the first mirror image data and the first metadata.
202, first node sends upload request to warehouse server, carries the first metadata in the upload request.
203, warehouse server saves first metadata.
204, (optional) warehouse server sends first to first node and uploads success message.
205, (optional) first node sends the first mirror image data to warehouse server.
206, (optional) warehouse server saves first mirror image data into distributed memory system.
207, (optional) warehouse server sends second to first node and uploads success message.
In step 201, first node (first node is any node in above-mentioned docker system) was being run New mirror image is produced in journey, which is the first mirror image described in step 201, which specifically includes the first mirror As data and the first metadata.
In step 202, after first node generates the first mirror image, first node sends to upload to warehouse server and ask Ask, request by first mirrored storage into warehouse server, can be with when needing in order to other nodes using first mirror image By sending downloading request first mirror image to warehouse server, wherein carried in the upload request that first node is sent There is the first metadata of first mirror image.
What needs to be explained here is that the step of generating first mirror image can be executed by the server-side 12 in first node, So, when the server-side of first node 12 is arranged in the distributed memory system shown in Fig. 2 or Fig. 4, server-side 12 is raw At the first mirror image in include the first mirror image data be just stored directly in the distributed memory system, at this point, in step In 203, after warehouse server receives first metadata that first node is sent, first metadata is directly saved.
Optionally, after warehouse server saves first metadata, in step 204, warehouse server can be with First is sent to first node and uploads success message, to inform that first node first metadata uploads successfully.
As can be seen that in this case, first node need to only upload first number of the new mirror image generated to warehouse server According to, without uploading the mirror image data of new mirror image, so as to reduce the number of transmissions of mirror image data in docker system, reduction The expense of entire docker system.
Or when server-side 12 is not disposed in distributed memory system shown in Fig. 4, first node is for general First mirror image data is stored into the distributed memory system, it is also necessary to execute step 205-207.
Wherein, in step 205, first node sends first mirror image data to warehouse server.In turn, in step In 206, warehouse server can call warehouse as shown in Figure 4 to drive 04, which is saved to distributed storage In system.Same optional, warehouse server can also send second to first node and upload success message, to inform first segment Point first mirror image data uploads successfully.
In addition, the step 101-107 and step 201-207, the embodiment of the present invention in based on the above embodiment are also mentioned For another mirror image delet method, this method is used to delete the mirror image in the warehouse server in docker system.
Illustratively, as shown in figure 9, (first mirror image includes the first mirror to delete the first mirror image in warehouse server As data and the first metadata) for, the embodiment of the present invention provides a kind of mirror image delet method, comprising:
301, warehouse server receives the removal request that first node is sent, which, which is used to indicate, deletes warehouse clothes The first mirror image being engaged in device.
302, warehouse server deletes the first metadata in warehouse server according to the removal request.
303, warehouse server judges whether the reference counter of the first mirror image is 0.
If 304, the reference counter of the first mirror image is 0, warehouse server deletion is stored in distributed memory system The first mirror image data.
In step 301, the service in first node (first node is any node in above-mentioned docker system) End 12, such as HTTP server can send removal request to warehouse server, which, which is used to indicate, deletes warehouse clothes The first mirror image being engaged in device, for example, carrying the mark of the first metadata of the first mirror image in the removal request.
In turn, in step 302, warehouse server is according to the removal request received, first deletion warehouse server The first interior metadata.
Further, since the mirror image data of mirror image is uniformly stored in distributed storage in each node in docker system In system, even, the mirror image data in warehouse server also be can store in the distributed memory system, therefore, warehouse clothes Device be engaged in when deleting the first mirror image data of the first mirror image, it is thus necessary to determine that after first mirror image is not used in each node, ability Delete first mirror image data.
Certainly, since above-mentioned removal request is that first node is sent to warehouse server, warehouse server can write from memory Recognize first node and first mirror image is not used, and then need to only determine that first mirror is not used in other nodes in addition to first node As.
Illustratively, as previously mentioned, in docker system, it can be the preset reference counter of each mirror image, be used to The access times of the mirror image are recorded, therefore, in step 303, warehouse server can be by judging the reference meter of the first mirror image Whether number devices are 0, to determine whether first mirror image is used by one or more nodes.
Specifically, warehouse server can drive 04 to search first in distributed memory system with the warehouse in calling figure 4 The reference counter of mirror image illustrates do not have node in current docker system if the reference counter of the first mirror image is 0 Using first mirror image, at this point, in step 304, warehouse server deletes the first mirror being stored in distributed memory system As data, to complete the delete operation of first mirror image.
So far, a kind of mirror image management method provided in an embodiment of the present invention specifically may include method for down loading, the mirror image of mirror image Method for uploading and mirror image delet method, wherein, can be to mirror image in docker system provided in an embodiment of the present invention Mirror image data and metadata are managed respectively, and the mirror image data of mirror image is uniformly stored in distributed memory system in each node In, that is to say, that each node can share the mirror image data in distributed memory system, so, not only can be to avoid existing Have in technology the problem of saving identical mirror image in great deal of nodes and lead to the waste of memory space, also make each node and Warehouse server only needs to manage the metadata of mirror image in itself, so as to reduce the number of transmissions of mirror image data, reduces The expense of docker system.
Figure 10 is a kind of structural schematic diagram of docker system interior nodes 02 provided in an embodiment of the present invention, and the present invention is implemented The node 02 that example provides can be used for implementing the method that above-mentioned Fig. 2-various embodiments of the present invention shown in Fig. 9 are realized, for the ease of Illustrate, only parts related to embodiments of the present invention are shown, and it is disclosed by specific technical details, referring to figure 2. shown in-Fig. 9 Various embodiments of the present invention.
Specifically, as shown in Figure 10, node 02 includes: mirror image generation unit 21, transmission unit 22 and storage unit 23.
Wherein, mirror image generation unit 21, for generating the first mirror image, first mirror image includes the first metadata and first Mirror image data;
Transmission unit 22 carries described first in the upload request for sending upload request to warehouse server Metadata, so that the warehouse server saves first metadata;
Storage unit 23, for saving first mirror image data into the distributed memory system.
Further, the transmission unit 22 is also used to send first mirror image data to the warehouse server, with So that the warehouse server saves first mirror image data into the distributed memory system.
Further, as shown in figure 11, the node 02 further includes acquiring unit 24 and searching unit 25, wherein
The transmission unit 22 is also used to send downloading request to the warehouse server, carries in the downloading request There is the mark of the first metadata;
The acquiring unit 24, for receiving the corresponding with the mark of first metadata of the warehouse server transmission The first metadata;And if first mirror image data is stored in the distributed memory system, from the distribution First mirror image data is obtained in storage system;
The searching unit 25, for searching in the distributed memory system and whether depositing according to first metadata Contain the first mirror image data corresponding with first metadata.
Further, the acquiring unit 24, if being also used to not stored in the distributed memory system have described first Mirror image data then obtains first mirror image data from the warehouse server.
Further, the preservation node 23, the sheet being also used in first meta-data preservation to the first node Ground warehouse.
Further, as shown in figure 12, the node 02 further include:
Counting unit 26, for the reference counter execution plus 1 operation preset for the first mirror image.
Further, as shown in figure 13, the node 02 further includes deleting unit 27, wherein
The deletion unit 27, for deleting first metadata in the first node;
The counting unit 26 is also used to subtract 1 to the reference counter execution operation.
Wherein, above-mentioned image generation unit 21, transmission unit 22, storage unit 23, transmission unit 24, acquiring unit 24, The concrete function of searching unit 25 and counting unit 26 can mirror image management module 100 as shown in Figure 6 with it is shown in fig. 6 Client 11, server 12, driving 13, Container Management library 14 and container 15 interact realization.
In addition, Figure 14 is the structural representation of warehouse server 01 in a kind of docker system provided in an embodiment of the present invention Figure, warehouse server 01 provided in an embodiment of the present invention can be used for implementing above-mentioned Fig. 2-various embodiments of the present invention shown in Fig. 9 The method of realization, for ease of description, only parts related to embodiments of the present invention are shown, and particular technique details does not disclose , referring to figure 2.-various embodiments of the present invention shown in Fig. 9.
Specifically, as shown in figure 14, warehouse server 01 includes: receiving unit 31 and deletion unit 32.
Wherein, receiving unit 31, for receiving the removal request of first node transmission, the removal request, which is used to indicate, is deleted Except the first mirror image in the warehouse server, first mirror image includes the first metadata and the first mirror image data, and described the One node is any of N number of node in the docker system;
Unit 32 is deleted, for deleting first metadata in the warehouse server according to the removal request; If first mirror image is not used in each node, described first be stored in the distributed memory system is deleted Mirror image data.
Further, as shown in figure 15, the warehouse server 01 further includes judging unit 33, wherein the judgement is single Member 33, for judging whether the reference counter of first mirror image is 0;The deletion unit 32, if being specifically used for described the The reference counter of one mirror image is 0, then deletes first mirror image data being stored in the distributed memory system.
As shown in figure 16, warehouse server 01 shown in node 02 or Figure 14-15 shown in Figure 10-13 can be to scheme The mode of computer equipment (or system) in 16 is realized.
Figure 16 show computer equipment schematic diagram provided in an embodiment of the present invention.Computer equipment 100 includes at least one A processor 41, communication bus 42, memory 43 and at least one communication interface 44.
For example, the concrete function of above-mentioned receiving unit 31, deletion unit 32 and judging unit 33 can be taken by warehouse The computer instruction in the calling memory 43 of processor 41 being engaged in device 01 is realized.
Specifically, processor 41 can be a general central processor (CPU), microprocessor, the integrated electricity of specific application Road (application-specific integrated circuit, ASIC), or it is one or more for controlling present invention side The integrated circuit that case program executes.
Communication bus 42 may include an access, and information is transmitted between said modules.The communication interface 44, use is any The device of transceiver one kind is used for and other equipment or communication, such as Ethernet, wireless access network (RAN), wireless office Domain net (Wireless Local Area Networks, WLAN) etc..
Memory 43 can be read-only memory (read-only memory, ROM) or can store static information and instruction Other kinds of static storage device, random access memory (random access memory, RAM) or letter can be stored The other kinds of dynamic memory of breath and instruction, is also possible to Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact Disc Read- Only Memory, CD-ROM) or other optical disc storages, optical disc storage (including compression optical disc, laser disc, optical disc, digital universal Optical disc, Blu-ray Disc etc.), magnetic disk storage medium or other magnetic storage apparatus or can be used in carrying or store to have referring to Enable or data structure form desired program code and can by any other medium of computer access, but not limited to this. Memory 43, which can be, to be individually present, and is connected by bus with processor.Memory 43 can also be integrated in one with processor It rises.
Wherein, the memory 43 be used for store execution the present invention program application code, and by processor 41 Control executes.The processor 41 is for executing the application code stored in the memory 43.
In the concrete realization, as one embodiment, processor 41 may include one or more CPU, such as in Figure 16 CPU0 and CPU1.
In the concrete realization, as one embodiment, computer equipment 100 may include multiple processors, such as Figure 16 In processor 41 and processor 48.Each of these processors can be monokaryon (single-CPU) processor, It is also possible to multicore (multi-CPU) processor.Here processor can refer to one or more equipment, circuit, and/or For handling the processing core of data (such as computer program instructions).
In the concrete realization, as one embodiment, computer equipment 100 can also include that output equipment 45 and input are set Standby 46.Output equipment 45 and processor 41 communicate, and can show information in many ways.For example, output equipment 45 can be Liquid crystal display (liquid crystal display, LCD), Light-Emitting Diode (light emitting diode, LED) are aobvious Show equipment, cathode-ray tube (cathode ray tube, CRT) shows equipment or projector (projector) etc..Input is set It is communicated for 46 and processor 41, the input of user can be received in many ways.For example, input equipment 46 can be mouse, key Disk, touch panel device or sensing equipment etc..
Above-mentioned computer equipment 100 can be a general purpose computing device either dedicated computing machine equipment. In the concrete realization, computer equipment 100 can be desktop computer, portable computer, network server, palm PC (Personal Digital Assistant, PDA), cell phone, tablet computer, wireless terminal device, communication equipment, insertion Formula equipment or the equipment for having similar structures in Figure 16.The unlimited type for determining computer equipment 100 of the embodiment of the present invention.
It should be noted that in present example, any one functional node in above-mentioned docker system, for example, Warehouse server 01, node 02 may be realized by an entity device, it is also possible to it is realized jointly by multiple entity devices, Each functional node in docker system may be realized by different entity devices respectively, it is also possible to all be set by the same entity It is standby to realize.It is understood that any one functional node in docker system all may be that one in entity device patrols Collect functional module, it is also possible to a logic functional block being made of multiple entity devices.
So far, a kind of mirror image managing device provided in an embodiment of the present invention, specifically includes warehouse server and each node, Wherein, in docker system provided in an embodiment of the present invention, can mirror image data to mirror image and metadata be managed respectively, The mirror image data of mirror image is uniformly stored in distributed memory system in each node, that is to say, that each node can be shared point Mirror image data in cloth storage system so not only can be identical to avoid saving in great deal of nodes in the prior art Mirror image and the problem of lead to the waste of memory space, also make each node and warehouse server only need to manage itself scope The metadata of picture reduces the expense of docker system so as to reduce the number of transmissions of mirror image data.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, can be with reference to corresponding in preceding method embodiment Journey, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the module or The division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units Or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, institute Display or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit Indirect coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk Etc. the various media that can store program code.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (19)

1. a kind of mirror image management method, which is characterized in that the method is applied to containment system, and the containment system includes warehouse Server and the N number of node being connected with the warehouse server, each node include memory module, and N is more than or equal to 2 Integer;The described method includes:
First node sends downloading request to the warehouse server, and first yuan of the first mirror image is carried in the downloading request The mark of data, the first node are any of described N number of node;
The first node receives the warehouse server and sends first metadata;
The first node obtains first mirror image according to first metadata from the memory module of N number of node First mirror image data.
2. method according to claim 1, which is characterized in that the first node is according to first metadata from institute It states before obtaining first mirror image data in the memory module of N number of node, the method also includes:
The first node is determined and is stored in the memory module of N number of node and described according to first metadata Corresponding first mirror image data of one metadata.
3. any method in -2 according to claim 1, which is characterized in that receive the warehouse in the first node After the first metadata that server is sent, the method also includes:
The first node is by the ware-house here in first meta-data preservation to the first node.
4. method according to claim 3, which is characterized in that the first node by first meta-data preservation extremely After ware-house here in the first node, the method also includes:
The first node is executed to the reference counter of first mirror image plus 1 operation.
5. method according to any one of claims 1-4, which is characterized in that the method also includes:
The first node generates the second mirror image, and second mirror image includes the second metadata and the second mirror image data;
The first node sends upload request to the warehouse server, carries the binary number in the upload request According to so that the warehouse server saves first metadata;
The first node saves second mirror image data to the memory module of N number of node.
6. method according to claim 5, which is characterized in that the first node saves second mirror image data To the memory module of N number of node, comprising:
The first node sends second mirror image data to the warehouse server, so that the warehouse server is by institute The second mirror image data is stated to save to the memory module of N number of node.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
The first node determines the third mirror image deleted in the first node, and the third mirror image includes third metadata;
The first node deletes the third metadata in the first node;
The first node is to the reference counter of first mirror image execution operation that subtracts 1.
8. a kind of mirror image management method, which is characterized in that the method is applied to containment system, and the containment system includes warehouse Server and the N number of node being connected with the warehouse server, each node include memory module, and N is more than or equal to 2 Integer;The described method includes:
The warehouse server receives the removal request that first node is sent, and the removal request, which is used to indicate, deletes the warehouse The first mirror image in server, first mirror image include the first metadata and the first mirror image data, and the first node is institute State any of N number of node in containment system;
The warehouse server deletes first metadata in the warehouse server according to the removal request;
If first mirror image is not used in N number of node, the warehouse server deletion is stored in N number of node First mirror image data in memory module.
9. according to the method described in claim 8, it is characterized in that, if first mirror image is not used in N number of node, The warehouse server deletes the first mirror image data being stored in the memory module of N number of node, comprising:
The warehouse server judges whether the reference counter of first mirror image is 0;
If the reference counter of first mirror image is 0, the warehouse server deletes the storage for being stored in N number of node First mirror image data in module.
10. a kind of containment system, which is characterized in that the system comprises: warehouse server and with the warehouse server phase N number of node even, each node include memory module, and N is the integer more than or equal to 2;Wherein,
First node is used for: Xiang Suoshu warehouse server sends downloading request, carries the first mirror image in the downloading request The mark of first metadata, the first node are any of described N number of node;It receives the warehouse server and sends institute State the first metadata;The of first mirror image is obtained from the memory module of N number of node according to first metadata One mirror image data;
The warehouse server, is used for: receiving the downloading request that the first node is sent;According in downloading request The first metadata identifier lookup described in the first metadata;And first metadata is sent to the first node.
11. system according to claim 10, which is characterized in that according to first metadata from N number of node Memory module in obtain first mirror image data before, the first node is also used to:
According to first metadata, determine be stored in the memory module of N number of node it is corresponding with first metadata The first mirror image data.
12. any system in 0-12 according to claim 1, which is characterized in that receiving the warehouse server hair After the first metadata sent, the first node is also used to:
By the ware-house here in first meta-data preservation to the first node.
13. wanting system described in 12 according to right, which is characterized in that by first meta-data preservation to the first node After interior ware-house here, the first node is also used to:
The reference counter of first mirror image is executed plus 1 operates.
14. any system in 0-13 according to claim 1, which is characterized in that
The first node is also used to: generating the second mirror image, second mirror image includes the second metadata and the second mirror image data; Second mirror image data is saved to the memory module of N number of node;Upload request, institute are sent to the warehouse server It states and carries second metadata in upload request;
The warehouse server, is used for: receiving the upload request that the first node is sent;And save the upload request In second metadata.
15. system according to claim 14, which is characterized in that the warehouse server includes warehouse driving;Wherein,
Second mirror image data is saved to the memory module of N number of node, is specifically included: the first node is used for: Second mirror image data is sent to the warehouse server;
The warehouse server, is also used to: receiving second mirror image data that the first node is sent;And call the storehouse Library driving saves second mirror image data to the memory module of N number of node.
16. system according to claim 15, which is characterized in that
The first node, is also used to: determining the third mirror image deleted in the first node, the third mirror image includes third Metadata;Delete the third metadata in the first node;Delete first metadata in the first node; To the reference counter of first mirror image execution operation that subtracts 1.
17. system described in any one of 0-16 according to claim 1, which is characterized in that
The first node is also used to send removal request to the warehouse server, and the removal request is used to indicate deletion The third mirror image in the warehouse server;
The warehouse server, is also used to: receiving the removal request that the first node is sent;It is asked according to the deletion It asks, deletes the third metadata in the warehouse server;If the third mirror image is not used in N number of node, Delete the mirror image data for the third mirror image being stored in the memory module of N number of node.
18. a kind of node, which is characterized in that the node is suitable for containment system, and the containment system includes warehouse server With N number of node;The node includes interface & processor, and the interface is used for and other nodes in N number of node And the warehouse server communication, the processor require method described in 1-7 for perform claim, N is more than or equal to 2 Integer.
19. a kind of warehouse server, which is characterized in that the warehouse server belongs to containment system, and the containment system also wraps N number of node is included, the warehouse server includes interface & processor, and the interface with N number of node for communicating, the place It manages device and requires method described in 8-9 for perform claim, N is for the integer more than or equal to 2.
CN201910145316.2A 2016-01-26 2016-01-26 Mirror image management method, device and system Active CN109976667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910145316.2A CN109976667B (en) 2016-01-26 2016-01-26 Mirror image management method, device and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910145316.2A CN109976667B (en) 2016-01-26 2016-01-26 Mirror image management method, device and system
CN201610051837.8A CN105740048B (en) 2016-01-26 2016-01-26 A kind of mirror image management method, apparatus and system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201610051837.8A Division CN105740048B (en) 2016-01-26 2016-01-26 A kind of mirror image management method, apparatus and system

Publications (2)

Publication Number Publication Date
CN109976667A true CN109976667A (en) 2019-07-05
CN109976667B CN109976667B (en) 2021-09-14

Family

ID=56247362

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201610051837.8A Active CN105740048B (en) 2016-01-26 2016-01-26 A kind of mirror image management method, apparatus and system
CN201910145316.2A Active CN109976667B (en) 2016-01-26 2016-01-26 Mirror image management method, device and system

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201610051837.8A Active CN105740048B (en) 2016-01-26 2016-01-26 A kind of mirror image management method, apparatus and system

Country Status (1)

Country Link
CN (2) CN105740048B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347535A (en) * 2019-07-16 2019-10-18 北京谷数科技有限公司 A method of promoting dual controller write performance
CN111221623A (en) * 2019-12-26 2020-06-02 中科曙光国际信息产业有限公司 Mirror image library management system

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107797806A (en) * 2016-08-29 2018-03-13 北京雪球信息科技有限公司 A kind of dispositions method of program
CN106506587B (en) * 2016-09-23 2021-08-06 中国人民解放军国防科学技术大学 Docker mirror image downloading method based on distributed storage
CN106708599B (en) * 2016-12-01 2020-08-25 携程旅游信息技术(上海)有限公司 Virtual machine mirror image issuing system and method
CN108205481B (en) * 2016-12-19 2022-03-08 华为技术有限公司 Application container instance creation method and device
CN106997392B (en) * 2017-04-10 2020-03-03 北京搜狐新媒体信息技术有限公司 Processing method and device and reading method and device of Docker mirror image cache information
CN107105054B (en) * 2017-05-17 2019-12-24 苏州浪潮智能科技有限公司 Mirror image garbage cleaning system and method for docker mirror image warehouse
CN107515776B (en) * 2017-07-18 2021-04-09 深信服科技股份有限公司 Method for upgrading service continuously, node to be upgraded and readable storage medium
CN107450961B (en) * 2017-09-22 2020-10-16 济南浚达信息技术有限公司 Distributed deep learning system based on Docker container and construction method and working method thereof
CN109669808A (en) * 2017-10-17 2019-04-23 中移(苏州)软件技术有限公司 A kind of method and apparatus of system backup
CN109962843B (en) * 2017-12-22 2021-04-27 上海威派格智慧水务股份有限公司 Method for realizing edge information processing of gateway of Internet of things
CN108156246B (en) * 2017-12-27 2020-12-04 北京微网通联股份有限公司 File distribution method, system, server and client
CN110099076A (en) * 2018-01-29 2019-08-06 中兴通讯股份有限公司 A kind of method and its system that mirror image pulls
CN110198330B (en) * 2018-03-27 2022-03-22 腾讯科技(深圳)有限公司 Mirror image downloading method and device
US11132293B2 (en) 2018-04-10 2021-09-28 Red Hat Israel, Ltd. Intelligent garbage collector for containers
CN108647248B (en) * 2018-04-16 2021-03-09 新华三技术有限公司成都分公司 WORM state monitoring transfer method and device
CN110908671A (en) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 Method and device for constructing docker mirror image and computer readable storage medium
CN109936571B (en) * 2019-02-22 2020-05-29 全球能源互联网研究院有限公司 Mass data sharing method, open sharing platform and electronic equipment
CN109951551B (en) * 2019-03-21 2021-03-19 联想(北京)有限公司 Container mirror image management system and method
CN110119251B (en) * 2019-05-14 2023-01-03 北京杰思安全科技有限公司 Buffer control method and system based on disk large flow
CN110704162B (en) * 2019-09-27 2022-09-20 北京百度网讯科技有限公司 Method, device and equipment for sharing container mirror image by physical machine and storage medium
CN113872999A (en) * 2020-06-30 2021-12-31 中兴通讯股份有限公司 Mirror image distribution method, electronic device and storage medium
CN112748879B (en) * 2020-12-30 2023-03-10 中科曙光国际信息产业有限公司 Data acquisition method, system, device, computer equipment and storage medium
CN117667298A (en) * 2022-08-31 2024-03-08 成都华为技术有限公司 Method and device for starting container, computing node and shared storage equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100036879A1 (en) * 2008-05-08 2010-02-11 Thomas Friese Method, computer-readable medium, and system for storing, allocating and retrieving medical image data in a distributed computerized system of a clinical facility.
CN103761275A (en) * 2014-01-09 2014-04-30 浪潮电子信息产业股份有限公司 Management method for metadata in distributed file system
CN104391802A (en) * 2014-11-24 2015-03-04 浪潮电子信息产业股份有限公司 Streamline pool metadata node refreshing consistency protecting method
CN104516967A (en) * 2014-12-25 2015-04-15 国家电网公司 Electric power system mass data management system and use method thereof
US20150149410A1 (en) * 2013-11-27 2015-05-28 Microsoft Corporation Publishing to a content delivery system
WO2015127083A2 (en) * 2014-02-21 2015-08-27 Solidfire, Inc. Data syncing in a distributed system
CN104885076A (en) * 2012-05-10 2015-09-02 以太存储股份有限公司 Systems and methods for distributed storage

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8495356B2 (en) * 2010-12-31 2013-07-23 International Business Machines Corporation System for securing virtual machine disks on a remote shared storage subsystem
CN102932415B (en) * 2012-09-26 2015-04-15 东软集团股份有限公司 Method and device for storing mirror image document
CN103544045A (en) * 2013-10-16 2014-01-29 南京大学镇江高新技术研究院 HDFS-based virtual machine image storage system and construction method thereof
CN104731516B (en) * 2013-12-18 2019-03-01 腾讯科技(深圳)有限公司 A kind of method, apparatus and distributed memory system of accessing file
CN105045656B (en) * 2015-06-30 2018-11-30 深圳清华大学研究院 Big data storage and management method based on virtual container
CN104951308B (en) * 2015-06-30 2019-05-21 北京奇虎科技有限公司 The management optimization mode and device of Docker Registry
CN105187500A (en) * 2015-08-07 2015-12-23 浪潮(北京)电子信息产业有限公司 Container-based distributed storage system deployment method
CN105094924B (en) * 2015-08-21 2018-06-26 华为技术有限公司 The introduction method and device of image file

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100036879A1 (en) * 2008-05-08 2010-02-11 Thomas Friese Method, computer-readable medium, and system for storing, allocating and retrieving medical image data in a distributed computerized system of a clinical facility.
CN104885076A (en) * 2012-05-10 2015-09-02 以太存储股份有限公司 Systems and methods for distributed storage
US20150149410A1 (en) * 2013-11-27 2015-05-28 Microsoft Corporation Publishing to a content delivery system
CN103761275A (en) * 2014-01-09 2014-04-30 浪潮电子信息产业股份有限公司 Management method for metadata in distributed file system
WO2015127083A2 (en) * 2014-02-21 2015-08-27 Solidfire, Inc. Data syncing in a distributed system
CN104391802A (en) * 2014-11-24 2015-03-04 浪潮电子信息产业股份有限公司 Streamline pool metadata node refreshing consistency protecting method
CN104516967A (en) * 2014-12-25 2015-04-15 国家电网公司 Electric power system mass data management system and use method thereof

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110347535A (en) * 2019-07-16 2019-10-18 北京谷数科技有限公司 A method of promoting dual controller write performance
CN110347535B (en) * 2019-07-16 2020-05-26 北京谷数科技股份有限公司 Method for improving writing performance of double controllers
CN111221623A (en) * 2019-12-26 2020-06-02 中科曙光国际信息产业有限公司 Mirror image library management system
CN111221623B (en) * 2019-12-26 2024-01-19 中科曙光国际信息产业有限公司 Mirror image library management system

Also Published As

Publication number Publication date
CN105740048A (en) 2016-07-06
CN105740048B (en) 2019-03-08
CN109976667B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN105740048B (en) A kind of mirror image management method, apparatus and system
US10291704B2 (en) Networked solutions integration using a cloud business object broker
CN109582441A (en) For providing system, the method and apparatus of container service
Teng et al. A medical image archive solution in the cloud
CN103620549B (en) The storage medium stored for uniform data is abstract
US8788760B2 (en) Adaptive caching of data
CN110447017A (en) Rule-based modification in Data-Storage Equipment monitor
CN108885554A (en) Specific dispersion computer system
CN111901294A (en) Method for constructing online machine learning project and machine learning system
JP2021515294A (en) Transaction processing in a multi-master distributed data management system
US20190005067A1 (en) Multi-tenant data service in distributed file systems for big data analysis
CN105515872B (en) The update method of configuration information, apparatus and system
US11630695B1 (en) Dynamic reassignment in a search and indexing system
CN104160381A (en) Managing tenant-specific data sets in a multi-tenant environment
CN108027828A (en) It is synchronous with the trust instrument of stateless synchronization node
WO2020215752A1 (en) Graph computing method and device
CN101388891A (en) Apparatus and method for managing presence information of a presentity
CN108196787A (en) The quota management method and cluster storage system of cluster storage system
CN109992956A (en) The processing method and relevant apparatus of the security strategy of container
JP6760904B2 (en) Information processing equipment, information processing methods, and information processing programs
US11693710B1 (en) Workload pool hierarchy for a search and indexing system
CN107408239A (en) Carry out the framework of Mass Data Management in communication applications by multiple mailboxes
CN110457257A (en) Archives knowledge managing device and mobile terminal for mobile terminal
CN109445966A (en) Event-handling method, device, medium and calculating equipment
US10423785B2 (en) Data scanning within distributed computing components

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220218

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right