CN106445585A - Application deployment method and system based on container technology - Google Patents

Application deployment method and system based on container technology Download PDF

Info

Publication number
CN106445585A
CN106445585A CN201610785754.1A CN201610785754A CN106445585A CN 106445585 A CN106445585 A CN 106445585A CN 201610785754 A CN201610785754 A CN 201610785754A CN 106445585 A CN106445585 A CN 106445585A
Authority
CN
China
Prior art keywords
container
parameter
address
application
physical machine
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
CN201610785754.1A
Other languages
Chinese (zh)
Other versions
CN106445585B (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.)
China Minsheng Banking Corp Ltd
Original Assignee
China Minsheng Banking Corp 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 China Minsheng Banking Corp Ltd filed Critical China Minsheng Banking Corp Ltd
Priority to CN201610785754.1A priority Critical patent/CN106445585B/en
Publication of CN106445585A publication Critical patent/CN106445585A/en
Application granted granted Critical
Publication of CN106445585B publication Critical patent/CN106445585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an application deployment method and system based on a container technology. The method comprises the steps that a physical machine obtains a container establishment starting command which carries a -P parameter, a first -e parameter and a second -e parameter; and the physical machine establishes containers according to the container establishment starting command. Through utilization of the -P parameter, externally exposed ports of the containers can be automatically mapped on the ports of the physical machine one by one, and the ports of the physical machine corresponding to the ports of the containers do not need to be appointed, so a resource competition in a port layer does not exist; through utilization of a first environment variable established through the first -e parameter, applications in the containers can obtain externally serving actual addresses; and through utilization of a second environment variable established through the second -e parameter, the applications in the containers can obtain a configuration center address. The applications obtain a service registering center address from a configuration center. After the applications obtain the service registering center address, the actual addresses of the service are registered at a service registering center, thereby finishing publishing the service.

Description

Application dispositions method based on container technique and system
Technical field
The present invention relates to Internet technical field, more particularly, to a kind of application dispositions method based on container technique and be System.
Background technology
Docker is an application container engine increased income, there is provided a kind of solution of the rapid automatized deployment of application program Scheme;Can quickly create and start container using the mirror image that application is located using Docker, after container creates and runs, application I.e. deployment completes.Container technique passes through isolated process and resource, it is possible to achieve lightweight virtualizes.
In prior art, a physical machine can dispose multiple containers, mutually isolated between each container, each appearance Multiple applications can be had, using network bridge mode in device.Each container has the procotol (Internet of oneself isolation Protocol, abbreviation IP) address and respective port port0;The IP address of physical machine is ip1, physical machine has and each appearance The one-to-one port in the port port1 of device;Each container passes through the method for port mapping by the external port port0 providing, and reflects It is mapped on the port port1 in the physical machine of container place.External program can pass through ip1:Port1 accesses the clothes of application in container Business.
But in prior art, under network bridge mode, each container has the separate tP address of oneself, and the application in container Running in the IP address that obtains and port be IP address in container, the application outside physical machine cannot pass through container IP address and port are gone to access the application in container, and the application in container cannot automatically go to note to service register center Volume and issuing service.
Content of the invention
The present invention provides a kind of application dispositions method based on container technique and system, in order to solve container in prior art Interior application cannot automatically go to register the problem with issuing service to service register center.
It is an aspect of the present invention to provide a kind of application dispositions method based on container technique, including:
Physical machine obtains container and creates and starts order, and wherein, described container establishment starts order and includes-P parameter, the first-e Parameter, the second-e parameter ,-P parameter is used for the end being automatically mapped to the port of each container in physical machine one by one in physical machine On mouth, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, and the second-e parameter is used for specifying The address of configuration center device;
Described physical machine creates according to described container and starts order, creates each container, so that generating described the in each container One-e parameter, the corresponding environmental variance of the second-e parameter;
In container, container is passed through in the application of deployment, and described container creates in each parameter access configuration starting in order Center device and registration center's device.
Another aspect of the present invention is to provide a kind of application deployment system based on container technique, including:
Physical machine, configuration center device and registration center's device;
Wherein, described physical machine includes:
Acquisition module, starts order for obtaining container and creating, and wherein, described container creates startup order and includes-P ginseng Number, the first-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physics one by one On port on machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, the second-e parameter Address for specified configuration center fixture;
Creation module, starts order for creating according to described container, creates each container, so that generating described in each container First-e parameter, the corresponding environmental variance of the second-e parameter;
Access modules, the application for disposing in container is passed through each in container, and the establishment startup order of described container Parameter access configuration center device and registration center's device.
The solution have the advantages that:The present embodiment is obtained container and is created by physical machine and starts order, and wherein, container is created Build startup order and include-P parameter, the first-e parameter, the second-e parameter ,-P parameter is used for the port of each container in physical machine Automatically it is mapped to one by one on the port in physical machine, the first-e parameter inquires about reflecting of address for obtaining container IP with port mapping Penetrate relation, the second-e parameter is used for the address of specified configuration center fixture;Physical machine creates according to container and starts order, creates each Container, so that generate the first-e parameter, the corresponding environmental variance of the second-e parameter in each container;In container, the application of deployment is passed through Each parameter access configuration center device in container, and container establishment startup order and registration center's device.Thus using-P Container can externally be exposed port and automatically be mapped to one by one on the port in physical machine by parameter, without specified and container , therefore there is not the resource contention of port aspect in the port of the corresponding physical machine in port.Can be created in container by 2-e parameters Build 2 environmental variances;And external clothes can be obtained using application in the first environment variable being created by the first-e parameter, container The actual address of business, this actual address is the port after physical machine address+mapping;Using the second ring being created by the second-e parameter Border variable, application in container can obtain configuration center address.From configuration center, application obtains all of environment configuration information, Including service register center address.Apply after obtaining service register center address, each actual address servicing is registered to Service register center, that is, the service that completes is issued.
Brief description
The flow chart of the application dispositions method based on container technique that Fig. 1 provides for the embodiment of the present invention one;
The flow chart of the application dispositions method based on container technique that Fig. 2 provides for the embodiment of the present invention two;
The structural representation of the application deployment system based on container technique that Fig. 3 provides for the embodiment of the present invention three;
The structural representation of the application deployment system based on container technique that Fig. 4 provides for the embodiment of the present invention four.
Specific embodiment
Purpose, technical scheme and advantage for making the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described it is clear that described embodiment is The a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment being obtained under the premise of not making creative work, broadly falls into the scope of protection of the invention.
The flow chart of the application dispositions method based on container technique that Fig. 1 provides for the embodiment of the present invention one, as Fig. 1 institute Show, the method for the present embodiment, including:
Step 101, physical machine obtain container and create and start order, wherein, container create start order include-P parameter, the One-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physical machine one by one Port on, the first-e parameter is used for obtaining the mapping relations that container IP and port mapping inquire about address, and the second-e parameter is used for The address of specified configuration center fixture.
In the present embodiment, specifically, cluster management device can generate container and create and start order, and container is created Start the Docker that order is sent in the physical machine of selection, wherein, container creates to start to order and includes image parameter ,-P ginseng Number, the first-e parameter, the second-e parameter.
Container creates in each parameter starting in order, and-P parameter is used for the port automatic of each container in physical machine One is mapped on the port in physical machine, and the first-e parameter is used for the mapping one by one of specified containers IP address and physical machine IP address Relation, the second-e parameter is used for the address of specified configuration center fixture.Specifically ,-P parameter, for will be each in physical machine The port of container is mapped on the port in physical machine automatically one by one, thus all of the port that the application in each container is specified is complete Portion is mapped in physical machine, and the port after mapping is determined by physical machine, as long as not conflicting.First-e parameter, for first- E parameter is corresponding with the first environment variable HOST_GET_REALADDRESS that container starts, first environment variable HOST_GET_ REALADDRESS is corresponding with the port mapping inquiry address that container starts, and the port mapping that container starts inquires about address, container IP address and physical machine IP address are corresponding, and then the first-e parameter is used for obtaining container IP and port mapping inquiry address Mapping relations;Thus the application in each container can inquire the address of cache of oneself with b, query function is by cluster management device There is provided.Second-e parameter, for the address HOST_CONFIG of specified configuration center fixture.Physical machine creates according to container and starts Order creates each container.
Step 102, physical machine create according to container and start order, create each container, so that generating the first-e in each container Parameter, the corresponding environmental variance of the second-e parameter.
In the present embodiment, specifically, physical machine creates according to the container receiving and starts order, goes to create each container, By the first-e parameter and the second-e parameter, container can create corresponding environmental variance, so that being stored with each container Container creates each parameter starting order.
In step 103, container, container is passed through in the application of deployment, and container creates each parameter access starting in order and joins Put center fixture and registration center's device.
Wherein, the specific implementation of step 103 is:
Application in container, according to the address of the configuration center device specified by the second-e parameter, accesses configuration center device, To obtain each configuration entry value in configuration center device, wherein, configuration entry value includes registration center's unit address;
In container, application, according to registration center's unit address, accesses registration center's device;
In container, the container IP accessed by the first-e parameter and port mapping are inquired about the mapping relations of address by application, send out Give registration center's device, so that after registration center's device preserves mapping relations, answering in each container and registration center's device With mutually being accessed by mapping relations.
Wherein, application in container, by the mapping of the container IP accessed by the first-e parameter and port mapping inquiry address Relation, is sent to registration center's device, so that after registration center device preserves mapping relations, each container and registration center's device In application mutually accessed by mapping relations, including:
In container, application, according to the first-e parameter, determines that the first environment that container corresponding with the first-e parameter starts becomes Amount;
In container, application determines the port mapping inquiry address that container corresponding with first environment variable starts;
Using first environment variable corresponding port mapping inquiry address and Container ID when in container, the application of deployment starts, The mapping relations of the address, physical machine address and port of inquiry current container, wherein, mapping relations are container IP address, physics Machine IP address and the mapping relations one by one of port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device preserve mapping relations it Afterwards, the application in each container and registration center's device is mutually accessed by mapping relations.
In the present embodiment, specifically, after physical machine creates each container, each container starts, and is now equivalent to startup The application of deployment in container.During the application of each container starts, the application of deployment in each container, created using container and open Each parameter in dynamic order goes to access configuration center device and registration center's device, thus complete configuration item obtaining and service note Volume.
Specifically, the application disposed in the container in physical machine, first in the configuration according to specified by the second-e parameter The address HOST_CONFIG of center device, goes to access configuration center device;Due to being provided with each configuration entry value in configuration center, enter And the application of deployment can obtain each configuration entry value in configuration center device in container, include registration center in configuration entry value Registration center's unit address of device.Then the application disposed in container, according to the registration center's unit address in configuration entry value HOST_REGISTRY, goes to access registration center's device.Thus what the first-e parameter acquiring can be arrived by the application disposed in container Container IP and port mapping inquire about the mapping relations of address, are sent to registration center's device, go so that each container and registration center Application in device is mutually accessed by mapping relations;Specifically, in container, the application of deployment can be according to the first-e Parameter, determines first environment variable HOST_GET_REALADDRESS, Ran Hourong that container corresponding with the first-e parameter starts In device, the application of deployment determines the port mapping that container corresponding with first environment variable HOST_GET_REALADDRESS starts Inquiry address;Then in container, the application of deployment on startup, inquires about address using the corresponding port mapping of first environment variable And Container ID, the mapping relations of the address, physical machine address and port of inquiry current container, then can determine current container The mapping relations of address, physical machine address and port, the application in container can be by mapping relations, and wherein mapping relations are for holding Device IP address, physical machine IP address and port mapping inquire about the mapping relations one by one of address, are sent to registration center's device, make Obtain registration center's device and can preserve mapping relations.And then the application of each container can by the mapping relations preserving in container, Access the application in registration center's device, and the application in registration center's device can be according to reflecting of preserving in registration center's device Penetrate relation, access the application in each container, thus the application in container can be to registration center's device registration service.
The present embodiment is obtained container and is created by physical machine and starts order, and wherein, container establishment starts order and includes-P ginseng Number, the first-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physics one by one On port on machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, the second-e parameter Address for specified configuration center fixture;Physical machine creates according to container and starts order, creates each container, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;In container, container is passed through in the application of deployment, and container creates Start each parameter access configuration center device in order and registration center's device.Thus using-P parameter, can be external by container Expose port to be automatically mapped to one by one on the port in physical machine, without specified physical machine corresponding with the port of container , therefore there is not the resource contention of port aspect in port.2 environmental variances can be created by 2-e parameters in container;And The actual address of external service can be obtained using application in the first environment variable being created by the first-e parameter, container, this is real Border address is the port after physical machine address+mapping;Using application in the second environment variable being created by the second-e parameter, container Configuration center address can be obtained.From configuration center, application obtains all of environment configuration information, including service register center ground Location.Apply after obtaining service register center address, each actual address servicing is registered to service register center, that is, completes Service is issued.
The flow chart of the application dispositions method based on container technique that Fig. 2 provides for the embodiment of the present invention two, in embodiment On the basis of one, as shown in Fig. 2 the method for the present embodiment, before step 101, also include:
Step 201, the application Disposition Instructions of operation table apparatus receiving user's input, and application Disposition Instructions are sent to collection Group's managing device.
In the present embodiment, specifically, operation table apparatus can dispose the WEB server of BS structure, and operating personnel pass through behaviour Make table apparatus and start container.Specifically, operate the application Disposition Instructions of table apparatus receiving user's input, then operate table apparatus Application Disposition Instructions are sent to cluster management device.
Step 202, cluster management device according to application Disposition Instructions, according to resource occupation situation and the scheduling of each physical machine Strategy, selects physical machine to be disposed.
In the present embodiment, specifically, run Extension arrangement in application to be run by cluster management device and some applications Physical machine;Cluster management device is according to application Disposition Instructions, the foundation currently resource occupation situation of each physical machine and scheduling Strategy, goes to select physical machine to be disposed.Meanwhile, address and each container of each physical machine are recorded in cluster management device Port mapping, and inquiry address is externally provided, corresponding container place physical machine address can be inquired according to the ID of a container Port mapping information with this container.
Step 203, cluster management device generate container and create and start order, container establishment is started order and is sent to the portion for the treatment of The physical machine of administration.
In the present embodiment, specifically, cluster management device generates container and creates and starts order, and container establishment is started Order is sent to the physical machine to be disposed selected.
The present embodiment is obtained container and is created by physical machine and starts order, and wherein, container establishment starts order and includes-P ginseng Number, the first-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physics one by one On port on machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, the second-e parameter Address for specified configuration center fixture;Physical machine creates according to container and starts order, creates each container, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;In container, container is passed through in the application of deployment, and container creates Start each parameter access configuration center device in order and registration center's device.Thus using-P parameter, can be external by container Expose port to be automatically mapped to one by one on the port in physical machine, without specified physical machine corresponding with the port of container , therefore there is not the resource contention of port aspect in port.2 environmental variances can be created by 2-e parameters in container;And The actual address of external service can be obtained using application in the first environment variable being created by the first-e parameter, container, this is real Border address is the port after physical machine address+mapping;Using application in the second environment variable being created by the second-e parameter, container Configuration center address can be obtained.From configuration center, application obtains all of environment configuration information, including service register center ground Location.Apply after obtaining service register center address, each actual address servicing is registered to service register center, that is, completes Service is issued.Meanwhile, in the present embodiment, in conjunction with configuration center, all physical machine and the appearance of wherein operation can be managed collectively Device, container upon actuation all are persisted to operation table apparatus, and user can be filled by cluster management by operating table apparatus Put the various operations that unification completes container.
The structural representation of the application deployment system based on container technique that Fig. 3 provides for the embodiment of the present invention three, such as Fig. 3 Shown, the system that the present embodiment provides, including:
Physical machine 31, configuration center device 32 and registration center's device 33;
Wherein, physical machine 31 includes:
Acquisition module 311, for acquisition module, starts order for obtaining container and creating, and wherein, container creates and starts life Order includes-P parameter, the first-e parameter, the second-e parameter, and-P parameter is used for by the port of each container in physical machine automatically one by one It is mapped on the port in physical machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, Second-e parameter is used for the address of specified configuration center fixture;
Creation module 312, for according to container create start order, create each container so that in each container generate first- E parameter, the corresponding environmental variance of the second-e parameter;
Access modules 313, container is passed through in the application for deployment in container, and container creates each ginseng starting in order Number accesses configuration center device and registration center's device.
Wherein, access modules 313, including:
First access submodule 3131, for applying in container, according to the configuration center device specified by the second-e parameter Address, access configuration center device, to obtain each configuration entry value in configuration center device, wherein, configuration entry value include Registration center's unit address;
Second access submodule 3132, for application in container according to registration center's unit address, accesses registration center's dress Put;
Container IP accessed by first-e parameter is looked into port mapping by sending submodule 3133 for applying in container Ask the mapping relations of address, be sent to registration center's device so that after registration center device preserves mapping relations, each container and Application in registration center's device is mutually accessed by mapping relations.
Sending submodule 3133, specifically for:
In container, application, according to the first-e parameter, determines that the first environment that container corresponding with the first-e parameter starts becomes Amount;
In container, application determines the port mapping inquiry address that container corresponding with first environment variable starts;
Using first environment variable corresponding port mapping inquiry address and Container ID when in container, the application of deployment starts, The mapping relations of the address, physical machine address and port of inquiry current container, wherein, mapping relations are container IP address, physics Machine IP address and the mapping relations one by one of port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device preserve mapping relations it Afterwards, the application in each container and registration center's device is mutually accessed by mapping relations.
The application deployment system based on container technique of the present embodiment can perform that the embodiment of the present invention one provides based on appearance The application dispositions method of device technology, it is realized, and principle is similar, and here is omitted.
The present embodiment is obtained container and is created by physical machine and starts order, and wherein, container establishment starts order and includes-P ginseng Number, the first-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physics one by one On port on machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, the second-e parameter Address for specified configuration center fixture;Physical machine creates according to container and starts order, creates each container, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;In container, container is passed through in the application of deployment, and container creates Start each parameter access configuration center device in order and registration center's device.Thus using-P parameter, can be external by container Expose port to be automatically mapped to one by one on the port in physical machine, without specified physical machine corresponding with the port of container , therefore there is not the resource contention of port aspect in port.2 environmental variances can be created by 2-e parameters in container;And The actual address of external service can be obtained using application in the first environment variable being created by the first-e parameter, container, this is real Border address is the port after physical machine address+mapping;Using application in the second environment variable being created by the second-e parameter, container Configuration center address can be obtained.From configuration center, application obtains all of environment configuration information, including service register center ground Location.Apply after obtaining service register center address, each actual address servicing is registered to service register center, that is, completes Service is issued.
The structural representation of the application deployment system based on container technique that Fig. 4 provides for the embodiment of the present invention four, in reality On the basis of applying example three, as shown in figure 4, the system that the present embodiment provides, also include:
Operation table apparatus 41 and cluster management device 42;
Operation table apparatus 41, before obtaining container establishment startup order in acquisition module 311, receiving user's input Application Disposition Instructions, and application Disposition Instructions are sent to cluster management device 42;
Cluster management device 42, for according to application Disposition Instructions, according to resource occupation situation and the tune of each physical machine 31 Degree strategy, selects physical machine 31 to be disposed;Generate container and create and start order, container establishment is started order and is sent to the portion for the treatment of The physical machine 31 of administration.
The application deployment system based on container technique of the present embodiment can perform that the embodiment of the present invention two provides based on appearance The application dispositions method of device technology, it is realized, and principle is similar, and here is omitted.
The present embodiment is obtained container and is created by physical machine and starts order, and wherein, container establishment starts order and includes-P ginseng Number, the first-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physics one by one On port on machine, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, the second-e parameter Address for specified configuration center fixture;Physical machine creates according to container and starts order, creates each container, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;In container, container is passed through in the application of deployment, and container creates Start each parameter access configuration center device in order and registration center's device.Thus using-P parameter, can be external by container Expose port to be automatically mapped to one by one on the port in physical machine, without specified physical machine corresponding with the port of container , therefore there is not the resource contention of port aspect in port.2 environmental variances can be created by 2-e parameters in container;And The actual address of external service can be obtained using application in the first environment variable being created by the first-e parameter, container, this is real Border address is the port after physical machine address+mapping;Using application in the second environment variable being created by the second-e parameter, container Configuration center address can be obtained.From configuration center, application obtains all of environment configuration information, including service register center ground Location.Apply after obtaining service register center address, each actual address servicing is registered to service register center, that is, completes Service is issued.Meanwhile, in the present embodiment, in conjunction with configuration center, all physical machine and the appearance of wherein operation can be managed collectively Device, container upon actuation all are persisted to operation table apparatus, and user can be filled by cluster management by operating table apparatus Put the various operations that unification completes container.
One of ordinary skill in the art will appreciate that:The all or part of step realizing above-mentioned each method embodiment can be led to Cross the related hardware of programmed instruction to complete.Aforesaid program can be stored in a computer read/write memory medium.This journey Sequence upon execution, executes the step including above-mentioned each method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Above example only in order to technical scheme to be described, is not intended to limit;Although With reference to the foregoing embodiments the present invention is described in detail, it will be understood by those within the art that:It still may be used To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to wherein some technical characteristics; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (8)

1. a kind of application dispositions method based on container technique is it is characterised in that include:
Physical machine obtains container and creates and starts order, and wherein, described container establishment starts order and includes-P parameter, the first-e ginseng Number, the second-e parameter ,-P parameter is used for the port being automatically mapped to the port of each container in physical machine one by one in physical machine On, the first-e parameter is used for obtaining container IP and port mapping inquires about the mapping relations of address, and the second-e parameter is used for specifying joins Put the address of center fixture;
Described physical machine creates according to described container and starts order, creates each container, so that generating described first-e in each container Parameter, the corresponding environmental variance of the second-e parameter;
In container, container is passed through in the application of deployment, and described container creates each parameter access configuration center dress starting in order Put and registration center's device.
2. method according to claim 1 it is characterised in that in container the application of deployment pass through container, and described appearance Device creates each parameter access configuration center device and the registration center's device starting in order, including:
Application in container, according to the address of the configuration center device specified by described second-e parameter, accesses described configuration center Device, to obtain each configuration entry value in described configuration center device, wherein, described configuration entry value includes registration center's device Address;
In container, application, according to described registration center unit address, accesses registration center's device;
In container, the container IP accessed by the first-e parameter and port mapping are inquired about the mapping relations of address by application, are sent to Described registration center device, so that after described registration center device preserves described mapping relations, in each container and described registration Application in center device is mutually accessed by described mapping relations.
3. method according to claim 2 is it is characterised in that apply in container, by the appearance accessed by the first-e parameter Device IP inquires about the mapping relations of address with port mapping, is sent to described registration center device, so that described registration center device After preserving described mapping relations, the application in each container and described registration center device is carried out mutually by described mapping relations Access, including:
In container, application, according to described first-e parameter, determines that the first environment that container corresponding with the first-e parameter starts becomes Amount;
In container, application determines the port mapping inquiry address that container corresponding with first environment variable starts;
Using first environment variable corresponding port mapping inquiry address and Container ID, inquiry when in container, the application of deployment starts The mapping relations of the address of current container, physical machine address and port, wherein, mapping relations are container IP address, physical machine IP Address and the mapping relations one by one of port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that described registration center device preserve mapping relations it Afterwards, the application in each container and described registration center device is mutually accessed by described mapping relations.
4. the method according to any one of claim 1-3 creates startup it is characterised in that obtaining container in described physical machine Before order, also include:
The application Disposition Instructions of operation table apparatus receiving user's input, and described application Disposition Instructions are sent to cluster management dress Put;
Described cluster management device according to described application Disposition Instructions, according to resource occupation situation and the scheduling plan of each physical machine Slightly, select physical machine to be disposed;
Described cluster management device generates described container and creates and starts order, the establishment of described container is started order and is sent to the portion for the treatment of The physical machine of administration.
5. a kind of application deployment system based on container technique is it is characterised in that include:
Physical machine, configuration center device and registration center's device;
Wherein, described physical machine includes:
Acquisition module, starts order for obtaining container and creating, wherein, described container create start order include-P parameter, the One-e parameter, the second-e parameter ,-P parameter is used for for the port of each container in physical machine being automatically mapped to physical machine one by one Port on, the first-e parameter is used for obtaining the mapping relations that container IP and port mapping inquire about address, and the second-e parameter is used for The address of specified configuration center fixture;
Creation module, starts order for creating according to described container, creates each container, so that generating described the in each container One-e parameter, the corresponding environmental variance of the second-e parameter;
Access modules, container is passed through in the application for deployment in container, and described container creates each parameter starting in order Access configuration center device and registration center's device.
6. system according to claim 5 is it is characterised in that described access modules, including:
First access submodule, for applying in container, according to the ground of the configuration center device specified by described second-e parameter Location, accesses described configuration center device, to obtain each configuration entry value in described configuration center device, wherein, described configuration item Value includes registration center's unit address;
Second access submodule, for applying in container according to described registration center unit address, accesses registration center's device;
Container IP accessed by first-e parameter is inquired about address with port mapping for applying in container by sending submodule Mapping relations, are sent to described registration center device, so that after described registration center device preserves described mapping relations, each appearance Application in device and described registration center device is mutually accessed by described mapping relations.
7. system according to claim 6 is it is characterised in that described sending submodule, specifically for:
In container, application, according to described first-e parameter, determines that the first environment that container corresponding with the first-e parameter starts becomes Amount;
In container, application determines the port mapping inquiry address that container corresponding with first environment variable starts;
Using first environment variable corresponding port mapping inquiry address and Container ID, inquiry when in container, the application of deployment starts The mapping relations of the address of current container, physical machine address and port, wherein, mapping relations are container IP address, physical machine IP Address and the mapping relations one by one of port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that described registration center device preserve mapping relations it Afterwards, the application in each container and described registration center device is mutually accessed by described mapping relations.
8. the system according to any one of claim 5-7, it is characterised in that described system, also includes:
Operation table apparatus and cluster management device;
Described operation table apparatus, before obtaining container establishment startup order in described acquisition module, receiving user's input Application Disposition Instructions, and described application Disposition Instructions are sent to cluster management device;
Described cluster management device, for according to described application Disposition Instructions, according to resource occupation situation and the tune of each physical machine Degree strategy, selects physical machine to be disposed;Generate described container and create and start order, described container is created startup order and sends To physical machine to be disposed.
CN201610785754.1A 2016-08-30 2016-08-30 Dispositions method and system are applied based on container technique Active CN106445585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610785754.1A CN106445585B (en) 2016-08-30 2016-08-30 Dispositions method and system are applied based on container technique

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610785754.1A CN106445585B (en) 2016-08-30 2016-08-30 Dispositions method and system are applied based on container technique

Publications (2)

Publication Number Publication Date
CN106445585A true CN106445585A (en) 2017-02-22
CN106445585B CN106445585B (en) 2019-10-01

Family

ID=58091355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610785754.1A Active CN106445585B (en) 2016-08-30 2016-08-30 Dispositions method and system are applied based on container technique

Country Status (1)

Country Link
CN (1) CN106445585B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107105061A (en) * 2017-05-31 2017-08-29 北京中电普华信息技术有限公司 A kind of service registry method and device
CN108932153A (en) * 2018-07-06 2018-12-04 杭州涂鸦信息技术有限公司 A kind of method and apparatus that more Docker examples dynamically distribute host port
CN109032806A (en) * 2018-07-30 2018-12-18 华为技术有限公司 The service scheduling method and device of container
CN109408064A (en) * 2018-09-10 2019-03-01 杭州安恒信息技术股份有限公司 A kind of visual micro services system automation dispositions method of layout and system
CN109992354A (en) * 2019-04-09 2019-07-09 腾讯科技(深圳)有限公司 Container-treatment, device, principal server, system and storage medium
CN110321115A (en) * 2018-03-30 2019-10-11 中移(苏州)软件技术有限公司 A kind of Pod creation method and equipment
CN110764875A (en) * 2019-10-25 2020-02-07 北京威晟艾德尔科技有限公司 Docker container creating method based on competition mechanism
CN111124596A (en) * 2018-11-01 2020-05-08 千寻位置网络有限公司 Container-based release management method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090217185A1 (en) * 2008-02-22 2009-08-27 Eugene Goldfarb Container generation system for a customizable application
CN103428241A (en) * 2012-05-18 2013-12-04 中兴通讯股份有限公司 Method and system for deploying services
CN104991815A (en) * 2015-06-19 2015-10-21 北京奇虎科技有限公司 Docker container management method and system
CN105187500A (en) * 2015-08-07 2015-12-23 浪潮(北京)电子信息产业有限公司 Container-based distributed storage system deployment method
CN105354076A (en) * 2015-10-23 2016-02-24 深圳前海达闼云端智能科技有限公司 Application deployment method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090217185A1 (en) * 2008-02-22 2009-08-27 Eugene Goldfarb Container generation system for a customizable application
CN103428241A (en) * 2012-05-18 2013-12-04 中兴通讯股份有限公司 Method and system for deploying services
CN104991815A (en) * 2015-06-19 2015-10-21 北京奇虎科技有限公司 Docker container management method and system
CN105187500A (en) * 2015-08-07 2015-12-23 浪潮(北京)电子信息产业有限公司 Container-based distributed storage system deployment method
CN105354076A (en) * 2015-10-23 2016-02-24 深圳前海达闼云端智能科技有限公司 Application deployment method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107105061A (en) * 2017-05-31 2017-08-29 北京中电普华信息技术有限公司 A kind of service registry method and device
CN107105061B (en) * 2017-05-31 2020-09-29 北京中电普华信息技术有限公司 Service registration method and device
CN110321115A (en) * 2018-03-30 2019-10-11 中移(苏州)软件技术有限公司 A kind of Pod creation method and equipment
CN110321115B (en) * 2018-03-30 2022-12-13 中移(苏州)软件技术有限公司 Pod creation method and device
CN108932153A (en) * 2018-07-06 2018-12-04 杭州涂鸦信息技术有限公司 A kind of method and apparatus that more Docker examples dynamically distribute host port
CN109032806A (en) * 2018-07-30 2018-12-18 华为技术有限公司 The service scheduling method and device of container
CN109408064A (en) * 2018-09-10 2019-03-01 杭州安恒信息技术股份有限公司 A kind of visual micro services system automation dispositions method of layout and system
CN111124596A (en) * 2018-11-01 2020-05-08 千寻位置网络有限公司 Container-based release management method and system
CN109992354A (en) * 2019-04-09 2019-07-09 腾讯科技(深圳)有限公司 Container-treatment, device, principal server, system and storage medium
CN110764875A (en) * 2019-10-25 2020-02-07 北京威晟艾德尔科技有限公司 Docker container creating method based on competition mechanism

Also Published As

Publication number Publication date
CN106445585B (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN106445585A (en) Application deployment method and system based on container technology
JP7074880B2 (en) How to deploy network slices and equipment
US10469314B2 (en) API gateway for network policy and configuration management with public cloud
US11470040B2 (en) Cloud infrastructure resource information scanning
CN106506703B (en) Service discovery method, apparatus and system, server based on shared drive
US11271827B2 (en) Network service life cycle management grant method and apparatus
CN103167041A (en) System and method for supporting cloud environment application cluster automation deployment
CN112256399B (en) Docker-based Jupitter Lab multi-user remote development method and system
CN105704188B (en) Using the dispositions method and device with service
CN104253831A (en) Method and system for deploying application in cloud computing environment
WO2016106486A1 (en) Method and apparatus for configuring a communication system
CN111970337B (en) P2P network communication construction method, system, medium and terminal under cross-cloud environment
CN108400898A (en) The management method and device of resource in cloud data management platform
US20180123876A1 (en) Distributed Computing System Configuration
CN106933891A (en) Access the method for distributed data base and the device of Distributed database service
CN109104317A (en) Big data cluster method of automatic configuration and device based on Docker container
CN108351798A (en) Expansible addressing mechanism for virtual machine
CN111459619A (en) Method and device for realizing service based on cloud platform
CN114490393A (en) Single-cluster multi-tenant management system
CN105103125B (en) The acquisition methods and NFV devices of clock interrupt signal
CN110417741A (en) A kind of method and apparatus of filtering safe group
CN108365976B (en) Network service optimization method and device
CN110049081A (en) For build and using high availability Docker private library method and system
CN107277126A (en) A kind of cloud computing resources management method and device
US7818713B2 (en) Method, system and program product for generating requirement relationships for designing a solution

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