CN106686088A - Management method supporting multi-network mode of Docker environment - Google Patents
Management method supporting multi-network mode of Docker environment Download PDFInfo
- Publication number
- CN106686088A CN106686088A CN201611257733.9A CN201611257733A CN106686088A CN 106686088 A CN106686088 A CN 106686088A CN 201611257733 A CN201611257733 A CN 201611257733A CN 106686088 A CN106686088 A CN 106686088A
- Authority
- CN
- China
- Prior art keywords
- docker
- network
- environment
- management method
- docker environment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 30
- 238000004519 manufacturing process Methods 0.000 claims abstract description 7
- 238000000034 method Methods 0.000 claims description 17
- 238000009826 distribution Methods 0.000 claims description 2
- 238000013507 mapping Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 3
- 238000007792 addition Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- RJKFOVLPORLFTN-LEKSSAKUSA-N Progesterone Chemical compound C1CC2=CC(=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H](C(=O)C)[C@@]1(C)CC2 RJKFOVLPORLFTN-LEKSSAKUSA-N 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/04—Network management architectures or arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Abstract
The invention discloses a management method supporting a multi-network mode of Docker environment. Based on a Beego framework and a Mariadb database, the management method supporting a multi-network mode of Docker environment can complete network control and flexible management of Docker environment in the production environment. The management method supporting a multi-network mode of Docker environment is integrated with the Docker cluster management environment engineering in the production environment, wherein a Docker container can create the required network modes through self selection according to the using conditions, so that control management of the Docker environment network and flexible usage of the container can be completed.
Description
Technical field
The present invention relates to cloud computing software application technology field, and in particular to one kind supports Docker environment multi-network modes
Management method, a kind of manager for supporting Docker environment multi-network modes based on Beego frameworks and Mariadb data bases
Method, it is ensured that the container of Docker environment neatly uses network in controlled range.Configure during Docker context initializations
The call parameter and IP available of good each network, during Docker creating environments containers after selected network pattern, background data base exists
Distribute IP in IP available pond to use to Docker containers;Docker environment discharges IP when destroying container, and background data base reclaims this
IP is simultaneously set to available state to be allocated again.
Background technology
Docker is an application container engine increased income, allow developer can pack they application and rely on bag arrive
In one transplantable container, then it is published on the Linux machines of any prevalence.Can be according to not during Docker establishment containers
Heterogeneous networks pattern is used with scene, in addition to primary Brdige, Host, Container and None pattern, is also supported many
The Overlay patterns of main-machine communication, and third party's plug-in unit such as Weave, Flannel, Kuryr etc..Multi-network mode is simultaneously
Bring the puzzlement that cannot be managed collectively, therefore we need a kind of management method for supporting Docker environment multi-network modes,
To ensure flexibly using for Docker containers.
Beego is the http frameworks of a quick exploitation Go application, can be used to quickly develop API, Web, back-end services
Etc. various applications.It, based on building on eight big independent modules, is the framework of a height decoupling that it is.The branch of Beego
Orm is Object Relation Mapping, is corresponded with database table by class or structure, can be basically completed to data base
Additions and deletions change and look into operation.The background data base of the Orm operations of Beego is Mariadb, as a branch of MySQL, is mainly had
Open source community safeguards, using GPL authorizations, its objective is completely compatible MySQL, including API and order line, be allowed to easily into
For the substitute of MySQL, but all strong in terms of expanded function, storage engines and function improvement that some are new cross MySQL.
The content of the invention
The technical problem to be solved in the present invention is:The present invention is directed to problem above, there is provided one kind supports that Docker environment is more
The management method of network schemer.Docker environment multi-network modes are managed based on Beego frameworks and Mariadb data bases, together
When support Multi net voting operation, make up not enough and defect of the Docker environment Multi net voting without unified management, service end passes through Beego frames
The Orm operation background data bases of frame, can so help developer that Docker is preferably used under the good network planning
Container, while effectively carrying out the network management of Docker containers.Solve in production environment, to support Docker environment Multi net votings
The management of pattern, the flexibly IP applications and release of control Docker containers, so as to more easily use Docker containers.
The technical solution adopted in the present invention is:
A kind of management method for supporting Docker environment multi-network modes, methods described is based on Beego frameworks and Mariadb data
Storehouse, completes in a production environment the control of Docker environment networks and flexible management so that Docker containers are in controllable scope
Multiple network pattern is more flexibly used, and is supported the network of Docker environment various modes and is deposited.
Methods described configures the necessary parameter of each network, backstage Mariadb data bases by Docker context initializations
Tables of data is set up successively according to the form of network-subnet-IP and data are preserved;Apply first before Docker creating environments containers
IP, the network schemer distribution IP available that background data base needs according to it, Docker environment carries this IP and creates container.
The Docker environment discharges IP when destroying container, and background data base reclaims this IP and is set to again available to be allocated
State.
Methods described realizes that step is as follows:
A:Main frame builds Docker environment, configures the essential information of each mode network, and background data base is set up tables of data and protected
Deposit information;
B:During Docker creating environments containers, it is necessary first to apply for an IP, the corresponding network schemer point of back-end data library searching
With IP available;Container carries this IP and is created, and such as creates successfully, and notification database updates the IP states, returns Docker rings
Border;Failure is such as created, Docker environment is returned, notification database resets the IP states;
C:When Docker environment destroys container, after release IP, background data base finds the IP and resets its state, returns Docker
Environment release success.
Tri- tables of network portion Database Network, Subnet, IP of Mairadb data bases, wherein Network
The essential information of table record each network, maps one or more Subnet tables;The IP available section of Subnet table records each networks,
Map one or more IP tables;Each IP of IP table records and its whether available state.
Methods described is realized being based on the operating systems of CentOS release 7, and based on Etcd and Swarm 1.11.1 versions are built
This Docker cluster environment, service end programming is realized based on Go Programming with Pascal Language.
The Go language versions are 1.5.3 linux/amd64.
The Beego versions are 1.6.4.
The Mairadb database versions are 5.5.47.
Beneficial effects of the present invention are:
In the integrated cluster management environmental projects of Docker in a production environment of the inventive method, Docker containers can be according to using wound
The autonomous network schemer for selecting and needing is built, so as to complete the control management of Docker environment networks and flexibly using for container.
Description of the drawings
Fig. 1 is Docker context initialization flow through a network figures;
Fig. 2 is Docker creating environments container application IP flow processs;
Fig. 3 is that Docker containers destroy container release IP flow processs.
Specific embodiment
According to Figure of description, with reference to specific embodiment, the present invention is further described:
Embodiment 1:
A kind of management method for supporting Docker environment multi-network modes, methods described is based on Beego frameworks and Mariadb data
Storehouse, completes in a production environment the control of Docker environment networks and flexible management so that Docker containers are in controllable scope
Multiple network pattern is more flexibly used, and is supported the network of Docker environment various modes and is deposited.
Embodiment 2
As shown in Figure 1, 2, on the basis of embodiment 1, the present embodiment methods described configures each by Docker context initializations
The necessary parameter of network, backstage Mariadb database roots set up successively tables of data and preserve number according to the form of network-subnet-IP
According to;Apply for IP before Docker creating environments containers first, background data base distributes IP available according to its network schemer for needing,
Docker environment carries this IP and creates container.
Embodiment 3
As shown in figure 3, on the basis of embodiment 2, Docker environment described in the present embodiment discharges IP, back-end data when destroying container
Reclaim this IP and be set to available state to be allocated again in storehouse.
Embodiment 4
On the basis of embodiment 3, the present embodiment methods described realizes that step is as follows:
A:Main frame builds Docker environment, user each mode network of interface configurations essential information, such as CIDR sections, gateway,
IP available section(Start-stop IP)Deng background data base sets up tables of data and preserves information;
B:During Docker creating environments containers, it is necessary first to apply for an IP, the corresponding network schemer point of back-end data library searching
With IP available;Container carries this IP and is created, and such as creates successfully, and notification database updates the IP states, returns Docker rings
Border;Failure is such as created, Docker environment is returned, notification database resets the IP states;
C:When Docker environment destroys container, after release IP, background data base finds the IP and resets its state, returns Docker
Environment release success.
Embodiment 5
On the basis of any embodiment 1-4, the network portion Database Network of the present embodiment Mairadb data bases,
Tri- tables of Subnet, IP, the wherein essential information of each network of Network table records, map one or more Subnet tables;
The IP available section of Subnet table records each networks, maps one or more IP tables;Each IP of IP table records and its whether available
State.
Embodiment 6
On the basis of embodiment 5, the present embodiment methods described is realized being based on the operating systems of CentOS release 7, based on Etcd
With the Docker cluster environment that Swarm builds 1.11.1 versions, service end programming is based on Go Programming with Pascal Language realization.
Embodiment 7
On the basis of embodiment 6, Go language versions described in the present embodiment are 1.5.3 linux/amd64.
Embodiment 8
On the basis of embodiment 7, Beego versions described in the present embodiment are 1.6.4.
Routing function therein is used for realizing from request address to implementation method, can join in interface configurations netinit
Number;ORM modules are realized changing the additions and deletions of background data base looking into wait and operated, can be with flexible operating Mairadb data bases.
Embodiment 9
On the basis of embodiment 8, Mairadb database versions described in the present embodiment are 5.5.47.
Embodiment is merely to illustrate the present invention, and not limitation of the present invention, about the ordinary skill of technical field
Personnel, without departing from the spirit and scope of the present invention, can also make a variety of changes and modification, therefore all equivalents
Technical scheme fall within scope of the invention, the scope of patent protection of the present invention should be defined by the claims.
Claims (9)
1. a kind of management method for supporting Docker environment multi-network modes, it is characterised in that methods described is based on Beego frameworks
With Mariadb data bases, the control of Docker environment networks and flexible management are completed in a production environment.
2. a kind of management method for supporting Docker environment multi-network modes according to claim 1, it is characterised in that institute
Method is stated by Docker context initializations, the necessary parameter of each network is configured, backstage Mariadb database roots according to network-
The form of subnet-IP sets up successively tables of data and preserves data;Apply for IP, back-end data first before Docker creating environments containers
The network schemer distribution IP available that storehouse needs according to it, Docker environment carries this IP and creates container.
3. a kind of management method for supporting Docker environment multi-network modes according to claim 2, it is characterised in that institute
State when Docker environment destroys container and discharge IP, background data base reclaims this IP and is set to available state to be allocated again.
4. a kind of management method for supporting Docker environment multi-network modes according to claim 3, it is characterised in that institute
The method of stating realizes that step is as follows:
A:Main frame builds Docker environment, configures the essential information of each mode network, and background data base is set up tables of data and protected
Deposit information;
B:During Docker creating environments containers, it is necessary first to apply for an IP, the corresponding network schemer point of back-end data library searching
With IP available;Container carries this IP and is created, and such as creates successfully, and notification database updates the IP states, returns Docker rings
Border;Failure is such as created, Docker environment is returned, notification database resets the IP states;
C:When Docker environment destroys container, after release IP, background data base finds the IP and resets its state, returns Docker
Environment release success.
5. according to a kind of arbitrary described management method for supporting Docker environment multi-network modes of claim 1-4, its feature
It is, tri- tables of network portion Database Network, Subnet, IP of Mairadb data bases, wherein Network tokens
The essential information of each network is recorded, one or more Subnet tables are mapped;The IP available section of Subnet table records each networks, mapping
One or more IP tables;Each IP of IP table records and its whether available state.
6. a kind of management method for supporting Docker environment multi-network modes according to claim 5, it is characterised in that institute
State method to realize, based on the operating systems of CentOS release 7, based on Etcd and Swarm the Docker of 1.11.1 versions being built
Cluster environment, service end programming is realized based on Go Programming with Pascal Language.
7. a kind of management method for supporting Docker environment multi-network modes according to claim 6, it is characterised in that institute
Go language versions are stated for 1.5.3 linux/amd64.
8. a kind of management method for supporting Docker environment multi-network modes according to claim 7, it is characterised in that institute
Beego versions are stated for 1.6.4.
9. a kind of management method for supporting Docker environment multi-network modes according to claim 8, it is characterised in that institute
Mairadb database versions are stated for 5.5.47.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611257733.9A CN106686088A (en) | 2016-12-30 | 2016-12-30 | Management method supporting multi-network mode of Docker environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611257733.9A CN106686088A (en) | 2016-12-30 | 2016-12-30 | Management method supporting multi-network mode of Docker environment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106686088A true CN106686088A (en) | 2017-05-17 |
Family
ID=58873313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611257733.9A Pending CN106686088A (en) | 2016-12-30 | 2016-12-30 | Management method supporting multi-network mode of Docker environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106686088A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107395762A (en) * | 2017-08-30 | 2017-11-24 | 四川长虹电器股份有限公司 | A kind of application service based on Docker containers accesses system and method |
CN107454207A (en) * | 2017-08-14 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of method and Docker clusters of configuration Overlay web container external IPs |
CN107580083A (en) * | 2017-09-20 | 2018-01-12 | 北京京东尚科信息技术有限公司 | A kind of method and system of container IP address distribution |
CN107666525A (en) * | 2017-09-08 | 2018-02-06 | 北京京东尚科信息技术有限公司 | The method and apparatus of cluster container IP distribution |
CN107995326A (en) * | 2017-12-13 | 2018-05-04 | 北京搜狐新媒体信息技术有限公司 | The management method and device of a kind of capacitor network |
CN110445709A (en) * | 2019-09-11 | 2019-11-12 | 成都千立网络科技有限公司 | Carry the intelligent gateway of docker application |
CN114968214A (en) * | 2022-07-12 | 2022-08-30 | 云账户技术(天津)有限公司 | Code automatic generation method and device, storage medium and terminal equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104951360A (en) * | 2015-06-30 | 2015-09-30 | 北京奇虎科技有限公司 | Configuration management mode and device based on Docker |
CN105357296A (en) * | 2015-10-30 | 2016-02-24 | 河海大学 | Elastic caching system based on Docker cloud platform |
CN105824688A (en) * | 2016-03-16 | 2016-08-03 | 合网络技术(北京)有限公司 | Method for solving start concurrence bottleneck of docker container |
CN105897946A (en) * | 2016-04-08 | 2016-08-24 | 北京搜狐新媒体信息技术有限公司 | Obtaining method and system of access address |
CN106161104A (en) * | 2016-08-22 | 2016-11-23 | 浪潮电子信息产业股份有限公司 | A kind of based on Docker event automatic configuration Docker container with the method for mainframe network IP |
-
2016
- 2016-12-30 CN CN201611257733.9A patent/CN106686088A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104951360A (en) * | 2015-06-30 | 2015-09-30 | 北京奇虎科技有限公司 | Configuration management mode and device based on Docker |
CN105357296A (en) * | 2015-10-30 | 2016-02-24 | 河海大学 | Elastic caching system based on Docker cloud platform |
CN105824688A (en) * | 2016-03-16 | 2016-08-03 | 合网络技术(北京)有限公司 | Method for solving start concurrence bottleneck of docker container |
CN105897946A (en) * | 2016-04-08 | 2016-08-24 | 北京搜狐新媒体信息技术有限公司 | Obtaining method and system of access address |
CN106161104A (en) * | 2016-08-22 | 2016-11-23 | 浪潮电子信息产业股份有限公司 | A kind of based on Docker event automatic configuration Docker container with the method for mainframe network IP |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454207A (en) * | 2017-08-14 | 2017-12-08 | 郑州云海信息技术有限公司 | A kind of method and Docker clusters of configuration Overlay web container external IPs |
CN107395762A (en) * | 2017-08-30 | 2017-11-24 | 四川长虹电器股份有限公司 | A kind of application service based on Docker containers accesses system and method |
CN107666525A (en) * | 2017-09-08 | 2018-02-06 | 北京京东尚科信息技术有限公司 | The method and apparatus of cluster container IP distribution |
CN107666525B (en) * | 2017-09-08 | 2020-11-24 | 北京京东尚科信息技术有限公司 | Method and device for IP allocation of cluster container |
CN107580083A (en) * | 2017-09-20 | 2018-01-12 | 北京京东尚科信息技术有限公司 | A kind of method and system of container IP address distribution |
CN107580083B (en) * | 2017-09-20 | 2020-11-03 | 北京京东尚科信息技术有限公司 | Method and system for allocating IP addresses of containers |
CN107995326A (en) * | 2017-12-13 | 2018-05-04 | 北京搜狐新媒体信息技术有限公司 | The management method and device of a kind of capacitor network |
CN107995326B (en) * | 2017-12-13 | 2021-04-20 | 北京搜狐新媒体信息技术有限公司 | Management method and device of container network |
CN110445709A (en) * | 2019-09-11 | 2019-11-12 | 成都千立网络科技有限公司 | Carry the intelligent gateway of docker application |
CN114968214A (en) * | 2022-07-12 | 2022-08-30 | 云账户技术(天津)有限公司 | Code automatic generation method and device, storage medium and terminal equipment |
CN114968214B (en) * | 2022-07-12 | 2022-10-28 | 云账户技术(天津)有限公司 | Code automatic generation method and device, storage medium and terminal equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106686088A (en) | Management method supporting multi-network mode of Docker environment | |
CN103997414B (en) | Generate method and the network control unit of configuration information | |
US8369329B2 (en) | Dynamic hierarchical address resource management architecture, method and apparatus | |
CN103164286A (en) | Implement method, resource manager and cloud calculating system of cloud computing platform arrangement | |
US9847903B2 (en) | Method and apparatus for configuring a communication system | |
CN103607432B (en) | A kind of method and system of network creation and the network control center | |
CN106464528A (en) | Touchless orchestration for layer 3 data center interconnect in communications networks | |
CN103607430A (en) | Network processing method and system, and network control center | |
US10820212B2 (en) | System and method for partitioned wireless telecommunication network deployment | |
CN103731295A (en) | Method and system for operating virtual consolidated appliance | |
CN106031100B (en) | The dispositions method and device of business chain | |
CN102999571B (en) | The implementation method of unit multinode in a kind of cluster | |
CN105635190B (en) | Service executing apparatus in data center network and device | |
CN108810013A (en) | A kind of service access method based on container | |
CN109561033A (en) | The method and device of multicast replication in Overlay network | |
CN105162835B (en) | The service registration framework and method of automation system for the power network dispatching | |
CN106817236A (en) | The collocation method and device of virtual network function | |
US9712455B1 (en) | Determining availability of networking resources prior to migration of a server or domain | |
US10680852B2 (en) | Configuration of a managed device | |
CN101582851B (en) | Method and system for realizing sharing route capacity on dual-stacker router | |
CN105704042A (en) | Message processing method, BNG and BNG cluster system | |
CN105611484A (en) | M2M node management method and M2M node management device | |
CN104301247A (en) | Method and device for load balancing of PPPOE access equipment | |
CN106708573A (en) | System and method used for automatic installation of Hadoop cluster | |
CN110086684B (en) | DCN network self-passing method based on dynamic programming |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20170517 |
|
WD01 | Invention patent application deemed withdrawn after publication |