CN104503882A - Container management method and device - Google Patents

Container management method and device Download PDF

Info

Publication number
CN104503882A
CN104503882A CN201410829260.XA CN201410829260A CN104503882A CN 104503882 A CN104503882 A CN 104503882A CN 201410829260 A CN201410829260 A CN 201410829260A CN 104503882 A CN104503882 A CN 104503882A
Authority
CN
China
Prior art keywords
container
information
node
management
zookeeper
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
CN201410829260.XA
Other languages
Chinese (zh)
Other versions
CN104503882B (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.)
Beijing Jingdong three hundred and sixty degree e-commerce Co., Ltd.
Original Assignee
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Shangke Information Technology Co Ltd
Priority to CN201410829260.XA priority Critical patent/CN104503882B/en
Publication of CN104503882A publication Critical patent/CN104503882A/en
Application granted granted Critical
Publication of CN104503882B publication Critical patent/CN104503882B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a container management method and device. The container management method comprises the following steps: getting information of containers from a reliable coordination system Zookeeper; positioning and detecting the containers according to the information of the containers. According the method and the device, not only is data processing burden of communication equipment reduced, and consumption of a central processing unit and a memory is reduced, but also the information of the containers is directly gotten from the reliable coordination system Zookeeper when the containers are positioned and detected, so that the overtime problem caused by heartbeat is avoided, management delay on the containers does not occur, and the problem of message passing bottleneck which is caused by the increase of the number of the containers is prevented.

Description

Container Management method and device
Technical field
The embodiment of the present invention relates to Internet technical field, particularly relates to a kind of Container Management method and device.
Background technology
Namely (Platform-as-a-service is served at a publicly-owned platform, Paas) in platform, along with the progressively expansion of userbase, thousands of container (Container) can be produced, and these containers are irregular is distributed in different virtual machines, and continuous change state or move to other virtual machines, therefore want quick position and these containers of detection just very difficult.
At present, the scheme of conventional Container Management is: each container in virtual machine adopts heartbeat mechanism namely to report a secondary data by cloud message system (NATS) to processor every a few second, and processor carrys out positioning vessel according to the data that these report and judges the health condition of container.
But there is following problem in above-mentioned management method: 1, the data volume of processor process is very large, adds the data processing load of processor, cause to central processing unit and memory consumption very large; 2, adopt heartbeat mechanism to relate to heartbeat timeout, Container Management can be caused like this to have certain delay; Increasing 3, along with number of containers, Message Transmission can become a bottleneck.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of Container Management method and device, to optimize existing Container Management method, alleviates the data processing load of communication facilities and can not cause delay and Message Transmission bottleneck to Container Management.
In first aspect, embodiments provide a kind of Container Management method, comprising:
The information of container of container is obtained from reliable coherent system Zookeeper;
According to described information of container, described container is positioned and detected.
In second aspect, the embodiment of the present invention additionally provides a kind of Container Management method, comprising:
The node request to create that receiving vessel Management Unit sends, comprises the information of container of container in described node request to create;
Create the node that described Container Management assembly is corresponding, and the information of container of described container is kept in described node;
Establish a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect.
In the third aspect, the embodiment of the present invention additionally provides a kind of Container Management device, comprising:
Acquisition module, for obtaining the information of container of container from Zookeeper;
Administration module, for positioning according to described information of container described container and detect.
In fourth aspect, the embodiment of the present invention additionally provides a kind of Container Management device, comprising:
5th receiver module, for the node request to create that receiving vessel Management Unit sends, comprises the information of container of container in described node request to create;
Node creation module, for creating node corresponding to described Container Management assembly;
Second memory module, for being kept in described node by the information of container of described container;
Communication module, for establishing a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and to position container according to information of container and detects.
The present embodiment directly obtains the information of container of container from reliable coherent system Zookeeper, according to described information of container, described container is positioned and detected, not only alleviate the data processing load of communication facilities, reduce the consumption to central processing unit and internal memory, and do not need to adopt heartbeat mechanism, thus avoid the timeout issue that heartbeat causes, delay can not be caused to causing Container Management, and can not increasing along with the quantity of container, bottleneck is caused to Message Transmission.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of Container Management method that first embodiment of the invention provides;
Fig. 2 is the schematic flow sheet of a kind of Container Management method that second embodiment of the invention provides;
Fig. 3 is the schematic flow sheet of a kind of Container Management method that third embodiment of the invention provides;
Fig. 4 is the schematic flow sheet of a kind of Container Management method that fourth embodiment of the invention provides;
Fig. 5 is the schematic flow sheet of a kind of Container Management method that fifth embodiment of the invention provides;
Fig. 6 is the structural representation of a kind of Container Management device that sixth embodiment of the invention provides;
Fig. 7 is the structural representation of a kind of Container Management device that seventh embodiment of the invention provides.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the specific embodiment of the invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not full content.
First embodiment
Fig. 1 is the schematic flow sheet of a kind of Container Management method that first embodiment of the invention provides, the method of the present embodiment can be performed by the Container Management device be integrated in communication facilities (such as router), this device realizes by the mode of hardware and/or software, does not limit this.Accordingly, the method for the present embodiment specifically comprises the steps:
Step 11, from reliable coherent system Zookeeper, obtain the information of container of container.
Wherein, the information of container of one or more container has been prestored in reliable coherent system Zookeeper.Wherein information of container comprises the information such as container identification, container position.
Such as, after communication facilities (such as router) starts, from Zookeeper, obtain the information of container of all containers, with in order to the location of container and detection.
Step 12, according to described information of container, described container is positioned and detected.
Such as, according to the information of container (such as container identification, container position) in above-mentioned steps 11, described container is positioned and detected, health examination is carried out to container, thus determines the health status of container.
The present embodiment directly obtains the information of container of container from reliable coherent system Zookeeper, according to described information of container, described container is positioned and detected, not only alleviate the data processing load of communication facilities, reduce the consumption to central processing unit and internal memory, and do not need to adopt heartbeat mechanism, thus avoid the timeout issue that heartbeat causes, delay can not be caused to causing Container Management, and can not increasing along with the quantity of container, bottleneck is caused to Message Transmission.
Exemplary, on the basis of the present embodiment, described from Zookeeper, obtain the information of container of container before, also comprise:
From Zookeeper, obtain the node of Container Management assembly, in described Zookeeper, be pre-created the node of Container Management assembly;
The described information of container obtaining container from Zookeeper, comprising:
The information of container of container is obtained from the node of Container Management assembly.
Wherein, Container Management assembly is the assembly in Paas platform, disposes a Container Management assembly, be in charge of containers all in virtual machine in every platform virtual machine.Such as, be previously stored with the node of one or more Container Management assembly in Zookeeper, the different mark of each node represents, to distinguish node corresponding to different Container Management assemblies.The information of container of all containers that Container Management assembly corresponding to this node manages is stored under each node.
Such as, after communication facilities (such as router) starts, from Zookeeper, obtain the node of all Container Management assemblies, each node of circular treatment, from joint, obtain the information of container of all containers, with in order to the location of container and detection.
Exemplary, above-mentioned from the node of Container Management assembly, obtain the information of container of container after, also comprise:
Store the information of container obtained.
Such as, information of container is stored in internal memory obtain the information of container of container from the node of Container Management assembly after by communication facilities (such as router), in order to the follow-up location in order to container and detection.
Exemplary, after the information of container that above-mentioned storage obtains, also comprise:
Receive the deletion Container Management component nodes message that Zookeeper sends, in described deletion Container Management component nodes message, comprise all information of container deleted in Container Management component nodes;
Delete all information of container in described deletion Container Management component nodes.
Such as, when communication facilities (such as router) receives the deletion Container Management component nodes message of Zookeeper transmission, from this node, obtain all information of container, from internal memory, delete all information of container.
Exemplary, after the information of container that above-mentioned storage obtains, also comprise:
Receive the newly-increased Container Management component nodes message that Zookeeper sends, in described newly-increased Container Management component nodes message, comprise all information of container in the node of newly-increased Container Management component nodes;
Store all information of container in described newly-increased Container Management component nodes.
Such as, when communication facilities (such as router) receives the newly-increased Container Management component nodes message of Zookeeper transmission, first be this peer distribution storage space in internal memory, then from this node messages, obtain all information of container, all information of container are stored in memory allocated space.
Exemplary, after the information of container that above-mentioned storage obtains, also comprise:
The cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
Delete the information of container corresponding with described container identification.
Such as, when Container Management assembly is destroyed container or is captured that container is abnormal to be hung, then send to communication facilities and cancel container registration message, communication facilities (such as router) deletes the information of container corresponding with this container identification according to container identification after receiving the cancellation container registration message of Container Management assembly transmission from internal memory.
Exemplary, after the information of container that above-mentioned storage obtains, also comprise:
The container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
Store described container identification and information of container.
Such as, when Container Management assembly successfully creates a container, then send container registration message to communication facilities, after communication facilities (such as router) receives the container registration message of Container Management assembly transmission, for container allocation storage space, described container identification and corresponding information of container are stored in memory allocated space.
Exemplary, described Container Management assembly sends message by message handling system NATS.
Second embodiment
Fig. 2 is the schematic flow sheet of a kind of Container Management method that second embodiment of the invention provides, the method of the present embodiment can be performed by the Container Management device be integrated in communication facilities (such as router), this device realizes by the mode of hardware and/or software, does not limit this.Accordingly, the method for the present embodiment specifically comprises the steps:
Step 21, from Zookeeper, obtain the node of Container Management assembly, in described Zookeeper, be pre-created the node of Container Management assembly.
Specifically see the associated description of above-described embodiment a pair step, be not repeated here.
Step 22, from the node of Container Management assembly, obtain the information of container of container.
Specifically see the associated description of above-described embodiment a pair step, be not repeated here.
Step 23, the information of container of acquisition to be stored in internal memory.
Step 24, internally deposit into the different process of row according to the different messages received.
Such as, when the message that communication facilities (such as router) receives is the deletion Container Management component nodes message of Zookeeper transmission, then from internal memory, all information of container corresponding in this node are deleted.When the message that communication facilities (such as router) receives is the cancellation container registration message of Container Management assembly transmission, then from internal memory, delete the information of container corresponding with this container identification.When the message that communication facilities (such as router) receives is the newly-increased Container Management component nodes message of Zookeeper transmission, then from this node messages, obtains all information of container, all information of container are stored in internal memory.When the message that communication facilities (such as router) receives is the container registration message of Container Management assembly transmission, then the information of container of correspondence is stored in internal memory.
Step 25, according to the information of container stored in internal memory container to be positioned and detect.
The present embodiment directly obtains the information of container of container from reliable coherent system Zookeeper, according to described information of container, described container is positioned and detected, not only alleviate the data processing load of communication facilities, reduce the consumption to central processing unit and internal memory, and do not need to adopt heartbeat mechanism, thus avoid the timeout issue that heartbeat causes, delay can not be caused to causing Container Management, and can not increasing along with the quantity of container, bottleneck is caused to Message Transmission.
3rd embodiment
Fig. 3 is the schematic flow sheet of a kind of Container Management method that third embodiment of the invention provides.The method of the present embodiment can be performed by the Container Management device be integrated in Zookeeper, and this device realizes by the mode of hardware and/or software, does not limit this.Accordingly, the method for the present embodiment specifically comprises the steps:
The node request to create that step 31, receiving vessel Management Unit send, comprises the information of container of container in described node request to create.
Wherein, Container Management assembly is the assembly in Paas platform, disposes a Container Management assembly, be in charge of containers all in virtual machine in every platform virtual machine.
Such as, when Container Management assembly starts, after automatically asking Zookeeper node request to create.
Step 32, create node corresponding to described Container Management assembly, and the information of container of described container is kept in described node.
Such as, Zookeeper creates the node that described Container Management assembly is corresponding after receiving the node request to create that Container Management assembly sends, and information of container corresponding to the container that manages of Container Management assembly is kept in described node.
Step 33, to establish a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect.
Wherein, communication facilities can be router.Communication connection can be wireless connections such as WI-FI, also can be limited connection such as broadband connection.
The present embodiment creates Container Management component nodes by Zookeeper, and the information of container of the container managed by Container Management assembly is kept at node, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect, not only alleviate the data processing load of communication facilities, reduce the consumption to central processing unit and internal memory, and do not need to adopt heartbeat mechanism, avoid the timeout issue that heartbeat causes, delay can not be caused to causing Container Management, and can not increasing along with the quantity of container, bottleneck is caused to Message Transmission.
Exemplary, on the basis of the present embodiment, the above-mentioned information of container by described container also comprises after being kept in described node:
The knot removal request that receiving vessel Management Unit sends;
Delete the information of container of container in node corresponding to described Container Management assembly and node.
Wherein, comprise in knot removal request by node identification corresponding to the Container Management assembly deleted.
Such as, when Container Management assembly is closed time, can from trend Zookeeper sending node removal request, accordingly, Zookeeper deletes the information of container of container in node corresponding to described Container Management assembly and node.
Exemplary, the above-mentioned information of container by described container also comprises after being kept in described node:
The cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
The information of container corresponding with described container identification is deleted from node corresponding to described Container Management assembly.
Such as, when Container Management assembly is destroyed container or captured that container is abnormal to be hung, then send to Zookeeper and cancel container registration message.
Exemplary, the above-mentioned information of container by described container also comprises after being kept in described node:
The container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
The information of container of the container corresponding with described container identification is added in node corresponding to described Container Management assembly.
Such as, when Container Management assembly successfully creates a container, then send container registration message to Zookeeper.
4th embodiment
Fig. 4 is the schematic flow sheet of a kind of Container Management method that fourth embodiment of the invention provides.The method of the present embodiment can be performed by the Container Management device be integrated in Zookeeper, and this device realizes by the mode of hardware and/or software, does not limit this.Accordingly, the method for the present embodiment specifically comprises the steps:
The node request to create that step 41, receiving vessel Management Unit send, comprises the information of container of container in described node request to create.
Specifically see the associated description of above-described embodiment three to this step, be not repeated here.
Step 42, create node corresponding to described Container Management assembly, and the information of container of described container is kept in described node.
Specifically see the associated description of above-described embodiment three to this step, be not repeated here.
Step 43, according to receive different messages different process is carried out to node.
Such as, when the message received is the knot removal request of Container Management assembly transmission, then the information of container of container in node corresponding to described Container Management assembly and node is deleted.When the message received is the cancellation container registration message of Container Management assembly transmission, comprise the container identification of the container of cancel register in described cancellation container registration message, then the information of container corresponding with described container identification is deleted from node corresponding to described Container Management assembly.When the message received is the container registration message that Container Management assembly sends, comprise container identification and the information of container of the container of registration in described container registration message, then the information of container of the container corresponding with described container identification is added in node corresponding to described Container Management assembly.
Step 44, to establish a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect.
Specifically see the associated description of above-described embodiment three to this step, be not repeated here.
The present embodiment creates Container Management component nodes by Zookeeper, and the information of container of the container managed by Container Management assembly is kept at node, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect, not only alleviate the data processing load of communication facilities, reduce the consumption to central processing unit and internal memory, and do not need to adopt heartbeat mechanism, avoid the timeout issue that heartbeat causes, delay can not be caused to causing Container Management, and can not increasing along with the quantity of container, bottleneck is caused to Message Transmission.
5th embodiment
Fig. 5 is the schematic flow sheet of a kind of Container Management method that fifth embodiment of the invention provides.The present embodiment is communication facilities, Container Management assembly and Zookeeper three be by jointly completing the specific embodiment of Container Management alternately.Accordingly, the method for the present embodiment comprises the steps:
Step 51, deployment container Management Unit.
Such as, every platform virtual machine is disposed a Container Management assembly respectively, containers all on current virtual machine is in charge of by this Container Management assembly.
Step 52, when Container Management assembly starts, then to Zookeeper sending node request to create, perform step 53.
Step 53, Zookeeper create node corresponding to Container Management assembly, send newly-increased Container Management component nodes message to communication facilities simultaneously, comprise all information of container in the node of newly-increased Container Management component nodes in described newly-increased Container Management component nodes message, perform step 512.
Step 54, when Container Management assembly stop or close time, then to Zookeeper sending node removal request, perform step 55.
Step 55, Zookeeper delete node corresponding to Container Management assembly, send to communication facilities simultaneously and delete Container Management component nodes message, comprise all information of container deleted in Container Management component nodes in described deletion Container Management component nodes message, perform step 513.
Step 56, when Container Management building component container, then send container registration message to Zookeeper, send container registration message by NATS to communication facilities simultaneously, in described container registration message, comprise container identification and the information of container of the container of registration, perform step 57 and step 514.
Information of container adds in corresponding Container Management component nodes by step 57, Zookeeper.
Step 58, when Container Management assembly is destroyed a container or is captured that container is abnormal to be hung, then send to Zookeeper and cancel container registration message, send cancellation container registration message by NATS to communication facilities simultaneously, comprise the container identification of the container of cancel register in described cancellation container registration message, perform step 59 and step 515.
Step 59, Zookeeper delete information of container from the Container Management component nodes of correspondence.
Step 510, when communication device initiated, then what from Zookeeper, obtain all Container Management assemblies faces node, and each node of circular treatment, obtains all information of container from node, performs step 511.
The information of container of acquisition is kept in internal memory by step 511, communication facilities, for location and the detection of container.
Step 512, when communication device initiated, store all information of container in newly-increased Container Management component nodes.
Step 513, when communication device initiated, delete all information of container in Container Management component nodes.
Step 514, when communication device initiated, store described container identification and information of container.
Step 515, when communication device initiated, delete the information of container corresponding with described container identification.
6th embodiment
Fig. 6 is the structural representation of a kind of Container Management device that sixth embodiment of the invention provides, and as shown in Figure 6, comprises acquisition module 61 and administration module 62.
Acquisition module 61 for obtaining the information of container of container from Zookeeper;
Administration module 62 is for positioning according to described information of container described container and detect.
Exemplary, on the basis of the present embodiment, above-mentioned acquisition module 61 is also for before the information of container obtaining container from Zookeeper, the node of Container Management assembly is obtained from Zookeeper, be pre-created the node of Container Management assembly in described Zookeeper, from the node of Container Management assembly, obtain the information of container of container.
Exemplary, said apparatus also comprises:
Memory module 63, for after obtaining the information of container of container at described acquisition module 61 from the node of Container Management assembly, stores the information of container obtained.
Exemplary, said apparatus also comprises:
First receiver module 64 for store in described memory module 63 obtain information of container after, receive the deletion Container Management component nodes message that Zookeeper sends, in described deletion Container Management component nodes message, comprise all information of container deleted in Container Management component nodes;
First removing module 65 is for deleting all information of container in described deletion Container Management component nodes.
Exemplary, said apparatus also comprises:
Second receiver module 66 for store in described memory module 63 obtain information of container after, receive the newly-increased Container Management component nodes message that Zookeeper sends, in described newly-increased Container Management component nodes message, comprise all information of container in newly-increased Container Management component nodes;
Above-mentioned memory module 63 is also for storing all information of container in described newly-increased Container Management component nodes.
Exemplary, said apparatus also comprises:
3rd receiver module 67 for store in described memory module 63 obtain information of container after, receiving vessel Management Unit send cancellation container registration message, comprise the container identification of the container of cancel register in described cancellation container registration message;
Second removing module 68 is for deleting the information of container corresponding with described container identification.
Exemplary, said apparatus also comprises:
4th receiver module 69 for store in described memory module 63 obtain information of container after, receiving vessel Management Unit send container registration message, comprise container identification and the information of container of the container of registration in described container registration message;
Above-mentioned memory module 63 is also for storing described container identification and information of container.
The Container Management device that the present embodiment provides can be used for the Container Management method that execution any embodiment of the present invention provides, and possesses corresponding functional module, realizes identical beneficial effect.
7th embodiment
Fig. 7 is the structural representation of a kind of Container Management device that seventh embodiment of the invention provides, and as shown in Figure 7, comprises the 5th receiver module 71, node creation module 72, second memory module 73 and communication module 74.
The node request to create that 5th receiver module 71 sends for receiving vessel Management Unit, comprises the information of container of container in described node request to create;
Node creation module 72 is for creating node corresponding to described Container Management assembly;
Second memory module 73 is for being kept in described node by the information of container of described container;
Communication module 74, for establishing a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and to position container according to information of container and detects.
Exemplary, on the basis of the present embodiment, the 5th receiver module 71 also for after the information of container of described container being kept in described node in described second memory module 73, the knot removal request that receiving vessel Management Unit sends;
Described device also comprises:
3rd removing module 75 is for deleting the information of container of container in node corresponding to described Container Management assembly and node.
Exemplary, above-mentioned 5th receiver module 71 is also for after being kept in described node in described second memory module 73 by the information of container of described container, the cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
Said apparatus also comprises:
4th removing module 76 is for deleting the information of container corresponding with described container identification from node corresponding to described Container Management assembly.
Exemplary, above-mentioned 5th receiver module 71 is also for after being kept in described node in described second memory module 73 by the information of container of described registration container, the container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
Said apparatus also comprises:
Add module 76 for being added to by the information of container of the container corresponding with described container identification in node corresponding to described Container Management assembly.
The Container Management device that the present embodiment provides can be used for the Container Management method that execution any embodiment of the present invention provides, and possesses corresponding functional module, realizes identical beneficial effect.
Obviously, it will be understood by those skilled in the art that above-mentioned of the present invention each module or each step can by server implementations as above.Alternatively, the embodiment of the present invention can realize by the executable program of computer installation, thus they storages can be performed by processor in the storage device, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.; Or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to the combination of any specific hardware and software.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, to those skilled in the art, the present invention can have various change and change.All do within spirit of the present invention and principle any amendment, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (23)

1. a Container Management method, is characterized in that, comprising:
The information of container of container is obtained from reliable coherent system Zookeeper;
According to described information of container, described container is positioned and detected.
2. method according to claim 1, is characterized in that, described from Zookeeper, obtain the information of container of container before, also comprise:
From Zookeeper, obtain the node of Container Management assembly, in described Zookeeper, be pre-created the node of Container Management assembly;
The described information of container obtaining container from Zookeeper, comprising:
The information of container of container is obtained from the node of Container Management assembly.
3. method according to claim 2, is characterized in that, described from the node of Container Management assembly, obtain the information of container of container after, also comprise:
Store the information of container obtained.
4. method according to claim 3, is characterized in that, after the information of container that described storage obtains, also comprises:
Receive the deletion Container Management component nodes message that Zookeeper sends, in described deletion Container Management component nodes message, comprise all information of container deleted in Container Management component nodes;
Delete all information of container in described deletion Container Management component nodes.
5. method according to claim 3, is characterized in that, after the information of container that described storage obtains, also comprises:
Receive the newly-increased Container Management component nodes message that Zookeeper sends, in described newly-increased Container Management component nodes message, comprise all information of container in newly-increased Container Management component nodes;
Store all information of container in described newly-increased Container Management component nodes.
6. method according to claim 3, is characterized in that, after the information of container that described storage obtains, also comprises:
The cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
Delete the information of container corresponding with described container identification.
7. method according to claim 3, is characterized in that, after the information of container that described storage obtains, also comprises:
The container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
Store described container identification and information of container.
8. the method according to claim 6 or 7, is characterized in that, described Container Management assembly sends message by message handling system NATS.
9. a Container Management method, is characterized in that, comprising:
The node request to create that receiving vessel Management Unit sends, comprises the information of container of container in described node request to create;
Create the node that described Container Management assembly is corresponding, and the information of container of described container is kept in described node;
Establish a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and according to information of container container positioned and detect.
10. method according to claim 9, is characterized in that, after being kept at by the information of container of described container in described node, also comprises:
The knot removal request that receiving vessel Management Unit sends;
Delete the information of container of container in node corresponding to described Container Management assembly and node.
11. methods according to claim 9, is characterized in that, after being kept at by the information of container of described container in described node, also comprise:
The cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
The information of container corresponding with described container identification is deleted from node corresponding to described Container Management assembly.
12. methods according to claim 9, is characterized in that, after being kept at by the information of container of described container in described node, also comprise:
The container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
The information of container of the container corresponding with described container identification is added in node corresponding to described Container Management assembly.
13. 1 kinds of Container Management devices, is characterized in that, comprising:
Acquisition module, for obtaining the information of container of container from Zookeeper;
Administration module, for positioning according to described information of container described container and detect.
14. devices according to claim 13, it is characterized in that, described acquisition module also for: before the information of container obtaining container from Zookeeper, the node of Container Management assembly is obtained from Zookeeper, be pre-created the node of Container Management assembly in described Zookeeper, from the node of Container Management assembly, obtain the information of container of container.
15. devices according to claim 14, is characterized in that, described device also comprises:
Memory module, for obtain the information of container of container the node of described acquisition module from Container Management assembly after, stores the information of container obtained.
16. devices according to claim 15, is characterized in that, described device also comprises:
First receiver module, after storing in described memory module the information of container obtained, receive the deletion Container Management component nodes message that Zookeeper sends, in described deletion Container Management component nodes message, comprise all information of container deleted in Container Management component nodes;
First removing module, for deleting all information of container in described deletion Container Management component nodes.
17. devices according to claim 15, is characterized in that, described device also comprises:
Second receiver module, after storing in described memory module the information of container obtained, receive the newly-increased Container Management component nodes message that Zookeeper sends, in described newly-increased Container Management component nodes message, comprise all information of container in newly-increased Container Management component nodes;
Described memory module also for: store all information of container in described newly-increased Container Management component nodes.
18. devices according to claim 15, is characterized in that, described device also comprises:
3rd receiver module, after storing in described memory module the information of container obtained, the cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
Second removing module, for deleting the information of container corresponding with described container identification.
19. devices according to claim 15, is characterized in that, described device also comprises:
4th receiver module, after storing in described memory module the information of container obtained, the container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of the container of registration in described container registration message;
Described memory module also for: store described container identification and information of container.
20. 1 kinds of Container Management devices, is characterized in that, comprising:
5th receiver module, for the node request to create that receiving vessel Management Unit sends, comprises the information of container of container in described node request to create;
Node creation module, for creating node corresponding to described Container Management assembly;
Second memory module, for being kept in described node by the information of container of described container;
Communication module, for establishing a communications link with communication facilities, with the information of container making described communication facilities obtain container from described node, and to position container according to information of container and detects.
21. devices according to claim 20, is characterized in that, the 5th receiver module also for: after the information of container of described container is kept in described node by described second memory module, receiving vessel Management Unit send knot removal request;
Described device also comprises:
3rd removing module, for deleting the information of container of container in node corresponding to described Container Management assembly and node.
22. devices according to claim 20, it is characterized in that, described 5th receiver module also for: after the information of container of described container is kept in described node by described second memory module, the cancellation container registration message that receiving vessel Management Unit sends, comprises the container identification of the container of cancel register in described cancellation container registration message;
Described device also comprises:
4th removing module, for deleting the information of container corresponding with described container identification from node corresponding to described Container Management assembly.
23. devices according to claim 20, it is characterized in that, described 5th receiver module also for: after the information of container of described registration container is kept in described node by described second memory module, the container registration message that receiving vessel Management Unit sends, comprises container identification and the information of container of registration container in described container registration message;
Described device also comprises:
Add module, for being added to by the information of container of the container corresponding with described container identification in node corresponding to described Container Management assembly.
CN201410829260.XA 2014-12-25 2014-12-25 container management method and device Active CN104503882B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410829260.XA CN104503882B (en) 2014-12-25 2014-12-25 container management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410829260.XA CN104503882B (en) 2014-12-25 2014-12-25 container management method and device

Publications (2)

Publication Number Publication Date
CN104503882A true CN104503882A (en) 2015-04-08
CN104503882B CN104503882B (en) 2018-10-19

Family

ID=52945282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410829260.XA Active CN104503882B (en) 2014-12-25 2014-12-25 container management method and device

Country Status (1)

Country Link
CN (1) CN104503882B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550130A (en) * 2015-12-14 2016-05-04 中电科华云信息技术有限公司 Container based dynamic arrangement method for application environment and system applying method
WO2017041613A1 (en) * 2015-09-10 2017-03-16 华为技术有限公司 Mirror image deployment method and apparatus
CN106790595A (en) * 2016-12-29 2017-05-31 上海理想信息产业(集团)有限公司 A kind of Docker containers active load balancer and method
CN107276795A (en) * 2017-06-06 2017-10-20 北京小米移动软件有限公司 Information processing method and device and server and terminal based on container
CN107666525A (en) * 2017-09-08 2018-02-06 北京京东尚科信息技术有限公司 The method and apparatus of cluster container IP distribution
CN108228313A (en) * 2017-11-30 2018-06-29 中国联合网络通信集团有限公司 The discovery method and device of downstream reservoir
WO2019100605A1 (en) * 2017-11-21 2019-05-31 平安科技(深圳)有限公司 Platform-as-a-service paas container platform construction method, server, system, and storage medium
CN109857516A (en) * 2018-12-29 2019-06-07 航天信息股份有限公司 Cluster moving method and device based on container
CN109871222A (en) * 2017-12-05 2019-06-11 柯尼卡美能达株式会社 The update method and recording medium of application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011159842A2 (en) * 2010-06-15 2011-12-22 Nimbula, Inc. Virtual computing infrastructure
CN103258159A (en) * 2011-12-16 2013-08-21 德商赛克公司 Extensible and/or distributed authorization system and/or methods of providing the same
CN103345508A (en) * 2013-07-04 2013-10-09 北京大学 Data storage method and system suitable for social network graph
CN103701633A (en) * 2013-12-09 2014-04-02 国家电网公司 Setup and maintenance system of visual cluster application for distributed search SolrCloud

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011159842A2 (en) * 2010-06-15 2011-12-22 Nimbula, Inc. Virtual computing infrastructure
CN103258159A (en) * 2011-12-16 2013-08-21 德商赛克公司 Extensible and/or distributed authorization system and/or methods of providing the same
CN103345508A (en) * 2013-07-04 2013-10-09 北京大学 Data storage method and system suitable for social network graph
CN103701633A (en) * 2013-12-09 2014-04-02 国家电网公司 Setup and maintenance system of visual cluster application for distributed search SolrCloud

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHANGWEI_2943: "一种Paas平台集群Container容器管理的方法", 《博客专区》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041613A1 (en) * 2015-09-10 2017-03-16 华为技术有限公司 Mirror image deployment method and apparatus
US10877772B2 (en) 2015-09-10 2020-12-29 Huawei Technologies Co., Ltd. Image deployment method and apparatus
CN105550130A (en) * 2015-12-14 2016-05-04 中电科华云信息技术有限公司 Container based dynamic arrangement method for application environment and system applying method
CN106790595A (en) * 2016-12-29 2017-05-31 上海理想信息产业(集团)有限公司 A kind of Docker containers active load balancer and method
CN107276795A (en) * 2017-06-06 2017-10-20 北京小米移动软件有限公司 Information processing method and device and server and terminal based on container
CN107666525B (en) * 2017-09-08 2020-11-24 北京京东尚科信息技术有限公司 Method and device for IP allocation of cluster container
CN107666525A (en) * 2017-09-08 2018-02-06 北京京东尚科信息技术有限公司 The method and apparatus of cluster container IP distribution
WO2019100605A1 (en) * 2017-11-21 2019-05-31 平安科技(深圳)有限公司 Platform-as-a-service paas container platform construction method, server, system, and storage medium
CN108228313A (en) * 2017-11-30 2018-06-29 中国联合网络通信集团有限公司 The discovery method and device of downstream reservoir
CN108228313B (en) * 2017-11-30 2021-11-30 中国联合网络通信集团有限公司 Method and device for discovering downstream container
CN109871222A (en) * 2017-12-05 2019-06-11 柯尼卡美能达株式会社 The update method and recording medium of application
CN109871222B (en) * 2017-12-05 2022-10-18 柯尼卡美能达株式会社 Application updating method and recording medium
CN109857516A (en) * 2018-12-29 2019-06-07 航天信息股份有限公司 Cluster moving method and device based on container
CN109857516B (en) * 2018-12-29 2023-12-12 航天信息股份有限公司 Cluster migration method and device based on container

Also Published As

Publication number Publication date
CN104503882B (en) 2018-10-19

Similar Documents

Publication Publication Date Title
CN104503882A (en) Container management method and device
CN105024855B (en) Distributed type assemblies manage system and method
US10313452B2 (en) Migrating a chat message service provided by a chat server to a new chat server
CN103812823A (en) Method, device and system for configuration information migration in thermal migration of virtual machine
TW201543243A (en) Capability monitoring in a service oriented architecture
JP2018181325A5 (en)
CN104301140A (en) Service request responding method, device and system
CN104239122A (en) VM (virtual machine) migration method and device
CN104468201A (en) Automatic deleting method and device for offline network equipment
US11281446B2 (en) Updating method, terminal and electronic device
CN103634166A (en) Equipment survival detection method and equipment survival detection device
CN108614750A (en) The restoration methods and device of delay machine data
CN114153607A (en) Cross-node edge computing load balancing method, device and readable storage medium
CN103810038A (en) Method and device for transferring virtual machine storage files in HA cluster
CN104243473B (en) A kind of method and device of data transmission
CN107548038A (en) Method for processing short messages and device
CN104935614B (en) Data transmission method and device
CN108667640B (en) Communication method and device, and network access system
CN106230658B (en) A kind of method and apparatus monitoring the network equipment
CN102752144B (en) Method and device for processing topology change in soft restart in-service software upgrade process
CN116670636A (en) Data access method, device and storage medium
CN108235800A (en) A kind of network failure probing method and control centre's equipment
CN105100072B (en) A kind of network node monitoring method and device
CN111010362B (en) Monitoring method and device for abnormal host
CN111092770B (en) Virtual network management method and electronic equipment

Legal Events

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

Effective date of registration: 20191126

Address after: 100176 room 222, 2f, building C, No. 18, Kechuang 11th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee after: Beijing Jingdong three hundred and sixty degree e-commerce Co., Ltd.

Address before: 100080 Beijing city Haidian District xingshikou Road No. 65 building 11C Creative Park West West west Shan East 1-4 layer 1-4 layer

Patentee before: Beijing Jingdong Shangke Information Technology Co., Ltd.