CN106445585B - Dispositions method and system are applied based on container technique - Google Patents

Dispositions method and system are applied based on container technique Download PDF

Info

Publication number
CN106445585B
CN106445585B CN201610785754.1A CN201610785754A CN106445585B CN 106445585 B CN106445585 B CN 106445585B CN 201610785754 A CN201610785754 A CN 201610785754A CN 106445585 B CN106445585 B CN 106445585B
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.)
Active
Application number
CN201610785754.1A
Other languages
Chinese (zh)
Other versions
CN106445585A (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

Abstract

The present invention provides a kind of application dispositions method and system based on container technique, wherein this method comprises: physical machine obtains the container creation start command for carrying-P parameter, the first-e parameter, the second-e parameter;Physical machine creates start command according to container, creates container.Using-P parameter, container externally can be exposed to port and be mapped to one by one on the port in physical machine automatically, the port without specifying physical machine corresponding with the port of container, therefore the resource contention of port level is not present.Using the first environment variable created by the first-e parameter, application can obtain the actual address externally serviced in container;Using the second environment variable created by the second-e parameter, application can obtain configuration center address in container.From configuration center, using acquisition service register center address.It applies after obtaining service register center address, the actual address of each service is registered to service register center, complete service publication.

Description

Dispositions method and system are applied based on container technique
Technical field
The present invention relates to Internet technical fields more particularly to a kind of application based on container technique dispositions method and to be System.
Background technique
Docker is the application container engine of an open source, provides a kind of solution of rapid automatized deployment of application program Scheme;Mirror image where application can be used using Docker quickly creates and starts container, after container is created and is run, application I.e. deployment is completed.Lightweight virtualization may be implemented by isolated process and resource in container technique.
In the prior art, multiple containers, mutually isolated, Mei Gerong between each container can be disposed in a physical machine It can have multiple applications in device, using network bridge mode.Network protocol (the Internet that each container has oneself to be isolated Protocol, abbreviation IP) address and respective port port0;The IP address of physical machine is ip1, is had and each appearance in physical machine The one-to-one port port1 in the port of device;The port port0 that each container will be provided externally by the method for port mapping, reflects On port port1 where being mapped to container in physical machine.External program can access the clothes applied in container by ip1:port1 Business.
However in the prior art, under network bridge mode, each container has the separate tP address of oneself, and in the application of container Operational process in the IP address that obtains and port be IP address in container, the application outside physical machine can not pass through container The application in access container is gone in IP address and port, and the application in container automatically can not go to infuse to service register center Volume and issuing service.
Summary of the invention
The present invention provides a kind of application dispositions method and system based on container technique, to solve container in the prior art The problem of interior application automatically can not go registration and issuing service to service register center.
It is an aspect of the present invention to provide a kind of to apply dispositions method based on container technique, comprising:
Physical machine obtains container and creates start command, wherein the container creation start command includes-P parameter, the first-e Parameter, the second-e parameter ,-P parameter are used for the end being mapped to the port of each container in physical machine one by one automatically in physical machine On mouth, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, and the second-e parameter is for specifying The address of configuration center device;
The physical machine creates start command according to the container, creates each container, so as to generate described the in each container One-e parameter, the corresponding environmental variance of the second-e parameter;
The application disposed in container is created in each parameter access configuration in start command by container and the container 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, comprising:
Physical machine, configuration center device and registration center's device;
Wherein, the physical machine includes:
Module is obtained, for obtaining container creation start command, wherein the container creation start command is joined including-P Number, the first-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physics one by one automatically On port on machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, the second-e parameter Address for specified configuration center fixture;
Creation module creates each container, so that described in generating in each container for creating start command according to the container First-e parameter, the corresponding environmental variance of the second-e parameter;
Access modules, the application for disposing in container are created each in start command by container and the container Parameter access configuration center device and registration center's device.
The solution have the advantages that: the present embodiment obtains container by physical machine and creates start command, wherein container wound Building start command includes-P parameter, the first-e parameter, the second-e parameter, and-P parameter is used for the port of each container in physical machine Automatically it is mapped on the port in physical machine one by one, the first-e parameter is used to obtain container IP and inquires reflecting for address with port mapping Relationship is penetrated, the second-e parameter is used for the address of specified configuration center fixture;Physical machine creates start command according to container, and creation is each Container, so as to generate the first-e parameter, the corresponding environmental variance of the second-e parameter in each container;The application disposed in container passes through Each parameter access configuration center device and registration center's device in container and container creation start command.To use-P Container can externally be exposed port and be mapped to one by one on the port in physical machine automatically, without specified and container by parameter The port of the corresponding physical machine in port, therefore the resource contention of port level is not present.It can be created in container by 2-e parameters Build 2 environmental variances;And using the first environment variable created by the first-e parameter, application can obtain external clothes in container The actual address of business, the actual address are the port after physical machine address+mapping;Utilize the second ring created by the second-e parameter Border variable, the interior application of container can obtain configuration center address.From configuration center, using obtaining all environment configuration informations, Including service register center address.It applies after obtaining service register center address, the actual address of each service is registered to Service register center completes service publication.
Detailed description of the invention
Fig. 1 is the flow chart using dispositions method based on container technique that the embodiment of the present invention one provides;
Fig. 2 is the flow chart using dispositions method provided by Embodiment 2 of the present invention based on container technique;
Fig. 3 is the structural schematic diagram for the application deployment system based on container technique that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the application deployment system based on container technique that the embodiment of the present invention four provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart using dispositions method based on container technique that the embodiment of the present invention one provides, such as Fig. 1 institute Show, the method for the present embodiment, comprising:
Step 101, physical machine obtain container and create start command, wherein it includes-P parameter, that container, which creates start command, One-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physical machine one by one automatically Port on, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, and the second-e parameter is used for The address of specified configuration center fixture.
In the present embodiment, specifically, container creation start command can be generated in cluster management device, and container is created Start command is sent to the Docker in the physical machine of selection, wherein it includes image parameter ,-P ginseng in start command that container, which creates, Number, the first-e parameter, the second-e parameter.
Container creates in each parameter in start command, and-P parameter is used for the port automatic one 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 Relationship, the second-e parameter are 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 to one by one automatically on the port in physical machine, so that the specified all of the port of the application in each container 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 is used 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 of container starting inquires address, container IP address and physical machine IP address are corresponding, and then the first-e parameter inquires address for obtaining container IP and port mapping Mapping relations;To which the application in each container can inquire the address of cache of oneself with b, query function is by cluster management device It provides.Second-e parameter, the address HOST_CONFIG for specified configuration center fixture.Physical machine is created according to container to be started Order creates each container.
Step 102, physical machine create start command according to container, create each container, so as to generate the first-e in each container Parameter, the corresponding environmental variance of the second-e parameter.
In the present embodiment, it specifically, physical machine creates start command according to the container received, 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 in each container Each parameter of container creation start command.
The application disposed in step 103, container creates each parameter access in start command by container and container and matches Set center fixture and registration center's device.
Wherein, the specific implementation of step 103 are as follows:
Application in container accesses configuration center device according to the address of configuration center device specified by the second-e parameter, To obtain each configuration entry value in configuration center device, wherein include registration center's unit address in configuration entry value;
Application accesses registration center's device according to registration center's unit address in container;
The mapping relations of container IP accessed by the first-e parameter and port mapping inquiry address are sent out in application in container Registration center's device is given, so that after registration center's device saves mapping relations, answering in each container and registration center's device It is mutually accessed with by mapping relations.
Wherein, application in container, by the mapping of container IP accessed by the first-e parameter and port mapping inquiry address Relationship is sent to registration center's device, so that after registration center's device saves mapping relations, each container and registration center's device In application mutually accessed by mapping relations, comprising:
Application determines that the first environment of container starting corresponding with the first-e parameter becomes according to the first-e parameter in container Amount;
Application determines that the port mapping of container starting corresponding with first environment variable inquires address in container;
The corresponding port mapping inquiry address of first environment variable and Container ID are utilized when the application starting disposed in container, Inquire the address of current container, the mapping relations of physical machine address and port, wherein mapping relations are container IP address, physics Machine IP address, the mapping relations one by one with port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device save 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 starting is equivalent to starting at this time The application disposed in container.During the application starting of each container, the application disposed in each container is opened using container creation Each parameter in dynamic order removes access configuration center device and registration center's device, infuses to complete configuration item and obtain with service 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 removes access configuration center device;Due to being provided with each configuration entry value in configuration center, into And disposed in container using each configuration entry value in available configuration center device, include registration center in configuration entry value Registration center's unit address of device.Then the application disposed in container, according to registration center's unit address in configuration entry value HOST_REGISTRY removes access registration center's device.What the application to dispose in container can get the first-e parameter The mapping relations of container IP and port mapping inquiry 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, the application disposed in container can be according to the first-e Parameter determines the first environment variable HOST_GET_REALADDRESS of container starting corresponding with the first-e parameter, then holds The application disposed in device determines the port mapping of container starting corresponding with first environment variable HOST_GET_REALADDRESS Inquire address;Then the application disposed in container inquires address on startup, using the corresponding port mapping of first environment variable And Container ID, the address of current container, the mapping relations of physical machine address and port are inquired, can then 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 appearance Device IP address, physical machine IP address, the mapping relations one by one with port mapping inquiry address, are sent to registration center's device, make Mapping relations can be saved by obtaining registration center's device.And then the application of each container can by the mapping relations that are saved in container, The application in registration center's device is accessed, and the application in registration center's device can be reflected according to what is saved in registration center's device Relationship is penetrated, the application in each container is accessed, so that the application in container can be to registration center's device registration service.
The present embodiment obtains container by physical machine and creates start command, wherein container creates start command joins including-P Number, the first-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physics one by one automatically On port on machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, the second-e parameter Address for specified configuration center fixture;Physical machine creates start command according to container, each container is created, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;The application disposed in container is created by container and container Each parameter access configuration center device and registration center's device in start command.It, can be external by container to use-P parameter Exposure port is mapped to one by one automatically on the port in physical machine, without specifying physical machine corresponding with the port of container Port, therefore the resource contention of port level is not present.2 environmental variances can be created in container by 2-e parameters;And Using the first environment variable created by the first-e parameter, application can obtain the actual address externally serviced in container, the reality Border address is the port after physical machine address+mapping;Using the second environment variable created by the second-e parameter, applied in container Configuration center address can be obtained.From configuration center, using obtaining all environment configuration informations, including service register center Location.It applies after obtaining service register center address, the actual address of each service is registered to service register center, that is, is completed Service publication.
Fig. 2 is the flow chart using dispositions method provided by Embodiment 2 of the present invention based on container technique, in embodiment On the basis of one, as shown in Fig. 2, the method for the present embodiment, before step 101, further includes:
Step 201, station device receive the Disposition Instructions of applying of user's input, and will be sent to collection using Disposition Instructions Group's managing device.
In the present embodiment, specifically, station device can dispose the WEB server of BS structure, operator passes through behaviour Make platform device starting container.Specifically, what station device reception user inputted applies Disposition Instructions, then station device Cluster management device will be sent to using Disposition Instructions.
Step 202, cluster management device are according to Disposition Instructions are applied, according to the resource occupation situation of each physical machine and scheduling Strategy selects physical machine to be disposed.
In the present embodiment, specifically, in application operation Extension arrangement by cluster management device and several application operations Physical machine;Cluster management device is according to using Disposition Instructions, the resource occupation situation and scheduling of the current each physical machine of foundation Strategy goes to select physical machine to be disposed.Meanwhile recorded in cluster management device each physical machine address and each container Port mapping, and inquiry address is externally provided, physical machine address where corresponding container can be inquired according to the ID of a container With the port mapping information of the container.
Step 203, cluster management device generate container and create start command, and container creation start command is sent to portion The physical machine of administration.
In the present embodiment, specifically, cluster management device, which generates container, creates start command, and container is created and is started Order is sent to the physical machine to be disposed selected.
The present embodiment obtains container by physical machine and creates start command, wherein container creates start command joins including-P Number, the first-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physics one by one automatically On port on machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, the second-e parameter Address for specified configuration center fixture;Physical machine creates start command according to container, each container is created, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;The application disposed in container is created by container and container Each parameter access configuration center device and registration center's device in start command.It, can be external by container to use-P parameter Exposure port is mapped to one by one automatically on the port in physical machine, without specifying physical machine corresponding with the port of container Port, therefore the resource contention of port level is not present.2 environmental variances can be created in container by 2-e parameters;And Using the first environment variable created by the first-e parameter, application can obtain the actual address externally serviced in container, the reality Border address is the port after physical machine address+mapping;Using the second environment variable created by the second-e parameter, applied in container Configuration center address can be obtained.From configuration center, using obtaining all environment configuration informations, including service register center Location.It applies after obtaining service register center address, the actual address of each service is registered to service register center, that is, is completed Service publication.Meanwhile in the present embodiment, in conjunction with configuration center, the appearance that all physical machines can be managed collectively and wherein run Device, container after actuation all are persisted to station device, and user can be filled by station device by cluster management Set the unified various operations for completing container.
Fig. 3 is the structural schematic diagram for the application deployment system based on container technique that the embodiment of the present invention three provides, such as Fig. 3 It is shown, system provided in this embodiment, comprising:
Physical machine 31, configuration center device 32 and registration center's device 33;
Wherein, physical machine 31 includes:
Module 311 is obtained, for obtaining module, for obtaining container creation start command, wherein container creation starting life Enabling includes-P parameter, the first-e parameter, the second-e parameter, and-P parameter is used for the port of each container in physical machine automatically one by one It being mapped on the port in physical machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, Second-e parameter is used for the address of specified configuration center fixture;
Creation module 312 creates each container, so as to generate first-in each container for creating start command according to container E parameter, the corresponding environmental variance of the second-e parameter;
Access modules 313, the application for disposing in container create each ginseng in start command by container and container Number access configuration center device and registration center's device.
Wherein, access modules 313, comprising:
First access submodule 3131, for application in container, according to 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 in include Registration center's unit address;
Second access submodule 3132, for application in container according to registration center's unit address, access registration center dress It sets;
Sending submodule 3133, for being looked into using by container IP accessed by the first-e parameter with port mapping in container Ask address mapping relations, be sent to registration center's device so that registration center's device save mapping relations after, each container and Application in registration center's device is mutually accessed by mapping relations.
Sending submodule 3133, is specifically used for:
Application determines that the first environment of container starting corresponding with the first-e parameter becomes according to the first-e parameter in container Amount;
Application determines that the port mapping of container starting corresponding with first environment variable inquires address in container;
The corresponding port mapping inquiry address of first environment variable and Container ID are utilized when the application starting disposed in container, Inquire the address of current container, the mapping relations of physical machine address and port, wherein mapping relations are container IP address, physics Machine IP address, the mapping relations one by one with port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device save 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 be performed that the embodiment of the present invention one provides based on appearance Device technology applies dispositions method, and realization principle is similar, and details are not described herein again.
The present embodiment obtains container by physical machine and creates start command, wherein container creates start command joins including-P Number, the first-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physics one by one automatically On port on machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, the second-e parameter Address for specified configuration center fixture;Physical machine creates start command according to container, each container is created, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;The application disposed in container is created by container and container Each parameter access configuration center device and registration center's device in start command.It, can be external by container to use-P parameter Exposure port is mapped to one by one automatically on the port in physical machine, without specifying physical machine corresponding with the port of container Port, therefore the resource contention of port level is not present.2 environmental variances can be created in container by 2-e parameters;And Using the first environment variable created by the first-e parameter, application can obtain the actual address externally serviced in container, the reality Border address is the port after physical machine address+mapping;Using the second environment variable created by the second-e parameter, applied in container Configuration center address can be obtained.From configuration center, using obtaining all environment configuration informations, including service register center Location.It applies after obtaining service register center address, the actual address of each service is registered to service register center, that is, is completed Service publication.
Fig. 4 is the structural schematic diagram for the application deployment system based on container technique that the embodiment of the present invention four provides, in reality On the basis of applying example three, as shown in figure 4, system provided in this embodiment, further includes:
Station device 41 and cluster management device 42;
Station device 41, for receiving user's input before obtaining module 311 and obtaining container creation start command Using Disposition Instructions, and cluster management device 42 will be sent to using Disposition Instructions;
Cluster management device 42, for according to apply Disposition Instructions, resource occupation situation and tune according to each physical machine 31 Degree strategy, selects physical machine 31 to be disposed;It generates container and creates start command, container creation start command is sent to portion The physical machine 31 of administration.
The application deployment system based on container technique of the present embodiment can be performed provided by Embodiment 2 of the present invention based on appearance Device technology applies dispositions method, and realization principle is similar, and details are not described herein again.
The present embodiment obtains container by physical machine and creates start command, wherein container creates start command joins including-P Number, the first-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physics one by one automatically On port on machine, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, the second-e parameter Address for specified configuration center fixture;Physical machine creates start command according to container, each container is created, so that in each container Generate the first-e parameter, the corresponding environmental variance of the second-e parameter;The application disposed in container is created by container and container Each parameter access configuration center device and registration center's device in start command.It, can be external by container to use-P parameter Exposure port is mapped to one by one automatically on the port in physical machine, without specifying physical machine corresponding with the port of container Port, therefore the resource contention of port level is not present.2 environmental variances can be created in container by 2-e parameters;And Using the first environment variable created by the first-e parameter, application can obtain the actual address externally serviced in container, the reality Border address is the port after physical machine address+mapping;Using the second environment variable created by the second-e parameter, applied in container Configuration center address can be obtained.From configuration center, using obtaining all environment configuration informations, including service register center Location.It applies after obtaining service register center address, the actual address of each service is registered to service register center, that is, is completed Service publication.Meanwhile in the present embodiment, in conjunction with configuration center, the appearance that all physical machines can be managed collectively and wherein run Device, container after actuation all are persisted to station device, and user can be filled by station device by cluster management Set the unified various operations for completing container.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (6)

1. a kind of apply dispositions method based on container technique characterized by comprising
Physical machine obtains container and creates start command, wherein the container creation start command includes-P parameter, the first-e ginseng Number, the second-e parameter ,-P parameter are used for the port being mapped to the port of each container in physical machine one by one automatically in physical machine On, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, and the second-e parameter is matched for specified Set the address of center fixture;
The physical machine creates start command according to the container, each container is created, so as to generate the first-e in each container Parameter, the corresponding environmental variance of the second-e parameter;
The application disposed in container creates each parameter access configuration center dress in start command by container and the container It sets and registration center's device;
The application disposed in container creates each parameter access configuration center dress in start command by container and the container It sets and registration center's device, comprising:
Application, according to the address of configuration center device specified by the second-e parameter, accesses the configuration center in container Device, to obtain each configuration entry value in the configuration center device, wherein include registration center's device in the configuration entry value Address;
Application accesses registration center's device according to registration center's unit address in container;
The mapping relations of container IP accessed by the first-e parameter and port mapping inquiry address are sent to by application in container Registration center's device, so that after registration center's device saves the mapping relations, in each container and the registration Application in center device is mutually accessed by the mapping relations.
2. the method according to claim 1, wherein being applied in container, by appearance accessed by the first-e parameter The mapping relations of device IP and port mapping inquiry address, are sent to registration center's device, so that registration center's device After saving the mapping relations, the application in each container and registration center's device is carried out mutual by the mapping relations Access, comprising:
Application determines that the first environment of container starting corresponding with the first-e parameter becomes according to the first-e parameter in container Amount;
Application determines that the port mapping of container starting corresponding with first environment variable inquires address in container;
The corresponding port mapping inquiry address of first environment variable and Container ID, inquiry are utilized when the application starting disposed in container 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, the mapping relations one by one with port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device save mapping relations it Afterwards, the application in each container and registration center's device is mutually accessed by the mapping relations.
3. the method according to any one of claims 1 and 2, which is characterized in that obtain container creation in the physical machine and open Before dynamic order, further includes:
Station device receives the Disposition Instructions of applying of user's input, and the application Disposition Instructions are sent to cluster management dress It sets;
The cluster management device applies Disposition Instructions according to described, the resource occupation situation and scheduling plan according to each physical machine Slightly, physical machine to be disposed is selected;
The cluster management device generates the container and creates start command, and container creation start command is sent to portion The physical machine of administration.
4. a kind of application deployment system based on container technique characterized by comprising
Physical machine, configuration center device and registration center's device;
Wherein, the physical machine includes:
Module is obtained, for obtaining container creation start command, wherein container creation start command includes-P parameter, the One-e parameter, the second-e parameter ,-P parameter are used to the port of each container in physical machine being mapped to physical machine one by one automatically Port on, the first-e parameter is used to obtain the mapping relations of container IP and port mapping inquiry address, and the second-e parameter is used for The address of specified configuration center fixture;
Creation module creates each container, so as to generate described the in each container for creating start command according to the container One-e parameter, the corresponding environmental variance of the second-e parameter;
Access modules, the application for disposing in container create each parameter in start command by container and the container Access configuration center device and registration center's device;
The access modules, comprising:
First access submodule, for application, the ground according to configuration center device specified by the second-e parameter in container Location accesses the configuration center device, to obtain each configuration entry value in the configuration center device, wherein the configuration item It include registration center's unit address in value;
Second access submodule accesses registration center's device for application in container according to registration center's unit address;
Sending submodule, for inquiring address using by container IP accessed by the first-e parameter and port mapping in container Mapping relations are sent to registration center's device, so that after registration center's device saves the mapping relations, it is each to hold Application in device and registration center's device is mutually accessed by the mapping relations.
5. system according to claim 4, which is characterized in that the sending submodule is specifically used for:
Application determines that the first environment of container starting corresponding with the first-e parameter becomes according to the first-e parameter in container Amount;
Application determines that the port mapping of container starting corresponding with first environment variable inquires address in container;
The corresponding port mapping inquiry address of first environment variable and Container ID, inquiry are utilized when the application starting disposed in container 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, the mapping relations one by one with port mapping inquiry address;
Mapping relations are sent to registration center's device by application in container so that registration center's device save mapping relations it Afterwards, the application in each container and registration center's device is mutually accessed by the mapping relations.
6. according to the described in any item systems of claim 4 or 5, which is characterized in that the system, further includes:
Station device and cluster management device;
The station device, for receiving user's input before the acquisition module obtains container creation start command Cluster management device is sent to using Disposition Instructions, and by the application Disposition Instructions;
The cluster management device, for applying Disposition Instructions, resource occupation situation and tune according to each physical machine according to described Degree strategy, selects physical machine to be disposed;The container creation start command is generated, container creation start command is sent 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 CN106445585A (en) 2017-02-22
CN106445585B true 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)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107105061B (en) * 2017-05-31 2020-09-29 北京中电普华信息技术有限公司 Service registration method and device
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
CN109032806B (en) * 2018-07-30 2021-05-14 华为技术有限公司 Service scheduling method and device for 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
CN109992354B (en) * 2019-04-09 2021-02-19 腾讯科技(深圳)有限公司 Container processing method, device, main body server, system and storage medium
CN110764875A (en) * 2019-10-25 2020-02-07 北京威晟艾德尔科技有限公司 Docker container creating method based on competition mechanism

Family Cites Families (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
CN103428241B (en) * 2012-05-18 2016-08-24 中兴通讯股份有限公司 Service arrangement method and system
CN104991815B (en) * 2015-06-19 2019-01-18 北京奇虎科技有限公司 The management method and system of Docker container
CN105187500A (en) * 2015-08-07 2015-12-23 浪潮(北京)电子信息产业有限公司 Container-based distributed storage system deployment method
CN105354076B (en) * 2015-10-23 2019-01-25 北京云端光科技术有限公司 Application deployment method and device

Also Published As

Publication number Publication date
CN106445585A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106445585B (en) Dispositions method and system are applied based on container technique
CN112019475B (en) Resource access method, device, system and storage medium under server-free architecture
CN103167041B (en) A kind ofly support the system and method that the automation of cloud environment application cluster is disposed
US20230168806A1 (en) Storage system interface
US11271827B2 (en) Network service life cycle management grant method and apparatus
CN110326255A (en) Manage messaging protocol communication
US9246762B1 (en) NTP client-side automatic configuration
CN107566541A (en) Capacitor network resource allocation methods, system, storage medium and electronic equipment
CN105630488A (en) Docker container technology-based continuous integration realizing method
CN105704188B (en) Using the dispositions method and device with service
CN111796838B (en) Automatic deployment method and device for MPP database
CN113301116A (en) Cross-network communication method, device, system and equipment for microservice application
CN106856438B (en) Network service instantiation method, device and NFV system
CN111431956A (en) Cross-network service access method, device, system and storage medium
CN105141702A (en) Model-based mixed cloud construction method
CN116089090A (en) Virtual resource configuration method, device, equipment and medium of graphic display
CN114826869B (en) Device management method and device management system
US8978041B2 (en) Service virtualization container
CN105103125A (en) Method for obtaining clock interruption signal, and nfv functional entity
CN106686031B (en) Method and device for upgrading application to SaaS mode
CN107547607B (en) Cluster migration method and device
WO2020009014A1 (en) Management device and network management method
CN110413381A (en) For the method and apparatus to application service container
CN110971665A (en) Management method, system, equipment and storage medium for interfacing multi-type storage
CN116056240B (en) Resource allocation system, method and 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