Summary of the invention
The main purpose of the present invention is to provide a kind of multi-environment application dispositions method, equipment, storage medium and device, purports
The technical issues of solving multi-environment application deployment low efficiency in the prior art.
To achieve the above object, the present invention provides a kind of multi-environment using dispositions method, the multi-environment application section management side
Method the following steps are included:
Multi-environment application deployment facility obtains application publication packet, issues first that packet generates first environment according to the application
Application file;
First application file is synchronized to first agent's server of the first environment, so that the first agent
Corresponding first application program of first application file is synchronized to the first application server of the first environment by server;
First application program is obtained, the second agent that first application program pushes to second environment is serviced
Device, so that first application program is synchronized to the second application service of the second environment by second agent's server
Device.
Preferably, first agent's server that first application file is synchronized to the first environment, so that
Corresponding first application program of first application file is synchronized to the of the first environment by first agent's server
It is described multi-environment using dispositions method after one application server further include:
The attribute value in the first configuration item of the first environment is modified by default differentiation configuration function.
Preferably, after first configuration item that the first environment is modified by presetting differentiation configuration function, institute
It states multi-environment using dispositions method further include:
First application server for monitoring the first environment, when monitoring what first application server was sent
When information is completed in first deployment, acquisition first application program is executed, first application program is pushed to second
Second agent's server of environment, so that first application program is synchronized to second ring by second agent's server
The step of second application server in border.
Preferably, described that attribute in first configuration item of the first environment is modified by default differentiation configuration function
It is described multi-environment using dispositions method after value further include:
State-detection is carried out every application state of the preset time to first application server;
When the application state for detecting the presence of the first application server is abnormal, the first application to there is exception again
The application state of server carries out the state-detection of preset times;
When the state-detection result of the preset times is all abnormal, assert that there is the first abnormal application server is
Abnormal application server;
Disconnect the communication link between the abnormal application server and first agent's server.
Preferably, the communication link disconnected between the abnormal application server and first agent's server it
Before, it is described multi-environment using dispositions method further include:
The current version for obtaining first application file wraps in publication list from application and searches the upper of the current version
First application file of one version;
First application file of the last revision is synchronized to first agent's server of the first environment, so that institute
State first agent's server the first application program of the corresponding last revision of the first application file of the last revision is synchronous
To the abnormal application server of the first environment.
Preferably, the first environment includes multiple first operation systems, and each first operation system includes multiple first
Application server;
First agent's server that first application file is synchronized to the first environment, so that described first
Proxy server takes the first application that corresponding first application program of first application file is synchronized to the first environment
Business device, comprising:
Multiple first application servers for belonging to same first operation system are divided into two gray scale clusters;
Gray scale publication instruction is received, extracts the corresponding target of first application file from gray scale publication instruction
Gray scale cluster;
First application file is synchronized to first agent's server of the first environment, so that the first agent
Corresponding first application program of first application file is synchronized to the target gray collection of the first environment by server
The first application server in group.
Preferably, the acquisition application publication packet, issues the first practical writing that packet generates first environment according to the application
It is described multi-environment using dispositions method before part further include:
Multi-environment first firewall policy using between deployment facility and the first environment is obtained, and obtains institute
State multi-environment the second firewall policy using between deployment facility and the second environment;
First firewall policy is synchronized to first agent's server in the first environment, and will be described
Second firewall policy is synchronized to second agent's server in the second environment.
In addition, to achieve the above object, the present invention also proposes a kind of multi-environment using deployment facility, the multi-environment application
Deployment facility includes memory, processor and is stored on the memory and what can be run on the processor multi-environment answers
It is described multi-environment the multi-environment step using dispositions method as described above to be arranged for carrying out using deployment program with deployment program
Suddenly.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, it is stored on the storage medium polycyclic
Deployment program is applied in border, described multi-environment multi-environment application as described above to be realized when being executed by processor using deployment program
The step of dispositions method.
In addition, to achieve the above object, the present invention also proposes a kind of multi-environment application deployment device, the multi-environment application
Disposing device includes:
Generation module issues the first application that packet generates first environment according to the application for obtaining application publication packet
File;
Synchronization module, for first application file to be synchronized to first agent's server of the first environment, with
Make first agent's server that corresponding first application program of first application file is synchronized to the first environment
First application server;
First application program is pushed to second environment for obtaining first application program by pushing module
Second agent's server, so that first application program is synchronized to the of the second environment by second agent's server
Two application servers.
In the present invention, multi-environment application deployment facility obtains application publication packet, issues packet according to the application and generates first
First application file is synchronized to first agent's server of the first environment by the first application file of environment, so that
Corresponding first application program of first application file is synchronized to the of the first environment by first agent's server
One application server;First application program is obtained, first application program is pushed to the second agent of second environment
Server, so that second agent's server takes the second application that first application program is synchronized to the second environment
Business device.Based on environmental management, application file or application program are synchronized to by each environment by the multi-environment application deployment facility
Proxy server, disposed in respective environment by each proxy server, it is ensured that each environment it is mutually indepedent while,
It realizes multi-environment application deployment, improves application deployment efficiency.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the multi-environment application deployment facility knot for the hardware running environment that the embodiment of the present invention is related to
Structure schematic diagram.
As shown in Figure 1, the multi-environment application deployment facility may include: processor 1001, such as central processing unit
(Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory
1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display
Shield (Display), optional user interface 1003 can also include standard wireline interface and wireless interface, for user interface
1003 wireline interface can be USB interface in the present invention.Network interface 1004 optionally may include standard wireline interface,
Wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random of high speed
Memory (Random Access Memory, RAM) memory is accessed, stable memory (Non-volatile is also possible to
Memory, NVM), such as magnetic disk storage.Memory 1005 optionally can also be the storage independently of aforementioned processor 1001
Device.
It will be understood by those skilled in the art that structure shown in Fig. 1 was not constituted to multi-environment using deployment facility
It limits, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, regarding as in the memory 1005 of computer storage medium a kind of may include operating system, network
Communication module, Subscriber Interface Module SIM and it is multi-environment apply deployment program.
In multi-environment application deployment facility shown in Fig. 1, network interface 1004 is mainly used for connecting background server, with
The background server carries out data communication;User interface 1003 is mainly used for connecting user equipment;The multi-environment application section
Administration's equipment is multi-environment using deployment program by storing in the calling memory 1005 of processor 1001, and executes implementation of the present invention
Example provides multi-environment using dispositions method.
Based on above-mentioned hardware configuration, the multi-environment embodiment using dispositions method of the present invention is proposed.
Referring to Fig. 2, Fig. 2 is the multi-environment flow diagram using dispositions method first embodiment of the present invention, proposes this hair
Bright multi-environment application dispositions method first embodiment.
In the first embodiment, the multi-environment application dispositions method the following steps are included:
Step S10: multi-environment application deployment facility obtains application publication packet, issues packet according to the application and generates the first ring
First application file in border.
It should be understood that the executing subject of the present embodiment is described multi-environment using deployment facility, wherein described multi-environment
It can be the electronic equipments such as PC or server using deployment facility.The multi-environment application deployment facility and agile development pipe
Reason flowsheet platform is docked, and directly can obtain data from the agile development management process platform.It can be by described multi-environment
The application deployment of multiple environment is realized using deployment facility.The multiple environment includes production environment and test environment etc..
It will be appreciated that the first environment is commonly referred to as production environment, by it is described it is multi-environment apply deployment facility,
First application program can be published to the survey simultaneously automatically after the first application issued of the production environment
Test ring border.By the deployment configuration item of configurableization, classificationization configuration is carried out to varying environment in same configuration item.
It should be noted that the application publication packet is data required for the application deployment of the production environment,
Produce what first application program in the production environment need to be used when being disposed by application publication packet
First application file, first application file include: that the IP, interface of the first application program described in the production environment match
It sets, application parameter configuration and domain name etc..
Step S20: first application file is synchronized to first agent's server of the first environment, so that described
Corresponding first application program of first application file is synchronized to the first of the first environment and answered by first agent's server
Use server.
It should be understood that each environment has proxy server, communicated with the multi-environment application deployment facility, by each
Proxy server in environment carries out the pipe of receiving of the application server in respective environment.It specifically maps out the work and multi-environment is answered by described
With deployment facility strategy distribution to first agent's server of the test environment, again by first agent's server
Specific tasks are executed in the production environment.It ensures the mutually indepedent of each environment, while supporting multi-environment deployment again.
In the concrete realization, it can be taken by the automation tools puppet in the production environment as the first agent
Business device receive the first application server described in pipe, can carry out first practical writing using the automation tools puppet
The push of part.The automation tools puppet is a kind of centralized configuration management system of Linux, Unix or windows platform,
It, can management configuration file, user, software package and system service etc. using own puppet description language.The production environment
The deployment of the first application program need first agent's server by the production environment to realize, described first is applied
File synchronization is to first agent's server of the production environment, and first agent's server is according to first application file
First application program is synchronized to application server, to complete the deployment of first application program.
Step S30: first application program is obtained, first application program is pushed to the second generation of second environment
Server is managed, so that first application program is synchronized to the second application of the second environment by second agent's server
Server.
It should be understood that the second environment is commonly referred to as test environment, in order to realize multi-environment application deployment,
When first application deployment in the production environment is completed, first application in the production environment can be obtained
Program, and first application program is pushed into the second agent's server for testing environment, the test environment
Differences after first application program according to the production environment is disposed, can be first with described in production environment
It is disposed subject to first application file of first application program.First application program is completed in the test environment
In deployment after, then differentiation modification is carried out, to realize the application deployment of the second environment.
In the first embodiment, multi-environment application deployment facility obtains application publication packet, issues Bao Sheng according to the application
At the first application file of first environment, the first agent that first application file is synchronized to the first environment is serviced
Device, so that corresponding first application program of first application file is synchronized to first ring by first agent's server
First application server in border;Second agent's server that first application program is pushed to second environment, so that described
First application program is synchronized to the second application server of the second environment by second agent's server.By described more
Application file or application program are synchronized to the proxy server of each environment by environmental applications deployment facility, are existed by each proxy server
Disposed in respective environment, it is ensured that each environment it is mutually indepedent while, realize multi-environment application deployment, improve application
Dispose efficiency.
Referring to Fig. 3, Fig. 3 is the multi-environment flow diagram using dispositions method second embodiment of the present invention, based on above-mentioned
First embodiment shown in Fig. 2 proposes the multi-environment second embodiment using dispositions method of the present invention.
In a second embodiment, after the step S20, further includes:
Step S201: the attribute in the first configuration item of the first environment is modified by default differentiation configuration function
Value.
It will be appreciated that the application configuration of varying environment is different, the application configuration includes: Internet protocol address
The configuration of (Internet Protocol Address, IP address), interface, application parameter configuration and domain name etc..Each different
Differences are configured in the multi-environment application deployment facility: using each environment as dimension, carrying out various files, attribute-name
It is configured with the differentiation of corresponding attribute value.The multi-environment application deployment facility can inquire differences configuration, according to different rings
The configuration in border carries out the modification of attribute value according to differentiation rule after application publication.I.e. in the production environment, in institute
It states the first application program and is synchronized to first application server, after the publication for realizing first application program, by described
Default differentiation configuration function modifies to attribute value in first configuration item, to meet the operation ginseng of the production environment
Number.
After the step S201, further includes:
First application server for monitoring the first environment, when monitoring what first application server was sent
When information is completed in first deployment, the step S30 is executed.
It should be noted that the attribute value in first configuration item is modified when completing, first application server
The first deployment can be sent and complete information to described multi-environment using deployment facility.The multi-environment application deployment facility is receiving
After information is completed in first deployment, the application deployment of the test environment can be initiated.It can be by monitoring the first environment
First application server hold when the first deployment for monitoring that first application server is sent completes information constantly
Row second agent's server that first application program is pushed to second environment, so that second agent's server
The step of first application program is synchronized to the second application server of the second environment.
In a second embodiment, after the step S30, further includes:
The attribute value in the second configuration item of the second environment is modified by the default differentiation configuration function.
It should be understood that in the test environment, first with first application program in the production environment
The deployment that the second application program in the test environment is carried out subject to first application file, completes described first and applies journey
Sequence, need to be by the default differentiation configuration function in second application program after the deployment in the test environment
Attribute value is modified in second configuration item, to meet the operating parameter of the test environment.
In the concrete realization, when the attribute value in second configuration item modifies completion, second application server
Deployment completion status information can be sent to described multi-environment using deployment facility.The multi-environment application deployment facility is receiving
After the deployment completion status information, the application deployment of other more environment can be performed.It is described by described pre- in the present embodiment
If differentiation configuration function is modified after the attribute value in the second configuration item of the second environment, further includes: monitoring described the
Second application server of two environment, when information is completed in the second deployment for monitoring that second application server is sent
When, first application program is pushed to the third proxy server of third environment.The third proxy server will be described
First application program is synchronized to the third application server of the third environment, to realize the application section of the third environment
Administration.
In the present embodiment, before the step S10, further includes:
Step S01: obtaining multi-environment first firewall policy using between deployment facility and the first environment,
And obtain multi-environment second firewall policy using between deployment facility and the second environment.
It will be appreciated that the multi-environment application deployment facility is in first network region, the first network region is used
In monitoring, and with network partition connection locating for each environment.For the control of safety, the first network region and other networks
It is all to be protected by firewall between subregion.It, can since the multi-environment application deployment facility needs to receive the multiple environment of pipe
The multi-environment firewall policy using between deployment facility and each environment is set.Then before carrying out using deployment, it can obtain
Take multi-environment first firewall policy using between deployment facility and the first environment, and with the second environment it
Between the second firewall policy, and first firewall policy and second firewall policy are sent to corresponding environment
In proxy server disposed.
Step S02: being synchronized to first agent's server in the first environment for first firewall policy,
And second firewall policy is synchronized to second agent's server in the second environment.
It should be understood that can be serviced by the automation tools puppet in the production environment as the first agent
Device receive the first application server described in pipe, can carry out first application file using the automation tools puppet
Push and the multi-environment distribution using deployment facility and the firewall policy of each environment.Pass through the automation
First firewall policy is synchronized to first agent's server in the first environment by tool puppet, and described
One proxy server carries out the deployment of first firewall policy in the first environment;Pass through the automation tools
Second firewall policy is synchronized to second agent's server in the second environment, the second generation by puppet
Reason server carries out the deployment of second firewall policy in the second environment.To realize the portion of firewall policy
Administration carries out network monitoring, improves network security.
In the present embodiment, before the step S01, further includes:
The communication link between proxy server in foundation and each environment, so that the proxy server in each environment is established
With the communication link between the application server in respective environment.
It is described multi-environment to answer it should be noted that the multi-environment application deployment facility needs to carry out each environment to receive pipe
It is in network management region with deployment facility, the network management region can establish communication link with other environment, to realize for monitoring
To the pipe of receiving of each environment.For the control of safety, pass through firewall between the network management region and the network partition of other environment
Strategy is protected.Receive pipe respectively in environment as proxy server by the automation tools puppet in each environment
Application server, the proxy server in each environment is established and the respective communication link between the application server in environment, with
Each proxy server is set to carry out the push of deployment package in respective environment, the distribution of deployment strategy and deployable state prison
Control.Each environment includes the first environment and the second environment, and the proxy server in each environment includes the first agent
Server and second agent's server, the application server in respective environment include first application server and described
Second application server.
In a second embodiment, the first configuration item of the first environment is modified by presetting differentiation configuration function, with
Meet the operating parameter of the production environment;The second of the second environment is modified by the default differentiation configuration function to match
Item is set, to meet the operating parameter of the test environment, first with described first of first application program in production environment
It is disposed subject to application file, completes first application program after the deployment in the test environment, then carry out difference
Change modification, improves the efficiency using deployment;Obtain multi-environment using between deployment facility and the first environment
One firewall policy, and multi-environment second firewall policy using between deployment facility and the second environment is obtained,
First firewall policy is synchronized to first agent's server in the first environment, and described second is prevented fires
The second agent server of the wall policy synchronization into the second environment carries out to realize the deployment of firewall policy
Network monitoring improves network security.
Referring to Fig. 4, Fig. 4 is the multi-environment flow diagram using dispositions method 3rd embodiment of the present invention, based on above-mentioned
Second embodiment shown in Fig. 3 proposes the multi-environment 3rd embodiment using dispositions method of the present invention.
In the third embodiment, after the step S201, further includes:
Step S202: state-detection is carried out every application state of the preset time to first application server.
It include multiple in the same operation system it should be understood that usually including multiple operation systems in each environment
Application server can be replaced when one of application server failure by the other application server generation of the same operation system
The application server of failure executes corresponding application task.It avoids also continuing work when application server breaks down, causing
The case where application task execution fails can periodically answer every application server of each operation system in each environment
With the state-detection of state, can find failure in time.The preset time can according to execute application task average time into
Row setting can also be set according to the time of application packet publication, can also be set according to actual needs, the present embodiment pair
This is without restriction.For example, the preset time is set as 10 minutes, then every 10 minutes to first application server
Application state carries out state-detection.The application state includes the port of first application server, process, request connection number
With log etc., the port of first application server, process, request connection number and log etc. are detected with the presence or absence of abnormal.If
The state-detection is normal, then can show that state is normal in the multi-environment application management page using deployment facility, may be used also
State status is shown by pre-set color, for example, indicating that application state is normal by green.
Step S203: abnormal to existing again when the application state for detecting the presence of the first application server is abnormal
The first application server application state carry out preset times state-detection.
It will be appreciated that if detect in multiple first application servers in the first environment there are at least one
The application state of one application server is exception, in order to avoid the case where detection error occurs, it will usually abnormal to existing again
The first application server application state carry out state-detection, the preset times be typically greater than be equal to 1 integer, in order to
Avoid carrying out multiple repetition detection, the preset times will not be arranged it is excessively high, for example, the preset times are set as 3,
When the application state for then detecting the presence of the first application server is exception, persistently the first application service to there is exception again
The application state of device carries out 3 state-detections, and judgement has the application of the first abnormal application server according to testing result
State whether be still abnormal.
Step S204: when the state-detection result of the preset times is all abnormal, assert that there is abnormal first answers
It is abnormal application server with server.
It should be noted that if the state-detection result of the preset times is all abnormal, it is believed that there are abnormal the
One application server is implicitly present in failure, can be regarded as abnormal application server, needs the abnormal application server
It stops working, avoids the service request processing for being distributed to the exception application server abnormal.
Step S205: the communication link between the abnormal application server and first agent's server is disconnected.
In the concrete realization, the multi-environment application deployment facility can directly receive managed network load balancer (such as F5),
It is automatically by the interface of F5, the abnormal application server is equal from load after the abnormal application server stops working
It is rejected in the resource pool of weighing apparatus, no longer distributes new service traffics to the abnormal application server.It can also be described different by disconnecting
Communication link between normal application server and first agent's server, so that the exception application server can not connect again
The new service traffics for receiving first agent's server distribution realize the service disconnection of the abnormal application server.
In the present embodiment, before the step S205, further includes:
The current version for obtaining first application file wraps in publication list from application and searches the upper of the current version
First application file of one version;
First application file of the last revision is synchronized to first agent's server of the first environment, so that institute
State first agent's server the first application program of the corresponding last revision of the first application file of the last revision is synchronous
To the abnormal application server of the first environment.
It should be understood that other than it may be employed publication, it, can be described multi-environment when application released version exception
May be implemented using deployment facility using a key Backward Function, it is described it is multi-environment can be automatically last version using deployment facility
It is published on the abnormal application server using packet.It includes corresponding publication environmental information that the application, which is issued, corresponding
Application system information and corresponding application version information.The multi-environment application deployment facility is usually being carried out using packet publication
When, it will record the version and the information such as corresponding issuing time of each application packet, it can also be by the application publication packet of each version according to hair
Being stored sequentially in using in packet publication list for cloth time, then when detecting the abnormal server, can send out from the application
Corresponding application version information is obtained in cloth bag, i.e., the current version of described first application file can be believed according to different versions
Breath wraps the first application file that the last revision of the current version is searched in publication list from application, by the last revision
The first application file be synchronized to first agent's server of the first environment so that first agent's server will be described
First application program of the corresponding last revision of the first application file of last revision is synchronized to the described different of the first environment
Normal application server, to realize using a key Backward Function, so that the application file in the abnormal server is available
Normal file.
In the present embodiment, the first environment includes multiple first operation systems, and each first operation system includes more
A first application server;
The step S20, comprising:
Multiple first application servers for belonging to same first operation system are divided into two gray scale clusters;
Gray scale publication instruction is received, extracts the corresponding target of first application file from gray scale publication instruction
Gray scale cluster;
First application file is synchronized to first agent's server of the first environment, so that the first agent
Corresponding first application program of first application file is synchronized to the target gray collection of the first environment by server
The first application server in group.
It will be appreciated that the multi-environment application deployment facility can realize that gray scale is issued, the same application of same environment
System, the application file of a part of application server deployment A version, a part of application server can dispose the practical writing of B version
Part, the application file of the B version are to have increased part new function newly on the basis of the application file of the A version.It can pass through
The application server for deploying the application file of B version carries out the pre- online test of new function, when new function is subjected on the market
Afterwards, the application server for disposing the application file of A version can be also deployed to the application file of the B version.Described polycyclic
Border is using the gray scale configuration that some application system in deployment facility, can be set.By to environment name, operation system name and gray scale
Cluster name is specified, to define the application server in which gray scale cluster in which operation system in which specific environment
For gray scale environment.It, can be by the multi-environment application deployment facility selection each when selecting gray scale publication when application publication
The application version for needing to dispose in gray scale cluster.When needing to be deployed to the same B version completely, the specified industry of designated environment
All application server deployments in the specified gray scale cluster of business system are at the B version.
It should be noted that the first environment includes multiple first operation systems, each first operation system includes more
Multiple first application servers for belonging to same first operation system can be divided into two ashes in advance by a first application server
Cluster is spent, the practical writing of different editions can be disposed respectively according to affiliated gray scale cluster to the application server in two gray scale clusters
Part, for example, the application file of a gray scale clustered deploy(ment) A version, the application file of another gray scale clustered deploy(ment) B version.Institute
Stating gray scale publication instruction can be used family by the multi-environment display interface input using deployment facility, be also possible to backstage
Clocked flip.The corresponding target gray cluster of first application file is extracted from gray scale publication instruction, by institute
It states the application server in target gray cluster and is all deployed as first application file.
In the third embodiment, state inspection is carried out every application state of the preset time to first application server
It surveys, when the application state for detecting the presence of the first application server is abnormal, the first application service to there is exception again
The state-detection that the application state of device carries out preset times is recognized when the state-detection result of the preset times is all abnormal
It is fixed to there is the first abnormal application server for abnormal application server, disconnect the abnormal application server and the first generation
The communication link between server is managed, avoids also continuing work when application server breaks down, application request being caused to handle
Abnormal situation occurs.
In addition, the embodiment of the present invention also proposes a kind of storage medium, multi-environment application section is stored on the storage medium
Affix one's name to program, it is described it is multi-environment realize when being executed by processor using deployment program it is as described above multi-environment using dispositions method
The step of.
In addition, the embodiment of the present invention also proposes a kind of multi-environment application deployment device, the multi-environment application referring to Fig. 5
Disposing device includes:
Generation module 10, for obtaining using publication packet, issue packet generation first environment according to the application first is answered
Use file;
Synchronization module 20, for first application file to be synchronized to first agent's server of the first environment,
So that corresponding first application program of first application file is synchronized to the first environment by first agent's server
The first application server;
First application program is pushed to second environment for obtaining first application program by pushing module 30
Second agent's server so that first application program is synchronized to the second environment by second agent's server
Second application server.
It should be understood that the executing subject of the present embodiment is described multi-environment using deployment facility, wherein described multi-environment
It can be the electronic equipments such as PC or server using deployment facility.The multi-environment application deployment facility and agile development pipe
Reason flowsheet platform is docked, and directly can obtain data from the agile development management process platform.It can be by described multi-environment
The application deployment of multiple environment is realized using deployment facility.The multiple environment includes production environment and test environment etc..
It will be appreciated that the first environment is commonly referred to as production environment, by it is described it is multi-environment apply deployment facility,
First application program can be published to the survey simultaneously automatically after the first application issued of the production environment
Test ring border.By the deployment configuration item of configurableization, classificationization configuration is carried out to varying environment in same configuration item.
It should be noted that the application publication packet is data required for the application deployment of the production environment,
Produce what first application program in the production environment need to be used when being disposed by application publication packet
First application file, first application file include: that the IP, interface of the first application program described in the production environment match
It sets, application parameter configuration and domain name etc..
It should be understood that each environment has proxy server, communicated with the multi-environment application deployment facility, by each
Proxy server in environment carries out the pipe of receiving of the application server in respective environment.It specifically maps out the work and multi-environment is answered by described
With deployment facility strategy distribution to first agent's server of the test environment, again by first agent's server
Specific tasks are executed in the production environment.It ensures the mutually indepedent of each environment, while supporting multi-environment deployment again.
In the concrete realization, it can be taken by the automation tools puppet in the production environment as the first agent
Business device receive the first application server described in pipe, can carry out first practical writing using the automation tools puppet
The push of part.The automation tools puppet is a kind of centralized configuration management system of Linux, Unix or windows platform,
It, can management configuration file, user, software package and system service etc. using own puppet description language.The production environment
The deployment of the first application program need first agent's server by the production environment to realize, described first is applied
File synchronization is to first agent's server of the production environment, and first agent's server is according to first application file
First application program is synchronized to application server, to complete the deployment of first application program.
It should be understood that the second environment is commonly referred to as test environment, in order to realize multi-environment application deployment,
When first application deployment in the production environment is completed, first application in the production environment can be obtained
Program, and first application program is pushed into the second agent's server for testing environment, the test environment
Differences after first application program according to the production environment is disposed, can be first with described in production environment
It is disposed subject to first application file of first application program.First application program is completed in the test environment
In deployment after, then differentiation modification is carried out, to realize the application deployment of the second environment.
In the present embodiment, multi-environment application deployment facility obtains application publication packet, issues packet according to the application and generates
First application file is synchronized to first agent's server of the first environment by the first application file of first environment,
So that corresponding first application program of first application file is synchronized to the first environment by first agent's server
The first application server;First application program is obtained, first application program is pushed to the second of second environment
Proxy server, so that second agent's server second answering that first application program is synchronized to the second environment
Use server.Pass through the multi-environment agency service that application file or application program are synchronized to each environment using deployment facility
Device is disposed in respective environment by each proxy server, it is ensured that each environment it is mutually indepedent while, realize it is multi-environment
Application deployment, improve application deployment efficiency.
In one embodiment, device is disposed in the multi-environment application further include: modified module;
The modified module, for being modified in the first configuration item of the first environment by default differentiation configuration function
Attribute value.
In one embodiment, device is disposed in the multi-environment application further include: monitoring modular;
The monitoring modular, for monitoring first application server of the first environment, when monitoring described
When information is completed in the first deployment that one application server is sent, execution is described to push to second environment for first application program
Second agent's server so that first application program is synchronized to the second environment by second agent's server
The step of second application server.
In one embodiment, device is disposed in the multi-environment application further include: detection module, for every preset time pair
The application state of first application server carries out state-detection;
The detection module is also used to when the application state for detecting the presence of the first application server is abnormal, again
The state-detection of preset times is carried out to the application state that there is the first abnormal application server;
Assert module, for when the state-detection result of the preset times is all abnormal, assert there is abnormal the
One application server is abnormal application server;
Module is disconnected, for disconnecting the communication chain between the abnormal application server and first agent's server
Road.
In one embodiment, device is disposed in the multi-environment application further include: searching module is answered for obtaining described first
With the current version of file, the first application file that the last revision of the current version is searched in publication list is wrapped from application;
First application file of the last revision is synchronized to first agent's server of the first environment, so that institute
State first agent's server the first application program of the corresponding last revision of the first application file of the last revision is synchronous
To the abnormal application server of the first environment.
In one embodiment, the first environment includes multiple first operation systems, and each first operation system includes more
A first application server;
Device is disposed in the multi-environment application further include: division module, for same first operation system will to be belonged to
Multiple first application servers are divided into two gray scale clusters;
Receiving module extracts first application for receiving gray scale publication instruction from gray scale publication instruction
The corresponding target gray cluster of file;
The synchronization module 20 is also used to for first application file being synchronized to first agent's clothes of the first environment
Business device, so that corresponding first application program of first application file is synchronized to described first by first agent's server
The first application server in the target gray cluster of environment.
In one embodiment, device is disposed in the multi-environment application further include: obtains module;
The acquisition module, it is described multi-environment anti-using first between deployment facility and the first environment for obtaining
Wall with flues strategy, and obtain multi-environment second firewall policy using between deployment facility and the second environment;
The synchronization module 20 is also used to for first firewall policy being synchronized to described in the first environment
One proxy server, and second firewall policy is synchronized to second agent's server in the second environment.
The other embodiments or specific implementation of multi-environment application deployment device of the present invention can refer to above-mentioned each side
Method embodiment, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying
Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first,
Second and the use of third etc. do not indicate any sequence, can be title by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
(such as read-only memory mirror image (Read Only Memory image, ROM)/random access memory (Random Access
Memory, RAM), magnetic disk, CD) in, including some instructions are used so that terminal device (can be mobile phone, computer,
Server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.