CN104503882B - container management method and device - Google Patents
container management method and device Download PDFInfo
- Publication number
- CN104503882B CN104503882B CN201410829260.XA CN201410829260A CN104503882B CN 104503882 B CN104503882 B CN 104503882B CN 201410829260 A CN201410829260 A CN 201410829260A CN 104503882 B CN104503882 B CN 104503882B
- Authority
- CN
- China
- Prior art keywords
- container
- information
- management component
- node
- container management
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Small-Scale Networks (AREA)
Abstract
The embodiment of the invention discloses a kind of Container Management method and device, wherein method includes:From the reliable information of container for coordinating to obtain container in system Zookeeper;The container is positioned and detected according to the information of container, not only alleviate the data processing load of communication equipment, reduce the consumption to central processing unit and memory, and when container is positioned and is detected directly from the reliable information of container for coordinating to obtain container in system Zookeeper, timeout issue caused by avoiding heartbeat, Container Management will not be caused to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
Description
Technical field
The present embodiments relate to Internet technical field more particularly to a kind of Container Management method and devices.
Background technology
In a publicly-owned platform services (Platform-as-a-service, Paas) platform, with userbase
Gradually expansion, will produce thousands of container (Container), and these containers it is irregular be distributed in it is different virtual
In machine, and constantly change state or move to other virtual machines, therefore quickly to position and detect these containers with regard to highly difficult.
Currently, the scheme of common Container Management is:Each container in virtual machine is using heartbeat mechanism i.e. per every few seconds
Clock reports a data by cloud message system (NATS) to processor, and the data that processor is reported according to these are come positioning vessel
With the health condition for judging container.
But above-mentioned management method has the following problems:1, the data volume of processor processing is very big, increases processor
Data processing load causes very big to central processing unit and memory consumption;2, heartbeat timeout can be related to using heartbeat mechanism, this
Sample can cause Container Management to have certain delay;3, increasing with number of containers, message transmission can become a bottleneck.
Invention content
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 equipment and will not cause delay and message transmission bottleneck to Container Management.
In a first aspect, an embodiment of the present invention provides a kind of Container Management methods, including:
From the reliable information of container for coordinating to obtain container in system Zookeeper;
The container is positioned and detected according to the information of container.
In second aspect, the embodiment of the present invention additionally provides a kind of Container Management method, including:
The node request to create that Container Management component is sent is received, the container comprising container is believed in the node request to create
Breath;
The corresponding node of the Container Management component is created, and the information of container of the container is stored in the node
In;
It establishes and communicates to connect with communication equipment, so that the communication equipment obtains the container letter of container from the node
Breath, and container is positioned and detected according to information of container.
In the third aspect, the embodiment of the present invention additionally provides a kind of Container Management device, including:
Acquisition module, the information of container for obtaining container from Zookeeper;
Management module, for the container to be positioned and detected according to the information of container.
In fourth aspect, the embodiment of the present invention additionally provides a kind of Container Management device, including:
5th receiving module, the node request to create for receiving the transmission of Container Management component, the node request to create
In include the information of container of container;
Node creation module, for creating the corresponding node of the Container Management component;
Second memory module, for the information of container of the container to be stored in the node;
Communication module is communicated to connect for being established with communication equipment, so that the communication equipment is obtained from the node
The information of container of container, and container is positioned and detected according to information of container.
The present embodiment is directly from the reliable information of container for coordinating to obtain container in system Zookeeper, according to the container
Information is positioned and is detected to the container, is not only alleviated the data processing load of communication equipment, is reduced to centre
The consumption of device and memory is managed, and need not will not be to leading so as to avoid timeout issue caused by heartbeat using heartbeat mechanism
Cause Container Management cause to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
Description of the drawings
Fig. 1 is a kind of flow diagram for Container Management method that first embodiment of the invention provides;
Fig. 2 is a kind of flow diagram for Container Management method that second embodiment of the invention provides;
Fig. 3 is a kind of flow diagram for Container Management method that third embodiment of the invention provides;
Fig. 4 is a kind of flow diagram for Container Management method that fourth embodiment of the invention provides;
Fig. 5 is a kind of flow diagram for Container Management method that fifth embodiment of the invention provides;
Fig. 6 is a kind of structural schematic diagram for Container Management device that sixth embodiment of the invention provides;
Fig. 7 is a kind of structural schematic diagram for Container Management device that seventh embodiment of the invention provides.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with the accompanying drawings to of the invention specific real
Example is applied to be described in further detail.It is understood that specific embodiment described herein is used only for explaining the present invention,
Rather than limitation of the invention.It also should be noted that illustrating only for ease of description, in attached drawing related to the present invention
Part rather than full content.
First embodiment
Fig. 1 is a kind of flow diagram for Container Management method that first embodiment of the invention provides, the side of the present embodiment
Method can be executed by the Container Management device being integrated in communication equipment (such as router), the device can by hardware and/
Or the mode of software is realized, to this and is not limited.Correspondingly, the method for the present embodiment specifically comprises the following steps:
Step 11, the information of container that container is obtained from reliable coordination system Zookeeper.
Wherein, the information of container of one or more container has reliably been prestored in coordination system Zookeeper.Wherein
Information of container includes the information such as container identification, container position.
For example, after communication equipment (such as router) startup, the container letter of all containers is obtained from Zookeeper
Breath, with the positioning and detection to container.
Step 12 is positioned and is detected to the container according to the information of container.
For example, being carried out to the container according to the information of container (such as container identification, container position) in above-mentioned steps 11
Positioning and detection carry out health examination, so that it is determined that the health status of container to container.
The present embodiment is directly from the reliable information of container for coordinating to obtain container in system Zookeeper, according to the container
Information is positioned and is detected to the container, is not only alleviated the data processing load of communication equipment, is reduced to centre
The consumption of device and memory is managed, and need not will not be to leading so as to avoid timeout issue caused by heartbeat using heartbeat mechanism
Cause Container Management cause to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
It is illustratively, described before the information of container for obtaining container in Zookeeper on the basis of the present embodiment,
Further include:
The node of Container Management component is obtained from Zookeeper, and Container Management has been pre-created in the Zookeeper
The node of component;
The information of container that container is obtained from Zookeeper, including:
The information of container of container is obtained in the node of calm management component.
Wherein, Container Management component is the component in Paas platforms, and a Container Management group is disposed in every virtual machine
Part is responsible for container all in virtual machine.For example, being previously stored with one or more Container Managements in Zookeeper
The node of component, each node are indicated with different marks, to distinguish the different corresponding nodes of Container Management component.Each
The information of container for all containers that the corresponding Container Management component of the node is managed is stored under node.
For example, after communication equipment (such as router) startup, all Container Management components are obtained from Zookeeper
Node, each node of circular treatment, obtains the information of container of all containers from section, with the positioning and detection to container.
Illustratively, after the information of container that container is obtained in the node of above-mentioned calm management component, further include:
Store the information of container obtained.
For example, obtained in the node of the calm management component of communication equipment (such as router) container information of container it
Afterwards, in memory by information of container storage, in case subsequently to the positioning of container and detection.
Illustratively, after the information of container that above-mentioned storage obtains, further include:
Receive the deletion Container Management component nodes message that Zookeeper is sent, the deletion Container Management component nodes
Include all information of container deleted in Container Management component nodes in message;
Delete all information of container in the deletion Container Management component nodes.
For example, when communication equipment (such as router) receives the deletion Container Management component nodes of Zookeeper transmissions
When message, all information of container are obtained from the node, and all information of container are deleted from memory.
Illustratively, after the information of container that above-mentioned storage obtains, further include:
Receive the newly-increased Container Management component nodes message that Zookeeper is sent, the newly-increased Container Management component nodes
All information of container in node comprising newly-increased Container Management component nodes in message;
Store all information of container in the newly-increased Container Management component nodes.
For example, when communication equipment (such as router) receives the newly-increased Container Management component nodes of Zookeeper transmissions
When message, it is that the node distributes memory space in memory first, all information of container is then obtained from the node messages,
All information of container are stored in distribution memory space.
Illustratively, after the information of container that above-mentioned storage obtains, further include:
The cancellation container registration message that Container Management component is sent is received, includes cancellation in the cancellation container registration message
The container identification of the container of registration;
Delete information of container corresponding with the container identification.
For example, when Container Management component destroy container or capture container extremely hang when, then to communication equipment transmission take
Disappear container registration message, and communication equipment (such as router) receives the cancellation container registration message of Container Management component transmission
Afterwards, information of container corresponding with the container identification is deleted from memory according to container identification.
Illustratively, after the information of container that above-mentioned storage obtains, further include:
The container registration message that Container Management component is sent is received, includes the container registered in the container registration message
Container identification and information of container;
Store the container identification and information of container.
For example, when Container Management component successfully creates a container, then container registration message is sent to communication equipment, led to
It is container allocation memory space after letter equipment (such as router) receives the container registration message of Container Management component transmission,
The container identification and corresponding information of container are stored in distribution memory space.
Illustratively, the Container Management component sends message by message handling system NATS.
Second embodiment
Fig. 2 is a kind of flow diagram for Container Management method that second embodiment of the invention provides, the side of the present embodiment
Method can be executed by the Container Management device being integrated in communication equipment (such as router), the device can by hardware and/
Or the mode of software is realized, to this and is not limited.Correspondingly, the method for the present embodiment specifically comprises the following steps:
Step 21, the node that Container Management component is obtained from Zookeeper, have been pre-created in the Zookeeper
The node of Container Management component.
Referring specifically to the associated description of this pair of step of above-described embodiment, it is described again here.
Step 22, calm management component node in obtain container information of container.
Referring specifically to the associated description of this pair of step of above-described embodiment, it is described again here.
Step 23 stores the information of container of acquisition in memory.
Step 24 internally deposits into the different processing of row according to the different messages of reception.
For example, when the message that communication equipment (such as router) receives is the deletion Container Management group that Zookeeper is sent
When part node messages, then from deleting corresponding all information of container in the node in memory.When communication equipment (such as router)
When the message of reception is the cancellation container registration message that Container Management component is sent, then deleted and the container identification pair from memory
The information of container answered.When the message that communication equipment (such as router) receives is the newly-increased Container Management group that Zookeeper is sent
When part node messages, then all information of container are obtained from the node messages, in memory by all information of container storages.
It, then will be corresponding when the message that communication equipment (such as router) receives is the container registration message that Container Management component is sent
Information of container stores in memory.
Step 25 is positioned and is detected to container according to the information of container stored in memory.
The present embodiment is directly from the reliable information of container for coordinating to obtain container in system Zookeeper, according to the container
Information is positioned and is detected to the container, is not only alleviated the data processing load of communication equipment, is reduced to centre
The consumption of device and memory is managed, and need not will not be to leading so as to avoid timeout issue caused by heartbeat using heartbeat mechanism
Cause Container Management cause to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
3rd embodiment
Fig. 3 is a kind of flow diagram for Container Management method that third embodiment of the invention provides.The side of the present embodiment
Method can be executed by the Container Management device being integrated in Zookeeper, which can be by way of hardware and/or software
It realizes, to this and is not limited.Correspondingly, the method for the present embodiment specifically comprises the following steps:
Step 31 receives the node request to create that Container Management component is sent, and includes container in the node request to create
Information of container.
Wherein, Container Management component is the component in Paas platforms, and a Container Management group is disposed in every virtual machine
Part is responsible for container all in virtual machine.
For example, when Container Management component starts, after Zookeeper node requests to create can be asked automatically,.
Step 32 creates the corresponding node of the Container Management component, and the information of container of the container is stored in institute
It states in node.
For example, after Zookeeper receives the node request to create that Container Management component is sent, the Container Management is created
The corresponding node of component, and the corresponding information of container of container that Container Management component is managed is stored in the node.
Step 33 establishes communication connection with communication equipment, so that the communication equipment obtains container from the node
Information of container, and container is positioned and detected according to information of container.
Wherein, communication equipment can be router.Communication connection can be to be wirelessly connected such as WI-FI, or have
Limit connection such as broadband connection.
The present embodiment creates Container Management component nodes, and the appearance that Container Management component is managed by Zookeeper
The information of container of device is stored in node, so that the communication equipment obtains the information of container of container from the node, and according to
Information of container is positioned and is detected to container, is not only alleviated the data processing load of communication equipment, is reduced to centre
The consumption of device and memory is managed, and heartbeat mechanism need not be used, avoids timeout issue caused by heartbeat, it will not be to causing to hold
Device management causes to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
Illustratively, on the basis of the present embodiment, the above-mentioned information of container by the container is stored in the node
Later, further include:
Receive the knot removal request that Container Management component is sent;
Delete the information of container of container in the corresponding node of the Container Management component and node.
Wherein, include the corresponding node identification of Container Management component that will be deleted in knot removal request.
For example, when Container Management component is closed, it can be from trend Zookeeper sending node removal requests, accordingly
, Zookeeper deletes the information of container of container in the corresponding node of the Container Management component and node.
Illustratively, after the above-mentioned information of container by the container is stored in the node, further include:
The cancellation container registration message that Container Management component is sent is received, includes cancellation in the cancellation container registration message
The container identification of the container of registration;
Information of container corresponding with the container identification is deleted from the corresponding node of the Container Management component.
For example, when Container Management component destroy container or capture container extremely hang when, then to Zookeeper transmission take
Disappear container registration message.
Illustratively, after the above-mentioned information of container by the container is stored in the node, further include:
The container registration message that Container Management component is sent is received, includes the container registered in the container registration message
Container identification and information of container;
The information of container of container corresponding with the container identification is added to the corresponding node of the Container Management component
In.
For example, when Container Management component successfully creates a container, then container registration message is sent to Zookeeper.
Fourth embodiment
Fig. 4 is a kind of flow diagram for Container Management method that fourth embodiment of the invention provides.The side of the present embodiment
Method can be executed by the Container Management device being integrated in Zookeeper, which can be by way of hardware and/or software
It realizes, to this and is not limited.Correspondingly, the method for the present embodiment specifically comprises the following steps:
Step 41 receives the node request to create that Container Management component is sent, and includes container in the node request to create
Information of container.
Referring specifically to above-described embodiment three to the associated description of this step, it is described again here.
Step 42 creates the corresponding node of the Container Management component, and the information of container of the container is stored in institute
It states in node.
Referring specifically to above-described embodiment three to the associated description of this step, it is described again here.
Step 43 carries out node different processing according to the different messages of reception.
For example, when the message of reception is the knot removal request that Container Management component is sent, then the container tube is deleted
Manage the information of container of container in the corresponding node of component and node.When the message of reception is that the cancellation that Container Management component is sent is held
When device registration message, the container identification for cancelling the container comprising cancel register in container registration message then will be with the appearance
Device identifies corresponding information of container and is deleted from the corresponding node of the Container Management component.When the message of reception is Container Management
The container registration message that component is sent, the container identification and information of container of the container comprising registration in the container registration message,
Then the information of container of container corresponding with the container identification is added in the corresponding node of the Container Management component.
Step 44 establishes communication connection with communication equipment, so that the communication equipment obtains container from the node
Information of container, and container is positioned and detected according to information of container.
Referring specifically to above-described embodiment three to the associated description of this step, it is described again here.
The present embodiment creates Container Management component nodes, and the appearance that Container Management component is managed by Zookeeper
The information of container of device is stored in node, so that the communication equipment obtains the information of container of container from the node, and according to
Information of container is positioned and is detected to container, is not only alleviated the data processing load of communication equipment, is reduced to centre
The consumption of device and memory is managed, and heartbeat mechanism need not be used, avoids timeout issue caused by heartbeat, it will not be to causing to hold
Device management causes to postpone, and will not increasing with the quantity of container, bottleneck is caused to message transmission.
5th embodiment
Fig. 5 is a kind of flow diagram for Container Management method that fifth embodiment of the invention provides.The present embodiment is logical
Believe that equipment, Container Management component and Zookeeper three pass through the common specific embodiment for completing Container Management of interaction.Accordingly
, the method for the present embodiment includes the following steps:
Step 51, deployment container management assembly.
For example, disposing a Container Management component respectively on every virtual machine, which is responsible for working as
All containers on preceding virtual machine.
Step 52, when Container Management component starts, then to Zookeeper sending node requests to create, execute step 53.
Step 53, Zookeeper create the corresponding node of Container Management component, while sending new volume increasing device to communication equipment
Management assembly node messages include the node of newly-increased Container Management component nodes in the newly-increased Container Management component nodes message
In all information of container, execute step 512.
Step 54, when Container Management component stops or closes, then to Zookeeper sending node removal requests, execute
Step 55.
Step 55, Zookeeper delete the corresponding node of Container Management component, while being sent to communication equipment and deleting container
Management assembly node messages, it is described to delete in Container Management component nodes message comprising the institute deleted in Container Management component nodes
There is information of container, executes step 513.
Step 56, when Container Management component create container when, then to Zookeeper send container registration message, simultaneously lead to
Cross NATS and send container registration message to communication equipment, the container identification of the container comprising registration in the container registration message and
Information of container executes step 57 and step 514.
Information of container is added in corresponding Container Management component nodes by step 57, Zookeeper.
Step 58, when Container Management component destroys a container or captures container and hang extremely, then to
Zookeeper, which is sent, cancels container registration message, while being sent to communication equipment by NATS and cancelling container registration message, described
Cancel the container identification of the container comprising cancel register in container registration message, executes step 59 and step 515.
Step 59, Zookeeper delete information of container from corresponding Container Management component nodes.
Step 510, when communication device initiated, then all Container Management components are obtained from Zookeeper faces node,
The each node of circular treatment obtains all information of container from node, executes step 511.
Step 511, communication equipment preserve the information of container of acquisition in memory, are used for the positioning and detection of container.
Step 512, when communication device initiated, store all information of container increased newly in Container Management component nodes.
Step 513, when communication device initiated, delete delete Container Management component nodes in all information of container.
Step 514, when communication device initiated, store the container identification and information of container.
Step 515, when communication device initiated, delete corresponding with container identification information of container.
Sixth embodiment
Fig. 6 is a kind of structural schematic diagram for Container Management device that sixth embodiment of the invention provides, as shown in fig. 6, packet
Include acquisition module 61 and management module 62.
Information of container of the acquisition module 61 for obtaining container from Zookeeper;
Management module 62 is for being positioned and being detected to the container according to the information of container.
Illustratively, on the basis of the present embodiment, above-mentioned acquisition module 61 is additionally operable to obtaining appearance from Zookeeper
Before the information of container of device, the node of Container Management component is obtained from Zookeeper, is pre-created in the Zookeeper
There is the node of Container Management component, the information of container of container is obtained in the node of calm management component.
Illustratively, above-mentioned apparatus further includes:
Container letter of the memory module 63 for obtaining container in the node of 61 calm management component of the acquisition module
After breath, the information of container of acquisition is stored.
Illustratively, above-mentioned apparatus further includes:
First receiving module 64 is used for after the memory module 63 stores the information of container obtained, is received
The deletion Container Management component nodes message that Zookeeper is sent includes to delete in the deletions Container Management component nodes message
Except all information of container in Container Management component nodes;
First removing module 65 is used to delete all information of container in the deletion Container Management component nodes.
Illustratively, above-mentioned apparatus further includes:
Second receiving module 66 is used for after the memory module 63 stores the information of container obtained, is received
The newly-increased Container Management component nodes message that Zookeeper is sent, comprising new in the newly-increased Container Management component nodes message
All information of container in increase-volume management component node;
Above-mentioned memory module 63 is additionally operable to store all information of container in the newly-increased Container Management component nodes.
Illustratively, above-mentioned apparatus further includes:
Third receiving module 67 is used for after the memory module 63 stores the information of container obtained, receives Container Management
The cancellation container registration message that component is sent, the container mark for cancelling the container comprising cancel register in container registration message
Know;
Second removing module 68 is for deleting information of container corresponding with the container identification.
Illustratively, above-mentioned apparatus further includes:
4th receiving module 69 is used for after the memory module 63 stores the information of container obtained, receives Container Management
The container registration message that component is sent, the container identification and information of container of the container comprising registration in the container registration message;
Above-mentioned memory module 63 is additionally operable to store the container identification and information of container.
The Container Management device that the present embodiment is provided can be used for executing the Container Management that any embodiment of the present invention provides
Method has corresponding function module, realizes identical advantageous effect.
7th embodiment
Fig. 7 is a kind of structural schematic diagram for Container Management device that seventh embodiment of the invention provides, as shown in fig. 7, packet
Include the 5th receiving module 71, node creation module 72, the second memory module 73 and communication module 74.
5th receiving module 71 is used to receive the node request to create of Container Management component transmission, the node request to create
In include the information of container of container;
Node creation module 72 is for creating the corresponding node of the Container Management component;
Second memory module 73 is for the information of container of the container to be stored in the node;
Communication module 74 is used to establish with communication equipment and communicate to connect, so that the communication equipment is obtained from the node
The information of container of container, and container is positioned and detected according to information of container.
Illustratively, on the basis of the present embodiment, the 5th receiving module 71 is additionally operable in second memory module 73
After the information of container of the container is stored in the node, the knot removal request that Container Management component is sent is received;
Described device further includes:
Third removing module 75 is used to delete the container letter of container in the corresponding node of the Container Management component and node
Breath.
Illustratively, above-mentioned 5th receiving module 71 is additionally operable to the container of the container in second memory module 73
After information preservation is in the node, the cancellation container registration message that Container Management component is sent, the cancellation container are received
The container identification of container comprising cancel register in registration message;
Above-mentioned apparatus further includes:
4th removing module 76 for will information of container corresponding with the container identification from the Container Management component pair
It is deleted in the node answered.
Illustratively, above-mentioned 5th receiving module 71 is additionally operable to the registration container in second memory module 73
After information of container is stored in the node, the container registration message that Container Management component is sent, the container registration are received
The container identification and information of container of container comprising registration in message;
Above-mentioned apparatus further includes:
Add module 76 is used to the information of container of container corresponding with the container identification being added to the Container Management
In the corresponding node of component.
The Container Management device that the present embodiment is provided can be used for executing the Container Management that any embodiment of the present invention provides
Method has corresponding function module, realizes identical advantageous effect.
Obviously, it will be understood by those skilled in the art that each module of the above invention or each step can be by as above
The server implementation.Optionally, the embodiment of the present invention can be realized with the program that computer installation can perform, so as to
It is executed by a processor with being stored in storage device, the program can be stored in a kind of computer-readable storage
In medium, storage medium mentioned above can be read-only memory, disk or CD etc.;Or they are fabricated to each
A integrated circuit modules, or by them multiple modules or step be fabricated to single integrated circuit module and realize.In this way,
The present invention is not limited to the combinations of any specific hardware and software.
The foregoing is merely the preferred embodiment of the present invention, are not intended to restrict the invention, for those skilled in the art
For, the present invention can have various modifications and changes.It is all within spirit and principles of the present invention made by any modification, equivalent
Replace, improve etc., it should all be included in the protection scope of the present invention.
Claims (25)
1. a kind of Container Management method, which is characterized in that including:
From the reliable information of container for coordinating to obtain container in system Zookeeper, wherein the information of container include container identification,
Container position;
The container is positioned and detected according to the information of container;
Wherein, described before the information of container for obtaining container in Zookeeper, further include:
The node of Container Management component is obtained from Zookeeper, and Container Management component has been pre-created in the Zookeeper
Node;Wherein, the Container Management component is the component in Paas platforms, and a Container Management is disposed in every virtual machine
Component is responsible for container all in virtual machine;
Wherein, each node is indicated with different marks, to distinguish the different corresponding nodes of Container Management component;
The information of container that container is obtained from Zookeeper, including:
The information of container of container is obtained in the node of calm management component.
2. according to the method described in claim 1, it is characterized in that, obtaining container in the node of the calm management component
After information of container, further include:
Store the information of container obtained.
3. according to the method described in claim 2, it is characterized in that, after the information of container that the storage obtains, further include:
Receive the deletion Container Management component nodes message that Zookeeper is sent, the deletion Container Management component nodes message
In comprising delete Container Management component nodes in all information of container;
Delete all information of container in the deletion Container Management component nodes.
4. according to the method described in claim 2, it is characterized in that, after the information of container that the storage obtains, further include:
Receive the newly-increased Container Management component nodes message that Zookeeper is sent, the newly-increased Container Management component nodes message
In include all information of container in newly-increased Container Management component nodes;
Store all information of container in the newly-increased Container Management component nodes.
5. according to the method described in claim 2, it is characterized in that, after the information of container that the storage obtains, further include:
The cancellation container registration message that Container Management component is sent is received, includes cancel register in the cancellation container registration message
Container container identification;
Delete information of container corresponding with the container identification.
6. according to the method described in claim 2, it is characterized in that, after the information of container that the storage obtains, further include:
The container registration message that Container Management component is sent is received, the container for the container registered is included in the container registration message
Mark and information of container;
Store the container identification and information of container.
7. method according to claim 5 or 6, which is characterized in that the Container Management component passes through message handling system
NATS sends message.
8. a kind of Container Management method, which is characterized in that including:
The node request to create that Container Management component is sent is received, the information of container of container is included in the node request to create;
Wherein, the Container Management component is the component in Paas platforms, and a Container Management component is disposed in every virtual machine, is born
All containers in duty management virtual machine;
The corresponding node of the Container Management component is created, and the information of container of the container is stored in the node,
Described in information of container include container identification, container position;
It establishes and communicates to connect with communication equipment, so that the communication equipment obtains the information of container of container from the node, and
Container is positioned and detected according to information of container;
Wherein, each node is indicated with different marks, to distinguish the different corresponding nodes of Container Management component.
9. according to the method described in claim 8, it is characterized in that, the information of container of the container is stored in the node
Later, further include:
Receive the knot removal request that Container Management component is sent;
Delete the information of container of container in the corresponding node of the Container Management component and node.
10. according to the method described in claim 8, it is characterized in that, the information of container of the container is stored in the node
In after, further include:
The cancellation container registration message that Container Management component is sent is received, includes cancel register in the cancellation container registration message
Container container identification;
Information of container corresponding with the container identification is deleted from the corresponding node of the Container Management component.
11. according to the method described in claim 8, it is characterized in that, the information of container of the container is stored in the node
In after, further include:
The container registration message that Container Management component is sent is received, the container for the container registered is included in the container registration message
Mark and information of container;
The information of container of container corresponding with the container identification is added in the corresponding node of the Container Management component.
12. a kind of Container Management device, which is characterized in that including:
Acquisition module, the information of container for obtaining container from Zookeeper, wherein the information of container includes container mark
Know, container position;
Management module, for the container to be positioned and detected according to the information of container;
Wherein, the acquisition module is additionally operable to:From in Zookeeper obtain container information of container before, from Zookeeper
The middle node for obtaining Container Management component, the node of Container Management component is pre-created in the Zookeeper, from container tube
Manage the information of container that container is obtained in the node of component, wherein the Container Management component is the component in Paas platforms, every
A Container Management component is disposed in platform virtual machine, is responsible for container all in virtual machine;
Wherein, each node is indicated with different marks, to distinguish the different corresponding nodes of Container Management component.
13. device according to claim 12, which is characterized in that described device further includes:
Memory module, after the information of container of acquisition container in the node of the calm management component of the acquisition module,
Store the information of container obtained.
14. device according to claim 13, which is characterized in that described device further includes:
First receiving module, for after the information of container that memory module storage obtains, receiving what Zookeeper was sent
Container Management component nodes message is deleted, includes deletion Container Management component section in the deletion Container Management component nodes message
All information of container in point;
First removing module, for deleting all information of container in the deletion Container Management component nodes.
15. device according to claim 13, which is characterized in that described device further includes:
Second receiving module, for after the information of container that memory module storage obtains, receiving what Zookeeper was sent
It increases Container Management component nodes message newly, includes newly-increased Container Management component section in the newly-increased Container Management component nodes message
All information of container in point;
The memory module is additionally operable to:Store all information of container in the newly-increased Container Management component nodes.
16. device according to claim 13, which is characterized in that described device further includes:
Third receiving module, for after the information of container that memory module storage obtains, receiving Container Management component hair
The cancellation container registration message sent, the container identification for cancelling the container comprising cancel register in container registration message;
Second removing module, for deleting information of container corresponding with the container identification.
17. device according to claim 13, which is characterized in that described device further includes:
4th receiving module, for after the information of container that memory module storage obtains, receiving Container Management component hair
The container registration message sent, the container identification and information of container of the container comprising registration in the container registration message;
The memory module is additionally operable to:Store the container identification and information of container.
18. a kind of Container Management device, which is characterized in that including:
5th receiving module, the node request to create for receiving the transmission of Container Management component are wrapped in the node request to create
Information of container containing container;Wherein, the Container Management component is the component in Paas platforms, and one is disposed in every virtual machine
A Container Management component, is responsible for container all in virtual machine;
Node creation module, for creating the corresponding node of the Container Management component;
Second memory module, for the information of container of the container to be stored in the node, wherein the information of container packet
Include container identification, container position;
Communication module is communicated to connect for being established with communication equipment, so that the communication equipment obtains container from the node
Information of container, and container is positioned and is detected according to information of container;
Wherein, each node is indicated with different marks, to distinguish the different corresponding nodes of Container Management component.
19. device according to claim 18, which is characterized in that the 5th receiving module is additionally operable to:In second storage
After the information of container of the container is stored in the node by module, receives the knot removal that Container Management component is sent and ask
It asks;
Described device further includes:
Third removing module, the information of container for deleting container in the corresponding node of the Container Management component and node.
20. device according to claim 18, which is characterized in that the 5th receiving module is additionally operable to:Described second
After the information of container of the container is stored in the node by memory module, receives the cancellation that Container Management component is sent and hold
Device registration message, the container identification for cancelling the container comprising cancel register in container registration message;
Described device further includes:
4th removing module, for will information of container corresponding with the container identification from the corresponding section of the Container Management component
It is deleted in point.
21. device according to claim 18, which is characterized in that the 5th receiving module is additionally operable to:Described second
After the information of container for registering container is stored in the node by memory module, the container note that Container Management component is sent is received
Volume message, the container identification and information of container of registration container are included in the container registration message;
Described device further includes:
Add module, for the information of container of container corresponding with the container identification to be added to the Container Management component pair
In the node answered.
22. a kind of communication equipment, which is characterized in that the communication equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors are real
The now Container Management method as described in any in claim 1-7.
23. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is handled
The Container Management method as described in any in claim 1-7 is realized when device executes.
24. a kind of server, which is characterized in that the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors so that one or more of processors are real
The now Container Management method as described in any in claim 8-11.
25. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is handled
The Container Management method as described in any in claim 8-11 is realized when device executes.
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 CN104503882A (en) | 2015-04-08 |
CN104503882B true 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) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110806920B (en) * | 2015-09-10 | 2022-12-13 | 华为云计算技术有限公司 | Mirror image deployment method and device |
CN105550130A (en) * | 2015-12-14 | 2016-05-04 | 中电科华云信息技术有限公司 | Container based dynamic arrangement method for application environment and system applying method |
CN106790595B (en) * | 2016-12-29 | 2020-12-22 | 上海理想信息产业(集团)有限公司 | Docker container active load balancing device and method |
CN107276795B (en) * | 2017-06-06 | 2020-06-02 | 北京小米移动软件有限公司 | Container-based information processing method and device, server and terminal |
CN107666525B (en) * | 2017-09-08 | 2020-11-24 | 北京京东尚科信息技术有限公司 | Method and device for IP allocation of cluster container |
CN107979493B (en) * | 2017-11-21 | 2019-10-29 | 平安科技(深圳)有限公司 | Platform is construction method, server and the storage medium for servicing PAAS container platform |
CN108228313B (en) * | 2017-11-30 | 2021-11-30 | 中国联合网络通信集团有限公司 | Method and device for discovering downstream container |
JP7069672B2 (en) * | 2017-12-05 | 2022-05-18 | コニカミノルタ株式会社 | Application update method and program |
CN109857516B (en) * | 2018-12-29 | 2023-12-12 | 航天信息股份有限公司 | Cluster migration method and device based on container |
Citations (4)
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 |
-
2014
- 2014-12-25 CN CN201410829260.XA patent/CN104503882B/en active Active
Patent Citations (4)
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)
Title |
---|
一种Paas平台集群Container容器管理的方法;zhangwei_2943;《博客专区》;20141114;第1-2页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104503882A (en) | 2015-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104503882B (en) | container management method and device | |
US20230362237A1 (en) | Distributed network services | |
CN105024855B (en) | Distributed type assemblies manage system and method | |
US9935829B1 (en) | Scalable packet processing service | |
US20140173094A1 (en) | Methods, systems, and computer readable media for classifying application traffic received at a network traffic emulation device that emulates multiple application servers | |
CN111542064A (en) | Container arrangement management system and arrangement method for wireless access network | |
CN103746977A (en) | Connection method and device for Linux server | |
US20160103669A1 (en) | Installing and Configuring a Probe in a Distributed Computing Environment | |
TW201543243A (en) | Capability monitoring in a service oriented architecture | |
CN103716356B (en) | Storing process operating method, device and system based on web | |
CN108322530A (en) | Transmission method, device, gateway and the storage medium of context information | |
CN104767655B (en) | A kind of analog result detection method and device | |
CN104778178B (en) | A kind of application class method, apparatus and service server | |
CN108322325A (en) | A kind of virtual machine management method and device | |
CN104639555B (en) | request processing method, system and device | |
US20190044799A1 (en) | Technologies for hot-swapping a legacy appliance with a network functions virtualization appliance | |
KR20190029486A (en) | Elastic honeynet system and method for managing the same | |
CN113867782A (en) | Gray scale distribution method and device, computer equipment and storage medium | |
CN106034040B (en) | The control method of scan node, apparatus and system | |
CN105324968A (en) | Method and apparatus for allocating reliability resource | |
CN108366098A (en) | A kind of data interactive method and device of network node | |
CN104702469B (en) | Method, physical machine virtual unit and the network system of monitoring network | |
CN104836831B (en) | A kind of object method of servicing for Internet of Things | |
CN106874371A (en) | A kind of data processing method and device | |
CN106230658B (en) | A kind of method and apparatus monitoring the network 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. |