CN107247793A - The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse - Google Patents

The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse Download PDF

Info

Publication number
CN107247793A
CN107247793A CN201710473796.6A CN201710473796A CN107247793A CN 107247793 A CN107247793 A CN 107247793A CN 201710473796 A CN201710473796 A CN 201710473796A CN 107247793 A CN107247793 A CN 107247793A
Authority
CN
China
Prior art keywords
mirror image
warehouse
event
under control
area under
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
CN201710473796.6A
Other languages
Chinese (zh)
Other versions
CN107247793B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710473796.6A priority Critical patent/CN107247793B/en
Publication of CN107247793A publication Critical patent/CN107247793A/en
Priority to PCT/CN2018/083947 priority patent/WO2018233370A1/en
Application granted granted Critical
Publication of CN107247793B publication Critical patent/CN107247793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses the mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system, when its mirror image synchronization method first receives the mirror image that a certain available area warehouse is pushed by cloud area under control warehouse, cloud area under control control unit is notified to receive mirror image event;Afterwards, cloud area under control control unit parsing mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control warehouse by mirror image synchronization to corresponding available area warehouse.The present invention in cloud area under control, each Free Region by being respectively provided with control unit and warehouse, by monitoring the event in Docker mirror images warehouse, to realize the mirror image synchronization in cloud area under control and each Free Region, so that the problem of solving Docker mirror image real-time synchronizations.

Description

The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse
Technical field
The present invention relates to Docker technical fields, and in particular to the mirror image synchronization method and mirror image in Docker mirror images warehouse are same Step system.
Background technology
Docker(Docker is the application container an increased income engine, allow developer can pack they application and Bag is relied on into a transplantable container, is then published on any popular Linux machines, can also be realized virtual Change)The container technique of offer allows to run several containers (container), each container on same main frame or virtual machine It is exactly an independent virtual environment or application.
Container derives from Docker mirror images (image), and mirror image can be made by oneself by user or be submitted by operating container To generate, after mirror image generation, it can push and be preserved in (push) to mirror image warehouse (registry), can also be from mirror image storehouse Storehouse pulls (pull) to local to run container.
Docker provides official's mirror image warehouse (Docker hub), while allowing user voluntarily to build privately owned mirror image warehouse (private registry).The use of privately owned mirror image warehouse is necessary, to protect for most of mechanisms and tissue The mirrored content in warehouse and use.
Mirror image in the form of Bedding storage to be stored in file system, and different mirror images may share some layers (layer), to save Save memory space.Built for the warehouse for being related to multizone user access, when needing unified management mirror image, mirror image synchronization is one The necessary work of item, to ensure that the mirror image scope that user uses is not limited to some region.
Mirror image synchronization can be realized that one of which is shared storage, i.e., the warehouse in multiple regions by kinds of schemes (registry)The shared network storage disk of one piece of carry, thereby may be ensured that the warehouse for having mirror image to push to certain region every time (registry)When, all warehouses(registry)Can be synchronous immediately.But sometimes, the registry of multizone can not share Store, and each interregional network can not be accessed mutually, i.e., be isolation between regional.
When using Docker mirror images under multi-tenant environment, the user under tenant be normally constrained to can only access each can With the mirror image warehouse (Registry) disposed in the common service area in area.And for public mirror image, it is necessary in each available area It is synchronous in mirror image warehouse;For the privately owned mirror image inside tenant, it is also desirable to by mirror image synchronization to each available area.Come for user Say, the mirror image in its each available area that can be seen should be consistent, and the cloud storage of each available area can not be across simultaneously District-share, it is impossible to distribute mirror image event to other available areas, therefore synchronization can not be realized by the mode of shared storage, and Real-time synchronization can only be used.
Therefore, prior art has yet to be improved and developed.
The content of the invention
For the drawbacks described above of prior art, the present invention provides the mirror image synchronization method and mirror in a kind of Docker mirror images warehouse As synchronization system, the problem of existing Docker mirror images are unable to real-time synchronization is mainly solved.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of mirror image synchronization method in Docker mirror images warehouse, the mirror image synchronization method comprises the following steps:
When cloud area under control warehouse receives the mirror image that a certain available area warehouse is pushed, cloud area under control control unit is notified to receive mirror image event;
Cloud area under control control unit parsing mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control warehouse by mirror image It is synchronized to corresponding available area warehouse.
In the mirror image synchronization method in described Docker mirror images warehouse, cloud area under control warehouse receives the push of available area warehouse Mirror image event when, notify also to include before the step of cloud area under control control unit receives the mirror image event:
The available area warehouse is controlled to push mirror image to cloud area under control warehouse from a certain available area control unit.
In the mirror image synchronization method in described Docker mirror images warehouse, cloud area under control control unit parsing mirror image event, When judging that mirror image event needs synchronous, the step of control cloud area under control warehouse is by mirror image synchronization to corresponding available area warehouse is wrapped Include:
Cloud area under control control unit parsing mirror image event, and judge that mirror image event pulls event or push event;
If mirror image event is push event, determine that the mirror image event needs synchronization, and call the api interface in cloud area under control warehouse by mirror As being synchronized to corresponding available area warehouse.
In the mirror image synchronization method in described Docker mirror images warehouse, if mirror image event is push event, the mirror image is determined Event needs synchronization, and calls the step of api interface in cloud area under control warehouse is by mirror image synchronization to corresponding available area warehouse to include:
If mirror image event is push event, determine that the mirror image event needs synchronization;
The source of the mirror image event is parsed to obtain the available area warehouse of the push mirror image;
Call the api interface in cloud area under control warehouse that other of mirror image synchronization extremely in addition to the available area warehouse for being pushed to mirror image respectively may be used Use area warehouse.
In the mirror image synchronization method in described Docker mirror images warehouse, cloud area under control control unit parsing mirror image event, When judging that mirror image event needs synchronous, control cloud area under control warehouse by the step of mirror image synchronization to corresponding available area warehouse it Afterwards, in addition to:
When each available area warehouse receives mirror image, the available area control unit is notified to receive the mirror image event;
The available area control unit judges whether the mirror image event derives from cloud area under control, if it is, the available area warehouse will not It is further continued for distributing the mirror image.
In the mirror image synchronization method in described Docker mirror images warehouse, when each available area has multiple warehouses, cloud area under control Control unit controls the step of cloud area under control warehouse is by mirror image synchronization to corresponding available area warehouse to include:
Cloud area under control control unit recognizes the real IP of mirror image event, judges whether the real IP is true with some available area warehouse IP matches, if then not pushing mirror image to the available area warehouse.
A kind of mirror image synchronization system in Docker mirror images warehouse, the mirror image synchronization system includes:
Cloud area under control warehouse, for receiving during mirror image that a certain available area warehouse is pushed, notifies cloud area under control control unit to receive mirror image Event;
Cloud area under control control unit, for parsing the mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control storehouse Storehouse is by mirror image synchronization to corresponding available area warehouse.
The mirror image synchronization system in described Docker mirror images warehouse, in addition to:
Available area control unit, for controlling the available area warehouse to cloud area under control warehouse push mirror image.
The mirror image synchronization system in described Docker mirror images warehouse, in addition to:
Available area warehouse, for receiving during mirror image, notifies the available area control unit to receive the mirror image event;
The available area control unit, is additionally operable to connect and judges whether the mirror image event derives from cloud area under control, if it is, this is available Area warehouse will not continue to distribute the mirror image.
The mirror image synchronization system in described Docker mirror images warehouse,
Cloud area under control control unit, is additionally operable to recognize the real IP of mirror image event, judges whether the real IP is available with some The real IP in area warehouse matches, if then not pushing mirror image to the available area warehouse.
The invention discloses the mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system, its mirror image synchronization method When first receiving the mirror image that a certain available area warehouse is pushed by cloud area under control warehouse, cloud area under control control unit is notified to receive mirror image event; Afterwards, cloud area under control control unit parsing mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control warehouse by mirror image It is synchronized to corresponding available area warehouse.The present invention is passed through by being respectively provided with control unit and warehouse in cloud area under control, each Free Region The event in Docker mirror images warehouse is monitored, to realize the mirror image synchronization in cloud area under control and each Free Region, so as to solve Docker The problem of mirror image real-time synchronization.
Brief description of the drawings
The flow chart of the preferred embodiment of the mirror image synchronization method in the Docker mirror images warehouse that Fig. 1 provides for the present invention.
Step S200 preferred embodiment in the mirror image synchronization method in the Docker mirror images warehouse that Fig. 2 provides for the present invention Flow chart.
The signal of first Application Example in the mirror image synchronization method in the Docker mirror images warehouse that Fig. 3 provides for the present invention Figure.
The signal of second Application Example in the mirror image synchronization method in the Docker mirror images warehouse that Fig. 4 provides for the present invention Figure.
The signal of 3rd Application Example in the mirror image synchronization method in the Docker mirror images warehouse that Fig. 5 provides for the present invention Figure.
Fig. 6 is the functional schematic block diagram of the mirror image synchronization system in Docker mirror images warehouse of the present invention.
Fig. 7 is the principle of work and power frame of the mirror image synchronization system medium cloud area under control control unit in Docker mirror images warehouse of the present invention Figure.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and without It is of the invention in limiting.
Referring to Fig. 1, the preferred embodiment of the mirror image synchronization method in its Docker mirror images warehouse provided for the present invention Flow chart.As shown in figure 1, the mirror image synchronization method following steps in the Docker mirror images warehouse described in present pre-ferred embodiments:
When S100, cloud area under control warehouse receive the mirror image that a certain available area warehouse is pushed, cloud area under control control unit is notified to receive mirror image Event.
In the present embodiment, control unit and warehouse are provided with cloud area under control and each Free Region, the cloud area under control is One, available area is several, is managed for the mirror image to each available area.
It is preferred that also including before step S100:The available area warehouse is controlled to cloud from a certain available area control unit Area under control warehouse pushes mirror image.
When it is implemented, pushing a mirror image from user terminal to available area warehouse, trigger the area warehouse and notify the available area Control unit is received after mirror image event, available area control unit parsing mirror image event, and it is to pull event also to judge mirror image event It is push event, if the event of push, then calls this to can use the api interface in trivial warehouse(Application Programming Interface, application programming interface)By mirror image synchronization to cloud area under control warehouse.
Step S200, cloud area under control control unit parsing mirror image event, when judging that mirror image event needs synchronous, control cloud pipe Area warehouse is by mirror image synchronization to corresponding available area warehouse.
In the present embodiment, when judging that mirror image event needs synchronous by cloud area under control control unit, cloud area under control warehouse is controlled by mirror As being synchronized in corresponding available area warehouse, each available area mirror image is realized synchronous with cloud area under control.
Referring to Fig. 2, in its mirror image synchronization method in Docker mirror images warehouse for being provided for the present invention step S200 compared with The flow chart of good embodiment.
As shown in Fig. 2 the step S200 includes:
Step S201, cloud area under control control unit parsing mirror image event, and judge that mirror image event pulls event or push Event;
If step S202, mirror image event are push event, determine that the mirror image event needs synchronization, and call cloud area under control warehouse Api interface is by mirror image synchronization to corresponding available area warehouse.Exist when mirror image event to pull in event, or cloud area under control warehouse During the mirror image, then without simultaneously operating.
When it is implemented, the step S202 includes:
If S2021, mirror image event are push event, determine that the mirror image event needs synchronization.When mirror image event is pulls event, or When there is the mirror image in the warehouse of person's cloud area under control, then without simultaneously operating.
If S2022, mirror image event are push event, parse the source of the mirror image event and push the mirror image to obtain Available area warehouse.In the control unit of cloud area under control, the distributed tasks in the source available area warehouse are rejected, it is to avoid synchronous return occur Ring.
S2023, call the api interface in cloud area under control warehouse by mirror image synchronization in addition to the available area warehouse for being pushed to mirror image Other each available area warehouses when synchronous mirror event, not by mirror image be distributed to push the mirror image available area warehouse.
In order to be better understood from technical scheme, Docker of first Application Example to the present invention is enumerated herein The mirror image synchronization method in mirror image warehouse is described in detail:
Cloud area under control is centralized management area, and each available area may be provided at different places, and such as A available areas are arranged on Shanghai, B available areas Beijing is arranged on, C available areas are arranged on Shenzhen etc..Can not mutually it be communicated between A available areas, B available areas and C available areas, A can use Area, B available areas and C available areas can only be communicated with cloud area under control, be pushed or pulled mirror image operation.
As shown in figure 3, the first Application Example of the present invention is specifically included:
The first step, from user terminal to A available areas warehouse push mirror image;
Second step, A available areas warehouse are received notifies A available area control units to receive mirror image event and store the mirror after mirror image Picture;
After 3rd step, A available areas control unit parsing mirror image event, and control A available areas warehouse that mirror image is pushed into cloud area under control Warehouse;
When 4th step, cloud area under control warehouse receive the mirror image of A available areas warehouse push, cloud area under control control unit is notified to receive mirror image thing Part;
5th step, cloud area under control control unit parsing mirror image event, when judging mirror image event for push event, control cloud area under control storehouse Storehouse is by mirror image synchronization to A available areas warehouse, B available areas warehouse and C available areas warehouse, when judging mirror image event to pull event When, the mirror image event is not handled.
To avoid wasting Internet resources, the present invention also takes anti-non-return ring and strobe utility, and the step S202 is also wrapped Include:If mirror image event is push event, the source of the mirror image event is parsed;When synchronous mirror event, not by mirror image point Issue the available area warehouse for pushing the mirror image.
In the present embodiment, when judging the source of mirror image event, by recognizing the IP in the available area warehouse for pushing mirror image, from And can accurately judge event and push source.
Further, after step S200, the mirror image synchronization method in Docker mirror images warehouse of the invention also includes:
When step S300, each available area warehouse receive mirror image, the available area control unit is notified to receive the mirror image event;
Step S400, the available area control unit judge whether the mirror image event derives from cloud area under control, if it is, the available area Warehouse will not continue to distribute the mirror image.
The present invention prevents mirror image from pushing event by being respectively provided with anti-non-return ring and strobe utility in cloud area under control and each available area Unlimited winding, effectively saves Internet resources.
For the ease of being better understood from the loopback mechanism of the present invention, the second Application Example is enumerated herein to the present invention's The mirror image synchronization method in Docker mirror images warehouse is described in detail:
As shown in figure 4, the second Application Example of the present invention is specifically included:
Mirror image is pushed to cloud area under control warehouse by the first step, A available areas warehouse;
When second step, cloud area under control warehouse receive the mirror image of A available areas warehouse push, cloud area under control control unit is notified to receive mirror image thing Part;
3rd step, cloud area under control control unit parsing mirror image event, when judging mirror image event for push event, and determine the mirror image thing When part needs synchronous, the source for analyzing push event is A available areas warehouse, and the distributed tasks in A available areas warehouse is rejected;
Distributed tasks are sent to cloud area under control warehouse by the 4th step, cloud area under control control unit;
Mirror image is distributed to B available areas warehouse and C available areas warehouse by the 5th step, cloud area under control warehouse;
6th step, B available areas warehouse and C available areas warehouse are received after mirror image, notify B can to use control with control unit and C Unit receives mirror image event;
7th step, B as the source of event can be cloud area under control with control unit analyser with control unit and C, by pushing away for this Send task to delete, be no longer distributed, it is to avoid winding(Avoid pushing mirror image circulation).
In mirror image synchronization, it is possible to the situation of synchronization failure occurs(For example:During mirror image synchronization, go out existing network abnormal eventually Mirror image synchronization is caused to fail), in order to improve the accuracy rate of mirror image synchronization, the mirror image synchronization in the Docker mirror images warehouse of the present invention In method, all mirror images are pushed to each available area warehouse by the timing of cloud area under control warehouse.When it is implemented, the control of cloud area under control is single The daily two o'clock in the morning timing in member control cloud area under control warehouse pushes mirror image to each available area.
In order to avoid mirror image synchronization is repeated, in periodic synchronization, cloud area under control control unit calls the API in source mirror image warehouse to connect Mouthful mirror image is pushed to corresponding available area warehouse, and detection available area warehouse is interacted with the available area warehouse and whether there is The mirror image pushed;In the presence of detection mirror image, stop to push the mirror image.
In more complicated network environment, multiple available area warehouses are provided with an available area, and make load balancing, respectively Available area warehouse externally provides a vip(Very Important Person, honored guest)And during port, then using the available area as Mesh target area should push to mirror image the vip and port, and whether when judging winding, it is that it can use that should check Event origin The true ip in area warehouse and port.
Therefore, when each available area has multiple warehouses, cloud area under control control unit controls cloud area under control warehouse by mirror image synchronization During to corresponding available area warehouse, it is specially:Cloud area under control control unit recognizes the real IP of mirror image event, judges that the real IP is The no real IP with some available area warehouse matches, not available to this if then rejecting the distributed tasks in available area warehouse Area warehouse pushes mirror image.
Specifically, when there are multiple warehouses in a region, to make each warehouse duty balanced, the present invention uses and makes each region All warehouses one vip and port are externally provided, when pushing mirror image to the region in other regions, by under vip and port Hair.For each available area, it is distributed target and there was only cloud area under control mirror image warehouse VIP and port, and mirror is connected in the Region control unit As pushing during event, according to the real IP of mirror image Event origin, inquire about the IP whether be cloud area under control mirror image warehouse real IP it One, if then cloud area under control mirror image warehouse VIP is rejected from when time distributed tasks, now when the target of secondary distributed tasks is sky, Synchronous mirror is not continued to.
For cloud area under control, it is distributed target and includes each available area mirror image warehouse VIP and port, and in cloud area under control, control unit connects When pushing event to mirror image, whether according to the real IP of mirror image Event origin, it is some available area mirror image warehouse to inquire about the IP One of real IP, if then rejecting the VIP in the region mirror image warehouse from when time distributed tasks, now when secondary distributed tasks Target is other available area mirror image warehouses, is not continued to the downward synchronization of derived region, and is synchronized to other regions.Load is equal During weighing apparatus, same mirror image pushes request and can only handled by some in multiple warehouses, and multiple warehouses have shared storage, institute It is all equal to be handled with they any one, due to there is control unit control.
For the ease of the loopback mechanism being better understood from during many warehouses in each region, the 3rd Application Example is enumerated herein to this The mirror image synchronization method in the Docker mirror images warehouse of invention is described in detail:
As shown in figure 5, the 3rd Application Example of the present invention is specifically included:
Mirror image is pushed to cloud area under control warehouse VIP and port by the first step, C available areas warehouse 1;
The push request of scold mirror image is transferred to cloud area under control warehouse 2 to be handled by second step, cloud area under control warehouse VIP and port;
3rd step, cloud area under control warehouse 2 are received after push mirror image, notify cloud area under control control unit;
4th step, cloud area under control control unit are received after mirror image event, and it is available for C that analysis pushes the real IP in the source of mirror image event Area warehouse 1, and the distributed tasks of C available areas are rejected;
Mirror image is sent A by the 5th step, cloud area under control control unit control cloud area under control warehouse 2 by cloud area under control warehouse VIP and port Available area warehouse VIP and port and B available areas warehouse VIP and port.
Enter a ground, memory module is additionally provided with the control unit of cloud area under control, the content for preserving warehouse and mirror image is kept away Exempting from abnormal conditions causes loss of data.Specifically can be when cloud area under control control unit receives push event, by the specific letter of mirror image Breath is preserved in a storage module.
The present invention realizes public mirror image can be synchronous in time in the mirror image warehouse of each available area;It is privately owned inside tenant Mirror image can also be synchronized to each available area in time, so as to ensure in any available area, user is for public mirror image and tenant Under user for inside tenant privately owned mirror image incapability indistinguishably access.
Present invention also offers a kind of mirror image synchronization system in Docker mirror images warehouse, as shown in fig. 6, described device bag Include:Cloud area under control warehouse 11 and cloud area under control control unit 12, cloud area under control warehouse 11 is communicated with cloud area under control control unit 12, is used for When receiving the mirror image that a certain available area warehouse is pushed, cloud area under control control unit 12 is notified to receive mirror image event.The cloud area under control control Unit 12 processed, for parsing the mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control warehouse 11 by mirror image It is synchronized to corresponding available area warehouse.Specifically refer to the corresponding embodiment of the above method.
The mirror image synchronization system in the Docker mirror images warehouse of the present invention also includes available area warehouse 21 and available area control is single Member 22, the connection available area of available area warehouse 21 control unit 22.The available area is multiple.The available area control is single Member, for controlling the available area warehouse to cloud area under control warehouse push mirror image.
When it is implemented, pushing a mirror image from user terminal to available area warehouse 21, trigger the area warehouse 21 and notify this can Received with area's control unit 22 after mirror image event, the parsing mirror image event of available area control unit 22, it is drawing to judge mirror image event Take event still to push event, if the event of push, then call this to can use the api interface in trivial warehouse 21 that mirror image is pushed into cloud Area under control warehouse.
The available area warehouse, for receiving during mirror image, notifies the available area control unit to receive the mirror image event. The available area control unit, be additionally operable to connect judge the mirror image event whether derive from cloud area under control, if it is, making the available area Warehouse will not continue to distribute the mirror image, so as to prevent mirror image winding.
When judging the source of mirror image event, by recognizing the IP in the available area warehouse for pushing mirror image, so as to accurately sentence Disconnected event pushes source.Incorporated by reference to Fig. 5, when each available area has multiple warehouses, cloud area under control control unit is additionally operable to know The real IP of other mirror image event, judges whether the real IP matches with the real IP in some available area warehouse, if then not to The available area warehouse pushes mirror image.Specifically refer to the corresponding embodiment of the above method.
Referring to Fig. 7, when it is implemented, cloud area under control control unit 12 includes:Parse subelement 121 and mirror image synchronization Subelement 122.
The parsing subelement 121, for parsing the mirror image event, and judges that mirror image event pulls event or pushed away Send event.The mirror image synchronization subelement 122, is push event for mirror image event, determines that the mirror image event needs synchronization, and The api interface in cloud area under control warehouse is then called by mirror image synchronization to each corresponding available area warehouse.
The parsing subelement 121 determines that the mirror image event needs synchronization specifically for being push event when mirror image event When, the source of the mirror image event is parsed to obtain the available area warehouse of the push mirror image.The mirror image synchronization subelement 122 has Body be used to calling the api interface in cloud area under control warehouse by mirror image synchronization in addition to the available area warehouse for being pushed to mirror image other are each Available area warehouse.Specifically refer to the corresponding embodiment of the above method.
In further embodiment, cloud area under control control unit 12 also controls the timing of cloud area under control warehouse by all mirror images Each available area warehouse is pushed to, to avoid during mirror image synchronization, due to when the reasons such as network interruption cause the mirror image synchronization to fail, not The accuracy rate of mirror image synchronization is further ensured that under the premise of traffic affecting.Specifically refer to the corresponding embodiment of the above method.
In summary, the present invention in cloud area under control, each Free Region by being respectively provided with control unit and warehouse, by monitoring The event in Docker mirror images warehouse, to realize the mirror image synchronization in cloud area under control and each Free Region, so as to solve Docker mirror images The problem of real-time synchronization.The privately owned mirror image inside tenant is set also to be synchronized to each available area in time, so as to ensure arbitrarily may be used With in area, user indistinguishably visits for the user under public mirror image and tenant for the privately owned mirror image incapability inside tenant Ask.
Certainly, one of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, Computer program is can be by instruct related hardware(Such as processor, controller etc.)To complete, described program can be stored In the storage medium of an embodied on computer readable, the program may include such as the flow of above-mentioned each method embodiment upon execution.Its Described in storage medium can be for memory, magnetic disc, CD etc..
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (10)

1. a kind of mirror image synchronization method in Docker mirror images warehouse, it is characterised in that the mirror image synchronization method includes following step Suddenly:
When cloud area under control warehouse receives the mirror image that a certain available area warehouse is pushed, cloud area under control control unit is notified to receive mirror image event;
Cloud area under control control unit parsing mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control warehouse by mirror image It is synchronized to corresponding available area warehouse.
2. the mirror image synchronization method in Docker mirror images warehouse according to claim 1, it is characterised in that cloud area under control storehouse When storehouse receives the mirror image event of available area warehouse push, before the step of notice cloud area under control control unit receives the mirror image event Also include:
The available area warehouse is controlled to push mirror image to cloud area under control warehouse from a certain available area control unit.
3. the mirror image synchronization method in Docker mirror images warehouse according to claim 1, it is characterised in that the cloud area under control control Unit resolves mirror image event processed, when judging that mirror image event needs synchronous, control cloud area under control warehouse is by mirror image synchronization to corresponding The step of available area warehouse, includes:
Cloud area under control control unit parsing mirror image event, and judge that mirror image event pulls event or push event;
If mirror image event is push event, determine that the mirror image event needs synchronization, and call the api interface in cloud area under control warehouse by mirror As being synchronized to corresponding available area warehouse.
4. the mirror image synchronization method in Docker mirror images warehouse according to claim 3, it is characterised in that if mirror image event is Push event, determines that the mirror image event needs synchronization, and calls the api interface in cloud area under control warehouse by mirror image synchronization to accordingly may be used The step of with area warehouse, includes:
If mirror image event is push event, determine that the mirror image event needs synchronization;
The source of the mirror image event is parsed to obtain the available area warehouse of the push mirror image;
Call the api interface in cloud area under control warehouse that other of mirror image synchronization extremely in addition to the available area warehouse for being pushed to mirror image respectively may be used Use area warehouse.
5. the mirror image synchronization method in the Docker mirror images warehouse according to claim 1-4 any one, it is characterised in that institute Cloud area under control control unit parsing mirror image event is stated, when judging that mirror image event needs synchronous, control cloud area under control warehouse is same by mirror image Walk to after the step of corresponding available area warehouse, in addition to:
When each available area warehouse receives mirror image, the available area control unit is notified to receive the mirror image event;
The available area control unit judges whether the mirror image event derives from cloud area under control, if it is, the available area warehouse will not It is further continued for distributing the mirror image.
6. the mirror image synchronization method in Docker mirror images warehouse according to claim 1, it is characterised in that when each available area is equal When having multiple warehouses, cloud area under control control unit controls the step of cloud area under control warehouse is by mirror image synchronization to corresponding available area warehouse to wrap Include:
Cloud area under control control unit recognizes the real IP of mirror image event, judges whether the real IP is true with some available area warehouse IP matches, if then not pushing mirror image to the available area warehouse.
7. a kind of mirror image synchronization system in Docker mirror images warehouse, it is characterised in that the mirror image synchronization system includes:
Cloud area under control warehouse, for receiving during mirror image that a certain available area warehouse is pushed, notifies cloud area under control control unit to receive mirror image Event;
Cloud area under control control unit, for parsing the mirror image event, when judging that mirror image event needs synchronous, controls cloud area under control storehouse Storehouse is by mirror image synchronization to corresponding available area warehouse.
8. the mirror image synchronization system in Docker mirror images warehouse according to claim 7, it is characterised in that also include:
Available area control unit, for controlling the available area warehouse to cloud area under control warehouse push mirror image.
9. the mirror image synchronization system in Docker mirror images warehouse according to claim 8, it is characterised in that also include:
Available area warehouse, for receiving during mirror image, notifies the available area control unit to receive the mirror image event;
The available area control unit, is additionally operable to connect and judges whether the mirror image event derives from cloud area under control, if it is, this is available Area warehouse will not continue to distribute the mirror image.
10. the mirror image synchronization system in Docker mirror images warehouse according to claim 7, it is characterised in that the cloud area under control Control unit, be additionally operable to recognize mirror image event real IP, judge the real IP whether the real IP with some available area warehouse Match, if then not pushing mirror image to the available area warehouse.
CN201710473796.6A 2017-06-21 2017-06-21 Mirror image synchronization method and mirror image synchronization system of Docker mirror image warehouse Active CN107247793B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710473796.6A CN107247793B (en) 2017-06-21 2017-06-21 Mirror image synchronization method and mirror image synchronization system of Docker mirror image warehouse
PCT/CN2018/083947 WO2018233370A1 (en) 2017-06-21 2018-04-20 Method, system, device, and computer readable storage medium for synchronizing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710473796.6A CN107247793B (en) 2017-06-21 2017-06-21 Mirror image synchronization method and mirror image synchronization system of Docker mirror image warehouse

Publications (2)

Publication Number Publication Date
CN107247793A true CN107247793A (en) 2017-10-13
CN107247793B CN107247793B (en) 2020-03-17

Family

ID=60019519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710473796.6A Active CN107247793B (en) 2017-06-21 2017-06-21 Mirror image synchronization method and mirror image synchronization system of Docker mirror image warehouse

Country Status (2)

Country Link
CN (1) CN107247793B (en)
WO (1) WO2018233370A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948201A (en) * 2017-12-29 2018-04-20 平安科技(深圳)有限公司 The purview certification method and system in Docker mirror images warehouse
CN108200155A (en) * 2017-12-29 2018-06-22 平安科技(深圳)有限公司 The mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system
CN109062663A (en) * 2018-07-19 2018-12-21 北京百度网讯科技有限公司 Mirror image distribution method, device and storage medium
WO2018233370A1 (en) * 2017-06-21 2018-12-27 平安科技(深圳)有限公司 Method, system, device, and computer readable storage medium for synchronizing image
CN109688232A (en) * 2019-01-28 2019-04-26 杭州涂鸦信息技术有限公司 A kind of mirror image retrogressive method, mirror image backtracking system and proxy server
WO2019144965A1 (en) * 2018-01-29 2019-08-01 中兴通讯股份有限公司 Mirror pull method and system therefor
CN110196679A (en) * 2018-03-21 2019-09-03 腾讯科技(深圳)有限公司 Distributed deployment system, method for managing object, device, medium and electronic equipment
WO2019165573A1 (en) * 2018-02-27 2019-09-06 深圳中兴力维技术有限公司 Docker-based image synchronization method, device and system
CN111291017A (en) * 2020-03-03 2020-06-16 中国工商银行股份有限公司 Mirror image storage and extraction method and device of mirror image warehouse
CN113238831A (en) * 2021-04-30 2021-08-10 中核武汉核电运行技术股份有限公司 Nuclear power production service loading method and device based on container technology
CN113315795A (en) * 2020-02-26 2021-08-27 顺丰科技有限公司 Synchronization method and device of cloud host mirror image and storage medium
CN113505180A (en) * 2021-09-10 2021-10-15 苏州浪潮智能科技有限公司 Method, device and equipment for synchronizing mirror images in multi-cloud platform and readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119913A (en) * 2015-08-13 2015-12-02 东南大学 Web server architecture based on Docker and interactive method between modules
CN105515864A (en) * 2015-12-11 2016-04-20 深圳市中润四方信息技术有限公司 Container resource adaptive adjustment method and container resource adaptive adjustment system
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
CN106708599A (en) * 2016-12-01 2017-05-24 携程旅游信息技术(上海)有限公司 Virtual machine mirror image sending system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776149A (en) * 2017-01-04 2017-05-31 郑州云海信息技术有限公司 Local container mirror image is uploaded to the method and system in mirror image warehouse
CN107247793B (en) * 2017-06-21 2020-03-17 平安科技(深圳)有限公司 Mirror image synchronization method and mirror image synchronization system of Docker mirror image warehouse

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119913A (en) * 2015-08-13 2015-12-02 东南大学 Web server architecture based on Docker and interactive method between modules
CN105515864A (en) * 2015-12-11 2016-04-20 深圳市中润四方信息技术有限公司 Container resource adaptive adjustment method and container resource adaptive adjustment system
CN106528224A (en) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 Content updating method and system for Docker container, and server
CN106708599A (en) * 2016-12-01 2017-05-24 携程旅游信息技术(上海)有限公司 Virtual machine mirror image sending system and method

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018233370A1 (en) * 2017-06-21 2018-12-27 平安科技(深圳)有限公司 Method, system, device, and computer readable storage medium for synchronizing image
CN108200155A (en) * 2017-12-29 2018-06-22 平安科技(深圳)有限公司 The mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system
CN107948201A (en) * 2017-12-29 2018-04-20 平安科技(深圳)有限公司 The purview certification method and system in Docker mirror images warehouse
WO2019127971A1 (en) * 2017-12-29 2019-07-04 平安科技(深圳)有限公司 Image synchronization method for image registry, system, device, and storage medium
CN107948201B (en) * 2017-12-29 2020-11-13 平安科技(深圳)有限公司 Authority authentication method and system for Docker mirror warehouse
WO2019144965A1 (en) * 2018-01-29 2019-08-01 中兴通讯股份有限公司 Mirror pull method and system therefor
WO2019165573A1 (en) * 2018-02-27 2019-09-06 深圳中兴力维技术有限公司 Docker-based image synchronization method, device and system
CN110196679A (en) * 2018-03-21 2019-09-03 腾讯科技(深圳)有限公司 Distributed deployment system, method for managing object, device, medium and electronic equipment
CN109062663B (en) * 2018-07-19 2020-07-17 北京百度网讯科技有限公司 Mirror image distribution method, device and storage medium
CN109062663A (en) * 2018-07-19 2018-12-21 北京百度网讯科技有限公司 Mirror image distribution method, device and storage medium
CN109688232A (en) * 2019-01-28 2019-04-26 杭州涂鸦信息技术有限公司 A kind of mirror image retrogressive method, mirror image backtracking system and proxy server
CN113315795A (en) * 2020-02-26 2021-08-27 顺丰科技有限公司 Synchronization method and device of cloud host mirror image and storage medium
CN113315795B (en) * 2020-02-26 2024-03-05 顺丰科技有限公司 Cloud host mirror synchronization method, device and storage medium
CN111291017A (en) * 2020-03-03 2020-06-16 中国工商银行股份有限公司 Mirror image storage and extraction method and device of mirror image warehouse
CN111291017B (en) * 2020-03-03 2024-04-05 中国工商银行股份有限公司 Mirror image storage and extraction method and device of mirror image warehouse
CN113238831A (en) * 2021-04-30 2021-08-10 中核武汉核电运行技术股份有限公司 Nuclear power production service loading method and device based on container technology
CN113505180A (en) * 2021-09-10 2021-10-15 苏州浪潮智能科技有限公司 Method, device and equipment for synchronizing mirror images in multi-cloud platform and readable medium

Also Published As

Publication number Publication date
WO2018233370A1 (en) 2018-12-27
CN107247793B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN107247793A (en) The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse
CN111124670B (en) Tactical cloud-oriented microservice platform
WO2020147331A1 (en) Micro-service monitoring method and system
US8584136B2 (en) Context-aware request dispatching in clustered environments
US9722862B2 (en) Computer system to support failover in an event stream processing system
CN107590072A (en) A kind of application and development and the method and apparatus of test
CN111459749B (en) Prometheus-based private cloud monitoring method and device, computer equipment and storage medium
CN108306917A (en) The register method and device of data processing method and device, micro services module
US20080256248A1 (en) Single server access in a multiple tcp/ip instance environment
JP2017531370A (en) Energy saving control method, management server, and network device
WO2023030417A1 (en) Packet processing method and device, storage medium, and computer program product
US11294740B2 (en) Event to serverless function workflow instance mapping mechanism
CN108270818A (en) A kind of micro services architecture system and its access method
CN110417782B (en) System, method and readable medium for intelligent hardware message transmission
CN110138876A (en) Task deployment method, apparatus, equipment and platform
CN111432025A (en) Cloud edge cooperation-oriented distributed service directory management method and system
CN109218280A (en) Implement micro- partition strategy of the physics and virtual application component in data center
CN104281488A (en) Implementation method and system of server engine
CN113744853A (en) Service processing method, system, device, equipment and storage medium
CN109558239A (en) A kind of method for scheduling task, device, system, computer equipment and storage medium
CN109413001A (en) The method and device of safeguard protection is carried out to the interaction data in cloud computing system
Berenberg et al. Deployment archetypes for cloud applications
CN105490847B (en) A kind of private cloud storage system interior joint failure real-time detection and processing method
CN110149365B (en) Service adaptation method, device, system and computer readable medium
EP4005167A1 (en) Systems and methods for providing bidirectional forwarding detection with performance routing measurements

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