CN109597655A - Configure the method and device of application program - Google Patents
Configure the method and device of application program Download PDFInfo
- Publication number
- CN109597655A CN109597655A CN201710900537.7A CN201710900537A CN109597655A CN 109597655 A CN109597655 A CN 109597655A CN 201710900537 A CN201710900537 A CN 201710900537A CN 109597655 A CN109597655 A CN 109597655A
- Authority
- CN
- China
- Prior art keywords
- application program
- configuration
- file
- component
- node
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
This application discloses a kind of method and devices for configuring application program, belong to technical field of virtualization.This method comprises: the first configuration component obtains the file information for the first application program disposed in the first container;The file information of first configuration component according to the first application program, the basic document needed for obtaining the first application program in the database being located at outside first node;The configuration parameter of first the configuration component basic document according to needed for the first application program and the first application program generates the configuration file of the first application program.In the embodiment of the present application, application program is configured by the configuration component realization of external container, and basic document needed for configuration application program is obtained from the database outside node by above-mentioned configuration component, configuration to application program is decoupled with the container for disposing above-mentioned application program, to avoid the intrusive mood design to container, subsequent change and upgrading to application program in container is simpler easy.
Description
Technical field
The invention relates to technical field of virtualization, in particular to a kind of method and device for configuring application program.
Background technique
Container (container) technology is a kind of novel virtualization technology.Referring to FIG. 1, it illustrates a kind of containers
The schematic diagram of deployment scenario.Container 11 is deployed in node (node) 10 namely node 10 is the host of container 11.One section
One or more containers 11 can be disposed in point 10.Node 10 can be virtual machine, be also possible to physical machine.It can be disposed in container 11
Application program 12, such as web service (Web Server) application, database application.In order to ensure application program 12 is in container 11
Middle normal operation needs before application program 12 starts operation, executes relevant configuration to the application program 12 and operates.
In Distributed Application scene (such as micro services system), the application program in different vessels interdepends, so that answering
It needs to synchronize between different containers with the configuration parameter of program.Configuration parameter is to carry out initial configuration to application program
The parameter of Shi Suoxu, such as Internet protocol (Internet Protocol, IP) address, port numbers, component parameter etc..It please refers to
Fig. 2, it illustrates the schematic diagrames in Distributed Application scene, configured to the application program in container.It include configuration in figure
Center 20, first node 21 and second node 22.Configuration center 20 is mainly used for providing the access facility to configuration parameter.First
It is deployed with the first container 211 in node 21, the first application program 212,22 middle part of second node are deployed in the first container 211
There is second container 221 in administration, the second application program 222 is deployed in the second container 221, and the second application program 222 depends on
The configuration parameter of first application program 212 namely the second application program 222 are to need to be configured with the first application program 212
Synchronous application program.As shown in Fig. 2, operation has configuration visitor in each container (including the first container 211 and second container 221)
The configuration client run in the first container 211 is denoted as the first configuration client 213 below by family end, will be in second container 221
The configuration client of operation is denoted as the second configuration client 223.Client is configured usually to be realized by the script of lightweight, it is main negative
Blame the configuration process of push, subscription and execution to application program of configuration parameter.
The first container 211 calls initializtion script in load phase, by the initializtion script from environmental variance
Start-up parameter is read in (environment variables), includes the configuration of the first application program 212 in above-mentioned start-up parameter
Parameter, and call the configuration script of the first application program 212.First configuration client 213 executes matching for the first application program 212
Script is set, the configuration parameter of the first application program 212 is written in the configuration template of the first application program 212, generates first
The configuration file of application program 212 then stores the configuration file of the first application program 212 into specified directory, to complete
To the configuration process of the first application program 212.In addition, the first configuration client 213 also joins the configuration of the first application program 212
Number is sent to configuration center 20, so that the other application program dependent on the first application program 212 obtains the from configuration center 20
The configuration parameter of one application program 212.
Second container 221 calls initializtion script in load phase, calls the second application program 222 by the initializtion script
Configuration script.Second configuration client 223 executes the configuration script of the second application program 222, by the second application program 222
Configuration parameter is written in the configuration template of the second application program 222, generates the configuration file of the second application program 222, then
The configuration file of second application program 222 is stored into specified directory, to complete the configuration to the second application program 222
Journey.Wherein, the configuration parameter of the second application program 222 is receiving what configuration center 20 was sent by the second configuration client 223
It is obtained after configuration change notice from configuration center 20, above-mentioned configuration change notice is receiving the first configuration by configuration center 20
After the configuration parameter for the first application program 212 that client 213 is sent, configured to needs with the first application program 212
The corresponding configuration client of synchronous other application program (such as the second application program 222) is sent.
In the prior art, it by the configuration process of the configuration client executing application program in container, configures client and exists
The required configuration script used and configuration template are also stored in advance in a reservoir when configuring to application program.Due to different
Configuration script needed for application program, configuration template and relevant configuration flow are not quite similar, therefore are directed to different containers,
It needs customized development to configure client, configuration script and configuration template accordingly, and is previously implanted in container.Above-mentioned customization is opened
Hair process belongs to the intrusive mood design to container, is unfavorable for subsequent change and upgrading to application program in container.
Summary of the invention
The embodiment of the present application provides a kind of method and device for configuring application program, can be used for solving the prior art and is mentioned
The allocation plan for application program in container supplied melts hair because needing to be customized different containers, causes to be unfavorable for
The problem of subsequent change and upgrading to application program in container.
On the one hand, the embodiment of the present application provides a kind of method for configuring application program, is applied in first node, first segment
Point includes the first configuration component and the first container;This method comprises: the first configuration component obtains first disposed in the first container
The file information of application program, basis text needed for the file information of the first application program is used to indicate the first application program of configuration
Part;First configuration component obtains the according to the file information of the first application program from the database being located at outside first node
Basic document needed for one application program;First configuration component basic document according to needed for the first application program and the first application
The configuration parameter of program generates the configuration file of the first application program, wherein the configuration parameter of the first application program is held from first
It is obtained in the environmental variance of device.
Scheme provided by the embodiments of the present application configures application program by the configuration component realization of external container, and
Basic document needed for configuration application program is obtained from the database outside node by above-mentioned configuration component, passes through above-mentioned side
Formula decouples the configuration to application program with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided,
Subsequent change and upgrading to application program in container is simpler easy.
In a possible design, the file information of the first application program includes the metadata configurations of the first application program
The mark of file includes the mark of basic document needed for the first application program in the metadata configurations file of the first application program
Know;First configuration component obtains the according to the file information of the first application program from the database being located at outside first node
Basic document needed for one application program, comprising: the first configuration component is according to the metadata configurations file of the first application program
Mark, obtains the metadata configurations file of the first application program from database;First configuration component parses the first application program
Metadata configurations file, obtain the first application program needed for basic document mark;First configuration component is answered according to first
The mark of the basic document needed for program, the basic document needed for obtaining the first application program in database.
Scheme provided by the embodiments of the present application, basic document needed for configuring application program is by above-mentioned configuration component from node
It is obtained in external database, by the above-mentioned means, by configuration and the container solution of the above-mentioned application program of deployment to application program
Coupling, to avoid the intrusive mood design to container, subsequent change and upgrading to application program in container is simpler easy.
In a possible design, above-mentioned basic document includes configuration script and configuration template;First application program
It include configuration script sequence and configuration template list in metadata configurations file;It include the first application program in configuration script sequence
The mark of required configuration script, and arrangement of the mark of configuration script needed for the first application program in configuration script sequence
Sequentially, configuration script needed for being used to indicate the first application program executes sequence;It include the first application in configuration template list
The mark of configuration template needed for program and the corresponding file store path of each configuration template, file store path are used
In the store path for the configuration file that instruction is generated according to configuration template.
In a possible design, the first configuration component basic document according to needed for the first application program and first is answered
With the configuration parameter of program, after the configuration file for generating the first application program, further includes: the first configuration component is applied first
The configuration parameter of program is sent to the configuration center outside first node;First configuration component into second node second
Configuration component sends configuration change notice, and configuration change notice is for notifying the second configuration component obtains first from configuration center to answer
With the configuration parameter of program.
In a possible design, second configuration component of first configuration component into second node sends configuration change
Notice, comprising: the first configuration component sends configuration change notice by short connect to the second configuration component.Specifically, first matches
It sets component and establishes request to the transmission connection of the second configuration component, connection foundation request is logical with the foundation of the second configuration component for requesting
Letter connection;After being successfully established above-mentioned communication connection, the first configuration component sends configuration change notice to the second configuration component;
After configuration change notice is sent successfully, the first configuration component disconnects communication connection.
Scheme provided by the embodiments of the present application is realized between configuration component and configuration center by way of short connection and is matched
The reception and transmission for setting parameter avoid the connection resource for occupying configuration center.
In a possible design, the first configuration component basic document according to needed for the first application program and first is answered
With the configuration parameter of program, after the configuration file for generating the first application program, further includes: when in the third container of first node
The third application program of deployment is the first configuration component root when needing with the first application program application program that carry out configuration synchronous
According to the configuration parameter of basic document needed for third application program and third application program, the configuration text of third application program is generated
Part, wherein the configuration parameter of third application program includes the configuration parameter of the first application program.
Scheme provided by the embodiments of the present application, if two containers in same node are deployed with application program, also,
Need to rely on when configuring the application program of one of container another container application program when, without from configuration center
The configuration parameter of the application program of an other container is obtained, to promote the efficiency of configuration application program.
On the other hand, the embodiment of the present application provides a kind of method for configuring application program, is applied in second node, second
Node includes the second configuration component and second container;This method comprises: the second configuration component obtains the disposed in second container
The file information of two application programs, basis needed for the file information of the second application program is used to indicate the second application program of configuration
File;Second configuration component is obtained from the database being located at outside second node according to the file information of the second application program
Basic document needed for second application program;Matching for the first application program is received in the configuration center being located at outside second node
After setting parameter, the second configuration component receives the configuration parameter for the first application program that configuration center is sent, the first application program
It is the application program being deployed in the container of first node;Second configuration component basic document according to needed for the second application program
With the configuration parameter of the second application program, the configuration file of the second application program is generated, wherein the configuration of the second application program is joined
Number includes the configuration parameter of the first application program.
Scheme provided by the embodiments of the present application configures application program by the configuration component realization of external container, and
Basic document needed for configuration application program is obtained from the database outside node by above-mentioned configuration component, passes through above-mentioned side
Formula decouples the configuration to application program with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided,
Subsequent change and upgrading to application program in container is simpler easy.
In a possible design, the file information of the second application program includes the metadata configurations of the second application program
The mark of file includes the mark of basic document needed for the second application program in the metadata configurations file of the second application program
Know;Second configuration component obtains the according to the file information of the second application program from the database being located at outside second node
Basic document needed for two application programs, comprising: the second configuration component is according to the metadata configurations file of the second application program
Mark, obtains the metadata configurations file of the second application program from database;Second configuration component parses the second application program
Metadata configurations file, obtain the second application program needed for basic document mark;Second configuration component is answered according to second
The mark of the basic document needed for program, the basic document needed for obtaining the second application program in database.
In a possible design, the second configuration component receives the configuration ginseng for the first application program that configuration center is sent
Before number, further includes: the second configuration component receives the configuration change notice that the first configuration component is sent, and configuration change notice is used for
The second configuration component is notified to obtain the configuration parameter of the first application program from configuration center;Second configuration component is sent out to configuration center
Information acquisition request is sent, information acquisition request is used for the configuration parameter of the first application program of request.
In a possible design, the second configuration component receives the configuration change notice that the first configuration component is sent, packet
Include: the second configuration component receives the configuration change notice that the first configuration component is sent by short connection.Specifically, the second configuration group
Part receives the connection that the first configuration component is sent and establishes request;Second configuration component establishes request and the first configuration group according to connection
Part establishes communication connection;Second configuration component receives the configuration change notice that the first configuration component is sent, wherein in the second configuration
Component is successfully received after configuration change notice, and communication connection is disconnected.
Another aspect, the embodiment of the present invention provide a kind of device, which has first realized in above method example
The function of node side.The function can also execute corresponding software realization by hardware realization by hardware.It is described hard
Part or software include one or more modules corresponding with above-mentioned function or unit.
It include processor and communication interface in the structure of device in a possible design, the processor is configured
To support device to execute the corresponding function in first node side in the above method.The communication interface is for supporting device to set with other
Communication between standby.Further, device can also include memory, and the memory is saved for coupling with processor
The necessary program instruction of device and data.
In another aspect, the embodiment of the present invention provides a kind of device, which has second realized in above method example
The function of node side.The function can also execute corresponding software realization by hardware realization by hardware.It is described hard
Part or software include one or more modules corresponding with above-mentioned function or unit.
It include processor and communication interface in the structure of device in a possible design, the processor is configured
To support device to execute the corresponding function in second node side in the above method.The communication interface is for supporting device to set with other
Communication between standby.Further, device can also include memory, and the memory is saved for coupling with processor
The necessary program instruction of device and data.
Also on the one hand, the embodiment of the present application provides a kind of computer storage medium, for being stored as used in above-mentioned apparatus
Computer software instructions, it includes the programs for executing first node side designed by above-mentioned aspect.
Also on the one hand, the embodiment of the present application provides a kind of computer storage medium, for being stored as used in above-mentioned apparatus
Computer software instructions, it includes the programs for executing second node side designed by above-mentioned aspect.
Also on the one hand, the embodiment of the present application provides a kind of computer program product, when the computer program product is performed
When, the method that is used to execute first node side described in above-mentioned aspect.
Also on the one hand, the embodiment of the present application provides a kind of computer program product, when the computer program product is performed
When, the method that is used to execute second node side described in above-mentioned aspect.
Compared to the prior art, in the embodiment of the present application, by external container configuration component realize to application program into
Row configuration, and basic document needed for configuration application program is obtained from the database outside node by above-mentioned configuration component, is led to
Aforesaid way is crossed, the configuration to application program is decoupled with the container for disposing above-mentioned application program, to avoid invading container
Enter formula design, subsequent change and upgrading to application program in container is simpler easy.
Detailed description of the invention
Fig. 1 shows the schematic diagram of the container of deployment in node;
Fig. 2 is the schematic diagram configured in the prior art to application program that the prior art provides;
Fig. 3 A is the schematic diagram for the application scenarios that the application one embodiment provides;
Fig. 3 B is the schematic diagram for the application scenarios that another embodiment of the application provides;
Fig. 4 A is the flow chart of the method for the configuration application program that the application one embodiment provides;
Fig. 4 B is the schematic diagram for the macro substitution that the application one embodiment provides;
Fig. 4 C is the schematic diagram for the metadata configurations file that the application one embodiment provides;
Fig. 5 is the flow chart of the method for the configuration application program that another embodiment of the application provides;
Fig. 6 is the flow chart of the method for the configuration application program that another embodiment of the application provides;
Fig. 7 is the flow chart of the method for the configuration application program that another embodiment of the application provides;
Fig. 8 is the block diagram of the device for the configuration application program that the application one embodiment provides;
Fig. 9 is the block diagram of the device for the configuration application program that another embodiment of the application provides;
Figure 10 A is the schematic block diagram for the electronic equipment that the application one embodiment provides;
Figure 10 B is the structural schematic diagram for the electronic equipment that the application one embodiment provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing, to the embodiment of the present application
In technical solution be described.
The system architecture and business scenario of the embodiment of the present application description are to clearly illustrate that the application is implemented
The technical solution of example, does not constitute the restriction to technical solution provided by the embodiments of the present application, those of ordinary skill in the art can
Know, with the differentiation of system architecture and the appearance of new business scene, technical solution provided by the embodiments of the present application is for similar
Technical problem, it is equally applicable.
In conjunction with reference Fig. 3 A, it illustrates the schematic diagrames for the implementation environment that the application one embodiment provides.The implementation ring
Border includes: first node 30, database 50 and configuration center 60.
First node 30 includes the first configuration component 31 and n container 32, and n is can in positive integer namely first node 30
It also may include at least two containers 32 to include a container 32.In the embodiment of the present application, the first container can be above-mentioned
Any one container in n container 32, the first container are indicated with label 33.First configuration component 31 is for providing to first segment
The function that the application program disposed in each container 32 in point 30 is configured.It is deployed with application program in each container 32,
An application program can be disposed in each container 32, can also dispose multiple application programs.In the embodiment of the present application, only with
It is illustrated for one application program of deployment in each container 32.For example, being deployed with the first application in the first container 33
Program.First node 30 can be virtual machine, be also possible to physical machine (such as server).
Database 50 be used for store application program metadata configurations file and application program needed for basic document.
Metadata configurations file is for including application program in basic document, such as metadata configurations file needed for indicating application program
The mark of required basic document.File needed for basic document refers to configuration application program, such as basic document include configuration
Script and configuration template.Wherein, configuration script is for executing action of configuration, such as by the configuration parameter write-in configuration mould of application program
Plate forms configuration file.Configuration template refers to the template file of the configuration file of application program, there is each definition in configuration template
Mapping relations between the title and parameter value of configuration parameter can be simple and efficient by configuration template combination macro substitution mode
Ground obtains configuration file.Configuration center 60 is used to provide the access facility of the configuration parameter for application program.50 He of database
Configuration center 60 can be deployed in same physical equipment (such as server), can also be deployed in different physical equipments.
It in practical applications, may include multiple nodes in above-mentioned implementation environment, first node 30 can be above-mentioned multiple
Any one node in node.Database 50 is deployed in outside each node, independent mutually with each node.Configuration center 60
Also it is deployed in outside each node, it is independent mutually with each node.
Optionally, in conjunction with reference Fig. 3 B, which further includes second node 40.
Second node 40 includes the second configuration component 41 and m container 42, and m is can in positive integer namely second node 40
It also may include at least two containers 42 to include a container 42.In the embodiment of the present application, second container can be above-mentioned
Any one container in m container 42, second container are indicated with label 43.Second configuration component 41 is for providing to the second section
The function that the application program disposed in each container 42 in point 40 is configured.It is deployed with application program in each container 42,
An application program can be disposed in each container 42, can also dispose multiple application programs.In the embodiment of the present application, only with
It is illustrated for one application program of deployment in each container 42.For example, being deployed with the second application in second container 43
Program.Second node 40 can be virtual machine, be also possible to physical machine (such as server).
First node 30 and second node 40 can be two mutual independent physical machines.Optionally, when first node 30
When being virtual machine with second node 40, first node 30 and second node 40 can be two be deployed in same physical machine
Virtual machine is also possible to two virtual machines being deployed in two different physical machines.
When above-mentioned first application program and the second application program are two examples of a certain Distributed Application, in the application
In embodiment, it is assumed that it is to need that the second application program, which needs to rely on to the configuration of the first application program namely the second application program,
The synchronous application program of configuration is carried out with the first application program.Above-mentioned configuration, which synchronizes, to be referred in the operation of the second application program launching
Before, relevant configuration is executed to the second application program according to the configuration parameter of the first application program to operate.
In the embodiment of the present application, application program is configured by the configuration component realization of external container, and configuration is answered
The basic document needed for program is obtained from the database outside node by above-mentioned configuration component, by the above-mentioned means, by right
The configuration of application program is decoupled with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided, it is subsequent right
The change and upgrading of application program are simpler easy in container.
Below by based on it is recited above the invention relates to general character in terms of, it is further detailed to the embodiment of the present application
It describes in detail bright.
Fig. 4 A is please referred to, it illustrates the flow charts of the method for the configuration application program of the application one embodiment offer.
This method can be applied in the first node 30 in implementation environment shown in Fig. 3 A or Fig. 3 B.This method may include following several
A step.
Step 401, the first configuration component 31 obtains the file information for the first application program disposed in the first container 33.
First configuration component 31 is deployed in outside each container 32 in first node 30.First configuration component 31 has been used for
It is deployed in the configuration of the application program in each container 32 in first node 30 in pairs.Optionally, above-mentioned first configuration component
31 are properly termed as " config scheduler 1 ".The first application program is deployed in the first container 33.In the first application program
Before normal starting operation, need to complete the configuration to the first application program.
Basic document needed for the file information of first application program is used to indicate the first application program of configuration.First application
File needed for basic document needed for program refers to configuration first application program, such as above-mentioned basic document include configuration foot
Sheet and configuration template.
In one example, the file information of the first application program includes the metadata configurations file of the first application program
Mark.The mark of metadata configurations file is for uniquely indicating the metadata configurations file, different metadata configurations file tools
There is different marks.Basic document needed for the metadata configurations file of first application program is used to indicate the first application program,
Such as first application program metadata configurations file in include the first application program needed for basic document mark.
In other examples, the file information of the first application program includes the mark of basic document needed for the first application program
Know.Alternatively, the file information of the first application program includes the mark of the first application program, the mark of the first application program is for only
One indicates that first application program, different application programs have different marks.Optionally, the file letter of the first application program
Breath further includes the mark of the first container 33 and the mark of first node.
First node 30 by the first application deployment to the first container 33 when, the file of above-mentioned first application program is believed
(such as mark of metadata configurations file) configuration is ceased in the environmental variance of the first container 33.The environmental variance of the first container 33 is used
Required information when the specified starting of the first container 33 operation.For example, the operation of first node 30 is such as issued orders, docker run-e
Profile_id=xxx indicates when starting the first container 33, the mark " xxx " of metadata configurations file is configured to first
In the environmental variance of container 33.
When the first container 33 starts, (such as metadata configurations are literary by the file information of the first application program for the first container 33
The mark of part) it is sent to the first configuration component 31.Optionally, initializtion script (Init is stored in the first container 33
Script), the first container 33 loads initializtion script on startup, by initializtion script by the file information of the first application program
It is sent to the first configuration component 31.In one possible implementation, the first container 33 is answered by the way of bridge joint by first
It is sent to the first configuration component 31 with the file information of program, that is, the first container 33 calls the first configuration component 31 to provide
Interface sends the file information of the first application program by the interface to the first configuration component 31.In alternatively possible realization
In mode, the file information of the first application program is stored in book (Data Volume), 33 starting of the first container
Afterwards, starting notice is sent so that the first configuration component 31 reads the first application program from book to the first configuration component 31
The file information.
Step 402, the first configuration component 31 is according to the file information of the first application program, from being located at outside first node 30
Database 50 in obtain the first application program needed for basic document.
By the agency of, database 50 are used to store metadata configurations file and the application program institute of application program above
The basic document needed.Optionally, above-mentioned database 50 is properly termed as " Repository ".
Optionally, when the mark that the file information of the first application program includes the metadata configurations file of the first application program
When, above-mentioned steps 402 include following several sub-steps:
Step 402a, the first configuration component 31 is according to the mark of the metadata configurations file of the first application program, from data
The metadata configurations file of the first application program is obtained in library 50;
Optionally, the first configuration component 31 to be deployed with database 50 physical equipment send the first acquisition request, first
Acquisition request is used for the metadata configurations file of the first application program of request, carries the first application in the first acquisition request
The mark of the metadata configurations file of program, so that the above-mentioned physical equipment for being deployed with database 50 is receiving the first acquisition
After request, the first application program is obtained from database 50 according to the mark of the metadata configurations file of the first application program
Metadata configurations file, and after to the first configuration component 31 send the first application program metadata configurations file.
Step 402b, the first configuration component 31 parse the metadata configurations file of the first application program, obtain the first application
The mark of basic document needed for program;
The metadata configurations file of first application program includes the mark of basic document needed for the first application program.It is above-mentioned
For the mark of basic document for uniquely indicating basic document, the mark of basic document can be the title of basic document, different
Basic document has different marks.When basic document includes configuration script and configuration template, first number of the first application program
According in configuration file include the corresponding configuration script sequence of the first application program and configuration template list.Optionally, the first configuration
The mark of the configuration script needed for reading the first application program in the corresponding configuration script sequence of the first application program of component 31,
And the mark of the configuration template needed for reading the first application program in the corresponding configuration template list of the first application program.
It include the mark of configuration script needed for the first application program in the configuration script sequence of first application program.And
And first configuration script needed for application program mark putting in order in above-mentioned configuration script sequence, be used to indicate
Configuration script needed for one application program executes sequence.The mark of configuration script is different for uniquely indicating the configuration script
Configuration script have different marks.The configuration script of first application program is used to execute the configuration for the first application program
The configuration parameter of first application program is such as written the configuration template of the first application program, obtains the first application program by movement
Configuration file.
It include the mark of configuration template needed for the first application program in the corresponding configuration template list of first application program,
And the corresponding file store path of each configuration template.For any configuration template, the corresponding text of the configuration template
Part store path is used to indicate the store path of the configuration file generated according to the configuration template.The mark of configuration template is for only
One indicates that the configuration template, different configuration templates have different marks.Configuration template needed for first application program is used for
Generate the configuration file of the first application program.Definition has each of the first application program to match in the configuration template of first application program
Set the mapping relations between the title of parameter and parameter value, when the first application program of subsequent configuration generates first by macro substitution and answers
With the corresponding configuration file of program.In conjunction with reference Fig. 4 B, it illustrates the signals for the macro substitution that the application one embodiment provides
Figure.Definition has tri- configuration parameters of X, Y and Z in configuration template, wherein the configuration of the configuration parameter of entitled X and entitled Y are joined
Number is to be configured, and the parameter value of the configuration parameter of entitled Z is 3, in the parameter value 1 for getting the configuration parameter of entitled X and
After the parameter value 2 of the configuration parameter of entitled Y, by the configuration parameter of entitled X and entitled Y by the way of macro substitution
Parameter value is respectively written into configuration template, obtains configuration file.
In conjunction with reference Fig. 4 C, it illustrates the schematic diagrames of the metadata configurations file shown in the application one embodiment.It should
The mark (being denoted as Profile id) of metadata configurations file is xxx.Optionally, the mark of metadata configurations file compares using 64
The character string identification of special (bit).In the metadata configurations file other than record has Profile id, also record has configuration foot
This sequence (being denoted as Script sequence) and configuration template list (being denoted as Conf files).Include in configuration script sequence
The mark (such as title) of configuration script, such as the script1 in figure, script2.It include the mark of configuration template in configuration template list
Know (such as title), such as the conf1 and conf2 and the corresponding file store path of each configuration template in figure.Assuming that first answers
It is to need to first carry out script1 when then configuring the first application program, then hold shown in Fig. 4 C with the metadata configurations file of program
Row script2;The file store path of the corresponding configuration file of conf1 is /ect/conf/, the corresponding configuration file of conf2
File store path is /var/lib/.
Step 402c, the mark of the first basic document according to needed for the first application program of configuration component 31, from database
Basic document needed for obtaining the first application program in 50.
The mark of the basic document needed for the first application program includes the mark of configuration script needed for the first application program
When knowing the mark with configuration template needed for the first application program, the first configuration component 31 obtains the first application from database 50
Configuration script needed for program and configuration template.
Optionally, the first configuration component 31 to be deployed with database 50 physical equipment send the second acquisition request, second
Basic document needed for acquisition request is used for the first application program of request carries first in the second acquisition request using journey
The mark of basic document needed for sequence, so that the above-mentioned physical equipment for being deployed with database 50 is receiving the second acquisition request
Later, the mark of the basic document according to needed for the first application program base needed for obtaining the first application program in database 50
Plinth file, and after to the first configuration component 31 send the first application program needed for basic document.
In other possible examples, if the file information of the first application program includes basis needed for the first application program
The mark of file, then the first configuration component 31 is without executing step 402a and step 402b, but directly to being deployed with database
50 physical equipment sends above-mentioned second acquisition request, so that the above-mentioned physical equipment for being deployed with database 50 is receiving the
After two acquisition requests, first is obtained from database 50 according to the mark of basic document needed for the first application program using journey
Basic document needed for sequence, and after to the first configuration component 31 send the first application program needed for basic document.
In other possible examples, if in the file information of the first application program including the mark of the first application program,
The physical equipment for being deployed with database 50 at this time is preserved between the mark of application program and the mark of metadata configurations file
Corresponding relationship.The is carried in the first acquisition request that first configuration component 31 is sent to the physical equipment for being deployed with database 50
The mark of one application program, the physical equipment for being deployed with database 50 are searched above-mentioned corresponding relationship and are obtained and the first application program
Identify the mark (namely mark of the metadata configurations file of the first application program) of corresponding metadata configurations file, Zhi Hougen
The metadata configurations of the first application program are obtained from database 50 according to the mark of the metadata configurations file of the first application program
File, and after to the first configuration component 31 send the first application program metadata configurations file.First configuration component 31 obtains
To after the metadata configurations file of the first application program, 402b and 402c is obtained needed for the first application program through the above steps
Basic document.
Step 403, the first basic document according to needed for the first application program of configuration component 31 and the first application program
Configuration parameter generates the configuration file of the first application program, wherein the configuration parameter of the first application program is from the first container 33
It is obtained in environmental variance.
First configuration component 31 the configuration parameter, the first application program for getting the first application program configuration script and
After configuration template, the execution sequence of configuration script defined in the metadata configurations file according to the first application program is successively
Configuration parameter is written first by configuration script by way of macro substitution and answered by each configuration script for executing the first application program
With in the configuration template of program, the configuration file of the first application program is obtained.Optionally, the configuration text of the first application program is generated
After part, the first configuration component 31 is by above-mentioned configuration file according to the text of each configuration file indicated by metadata configurations file
Part store path respectively stores each configuration file into corresponding store path, to complete to the first application program
Configuration.
In addition, in the present embodiment, the configuration due to the first application program independent of other application program, so first
The configuration parameter of application program is obtained from the environmental variance of the first container 33.For example, the first container 33 is starting and is loading just
After beginningization script, the configuration parameter of the first application program is read from environmental variance by initializtion script, is then answered first
The first configuration component 31 is sent to the configuration parameter of program.Related initializtion script sends configuration ginseng to the first configuration component 31
Several modes may refer to the mode that related initializtion script described above sends the file information to the first configuration component 31,
Details are not described herein again.
In the embodiment of the present application, application program is configured by the configuration component realization of external container, and configuration is answered
The basic document needed for program is obtained from the database outside node by above-mentioned configuration component, by the above-mentioned means, by right
The configuration of application program is decoupled with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided, it is subsequent right
The change and upgrading of application program are simpler easy in container.
Referring to FIG. 5, it illustrates the flow charts of the method for the configuration application program of another embodiment of the application offer.
This method can be applied in the second node 40 in implementation environment shown in Fig. 3 B.This method may include the following steps.
Step 501, the second configuration component 41 obtains the file information for the second application program disposed in second container 43.
Second configuration component 41 is deployed in outside each container 42 in second node 40.Second configuration component 41 has been used for
It is deployed in the configuration of the application program in each container 42 in second node 40 in pairs.Optionally, above-mentioned second configuration component
41 are properly termed as " config scheduler 2 ".The second application program is deployed in second container 43.In the second application program
Before normal starting operation, need to complete the configuration to the second application program.
Basic document needed for the file information of second application program is used to indicate the second application program of configuration.Second application
File needed for basic document needed for program refers to configuration second application program, such as above-mentioned basic document include configuration foot
Sheet and configuration template.
In one example, the file information of the second application program includes the metadata configurations file of the second application program
Mark.The mark of metadata configurations file is for uniquely indicating the metadata configurations file, different metadata configurations file tools
There is different marks.Basic document needed for the metadata configurations file of second application program is used to indicate the second application program,
Such as second application program metadata configurations file in include the second application program needed for basic document mark.
In other examples, the file information of the second application program includes the mark of basic document needed for the second application program
Know.Alternatively, the file information of the second application program includes the mark of the second application program, the mark of the second application program is for only
One indicates that second application program, different application programs have different marks.Optionally, the file letter of the second application program
Breath further includes the mark of second container 43 and the mark of second node.
Second node 40 by the second application deployment to second container 43 when, the file of above-mentioned second application program is believed
(such as mark of metadata configurations file) configuration is ceased in the environmental variance of second container 43.The environmental variance of second container 43 is used
Required information when the specified starting of second container 43 operation.For example, the operation of second node 40 is such as issued orders, docker run-e
Profile_id=yyy indicates that the mark " yyy " of metadata configurations file is configured to second when second container 43 starts
In the environmental variance of container 43.
When second container 43 starts, (such as metadata configurations are literary by the file information of the second application program for second container 43
The mark of part) it is sent to the second configuration component 41.Optionally, initializtion script (Init is stored in second container 43
Script), second container 43 loads initializtion script on startup, by initializtion script by the file information of the second application program
It is sent to the second configuration component 41.In one possible implementation, second container 43 is answered by the way of bridge joint by second
It is sent to the second configuration component 41 with the file information of program, that is, second container 43 calls the second configuration component 41 to provide
Interface sends the file information of the second application program by the interface to the second configuration component 41.In alternatively possible realization
In mode, the file information of the second application program is stored in book, after second container 43 starts, to the second configuration group
Part 41 sends starting notice so that the second configuration component 41 reads the file information of the second application program from book.
Step 502, the second configuration component 41 is according to the file information of the second application program, from being located at outside second node 40
Database 50 in obtain the second application program needed for basic document.
By the agency of, database 50 are used to store metadata configurations file and the application program institute of application program above
The basic document needed.Optionally, above-mentioned database 50 is properly termed as " Repository ".
Optionally, when the mark that the file information of the second application program includes the metadata configurations file of the second application program
When, above-mentioned steps 502 include following several sub-steps:
Step 502a, the second configuration component 41 is according to the mark of the metadata configurations file of the second application program, from data
The metadata configurations file of the second application program is obtained in library 50;
Optionally, the second configuration component 41 sends third acquisition request, third to the physical equipment for being deployed with database 50
Acquisition request is used for the metadata configurations file of the second application program of request, carries the second application in third acquisition request
The mark of the meta data file of program, so that the above-mentioned physical equipment for being deployed with database 50 is receiving third acquisition request
Later, first number of the second application program is obtained from database 50 according to the mark of the metadata configurations file of the second application program
According to configuration file, and after to the second configuration component 41 send the second application program metadata configurations file.
Step 502b, the second configuration component 41 parse the metadata configurations file of the second application program, obtain the second application
The mark of basic document needed for program;
The metadata configurations file of second application program includes the mark of basic document needed for the second application program.It is above-mentioned
For the mark of basic document for uniquely indicating basic document, the mark of basic document can be the title of basic document, different
Basic document has different marks.When basic document includes configuration script and configuration template, first number of the second application program
According in configuration file include the corresponding configuration script sequence of the second application program and configuration template list.Optionally, the second configuration
The mark of the configuration script needed for reading the second application program in the corresponding configuration script sequence of the second application program of component 41,
And the mark of the configuration template needed for reading the second application program in the corresponding configuration template list of the second application program.
It include the mark of configuration script needed for the second application program in the configuration script sequence of second application program.And
And second configuration script needed for application program mark putting in order in above-mentioned configuration script sequence, be used to indicate
Configuration script needed for two application programs executes sequence.The mark of configuration script is different for uniquely indicating the configuration script
Configuration script have different marks.The configuration script of second application program is used to execute the configuration for the second application program
The configuration parameter of second application program is such as written the configuration template of the second application program, obtains the second application program by movement
Configuration file.
It include the mark of configuration template needed for the second application program in the corresponding configuration template list of second application program,
And the corresponding file store path of each configuration template.For any configuration template, the corresponding text of the configuration template
Part store path is used to indicate the store path of the configuration file generated according to the configuration template.The mark of configuration template is for only
One identifies the configuration template, and different configuration templates has different marks.Configuration template needed for second application program is used for
Generate the configuration file of the second application program.Definition has each of the second application program to match in the configuration template of second application program
Set the mapping relations between the title of parameter and parameter value, when the second application program of subsequent configuration generates second by macro substitution and answers
With the corresponding configuration file of program.Process in relation to macro substitution can be found in example shown in Fig. 4 B.
Step 502c, the mark of the second basic document according to needed for the second application program of configuration component 41, from database
Basic document needed for obtaining the second application program in 50.
The mark of the basic document needed for the second application program includes the mark of configuration script needed for the second application program
When knowing the mark with configuration template needed for the second application program, the second configuration component 41 obtains the second application from database 50
Configuration script needed for program and configuration template.
Optionally, the second configuration component 41 to be deployed with database 50 physical equipment send the 4th acquisition request, the 4th
Basic document needed for acquisition request is used for the second application program of request carries second in the 4th acquisition request using journey
The mark of basic document needed for sequence, so that the above-mentioned physical equipment for being deployed with database 50 is receiving the 4th acquisition request
Later, the mark of the basic document according to needed for the second application program base needed for obtaining the second application program in database 50
Plinth file, and after to the second configuration component 41 send the second application program needed for basic document.
In other possible examples, if the file information of the second application program includes basis needed for the second application program
The mark of file, then the second configuration component 41 is without executing step 502a and step 502b, but directly to being deployed with database
50 physical equipment sends above-mentioned 4th acquisition request, so that the above-mentioned physical equipment for being deployed with database 50 is receiving the
After four acquisition requests, second is obtained from database 50 according to the mark of basic document needed for the second application program using journey
Basic document needed for sequence, and after to the second configuration component 41 send the second application program needed for basic document.
In other possible examples, if in the file information of the second application program including the mark of the second application program,
The physical equipment for being deployed with database 50 at this time is preserved between the mark of application program and the mark of metadata configurations file
Corresponding relationship.The is carried in the third acquisition request that second configuration component 41 is sent to the physical equipment for being deployed with database 50
The mark of two application programs, the physical equipment for being deployed with database 50 are searched above-mentioned corresponding relationship and are obtained and the second application program
Identify the mark (namely mark of the metadata configurations file of the second application program) of corresponding metadata configurations file, Zhi Hougen
The metadata configurations of the second application program are obtained from database 50 according to the mark of the metadata configurations file of the second application program
File, and after to the second configuration component 41 send the second application program metadata configurations file.Second configuration component 41 obtains
To after the metadata configurations file of the second application program, 502b and 502c is obtained needed for the second application program through the above steps
Basic document.
Step 503, the configuration parameter of the first application program is received in the configuration center 60 being located at outside second node 40
Later, the second configuration component 41 receives the configuration parameter for the first application program that configuration center 60 is sent.
The configuration parameter of first application program includes the corresponding relationship between the title of configuration parameter and parameter value.Example
Such as, a certain item configuration parameter of the first application program is " IP=192.18.56.00 ", wherein " IP " is the name of configuration parameter
Claim, " 192.18.56.00 " is the parameter value of configuration parameter.First application program is to be deployed in the container of first node 30 (on i.e.
Text introduce the first container 33) in application program.
In one possible implementation, after the starting of second container 43, the second configuration component 41 is to positioned at second
Configuration center 60 outside node 40, which is sent, subscribes to request, subscribes to configuration parameter needed for carrying the second application program in request
Title (namely key).Wherein, the initialization foot that configuration parameter needed for the second application program loads after being started by second container 43
This reads from environmental variance.Subsequent configuration center 60 is after the configuration parameter for receiving the first application program, if first answers
With in the configuration parameter of program, there are configuration parameters needed for the second application program, then send first to the second configuration component 41 and answer
With the configuration parameter of program, above-mentioned configuration parameter can be sent in the form of key-value pair.
In addition, obtaining the realization of the another possibility of the configuration parameter of the first application program for the second configuration component 41
Mode embodiment will be illustrated below.
It should be noted that in the embodiment of the present application, be not construed as limiting to the execution opportunity of step 503, step 503 can be with
It executes, can also be executed after step 501 before step 501, or be performed simultaneously with step 501.
Step 504, the second basic document according to needed for the second application program of configuration component 41 and the second application program
Configuration parameter generates the configuration file of the second application program, wherein the configuration parameter of the second application program includes first using journey
The configuration parameter of sequence.
Second configuration component 41 the configuration parameter, the second application program for getting the second application program configuration script and
After configuration template, the execution sequence of configuration script defined in the metadata configurations file according to the second application program is successively
Configuration parameter is written second by configuration script by way of macro substitution and answered by each configuration script for executing the second application program
With in the configuration template of program, the configuration file of the second application program is obtained.Optionally, the configuration text of the second application program is generated
After part, the second configuration component 41 is by above-mentioned configuration file according to the text of each configuration file indicated by metadata configurations file
Part store path respectively stores each configuration file into corresponding store path, to complete to the second application program
Configuration.
In addition, in the present embodiment, the second application program, which depends on, applies the configuration of the first application program namely second
Program is to need and the first application program application program that carry out configuration synchronous.Above-mentioned configuration, which synchronizes, to be referred in the second application program
Before starting operation, relevant configuration is executed to the second application program according to the configuration parameter of the first application program and is operated.Second
The configuration parameter of application program includes the configuration parameter for the first application program that the second application program is relied on.Optionally, second
The configuration parameter of application program further includes the configuration parameter obtained from the environmental variance of second container 43.
In the embodiment of the present application, application program is configured by the configuration component realization of external container, and configuration is answered
The basic document needed for program is obtained from the database outside node by above-mentioned configuration component, by the above-mentioned means, by right
The configuration of application program is decoupled with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided, it is subsequent right
The change and upgrading of application program are simpler easy in container.
Referring to FIG. 6, it illustrates the flow charts of the method for the configuration application program of another embodiment of the application offer.
This method can be applied in implementation environment shown in Fig. 3 B.This method may include the following steps.
Step 601, the first configuration component 31 obtains the file information for the first application program disposed in the first container 33.
Basic document needed for the file information of first application program is used to indicate the first application program of configuration, the first container
33 be any one container in first node 30.
Step 602, the first configuration component 31 is according to the file information of the first application program, from being located at outside first node 30
Database 50 in obtain the first application program needed for basic document.
Step 603, the first basic document according to needed for the first application program of configuration component 31 and the first application program
Configuration parameter generates the configuration file of the first application program.
Wherein, the configuration parameter of the first application program is obtained from the environmental variance of the first container 33.
Above-mentioned steps 601-603 is identical as the step 401-403 in Fig. 4 A embodiment, referring to fig. 4 the introduction in A embodiment
Illustrate, the present embodiment repeats no more this.
Step 604, the configuration parameter of the first application program is sent to outside first node 30 by the first configuration component 31
The configuration center 60 in portion.
First configuration component 31 is after completing to the configuration of the first application program in the first container 33, by the first application
The configuration parameter of program is sent to the configuration center 60 outside first node 30, for needing to carry out with the first application program
Configure the configuration parameter that synchronous other application program obtains the first application program from configuration center 60.
By the agency of, configuration center 60 are used to provide the access facility of the configuration parameter for application program above.
It needs to carry out needing to obtain first when the synchronous other application program of configuration refers to configuration with the first application program and answer
With the application program of the configuration parameter of program.In practical applications, the first application program and deployment of the first container 33 are deployed in
Other application program in other containers can be the different instances of same application, relate to when configuring other application program
And some or all of configuration parameter it is identical with the configuration parameter of the first application program, it is therefore desirable to from configuration center 60 will
The configuration parameter of first application program is synchronized to other application program.
Optionally, the configuration parameter of the first application program is sent to positioned at first by the first configuration component 31 by short connection
Configuration center 60 outside node 30.That is, the first configuration component 31 is before the configuration parameter for sending the first application program, it is first
It establishes and communicates to connect with the physical equipment for being deployed with configuration center 60, configuration parameter is then sent by above-mentioned communication connection,
After being sent completely, the communication connection between the above-mentioned physical equipment for being deployed with configuration center 60 is disconnected.
Optionally, the first configuration component 31 send the first application program configuration parameter before, first to be deployed with configuration
The physical equipment at center 60 sends connection and establishes request, and connection establishes request for requesting in the first configuration component 31 and being deployed with
Communication connection is established between the physical equipment of configuration center 60, the address information that request carries first node 30 is established in connection,
The above-mentioned physical equipment for being deployed with configuration center 60 sends connection establishment response to the first configuration component 31, and connection establishment response is used
It is successfully established in confirming to establish to communicate to connect between the first configuration component 31 and the physical equipment for being deployed with configuration center 60, the
One configuration component 31 confirms the first configuration component 31 and is deployed with configuration center 60 after receiving above-mentioned connection establishment response
Physical equipment between communication connection be successfully established.In addition, after the configuration parameter of the first application program is sent successfully,
The communication connection that first configuration component 31 is disconnected and is deployed between the physical equipment of configuration center 60.Optionally, it is deployed with and matches
The physical equipment at center 60 is set after the configuration parameter for being properly received the first application program, returns to the to the first configuration component 31
One confirmation response, above-mentioned first confirmation response are used to indicate the configuration parameter for being properly received the first application program, and later first
Configuration component 31 disconnects above-mentioned communication connection according to above-mentioned first confirmation response.In other possible examples, when the first application
After the configuration parameter of program is successfully received, the physical equipment for being deployed with configuration center 60 is actively disconnected and the first configuration component
Communication connection between 31.
Correspondingly, the configuration center 60 outside first node 30 receives the first application that the first configuration component 31 is sent
The configuration parameter of program, and store the configuration parameter of above-mentioned first application program.Optionally, the configuration parameter of the first application program
It sends and stores in the form of key-value pair (key-value pair), wherein key indicates the title of configuration parameter, with this key pairs
The value answered indicates the parameter value of configuration parameter corresponding with the title of the configuration parameter.
Step 605, second configuration component 41 of first configuration component 31 into second node 40 sends configuration change notice.
The configuration component of each other nodes of first configuration component 31 into distribution application system sends configuration change
Notice.Above-mentioned other nodes include second node 40, and the configuration component of second node 40 is the second configuration component 41.Configuration change
Notify the configuration parameter for notifying the second configuration component 41 from the first application program of acquisition of configuration center 60.Configuration change notice
In include the title namely key of configuration parameter that the first configuration component 31 is sent to configuration center 60.In distribution application system
In, including multiple nodes, the different instances of the Distributed Application, a node are disposed in a manner of container in different nodes
In can dispose one or more examples of the Distributed Application.For example, the application program that a certain large size electric business platform provides is
Distributed application program, with multinomial services such as order management, buyer's management, seller's management, merchandise controls, above-mentioned different clothes
The example of business can be deployed in different containers, in different nodes.
Optionally, the first configuration component 31 sends configuration by short the second configuration component 41 connected into second node 40
Notification of Changes.That is, second configuration component 41 of first configuration component 31 into second node 40, which sends connection, establishes request, it should
Connection is established request and is communicated to connect for requesting to establish with the second configuration component 41, which establishes request and carry first node
30 communications address information.Second configuration component 41 sends connection establishment response to the first configuration component 31, which, which establishes, rings
Communication connection is successfully established applied between the first configuration component 31 of instruction and the second configuration component 41.First configuration component 31
After receiving connection establishment response, configuration change notice is sent to the second configuration component 41 by above-mentioned communication connection, and
After configuration change notice is sent successfully, above-mentioned communication connection is disconnected.Optionally, the second configuration component 41 is matched in successful reception
After setting Notification of Changes, the second confirmation response is returned to the first configuration component 31, above-mentioned second confirmation response, which is used to indicate, to be had become
Function receives configuration change notice, and the first configuration component 31 disconnects above-mentioned communication connection according to above-mentioned second confirmation response later.?
In other possible examples, after configuration change notice is successfully received, the second configuration component 41 is actively disconnected matches with first
Set the communication connection between component 31.
Step 606, the second configuration component 41 obtains the file information for the second application program disposed in second container 43.
Basic document needed for the file information of second application program is used to indicate the second application program of configuration, second container
43 be any one container in second node 40.
Step 607, the second configuration component 41 is according to the file information of the second application program, from being located at outside second node 40
Database 50 in obtain the second application program needed for basic document.
Above-mentioned steps 606-607 is identical as the step 501-502 in Fig. 5 embodiment, referring to introducing in Fig. 5 embodiment
Bright, the present embodiment repeats no more this.
It should be noted that in the embodiment of the present application, being not construed as limiting to the execution opportunity of step 606-607, step
606-607 can be executed before step 601-602, can also be executed after step 601-602, or with step 601-
602 are performed simultaneously.
Step 608, the second configuration component 41 sends information acquisition request to configuration center 60.
Optionally, it after the second configuration component 41 receives configuration change notice, is carried in detection configuration change notice
With the presence or absence of the title of configuration parameter needed for the second application program in the title of the configuration parameter of first application program, if depositing
, then the second configuration component 41 to configuration center send information acquisition request, if it does not exist, then do not execute to configuration center 60 send out
The step of sending information acquisition request.Information acquisition request is used for the configuration parameter of the first application program of request.Acquisition of information
The title (namely key) of configuration parameter needed for carrying the second application program in request.
Optionally, before the second configuration component 41 sends information acquisition request to configuration center 60, first and in deployment configuration
The physical equipment of the heart 60 establishes communication connection, is sent out later by the communication connection to the physical equipment at above-mentioned deployment configuration center 60
Send information acquisition request.
In addition, after the second configuration component 41 receives the configuration parameter of the first application program, with deployment configuration center 60
Physical equipment disconnect communication connection.Configuration parameter is realized between configuration component and configuration center 60 by way of short connection
Reception and transmission, avoid occupy configuration center 60 connection resource.
Step 609, configuration center 60 sends the configuration parameter of the first application program to the second configuration component 41.
The configuration parameter of above-mentioned first application program can be whole configuration parameters of the first application program, be also possible to
Configuration parameter needed for the second application program that two configuration components 41 indicate in information acquisition request.
Step 610, the second basic document according to needed for the second application program of configuration component 41 and the second application program
Configuration parameter generates the configuration file of the second application program.
Wherein, the configuration parameter of the second application program includes the configuration for the first application program that the second application program is relied on
Parameter.Optionally, the configuration parameter of the second application program further includes the configuration ginseng obtained from the environmental variance of second container 43
Number.Introduction explanation in relation to step 610, which can be found in Fig. 5 embodiment, illustrates that details are not described herein again about the introduction of step 504.
What is needed to add explanation is a bit, when the third application program disposed in the third container of first node 30 depends on
When the first application program namely third application program is to need and the first application program application program that carry out configuration synchronous.On
It states configuration and synchronizes and refer to before the operation of third application program launching, according to the configuration parameter of the first application program to third application
Program executes relevant configuration operation.First basic document according to needed for third application program of configuration component 31 and third application
The configuration parameter of program generates the configuration file of third application program.Above-mentioned third container is in first node 30 except first holds
Any one container except device 33.The configuration parameter of third application program includes the configuration parameter of the first application program.It is optional
Ground, the configuration parameter of third application program further include the configuration parameter obtained from the environmental variance of third container.In addition, first
Configuration component 31 needs to be implemented the third for obtaining and disposing in third container and answers before the configuration file for generating third application program
It is obtained according to the file information of third application program from the database 50 being located at outside first node 30 with the file information of program
The step of basic document needed for taking third application program.Wherein, the file information of third application program is used to indicate configuration
Basic document needed for three application programs.
In the embodiment of the present application, application program is configured by the configuration component realization of external container, and configuration is answered
The basic document needed for program is obtained from the database outside node by above-mentioned configuration component, by the above-mentioned means, by right
The configuration of application program is decoupled with the container for disposing above-mentioned application program, so that the intrusive mood design to container is avoided, it is subsequent right
The change and upgrading of application program are simpler easy in container.
In addition, reception and the hair of configuration parameter are realized between configuration component and configuration center by way of short connection
It send, avoids the connection resource for occupying configuration center.
Referring to FIG. 7, it illustrates the flow charts of the method for the configuration application program of another embodiment of the application offer.
This method can be applied in implementation environment shown in Fig. 3 B.This method may include the following steps.
Step 701, second container 43 starts.
Step 702, second container 43 loads initializtion script.
Step 703, second container 43 obtains the second application by initializtion script from the environmental variance of second container 43
The mark of the metadata configurations file of program.
Step 704, the mark of the metadata configurations file of the second application program is sent to the second configuration by second container 43
Component 41.
Step 705, the second configuration component 41 is according to the mark of the metadata configurations file of the second application program, from being located at the
The metadata configurations file of the second application program is obtained in database 50 outside two nodes 40.
Step 706, the second configuration component 41 parses the metadata configurations file of the second application program, obtains second and applies journey
The configuration script of sequence and the mark of configuration template.
Step 707, the second configuration component 41 is according to the configuration script of the second application program and the mark of configuration template, from position
The configuration script and configuration template of the second application program are obtained in database 50 outside second node 40.
Step 708, the first container 33 starts.
Step 709, the first container 33 loads initializtion script.
Step 710, the first container 33 obtains the first application by initializtion script from the environmental variance of the first container 33
The mark of the metadata configurations file of program.
Step 711, the mark of the metadata configurations file of the first application program is sent to the first configuration by the first container 33
Component 31.
Step 712, the first configuration component 31 is according to the mark of the metadata configurations file of the first application program, from being located at the
The metadata configurations file of the first application program is obtained in database 50 outside one node 30.
Step 713, the first configuration component 31 parses the metadata configurations file of the first application program, obtains first and applies journey
The configuration script of sequence and the mark of configuration template.
Step 714, the first configuration component 31 is according to the configuration script of the first application program and the mark of configuration template, from position
The configuration script and configuration template of the first application program are obtained in database 50 outside first node 30.
Step 715, the first configuration component 31 is answered according to the configuration script and configuration template of the first application program and first
With the configuration parameter of program, the configuration file of the first application program is generated.
Wherein, the configuration parameter of the first application program is obtained from the environmental variance of the first container 33.
Step 716, the configuration parameter of the first application program is sent to outside first node 30 by the first configuration component 31
The configuration center 60 in portion.
Step 717, the first configuration component 31 sends configuration change notice to the configuration component of other nodes.
Other nodes include second node 40.
Step 718, the first configuration component 31 sends the first configuration complete notification to the first container 33.
First configuration complete notification is used to indicate the configured completion of the first application program.
Step 719, the first container 33 starts the first application program.
Step 720, the second configuration component 41 sends acquisition of information to the configuration center 60 being located at outside second node 40 and asks
It asks.
Information acquisition request is used for the configuration parameter of the first application program of request.
Step 721, configuration center 60 sends the configuration parameter of the first application program to the second configuration component 41.
Step 722, the second configuration component 41 is answered according to the configuration script and configuration template of the second application program and second
With the configuration parameter of program, the configuration file of the second application program is generated.
Wherein, the configuration parameter of the second application program includes the configuration for the first application program that the second application program is relied on
Parameter.Optionally, the configuration parameter of the second application program further includes the configuration ginseng obtained from the environmental variance of second container 43
Number.
Step 723, the second configuration component 41 sends the second configuration complete notification to second container 43.
Second configuration complete notification is used to indicate the configured completion of the second application program.
Step 724, second container 43 starts the second application program.
It is above-mentioned mainly from first node 30 and second node 40 interaction angle to scheme provided by the embodiments of the present application into
Introduction is gone.The configuration application program as 30 side of first node can be implemented separately in the step of above-mentioned 30 side in relation to first node
Method, the side of the configuration application program as 40 side of second node can be implemented separately in relation to the step of 40 side of second node
Method.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device
Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Referring to FIG. 8, it illustrates the block diagrams of the device of the configuration application program of the application one embodiment offer.The dress
It sets in the first configuration component 31 applied to first node 30, which, which has, realizes the first configuration component in above method example
31 function, the function can also be executed corresponding software realization by hardware realization by hardware.The device can wrap
It includes: data obtaining module 810, file acquisition module 820 and file generating module 830.
Data obtaining module 810, it is described for obtaining the file information for the first application program disposed in the first container 33
Basic document needed for the file information of first application program is used to indicate configuration first application program.
File acquisition module 820, for the file information according to first application program, from positioned at the first node
Basic document needed for obtaining first application program in database 50 outside 30.
File generating module 830, for the basic document according to needed for first application program and first application
The configuration parameter of program generates the configuration file of first application program, wherein the configuration parameter of first application program
It is obtained from the environmental variance of the first container 33.
In an alternative embodiment based on embodiment illustrated in fig. 8, the file information of first application program includes
The mark of the metadata configurations file of first application program includes in the metadata configurations file of first application program
The mark of basic document needed for first application program;
The file acquisition module 820, is also used to:
According to the mark of the metadata configurations file of first application program, described is obtained from the database 50
The metadata configurations file of one application program;
The metadata configurations file of first application program is parsed, the text of basis needed for obtaining first application program
The mark of part;
According to the mark of basic document needed for first application program, described first is obtained from the database 50
Basic document needed for application program.
In another alternative embodiment based on embodiment illustrated in fig. 8, described device further include: module is submitted in configuration
840 send mould 850 with notice.
Module 840 is submitted in configuration, for being sent to the configuration parameter of first application program positioned at the first segment
Configuration center 60 outside point 30.
Notify sending module 850, it is described for sending configuration change notice to the second configuration component 41 of second node 40
Configuration change is notified for notifying second configuration component 41 to obtain first application program from the configuration center 60
Configuration parameter.
In another alternative embodiment based on embodiment illustrated in fig. 8, the notice sending module 860 is used for institute
It states the second configuration component 41 and sends connection foundation request, the connection establishes request for request and second configuration component 41
Establish communication connection;After being successfully established the communication connection, the second configuration component of Xiang Suoshu 41 sends the configuration change
Notice;After configuration change notice is sent successfully, the communication connection is disconnected.
Referring to FIG. 9, it illustrates the block diagrams of the device of the configuration application program of another embodiment of the application offer.It should
Device is applied in the second configuration component 41 of second node 40, which, which has, realizes the second configuration group in above method example
The function of part 41, the function can also be executed corresponding software realization by hardware realization by hardware.The device can wrap
It includes: data obtaining module 910, file acquisition module 920, information receiving module 930 and file generating module 940.
Data obtaining module 910, it is described for obtaining the file information for the second application program disposed in second container 43
Basic document needed for the file information of second application program is used to indicate configuration second application program.
File acquisition module 920, for the file information according to second application program, from positioned at the second node
Basic document needed for obtaining second application program in database 50 outside 40.
Information receiving module 930 is answered for receiving first in the configuration center 60 being located at outside the second node 40
After the configuration parameter of program, the is received described in the configuration parameter for first application program that the configuration center 60 is sent
One application program is the application program being deployed in the container of first node 30.
File generating module 940, for the basic document according to needed for second application program and second application
The configuration parameter of program generates the configuration file of second application program, wherein the configuration parameter of second application program
Configuration parameter including the first application program.
In an alternative embodiment based on embodiment illustrated in fig. 9, the file information of second application program includes
The mark of the metadata configurations file of second application program includes in the metadata configurations file of second application program
The mark of basic document needed for second application program;
The file acquisition module 920, is also used to:
According to the mark of the metadata configurations file of second application program, described is obtained from the database 50
The metadata configurations file of two application programs;
The metadata configurations file of second application program is parsed, the text of basis needed for obtaining second application program
The mark of part;
According to the mark of basic document needed for second application program, described second is obtained from the database 50
Basic document needed for application program.
In another alternative embodiment based on embodiment illustrated in fig. 9, described device further include: request sending module
950。
The information receiving module 930 is also used to receive what the first configuration component 31 in the first node 30 was sent
Configuration change notice, the configuration change notice is for notifying second configuration component 41 to be located at outside second node 40 from described
The configuration center 60 in portion obtains the configuration parameter of first application program.
Request sending module 950, for sending information acquisition request, the information acquisition request to the configuration center 60
Configuration parameter for the first application program described in request.
In an alternative embodiment based on embodiment illustrated in fig. 9, the information receiving module 930 is also used to receive
Request is established in the connection that first configuration component 31 is sent;Request and first configuration component 31 are established according to the connection
Establish communication connection;Receive the configuration change notice that first configuration component 31 is sent, wherein in second configuration
Component 41 is successfully received after the configuration change notice, and the communication connection is disconnected.
It is understood that device (or being " equipment ") is in order to realize the above functions, it comprises execute each function
Corresponding hardware configuration and/or software module.Each exemplary module and calculation described in conjunction with embodiment disclosed herein
Method step, the embodiment of the present application can be realized with the combining form of hardware or hardware and computer software.Some function is actually
It is executed in a manner of hardware or computer software driving hardware, the specific application and design constraint item depending on technical solution
Part.Those skilled in the art can realize described function using different methods to each specific application, still
It is this to realize the range it is not considered that the technical solution beyond the embodiment of the present application.
The embodiment of the present application can carry out functional module to device (or being " equipment ") according to above method example and draw
Point, for example, each functional module of each function division can be corresponded to, two or more functions can also be integrated in one
In a processing module.Above-mentioned integrated module both can take the form of hardware realization, can also be using SFU software functional unit
Form is realized.It should be noted that being schematical, only a kind of logic function to the division of module in the embodiment of the present application
It divides, there may be another division manner in actual implementation.
Using integrated module, one kind that Figure 10 A shows device involved in above-described embodiment can
The structural schematic diagram of energy.Device 1000 includes: processing module 1002 and communication module 1003.Processing module 1002 is used for device
1000 movement carries out control management.For example, processing module 1002 is when device 1000 is first node 30 for realizing above-mentioned
840 and of module is submitted in data obtaining module 810, file acquisition module 820, file generating module 830, configuration in Fig. 8 embodiment
Notify the function of sending module 850, specifically, the step that processing module 1002 is used to that device 1000 to be supported to execute in Fig. 4 A
Step 601 in 401 to 403, Fig. 6 is to 605, and/or other steps for executing techniques described herein.In another example
When device 1000 is second node 40, processing module 1002 for realizing data obtaining module 910 in above-mentioned Fig. 9 embodiment,
File acquisition module 920, information receiving module 930, file generating module 940 and request sending module 950 function, it is specific come
It says, processing module 1002 is used to supporting that device 1000 to execute step 606 of the step 501 into 504, Fig. 6 in Fig. 5 to 610,
And/or other steps for executing techniques described herein.Communication module 1003 is for supporting device 1000 to set with other
Standby communication.For example, communication module 1003 is for supporting first node 30 and the second section when device 1000 is first node 30
Communication between point 40, database 50 and configuration center 60 is matched such as under the control of processing module 1002 to the transmission of second node 40
The configuration set Notification of Changes, first/second acquisition request is sent to database 50, sends the first application program to configuration center 60
Parameter etc..In another example communication module 1003 is for supporting second node 40 and first when device 1000 is second node 40
Communication between node 30, database 50 and configuration center 60 receives first node 40 such as under the control of processing module 1002 and sends out
The configuration change sent is notified, third/the 4th acquisition request is sent to database 50, is asked to the transmission acquisition of information of configuration center 60
Ask, receive the configuration parameter of the first application program that configuration center 60 is sent etc..Device 1000 can also include memory module
1001, program code and data for storage device 1000.
Wherein, processing module 1002 can be processor or controller, such as can be central processing unit (Central
Processing Unit, CPU), general processor, digital signal processor (Digital Signal Processor, DSP),
Specific integrated circuit (Application-Specific Integrated Circuit, ASIC), field programmable gate array
It is (Field Programmable Gate Array, FPGA) or other programmable logic device, transistor logic, hard
Part component or any combination thereof.It may be implemented or execute to combine and various illustratively patrol described in present disclosure
Collect box, module and circuit.The processor is also possible to realize the combination of computing function, such as includes one or more micro- places
Manage device combination, DSP and the combination of microprocessor etc..Communication module 1003 can be communication interface, transceiver, transmission circuit
Deng, wherein communication interface is to be referred to as, and may include one or more interfaces, such as connecing between first node and second node
Mouthful.Memory module 1001 can be memory.
When processing module 1002 is processor, communication module 1003 is communication interface, when memory module 1001 is memory,
Device involved in the embodiment of the present application can be device shown in Figure 10 B.
Refering to fig. 1 shown in 0B, which includes: processor 1012, communication interface 1013, memory 1011.It is optional
Ground, device 1010 can also include bus 1014.Wherein, communication interface 1013, processor 1012 and memory 1011 can be with
It is connected with each other by bus 1014;Bus 1014 can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, abbreviation EISA) bus etc..The bus 1014 can be divided into address bus, data/address bus, control bus
Deng.Only to be indicated with a thick line in Figure 10 B, it is not intended that an only bus or a type of bus convenient for indicating.
Device shown in above-mentioned Figure 10 A or Figure 10 B can be first node 30 or second node 40.
The step of method in conjunction with described in the embodiment of the present application disclosure can realize in a manner of hardware, can also be with
It is that the mode of software instruction is executed by processor to realize.Software instruction can be made of corresponding software module, software module
Random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read can be stored on
Only Memory, ROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable ROM, EPROM), electricity can
Erasable programmable read-only memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM
(CD-ROM) or in the storage medium of any other form well known in the art.A kind of illustrative storage medium is coupled to place
Device is managed, to enable a processor to from the read information, and information can be written to the storage medium.Certainly, it stores
Medium is also possible to the component part of processor.Pocessor and storage media can be located in ASIC.In addition, the ASIC can position
In device.Certainly, pocessor and storage media can also be used as discrete assembly and be present in device.
Those skilled in the art it will be appreciated that in said one or multiple examples, retouched by the embodiment of the present application
The function of stating can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by this
A little functions storages in computer-readable medium or as on computer-readable medium one or more instructions or code into
Row transmission.Computer-readable medium includes computer storage media and communication media, and wherein communication media includes convenient for from one
Any medium of the place to another place transmission computer program.Storage medium can be general or specialized computer and can deposit
Any usable medium taken.
It should be understood that referenced herein " multiple " refer to two or more."and/or", description association
The incidence relation of object indicates may exist three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A
And B, individualism B these three situations.Character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".Make herein
" first ", " second " and similar word are not offered as any sequence, quantity or importance, and are used only to distinguish
Different objects.
Above-described specific embodiment carries out the purpose of the embodiment of the present application, technical scheme and beneficial effects
It is further described, it should be understood that the foregoing is merely the specific embodiments of the embodiment of the present application, and does not have to
In limit the embodiment of the present application protection scope, it is all on the basis of the technical solution of the embodiment of the present application, done it is any
Modification, equivalent replacement, improvement etc. should all include within the protection scope of the embodiment of the present application.
Claims (16)
1. a kind of method for configuring application program, which is characterized in that be applied in first node, the first node includes first
Configuration component and the first container;The described method includes:
First configuration component obtains the file information for the first application program disposed in the first container, and described first applies journey
Basic document needed for the file information of sequence is used to indicate configuration first application program;
First configuration component is according to the file information of first application program, from the number being located at outside the first node
According to basic document needed for obtaining first application program in library;
First configuration component basic document according to needed for first application program and first application program are matched
It sets parameter, generates the configuration file of first application program, wherein the configuration parameter of first application program is from described the
It is obtained in the environmental variance of one container.
2. the method according to claim 1, wherein the file information of first application program includes described
The mark of the metadata configurations file of one application program includes described the in the metadata configurations file of first application program
The mark of basic document needed for one application program;
First configuration component is according to the file information of first application program, from the number being located at outside the first node
According to basic document needed for obtaining first application program in library, comprising:
First configuration component is according to the mark of the metadata configurations file of first application program, from the database
Obtain the metadata configurations file of first application program;
First configuration component parses the metadata configurations file of first application program, obtains first application program
The mark of required basic document;
The mark of first configuration component basic document according to needed for first application program, is obtained from the database
Basic document needed for taking first application program.
3. method according to claim 1 or 2, which is characterized in that first configuration component is according to first application
The configuration parameter of basic document needed for program and first application program generates the configuration file of first application program
Later, further includes:
The configuration parameter of first application program is sent to outside the first node by first configuration component
Configuration center;
Second configuration component of first configuration component into second node sends configuration change notice, and the configuration change is logical
Know the configuration parameter for notifying second configuration component to obtain from the configuration center first application program.
4. according to the method described in claim 3, it is characterized in that, first configuration component second matching into second node
It sets component and sends configuration change notice, comprising:
First configuration component sends connection to second configuration component and establishes request, and the connection establishes request for asking
It asks to establish with second configuration component and communicate to connect;
After being successfully established the communication connection, first configuration component sends the configuration to second configuration component
Notification of Changes;
After configuration change notice is sent successfully, first configuration component disconnects the communication connection.
5. a kind of method for configuring application program, which is characterized in that be applied in second node, the second node includes second
Configuration component and second container;The described method includes:
Second configuration component obtains the file information for the second application program disposed in second container, and described second applies journey
Basic document needed for the file information of sequence is used to indicate configuration second application program;
Second configuration component is according to the file information of second application program, from the number being located at outside the second node
According to basic document needed for obtaining second application program in library;
After the configuration center being located at outside the second node receives the configuration parameter of the first application program, described second
Configuration component receives the configuration parameter for first application program that the configuration center is sent, and first application program is portion
Affix one's name to the application program in the container of first node;
Second configuration component basic document according to needed for second application program and second application program are matched
Parameter is set, the configuration file of second application program is generated, wherein the configuration parameter of second application program includes described
The configuration parameter of first application program.
6. according to the method described in claim 5, it is characterized in that, the file information of second application program includes described
The mark of the metadata configurations file of two application programs includes described the in the metadata configurations file of second application program
The mark of basic document needed for two application programs;
Second configuration component is according to the file information of second application program, from the number being located at outside the second node
According to basic document needed for obtaining second application program in library, comprising:
Second configuration component is according to the mark of the metadata configurations file of second application program, from the database
Obtain the metadata configurations file of second application program;
Second configuration component parses the metadata configurations file of second application program, obtains second application program
The mark of required basic document;
The mark of second configuration component basic document according to needed for second application program, is obtained from the database
Basic document needed for taking second application program.
7. method according to claim 5 or 6, which is characterized in that second configuration component receives the configuration center
Before the configuration parameter of first application program sent, further includes:
Second configuration component receives the configuration change notice of the transmission of the first configuration component in the first node, described to match
Configuration of the Notification of Changes for notifying second configuration component to obtain first application program from the configuration center is set to join
Number;
Second configuration component sends information acquisition request to the configuration center, and the information acquisition request is obtained for requesting
Take the configuration parameter of first application program.
8. the method according to the description of claim 7 is characterized in that second configuration component receives in the first node
The configuration change notice that first configuration component is sent, comprising:
Second configuration component receives the connection that first configuration component is sent and establishes request;
Second configuration component establishes request according to the connection and establishes communication connection with first configuration component;
Second configuration component receives the configuration change notice that first configuration component is sent, wherein described the
Two configuration components are successfully received after the configuration change notice, and the communication connection is disconnected.
9. a kind of device for configuring application program, which is characterized in that applied in the first configuration component of first node, described the
One node includes first configuration component and the first container;Described device includes:
Data obtaining module, for obtaining the file information for the first application program disposed in the first container, first application
Basic document needed for the file information of program is used to indicate configuration first application program;
File acquisition module, for the file information according to first application program, from outside the first node
Basic document needed for obtaining first application program in database;
File generating module, for matching for the basic document according to needed for first application program and first application program
It sets parameter, generates the configuration file of first application program, wherein the configuration parameter of first application program is from described the
It is obtained in the environmental variance of one container.
10. device according to claim 9, which is characterized in that the file information of first application program includes described
The mark of the metadata configurations file of first application program includes described in the metadata configurations file of first application program
The mark of basic document needed for first application program;
The file acquisition module, is also used to:
According to the mark of the metadata configurations file of first application program, first application is obtained from the database
The metadata configurations file of program;
The metadata configurations file of first application program is parsed, basic document needed for obtaining first application program
Mark;
According to the mark of basic document needed for first application program, described first is obtained from the database using journey
Basic document needed for sequence.
11. device according to claim 9 or 10, which is characterized in that described device further include:
Module is submitted in configuration, for being sent to the configuration parameter of first application program outside the first node
Configuration center;
It notifies sending module, sends configuration change notice, the configuration change for the second configuration component into second node
Notify the configuration parameter for notifying second configuration component to obtain from the configuration center first application program.
12. device according to claim 11, which is characterized in that the notice sending module is also used to:
Connection is sent to second configuration component and establishes request, and the connection establishes request for requesting and second configuration
Component establishes communication connection;
After being successfully established the communication connection, the second configuration component of Xiang Suoshu sends the configuration change notice;
After configuration change notice is sent successfully, the communication connection is disconnected.
13. a kind of device for configuring application program, which is characterized in that described applied in the second configuration component of second node
Second node includes second configuration component and second container;Described device includes:
Data obtaining module, for obtaining the file information for the second application program disposed in second container, second application
Basic document needed for the file information of program is used to indicate configuration second application program;
File acquisition module, for the file information according to second application program, from outside the second node
Basic document needed for obtaining second application program in database;
Information receiving module, for receiving the configuration of the first application program in the configuration center being located at outside the second node
After parameter, the configuration parameter for first application program that the configuration center is sent is received, first application program is
The application program being deployed in the container of first node;
File generating module, for matching for the basic document according to needed for second application program and second application program
Parameter is set, the configuration file of second application program is generated, wherein the configuration parameter of second application program includes described
The configuration parameter of first application program.
14. device according to claim 13, which is characterized in that the file information of second application program includes described
The mark of the metadata configurations file of second application program includes described in the metadata configurations file of second application program
The mark of basic document needed for second application program;
The file acquisition module, is also used to:
According to the mark of the metadata configurations file of second application program, second application is obtained from the database
The metadata configurations file of program;
The metadata configurations file of second application program is parsed, basic document needed for obtaining second application program
Mark;
According to the mark of basic document needed for second application program, described second is obtained from the database using journey
Basic document needed for sequence.
15. device described in 3 or 14 according to claim 1, which is characterized in that described device further include:
It is logical to be also used to receive the configuration change that the first configuration component in the first node is sent for the information receiving module
Know, the configuration change notice is for notifying second configuration component to obtain first application program from the configuration center
Configuration parameter;
Request sending module, for sending information acquisition request to the configuration center, the information acquisition request is for requesting
Obtain the configuration parameter of first application program.
16. device according to claim 15, which is characterized in that the information receiving module is also used to:
It receives the connection that first configuration component is sent and establishes request, request and first configuration are established according to the connection
Component establishes communication connection, receives the configuration change notice that first configuration component is sent, wherein match described second
It sets component to be successfully received after the configuration change notice, the communication connection is disconnected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710900537.7A CN109597655B (en) | 2017-09-28 | 2017-09-28 | Method and device for configuring application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710900537.7A CN109597655B (en) | 2017-09-28 | 2017-09-28 | Method and device for configuring application program |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109597655A true CN109597655A (en) | 2019-04-09 |
CN109597655B CN109597655B (en) | 2020-11-10 |
Family
ID=65955355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710900537.7A Active CN109597655B (en) | 2017-09-28 | 2017-09-28 | Method and device for configuring application program |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109597655B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110366025A (en) * | 2019-07-12 | 2019-10-22 | 深圳Tcl新技术有限公司 | Show configuration method, intelligent terminal and the computer readable storage medium of content |
CN110837455A (en) * | 2019-11-07 | 2020-02-25 | 北京宝兰德软件股份有限公司 | Script-based application configuration information acquisition method and device |
CN111552908A (en) * | 2020-04-30 | 2020-08-18 | 深信服科技股份有限公司 | Terminal, system and running method of application program |
CN111580884A (en) * | 2020-04-30 | 2020-08-25 | 北京金山云网络技术有限公司 | Configuration updating method and device, server and electronic equipment |
CN111857863A (en) * | 2020-06-19 | 2020-10-30 | 微梦创科网络科技(中国)有限公司 | Dynamic configuration method and system |
CN111901185A (en) * | 2020-06-05 | 2020-11-06 | 厦门亿联网络技术股份有限公司 | Account number management method and device for VoIP phone automatic test system |
CN112003918A (en) * | 2020-08-14 | 2020-11-27 | 济南浪潮数据技术有限公司 | Method, apparatus, device and medium for configuration synchronization between container application and client |
CN112650542A (en) * | 2020-08-28 | 2021-04-13 | 成都格斗科技有限公司 | Simple and general method for generating and managing configuration file under micro-service architecture |
CN112698839A (en) * | 2020-12-30 | 2021-04-23 | 深圳前海微众银行股份有限公司 | Data center node deployment method, device and system and computer storage medium |
CN114090133A (en) * | 2021-11-30 | 2022-02-25 | 深圳市元征科技股份有限公司 | Application program configuration method and device, electronic equipment and storage medium |
CN114546474A (en) * | 2022-02-23 | 2022-05-27 | Oppo广东移动通信有限公司 | Application program management method and related device |
WO2022126646A1 (en) * | 2020-12-18 | 2022-06-23 | Xeniro | Automated platform for managing, deploying and orchestrating highly distributed service applications |
CN114924806A (en) * | 2022-04-07 | 2022-08-19 | 南京慧尔视软件科技有限公司 | Dynamic synchronization method, device, equipment and medium for configuration information |
CN115080151A (en) * | 2022-07-22 | 2022-09-20 | 平安银行股份有限公司 | APP starting process control method, computer readable storage medium and terminal |
US12009970B2 (en) * | 2021-11-29 | 2024-06-11 | Arista Networks, Inc. | Flexible network management system for configuring network devices |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104618164A (en) * | 2015-02-12 | 2015-05-13 | 北京航空航天大学 | Management method for rapid cloud computing platform application deployment |
CN106982266A (en) * | 2017-05-27 | 2017-07-25 | 郑州云海信息技术有限公司 | A kind of method and apparatus of automatically dispose cluster |
CN107145380A (en) * | 2017-03-27 | 2017-09-08 | 华为技术有限公司 | Virtual resource method of combination and device |
-
2017
- 2017-09-28 CN CN201710900537.7A patent/CN109597655B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104618164A (en) * | 2015-02-12 | 2015-05-13 | 北京航空航天大学 | Management method for rapid cloud computing platform application deployment |
CN107145380A (en) * | 2017-03-27 | 2017-09-08 | 华为技术有限公司 | Virtual resource method of combination and device |
CN106982266A (en) * | 2017-05-27 | 2017-07-25 | 郑州云海信息技术有限公司 | A kind of method and apparatus of automatically dispose cluster |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110366025A (en) * | 2019-07-12 | 2019-10-22 | 深圳Tcl新技术有限公司 | Show configuration method, intelligent terminal and the computer readable storage medium of content |
CN110837455B (en) * | 2019-11-07 | 2023-04-14 | 北京宝兰德软件股份有限公司 | Script-based application configuration information acquisition method and device |
CN110837455A (en) * | 2019-11-07 | 2020-02-25 | 北京宝兰德软件股份有限公司 | Script-based application configuration information acquisition method and device |
CN111552908A (en) * | 2020-04-30 | 2020-08-18 | 深信服科技股份有限公司 | Terminal, system and running method of application program |
CN111580884A (en) * | 2020-04-30 | 2020-08-25 | 北京金山云网络技术有限公司 | Configuration updating method and device, server and electronic equipment |
CN111580884B (en) * | 2020-04-30 | 2024-04-19 | 北京金山云网络技术有限公司 | Configuration updating method, device, server and electronic equipment |
CN111901185A (en) * | 2020-06-05 | 2020-11-06 | 厦门亿联网络技术股份有限公司 | Account number management method and device for VoIP phone automatic test system |
CN111857863A (en) * | 2020-06-19 | 2020-10-30 | 微梦创科网络科技(中国)有限公司 | Dynamic configuration method and system |
CN111857863B (en) * | 2020-06-19 | 2023-10-27 | 微梦创科网络科技(中国)有限公司 | Dynamic configuration method and system |
CN112003918B (en) * | 2020-08-14 | 2023-01-24 | 济南浪潮数据技术有限公司 | Method, device, equipment and medium for configuration synchronization between container application and client |
CN112003918A (en) * | 2020-08-14 | 2020-11-27 | 济南浪潮数据技术有限公司 | Method, apparatus, device and medium for configuration synchronization between container application and client |
CN112650542A (en) * | 2020-08-28 | 2021-04-13 | 成都格斗科技有限公司 | Simple and general method for generating and managing configuration file under micro-service architecture |
WO2022126646A1 (en) * | 2020-12-18 | 2022-06-23 | Xeniro | Automated platform for managing, deploying and orchestrating highly distributed service applications |
CN112698839B (en) * | 2020-12-30 | 2024-04-12 | 深圳前海微众银行股份有限公司 | Data center node deployment method, device and system and computer storage medium |
CN112698839A (en) * | 2020-12-30 | 2021-04-23 | 深圳前海微众银行股份有限公司 | Data center node deployment method, device and system and computer storage medium |
US12009970B2 (en) * | 2021-11-29 | 2024-06-11 | Arista Networks, Inc. | Flexible network management system for configuring network devices |
CN114090133A (en) * | 2021-11-30 | 2022-02-25 | 深圳市元征科技股份有限公司 | Application program configuration method and device, electronic equipment and storage medium |
CN114546474A (en) * | 2022-02-23 | 2022-05-27 | Oppo广东移动通信有限公司 | Application program management method and related device |
CN114924806B (en) * | 2022-04-07 | 2024-03-26 | 南京慧尔视软件科技有限公司 | Dynamic synchronization method, device, equipment and medium for configuration information |
CN114924806A (en) * | 2022-04-07 | 2022-08-19 | 南京慧尔视软件科技有限公司 | Dynamic synchronization method, device, equipment and medium for configuration information |
CN115080151A (en) * | 2022-07-22 | 2022-09-20 | 平安银行股份有限公司 | APP starting process control method, computer readable storage medium and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN109597655B (en) | 2020-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109597655A (en) | Configure the method and device of application program | |
US20240204978A1 (en) | Interface for digital operator platform including response caching | |
CN100527080C (en) | Method for software program synchronization | |
US7831734B2 (en) | Method and system for remote configuration of network devices | |
RU2417416C2 (en) | Solution deployment in server farm | |
CN109547570A (en) | Service registration method, apparatus, registration center's management equipment and storage medium | |
CN111182025A (en) | Message processing method, device, server and storage medium | |
CN102725966A (en) | Pending state management for mobile business objects | |
CN107426309A (en) | A kind of information synchronization method, apparatus and system | |
CN110868763B (en) | Method, device and system for establishing Bluetooth connection | |
CN109104368B (en) | Connection request method, device, server and computer readable storage medium | |
CN103634144A (en) | Method, system and equipment for managing multi-IDC (internet data center) cluster configuration file | |
CN103428264A (en) | Data synchronization method, device and system | |
US12032952B2 (en) | Service upgrade method, apparatus, and system | |
CN111277481B (en) | Method, device, equipment and storage medium for establishing VPN tunnel | |
CN115114044B (en) | Message pushing method, device, equipment and medium | |
CN103731465A (en) | Distributed system and transaction treatment method thereof | |
CN112217845B (en) | Data transmission method based on Netconf protocol and related equipment | |
CN111581576B (en) | Development processing method and device based on micro-service and storage medium | |
CN102664756A (en) | Device access method, device and system | |
CN110008431A (en) | Page assembly construction method, device, page generating device and readable storage medium storing program for executing | |
Krainyk et al. | Internet-of-Things Device Set Configuration for Connection to Wireless Local Area Network. | |
CN116233283B (en) | Dynamic expansion and hot plug method of equipment communication protocol | |
CN107577822A (en) | A kind of method of data synchronization, data synchronization unit and mobile terminal | |
CN108418857B (en) | Zookeeper cluster system and connection method and device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |