CN105743680B - A kind of clustered deploy(ment) method and deployment facility - Google Patents
A kind of clustered deploy(ment) method and deployment facility Download PDFInfo
- Publication number
- CN105743680B CN105743680B CN201410764681.9A CN201410764681A CN105743680B CN 105743680 B CN105743680 B CN 105743680B CN 201410764681 A CN201410764681 A CN 201410764681A CN 105743680 B CN105743680 B CN 105743680B
- Authority
- CN
- China
- Prior art keywords
- starting
- deployment
- script
- name
- deployment facility
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The embodiment of the invention discloses a kind of clustered deploy(ment) method and deployment facilities, and after disposing code update, deployment code quickly can be deployed to preset destination server by deployment facility, the method comprise the steps that deployment facility obtains deployment code;Deployment facility starts script according to deployment code building;Deployment facility obtains starting script configuration item according to starting script;Branch's name in deployment facility parsing starting script configuration item, obtains destination server group;Application name in deployment facility parsing starting script configuration item obtains matching building output packet;Deployment facility obtains corresponding application according to branch's name and starts configuration file;Matching is constructed output packet, starting script and application starting configuration file and is sent to the destination server in destination server group by deployment facility.The embodiment of the present invention also provides a kind of deployment facility.
Description
Technical field
The present invention relates to computer field more particularly to a kind of clustered deploy(ment) methods and deployment facility.
Background technique
Now in terms of the continuous integrating based on Java exploitation Large-Scale Interconnected net product, whether improved in product process,
Or in the business demand of privatization customization, multiple-limb concurrent development and release model have become more and more popular, and Git is also gradually
As mainstream code library management framework, when testing or issuing the application product of different branches, it is related to building for more set of environments
And configuration;On multiserver or more cluster server groups, also there are personalized lasting deployment requirements.
Git is a free, open source distributed version control system, is efficiently handled for agility any small or big
Project;Capistrano is a kind of a kind of frame and tool applied by ssh to multiple server disposition web;Ssh is one
The Development Framework combination of kind Java;Ant is the automation starting script engine based on Java, and starting script format is that can expand
It opens up markup language (eXtensible Markup Language, XML).
Project deployment way in the prior art has:
1, for the traditional approach of Java project deployment are as follows: write corresponding ant to projects and each server and start foot
This, deployment process is realized by modifying some configurations, and the environment of every suit deploying projects all corresponds to a set of deployment starting foot
This.
2, the project deployment way that the library Capistrano and Git combines are as follows: portion Capistrano newborn as one
Administration's tool and the library Git combine be used primarily in deployment HyperText Preprocessor (PHP, Hypertext Preprocessor) and
Hypertext markup language (HyperText Markup Language, HTML) etc. does not need to compile the directly online network used
Web project realizes deployment process by built-in deployment function.
But in mode 1, as long as the environment of deploying projects changes, it is necessary to change corresponding ant starting script, because
This causes modification and maintenance cost high, heavy workload;In mode 2, Capistrano it is this kind of for Java project it is more complex simultaneously
The project for needing to be deployed in web container is supported without enough customization, to affect the efficiency of project deployment.
Summary of the invention
The embodiment of the invention provides a kind of clustered deploy(ment) method and deployment facilities, after enabling to deployment code update,
Deployment code quickly can be deployed to preset destination server by deployment facility.
In view of this, first aspect present invention provides a kind of clustered deploy(ment) method, comprising:
Deployment facility obtains deployment code;
The deployment facility starts script according to the deployment code building;
The deployment facility obtains starting script configuration item according to the starting script;
The deployment facility parses branch's name in the starting script configuration item, obtains destination server group;
The deployment facility parses the application name in the starting script configuration item, obtains matching building output packet;
The deployment facility obtains corresponding application according to branch's name and starts configuration file;
The matching is constructed output packet, the starting script and application starting configuration file hair by the deployment facility
Send the destination server into the destination server group.
In conjunction with first aspect present invention, in the first embodiment of first aspect present invention, the deployment facility is according to institute
Stating starting script acquisition starting script configuration item includes:
The deployment facility extracts starting script configuration item according to the starting script from own database.
In conjunction with first aspect present invention, in the second embodiment of first aspect present invention, the deployment facility is according to institute
Stating starting script acquisition starting script configuration item includes:
The deployment facility obtains starting script configuration item according to the starting script from External memory equipment.
In conjunction with first aspect present invention, in the third embodiment of first aspect present invention, the deployment facility is according to institute
Stating the corresponding application starting configuration file of branch's name acquisition includes:
The deployment facility extracts corresponding application according to branch's name from own database and starts configuration file.
In conjunction with first aspect present invention, in the 4th embodiment of first aspect present invention, the deployment facility is according to institute
Stating the corresponding application starting configuration file of branch's name acquisition includes:
The deployment facility obtains corresponding application according to branch's name from External memory equipment and starts configuration file
In conjunction with first aspect present invention, the first embodiment of first aspect present invention, first aspect present invention second
4th embodiment of embodiment, the third embodiment of first aspect present invention or first aspect present invention, the present invention the
In 5th embodiment of one side, further includes:
When the destination server operation starting script, and it is corresponding in application, the deployment to start the script
Equipment receives the application starting information that destination server is sent.
Second aspect of the present invention provides a kind of deployment facility, comprising:
First obtains module, for obtaining deployment code;
Generation module, for starting script according to the deployment code building;
Second obtains module, for obtaining starting script configuration item according to the starting script;
First parsing module obtains destination server group for parsing branch's name in the starting script configuration item;
Second parsing module obtains matching building output packet for parsing the application name in the starting script configuration item;
Third obtains module, starts configuration file for obtaining corresponding application according to branch's name;
Sending module starts configuration file for the matching to be constructed output packet, the starting script and the application
The destination server being sent in the destination server group.
In conjunction with second aspect of the present invention, in the first embodiment of second aspect of the present invention, described second obtains module packet
It includes:
First acquisition unit, for extracting starting script configuration item from own database according to the starting script.
In conjunction with second aspect of the present invention, in the second embodiment of second aspect of the present invention, described second obtains module packet
It includes:
Second acquisition unit, for obtaining starting script configuration item from External memory equipment according to the starting script.
In conjunction with second aspect of the present invention, in the third embodiment of second aspect of the present invention, the third obtains module packet
It includes:
Third acquiring unit, for extracting corresponding application starting configuration from own database according to branch's name
File.
In conjunction with second aspect of the present invention, in the 4th embodiment of second aspect of the present invention, the third obtains module packet
It includes:
4th acquiring unit, for obtaining corresponding application starting configuration from External memory equipment according to branch's name
File.
In conjunction with second aspect of the present invention, the first embodiment of second aspect of the present invention, second aspect of the present invention second
4th embodiment of embodiment, the third embodiment of second aspect of the present invention or second aspect of the present invention, the present invention the
In 5th embodiment of two aspects, further includes:
Receiving module, for receiving the application starting information of destination server transmission.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
Deployment facility obtains deployment code, and deployment facility starts script according to deployment code building, and deployment facility is according to opening
Dynamic script obtains starting script configuration item, and the branch's name and application name in deployment facility parsing starting script configuration item respectively obtain
Destination server group and matching building output packet, deployment facility obtain corresponding application according to branch's name and start configuration file, portion
Matching is constructed output packet, starting script and application starting configuration file and is sent to the clothes of the target in destination server group by administration's equipment
Business device generates corresponding starting script after disposing code update, and starting script can be sent to the mesh of pre-configuration by deployment facility
Server group in destination server, therefore simplify configuration flow, reduce O&M cost and improve work efficiency.
Detailed description of the invention
Fig. 1 is a kind of one embodiment of clustered deploy(ment) method in the embodiment of the present invention;
Fig. 2 is a kind of another embodiment of clustered deploy(ment) method in the embodiment of the present invention;
Fig. 3 is a kind of another embodiment of clustered deploy(ment) method in the embodiment of the present invention;
Fig. 4 is a kind of another embodiment of clustered deploy(ment) method in the embodiment of the present invention;
Fig. 5 is a kind of another embodiment of clustered deploy(ment) method in the embodiment of the present invention;
Fig. 6 is a kind of one embodiment of deployment facility in the embodiment of the present invention;
Fig. 7 is a kind of another embodiment of deployment facility in the embodiment of the present invention;
Fig. 8 is a kind of another embodiment of deployment facility in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of clustered deploy(ment) methods, after being used for so that disposing code update, deployment facility energy
Deployment code is quickly deployed to preset destination server.
Referring to Fig. 1, a kind of one embodiment of clustered deploy(ment) method includes: in the embodiment of the present invention
101, deployment facility obtains deployment code;
In the embodiment of the present invention, deployment facility gets deployment code.
102, deployment facility starts script according to deployment code building;
In the embodiment of the present invention, after deployment facility gets deployment code, script is started according to the deployment code building.
103, deployment facility obtains starting script configuration item according to starting script;
In the embodiment of the present invention, deployment facility gets starting script configuration item according to the starting script of generation.
104, branch's name in deployment facility parsing starting script configuration item, obtains destination server group;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, to the branch in starting script configuration item
Name is parsed, and destination server group is obtained.
105, the application name in deployment facility parsing starting script configuration item obtains matching building output packet;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, to the application in starting script configuration item
Name is parsed, and matching building output packet is obtained.
106, deployment facility obtains corresponding application starting configuration file according to branch's name;
In the embodiment of the present invention, deployment facility gets corresponding application according to branch's name in starting script configuration item and opens
Dynamic configuration file.
107, matching is constructed output packet, starting script and application starting configuration file and is sent to purpose service by deployment facility
Destination server in device group.
In the embodiment of the present invention, the matching building output that deployment facility will acquire is wrapped, starts script and is matched using starting
Set the destination server that file is sent in destination server group.
It should be noted that the sequencing of step 104, step 105 and step 106 can be exchanged with each other, it will not other side
The implementation of case has an impact, and specific sequence is without limitation.
In the embodiment of the present invention, deployment facility obtains deployment code, and deployment facility starts script according to deployment code building,
Deployment facility according to starting script obtain starting script configuration item, deployment facility parsing starting script configuration item in branch name and
Application name respectively obtains destination server group and matching building output packet, and deployment facility obtains corresponding application according to branch's name and opens
Matching is constructed output packet, starting script and application starting configuration file and is sent to purpose service by dynamic configuration file, deployment facility
Destination server in device group starts script according to deployment code building, starting script can be disposed after disposing code update
Equipment is sent to the destination server in the destination server group of pre-configuration, therefore simplifies configuration flow, reduce O&M at
Originally it and improves work efficiency.
It should be noted that deployment facility can be from deployment according to the mode that starting script obtains starting script configuration item
Device databases obtain, or obtain from External memory equipment, deployment facility can also obtain starting foot in other ways
This configuration item, herein without limitation.
Separately below to deployment facility according to starting script extracted from own database starting script configuration item and from
Starting script configuration item is obtained in External memory equipment to be described in detail:
One, deployment facility extracts starting script configuration item from own database;
Referring to Fig. 2, a kind of another embodiment of clustered deploy(ment) method includes: in the embodiment of the present invention
201, deployment facility obtains deployment code;
In the embodiment of the present invention, the code of being disposed for task is input to deployment facility, and deployment facility gets deployment
Code.
202, deployment facility starts script according to deployment code building;
In the embodiment of the present invention, after deployment facility gets deployment code, script is started according to the deployment code building.
203, deployment facility extracts starting script configuration item according to starting script from own database;
In the embodiment of the present invention, the creation of starting script configuration item is based on starting script, and deployment facility is according to generation
Starting script inquiry own database and extract starting script configuration item.
204, branch's name in deployment facility parsing starting script configuration item, obtains destination server group;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, branch's name in configuration item is solved
Analysis, the setting of server group are based on branch's name, the available destination server group of parsing branch name.
205, the application name in deployment facility parsing starting script configuration item obtains matching building output packet;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, the application name in configuration item is solved
Analysis, the creation of matching building output packet are based on application name, and parsing application name may be matched building output packet.
206, deployment facility obtains corresponding application starting configuration file according to branch's name;
In the embodiment of the present invention, the creation of configuration file is based on branch's name, and deployment facility is configured according to starting script
Branch's name in is available to corresponding application starting configuration file.
207, matching is constructed output packet, starting script and application starting configuration file and is sent to purpose service by deployment facility
Destination server in device group;
In the embodiment of the present invention, the matching building output that deployment facility will acquire is wrapped, starts script and is matched using starting
Set the destination server that file is sent in destination server group.
208, deployment facility receives the application starting information that destination server is sent.
In the embodiment of the present invention, when destination server receives matching building output packet, starting script and matches using starting
After setting file, operation starting script, and start corresponding with the starting script in application, destination server generates application starting letter
Breath, deployment facility receive application starting information.
It should be noted that the sequencing of step 204, step 205 and step 206 can be exchanged with each other, it will not other side
The implementation of case has an impact, and specific sequence is without limitation.
In the embodiment of the present invention, deployment facility obtains deployment code, and deployment facility starts script according to deployment code building,
Deployment facility obtains starting script configuration item according to starting script, and deployment facility parses branch's name in configuration item and applies status
Destination server group and matching building output packet are not obtained, and deployment facility obtains corresponding application starting configuration text according to branch's name
Matching is constructed output packet, starting script and application starting configuration file and is sent in destination server group by part, deployment facility
Destination server starts script according to deployment code building, starting script can be sent by deployment facility after disposing code update
Destination server into the destination server group of pre-configuration, therefore simplify configuration flow, reduce O&M cost and mention
High working efficiency.
Secondly, deployment facility extracts starting script configuration item according to starting script from own database, so that scheme
It is more specific.
Again, start script when destination server is run, and start corresponding with the starting script in application, deployment facility
The application starting information that destination server is sent is received, the exploitativeness of scheme is improved.
Two, deployment facility obtains starting script configuration item from External memory equipment.
Referring to Fig. 3, a kind of another embodiment of clustered deploy(ment) method includes: in the embodiment of the present invention
301, deployment facility obtains deployment code;
In the embodiment of the present invention, the code of being disposed for task is input to deployment facility, and deployment facility gets deployment
Code.
302, deployment facility starts script according to deployment code building;
In the embodiment of the present invention, after deployment facility gets deployment code, script is started according to the deployment code building.
303, deployment facility obtains starting script configuration item according to starting script from External memory equipment;
In the embodiment of the present invention, the creation of starting script configuration item is based on starting script, and deployment facility is according to generation
Starting script retrieval External memory equipment and from External memory equipment get starting script configuration item.
304, branch's name in deployment facility parsing configuration item, obtains destination server group;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, branch's name in configuration item is solved
Analysis, the setting of server group are based on branch's name, the available destination server group of parsing branch name.
305, the application name in deployment facility parsing configuration item obtains matching building output packet;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, the application name in configuration item is solved
Analysis, the creation of matching building output packet are based on application name, and parsing application name may be matched building output packet.
306, deployment facility obtains corresponding application starting configuration file according to branch's name;
In the embodiment of the present invention, the creation of configuration file is based on branch's name, and deployment facility is configured according to starting script
Branch's name in is available to corresponding application starting configuration file.
307, matching is constructed output packet, starting script and corresponding application starting configuration file and is sent to mesh by deployment facility
Server group in destination server;
In the embodiment of the present invention, the matching building output that deployment facility will acquire is wrapped, starts script and is matched using starting
Set the destination server that file is sent in destination server group.
308, deployment facility receives the application starting information that destination server is sent.
In the embodiment of the present invention, when destination server receives matching building output packet, starting script and matches using starting
After setting file, operation starting script, and start corresponding with the starting script in application, destination server generates application starting letter
Breath, deployment facility receive application starting information.
It should be noted that the sequencing of step 304, step 305 and step 306 can be exchanged with each other, it will not other side
The implementation of case has an impact, and specific sequence is without limitation.
In the embodiment of the present invention, deployment facility obtains deployment code, and deployment facility starts script according to deployment code building,
Deployment facility obtains starting script configuration item according to starting script, and deployment facility parses branch's name in configuration item and applies status
Destination server group and matching building output packet are not obtained, and deployment facility obtains corresponding application starting configuration text according to branch's name
Matching is constructed output packet, starting script and application starting configuration file and is sent in destination server group by part, deployment facility
Destination server starts script according to deployment code building, starting script can be sent by deployment facility after disposing code update
Destination server into the destination server group of pre-configuration, therefore simplify configuration flow, reduce O&M cost and mention
High working efficiency.
Secondly, deployment facility obtains starting script configuration item according to starting script from External memory equipment, so that scheme
It is more specific.
Again, start script when destination server is run, and start corresponding with the starting script in application, deployment facility
The application starting information that destination server is sent is received, the exploitativeness of scheme is improved.
It should be noted that deployment facility can be according to the mode that branch's name obtains corresponding application starting configuration file
It is extracted from own database, or obtained from External memory equipment, deployment facility can also obtain by other means
Corresponding application starting configuration file is taken, herein without limitation.
Corresponding application starting configuration text is extracted from own database according to branch's name to deployment facility separately below
Part and corresponding application starting configuration file obtained from External memory equipment be described in detail:
(1), deployment facility extracts corresponding application starting configuration file from own database;
Referring to Fig. 4, a kind of another embodiment of clustered deploy(ment) method includes: in the embodiment of the present invention
401, deployment facility obtains deployment code;
In the embodiment of the present invention, the code of being disposed for task is input to deployment facility, and deployment facility gets deployment
Code.
402, deployment facility starts script according to deployment code building;
In the embodiment of the present invention, after deployment facility gets deployment code, script is started according to the deployment code building.
403, deployment facility obtains starting script configuration item according to starting script;
In the embodiment of the present invention, after deployment facility generates starting script, starting foot is obtained according to the starting script of the generation
This configuration item.
404, branch's name in deployment facility parsing configuration item, obtains destination server group;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, branch's name in configuration item is solved
Analysis, the setting of server group are based on branch's name, the available destination server group of parsing branch name.
405, the application name in deployment facility parsing configuration item obtains matching building output packet;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, the application name in configuration item is solved
Analysis, the creation of matching building output packet are based on application name, and parsing application name may be matched building output packet.
406, deployment facility extracts corresponding application starting configuration file according to branch's name from own database;
In the embodiment of the present invention, the creation of configuration file is based on branch's name, and deployment facility is configured according to starting script
Branch's name inquiry own database in, and extract application starting configuration file corresponding with branch name.
407, matching is constructed output packet, starting script and corresponding application starting configuration file and is sent to mesh by deployment facility
Server group in destination server;
In the embodiment of the present invention, the matching building output that deployment facility will acquire is wrapped, starts script and is matched using starting
Set the destination server that file is sent in destination server group.
408, deployment facility receives the application starting information that destination server is sent.
In the embodiment of the present invention, when destination server receives matching building output packet, starting script and matches using starting
After setting file, operation starting script, and start corresponding with the starting script in application, destination server generates application starting letter
Breath, deployment facility receive application starting information.
It should be noted that the sequencing of step 404, step 405 and step 406 can be exchanged with each other, it will not other side
The implementation of case has an impact, and specific sequence is without limitation.
In the embodiment of the present invention, deployment facility obtains deployment code, and deployment facility starts script according to deployment code building,
Deployment facility obtains starting script configuration item according to starting script, and deployment facility parses branch's name in configuration item and applies status
Destination server group and matching building output packet are not obtained, and deployment facility obtains corresponding application starting configuration text according to branch's name
Matching is constructed output packet, starting script and application starting configuration file and is sent in destination server group by part, deployment facility
Destination server starts script according to deployment code building, starting script can be sent by deployment facility after disposing code update
Destination server into the destination server group of pre-configuration, therefore simplify configuration flow, reduce O&M cost and mention
High working efficiency.
Secondly, deployment facility extracts corresponding application according to branch's name from own database starts configuration file, make
The scheme of obtaining is more specific.
Again, start script when destination server is run, and start corresponding with the starting script in application, deployment facility
The application starting information that destination server is sent is received, the exploitativeness of scheme is improved.
(2), deployment facility obtains corresponding application starting configuration file from External memory equipment;
Referring to Fig. 5, a kind of another embodiment of clustered deploy(ment) method includes: in the embodiment of the present invention
501, deployment facility obtains deployment code;
In the embodiment of the present invention, the code of being disposed for task is input to deployment facility, and deployment facility gets deployment
Code.
502, deployment facility starts script according to deployment code building;
In the embodiment of the present invention, after deployment facility gets deployment code, script is started according to the deployment code building.
503, deployment facility obtains starting script configuration item according to starting script;
In the embodiment of the present invention, after deployment facility generates starting script, starting foot is obtained according to the starting script of the generation
This configuration item.
504, branch's name in deployment facility parsing configuration item, obtains destination server group;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, branch's name in configuration item is solved
Analysis, the setting of server group are based on branch's name, the available destination server group of parsing branch name.
505, the application name in deployment facility parsing configuration item obtains matching building output packet;
In the embodiment of the present invention, after deployment facility obtains starting script configuration item, the application name in configuration item is solved
Analysis, the creation of matching building output packet are based on application name, and parsing application name may be matched building output packet.
506, deployment facility obtains corresponding application starting configuration file according to branch's name from External memory equipment;
In the embodiment of the present invention, the creation of configuration file is based on branch's name, and deployment facility is configured according to starting script
Branch's name retrieval External memory equipment in, gets application starting corresponding with branch name from External memory equipment and configures
File.
507, matching is constructed output packet, starting script and application starting configuration file and is sent to purpose service by deployment facility
Destination server in device group;
In the embodiment of the present invention, the matching building output that deployment facility will acquire is wrapped, starts script and is matched using starting
Set the destination server that file is sent in destination server group.
508, deployment facility receives the application starting information that destination server is sent.
In the embodiment of the present invention, when destination server receives matching building output packet, starting script and matches using starting
After setting file, operation starting script, and start corresponding with the starting script in application, destination server generates application starting letter
Breath, deployment facility receive application starting information.
It should be noted that the sequencing of step 504, step 505 and step 506 can be exchanged with each other, it will not other side
The implementation of case has an impact, and specific sequence is without limitation.
In the embodiment of the present invention, deployment facility obtains deployment code, and deployment facility starts script according to deployment code building,
Deployment facility obtains starting script configuration item according to starting script, and deployment facility parses branch's name in configuration item and applies status
Destination server group and matching building output packet are not obtained, and deployment facility obtains corresponding application starting configuration text according to branch's name
Matching is constructed output packet, starting script and application starting configuration file and is sent in destination server group by part, deployment facility
Destination server starts script according to deployment code building, starting script can be sent by deployment facility after disposing code update
Destination server into the destination server group of pre-configuration, therefore simplify configuration flow, reduce O&M cost and mention
High working efficiency.
Secondly, deployment facility obtains corresponding application according to branch's name from External memory equipment starts configuration file, make
The scheme of obtaining is more specific.
Again, start script when destination server is run, and start corresponding with the starting script in application, deployment facility
The application starting information that destination server is sent is received, the exploitativeness of scheme is improved.
In order to make it easy to understand, a kind of clustered deploy(ment) method is described in detail with a concrete application scene below, have
Body:
After certain JAVA project is completed in deployment facility building, automatic trigger Capistrano deployment task, is constructing this
In JAVA Project Process, configuration item, Capistrano format configuration file etc. are created, and be stored in the database of deployment facility
In, deployment facility receives the deployment code of JAVA deploying projects, starting script is generated according to the item code, from deployment facility
Database in extract starting script configuration item, parsing starting script configuration item in branch name " app ", " man ",
" manxt " configures Capistrano group file format in the grouping level of unified association code branch name and Capistrano
For " server'192.168.22.142', user:'root', roles:%w { app }, my_property::my_value;
Server'172.20.192.11', user:'root', roles:%w { man }, my_property::my_value;
Server'172.20.192.10', user:'root', roles:%w { manxt }, my_property::my_value " can
With obtain destination server group be " 192.168.22.142 and 172.20.192.11 and 172.20.192.10 ", destination server
As " 192.168.22.142 ", parsing start the application name in script configuration item, obtain matching building output packet;
Deployment facility extracts corresponding application according to branch's name " app " from database and starts configuration file, will match
Building output packet, starting script and application starting configuration file are sent in destination server " 192.168.22.142 ", when this
Server runs the starting script, and starts corresponding with the starting script in application, generating application starting information, deployment facility
Receive the application starting information that destination server is sent.
Referring to Fig. 6, a kind of one embodiment of deployment facility includes: in the embodiment of the present invention
First obtains module 601, for obtaining deployment code;
Generation module 602 starts script for obtaining the deployment code building that module 601 obtains according to first;
Second obtains module 603, and the starting script for being generated according to generation module 602 obtains starting script configuration item;
First parsing module 604, for parsing the branch in the starting script configuration item that the second acquisition module 603 obtains
Name, obtains destination server group;
Second parsing module 605, for parsing the application in the starting script configuration item that the second acquisition module 603 obtains
Name obtains matching building output packet;
Third obtains module 606, starts configuration file for obtaining corresponding application according to branch's name;
Sending module 607 is sent to purpose for that will match building output packet, starting script and application starting configuration file
Destination server in server group.
In the embodiment of the present invention, first, which obtains module 601, obtains deployment code, and generation module 602 obtains mould according to first
The deployment code building that block 601 obtains starts script, the starting script that the second acquisition module 603 is generated according to generation module 602
Obtain starting script configuration item, the branch in the first parsing module 604 and the second parsing module 605 parsing starting script configuration item
Name and application name respectively obtain destination server group and matching building output packet, and third obtains module 606 and obtained according to branch's name
Corresponding application starts configuration file, and sending module 607 obtains the first parsing module 604, the second parsing module 605 and third
Matching building output packet, starting script and the application starting configuration file that module 606 obtains are sent in destination server group
Destination server, after disposing code update, generation module 602 starts script according to deployment code building, and starting script can quilt
Deployment facility is sent to the destination server in the destination server group of pre-configuration, therefore simplifies configuration flow, reduces fortune
It ties up cost and improves work efficiency.
Referring to Fig. 7, a kind of another embodiment of deployment facility includes: in the embodiment of the present invention
First obtains module 701, for obtaining deployment code;
Generation module 702 starts script for obtaining the deployment code building that module 701 obtains according to first;
Second obtains module 703, and the starting script for being generated according to generation module 702 obtains starting script configuration item;
First parsing module 704, for parsing the branch in the starting script configuration item that the second acquisition module 703 obtains
Name, obtains destination server group;
Second parsing module 705, for parsing the application in the starting script configuration item that the second acquisition module 703 obtains
Name obtains matching building output packet;
Third obtains module 706, starts configuration file for obtaining corresponding application according to branch's name;
Sending module 707 is sent to purpose for that will match building output packet, starting script and application starting configuration file
Destination server in server group.
Receiving module 708 for starting script when destination server operation, and starts application corresponding with the starting script
When, receive the application starting information that destination server is sent.
In the embodiment of the present invention, the second acquisition module 703 includes:
First acquisition unit 7031, the starting script for being generated according to generation module 702 are extracted from own database
Start script configuration item out;
Or,
Second acquisition unit 7032, the starting script for being generated according to generation module 702 are obtained from External memory equipment
Take starting script configuration item;
In the embodiment of the present invention, first, which obtains module 701, obtains deployment code, and generation module 702 obtains mould according to first
The deployment code building that block 701 obtains starts script, and second obtains first acquisition unit 7031 or the second acquisition in module 703
The starting script that unit 7032 is generated according to generation module 702 obtains starting script from own database or External memory equipment
Configuration item, the first parsing module 704 and the parsing of the second parsing module 705 start branch's name in script configuration item and apply status
Destination server group is not obtained and matching constructs output packet, and third obtains module 706 and opened according to the corresponding application of branch's name acquisition
Dynamic configuration file, sending module 707 obtain the first parsing module 704, the second parsing module 705 and third acquisition module 706
Matching building output packet, starting script and application starting configuration file be sent to the destination server in destination server group,
After disposing code update, generation module 702 starts script according to deployment code building, and starting script can be sent by deployment facility
Destination server into the destination server group of pre-configuration, therefore simplify configuration flow, reduce O&M cost and mention
High working efficiency.
Secondly, have in the second acquisition module 703 first acquisition unit 7031 and second acquisition unit 7032 can there are two types of
Method obtains configuration item, so that scheme has more implementation.
Again, start script when destination server is run, and start corresponding with the starting script in application, receiving module
708 receive the application starting information that destination server is sent, so that scheme is more specific.
Referring to Fig. 8, a kind of another embodiment of deployment facility includes: in the embodiment of the present invention
First obtains module 801, for obtaining deployment code;
Generation module 802 starts script for obtaining the deployment code building that module 801 obtains according to first;
Second obtains module 803, and the starting script for being generated according to generation module 802 obtains starting script configuration item;
First parsing module 804, for parsing the branch in the starting script configuration item that the second acquisition module 803 obtains
Name, obtains destination server group;
Second parsing module 805, for parsing the application in the starting script configuration item that the second acquisition module 803 obtains
Name obtains matching building output packet;
Third obtains module 806, starts configuration file for obtaining corresponding application according to branch's name;
Sending module 807 is sent to purpose for that will match building output packet, starting script and application starting configuration file
Destination server in server group.
Receiving module 808 for starting script when destination server operation, and starts application corresponding with the starting script
When, receive the application starting information that destination server is sent.
In the embodiment of the present invention, third obtains module 806 and includes:
Third acquiring unit 8061 is opened for being extracted from own database according to branch's name in starting script configuration item
Dynamic script configuration item;
Or,
4th acquiring unit 8062 is opened for being obtained from External memory equipment according to branch's name in starting script configuration item
Dynamic script configuration item;
In the embodiment of the present invention, first, which obtains module 801, obtains deployment code, and generation module 802 obtains mould according to first
The deployment code building that block 801 obtains starts script, and second, which obtains the starting script that 803 generation module 802 of module generates, obtains
Start script configuration item, the first parsing module 804 and the second parsing module 805 parsing starting script configuration item in branch name and
Application name respectively obtains destination server group and matching building output packet, and third obtains the third acquiring unit in module 806
8061 or the 4th acquiring unit 8062 obtain corresponding application according to branch's name from own database or External memory equipment and open
Dynamic configuration file, sending module 807 obtain the first parsing module 804, the second parsing module 805 and third in module 806
Matching building output packet, starting script and the application starting configuration that third acquiring unit 8061 or third acquiring unit 8061 obtain
File is sent to the destination server in destination server group, and after disposing code update, generation module 802 is according to deployment code
Starting script is generated, starting script can be sent to the destination server in the destination server group of pre-configuration by deployment facility, because
This simplifies configuration flow, reduces O&M cost and improves work efficiency.
Secondly, third obtain have in module 806 third acquiring unit 8061 and the 4th acquiring unit 8062 can there are two types of
Method obtains starting script configuration item, so that scheme has more implementation.
Again, start script when destination server is run, and start corresponding with the starting script in application, receiving module
808 receive the application starting information that destination server is sent, so that scheme is more specific.
It is carried out below with interactive process of the specific implementation to each unit in deployment facility of the embodiment of the present invention detailed
Thin description:
After certain JAVA project is completed in deployment facility building, automatic trigger Capistrano deployment task, is constructing this
In JAVA Project Process, configuration item, Capistrano format configuration file etc. are created, and be stored in the database of deployment facility
In;
First acquisition module 801 receives the deployment code of JAVA deploying projects, and generation module 802 is according to the item code
Starting script is generated, the second acquisition module 803 extracts starting script configuration item, the first parsing module from own database
Branch name " app ", " man ", " manxt " in 804 parsing starting script configuration items, in unified association code branch name and
When the grouping level of Capistrano, configure Capistrano group file format for " server'192.168.22.142',
User:'root', roles:%w { app }, my_property::my_value;server'172.20.192.11',user:'
Root', roles:%w { man }, my_property::my_value;server'172.20.192.10',user:'root',
Roles:%w { manxt }, my_property::my_value ", available destination server group are " 192.168.22.142
With 172.20.192.11 and 172.20.192.10 ", destination server is " 192.168.22.142 ", the second parsing module
Application name in 805 parsing starting script configuration items obtains matching building output packet;
Third obtains the third acquiring unit 8061 in module 806 and is extracted from database pair according to branch's name " app "
Matching is constructed output packet, starting script and application starting configuration file and sent out by the application starting configuration file answered, sending module 807
It send into destination server " 192.168.22.142 ", receiving module 808 runs the script when the server, and starts and open with this
Dynamic script is corresponding in application, generating application starting information, and deployment facility receives the application starting information that destination server is sent.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (12)
1. a kind of clustered deploy(ment) method characterized by comprising
Deployment facility obtains deployment code;
The deployment facility starts script according to the deployment code building;
The deployment facility obtains starting script configuration item according to the starting script, and the starting script configuration item includes branch
Name and application name, branch's name is related to server group and configuration file, and the application name is related to matching building output packet;
The deployment facility parses the branch name in the starting script configuration item, obtains destination server group;
The deployment facility parses the application name in the starting script configuration item, obtains matching building output packet;
The deployment facility obtains corresponding application according to branch's name and starts configuration file;
The matching is constructed output packet, the starting script and application starting configuration file and is sent to by the deployment facility
Destination server in the destination server group.
2. clustered deploy(ment) method according to claim 1, which is characterized in that the deployment facility is according to the starting script
Obtaining starting script configuration item includes:
The deployment facility extracts starting script configuration item according to the starting script from own database.
3. clustered deploy(ment) method according to claim 1, which is characterized in that the deployment facility is according to the starting script
Obtaining starting script configuration item includes:
The deployment facility obtains starting script configuration item according to the starting script from External memory equipment.
4. clustered deploy(ment) method according to claim 1, which is characterized in that the deployment facility is obtained according to branch's name
The corresponding application starting configuration file is taken to include:
The deployment facility extracts corresponding application according to branch's name from own database and starts configuration file.
5. clustered deploy(ment) method according to claim 1, which is characterized in that the deployment facility is obtained according to branch's name
The corresponding application starting configuration file is taken to include:
The deployment facility obtains corresponding application according to branch's name from External memory equipment and starts configuration file.
6. clustered deploy(ment) method according to any one of claim 1 to 5, which is characterized in that further include:
When the destination server operation starting script, and it is corresponding in application, the deployment facility to start the script
Receive the application starting information that destination server is sent.
7. a kind of deployment facility characterized by comprising
First obtains module, for obtaining deployment code;
Generation module, for starting script according to the deployment code building;
Second obtains module, for obtaining starting script configuration item, the starting script configuration item packet according to the starting script
Branch's name and application name are included, branch's name is related to server group and configuration file, and the application name is exported with building is matched
Packet is related;
First parsing module obtains destination server group for parsing the branch name in the starting script configuration item;
Second parsing module obtains matching building output packet for parsing the application name in the starting script configuration item;
Third obtains module, starts configuration file for obtaining corresponding application according to branch's name;
Sending module is sent for the matching to be constructed output packet, the starting script and application starting configuration file
To the destination server in the destination server group.
8. deployment facility according to claim 7, which is characterized in that described second, which obtains module, includes:
First acquisition unit, for extracting starting script configuration item from own database according to the starting script.
9. deployment facility according to claim 7, which is characterized in that described second, which obtains module, includes:
Second acquisition unit, for obtaining starting script configuration item from External memory equipment according to the starting script.
10. deployment facility according to claim 7, which is characterized in that the third obtains module and includes:
Third acquiring unit, for extracting corresponding application starting configuration text from own database according to branch's name
Part.
11. deployment facility according to claim 7, which is characterized in that the third obtains module and includes:
4th acquiring unit, for obtaining corresponding application starting configuration text from External memory equipment according to branch's name
Part.
12. deployment facility according to any one of claims 7 to 11, which is characterized in that further include:
Receiving module, for starting script when destination server operation, and it is corresponding in application, receiving destination service to start script
The application starting information that device is sent.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410764681.9A CN105743680B (en) | 2014-12-11 | 2014-12-11 | A kind of clustered deploy(ment) method and deployment facility |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410764681.9A CN105743680B (en) | 2014-12-11 | 2014-12-11 | A kind of clustered deploy(ment) method and deployment facility |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105743680A CN105743680A (en) | 2016-07-06 |
CN105743680B true CN105743680B (en) | 2019-02-12 |
Family
ID=56240616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410764681.9A Active CN105743680B (en) | 2014-12-11 | 2014-12-11 | A kind of clustered deploy(ment) method and deployment facility |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105743680B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106371881B (en) * | 2016-09-08 | 2020-01-03 | 武汉斗鱼网络科技有限公司 | Method and system for updating program version in server |
CN107483572A (en) * | 2017-08-08 | 2017-12-15 | 北京奇艺世纪科技有限公司 | The dispositions method and device of a kind of server |
CN108595222A (en) * | 2018-04-26 | 2018-09-28 | 努比亚技术有限公司 | Background service environmental structure method, server and computer readable storage medium |
CN109032582A (en) * | 2018-07-19 | 2018-12-18 | 郑州云海信息技术有限公司 | A kind of method and device generating server O&M script |
CN109460252B (en) * | 2018-09-25 | 2023-10-20 | 中国平安人寿保险股份有限公司 | Configuration file processing method and device based on git and computer equipment |
CN109460670B (en) * | 2018-09-26 | 2024-04-12 | 中国平安人寿保险股份有限公司 | Configuration item decryption method, device, computer equipment and storage medium |
CN109582319B (en) * | 2018-12-04 | 2022-02-08 | 北京奇艺世纪科技有限公司 | Service code deployment method and device |
CN110401559A (en) * | 2019-06-05 | 2019-11-01 | 网宿科技股份有限公司 | A kind of server restorative procedure and device |
CN110532096B (en) * | 2019-08-28 | 2022-12-30 | 深圳市云存宝技术有限公司 | System and method for multi-node grouping parallel deployment |
CN110569044B (en) * | 2019-09-09 | 2022-07-12 | 浪潮通用软件有限公司 | Method, device and system for deploying application to running environment |
CN110795125A (en) * | 2019-10-21 | 2020-02-14 | 上海器魂智能科技有限公司 | Software updating method, system, device and readable storage medium based on DevOps framework |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101330514A (en) * | 2008-07-15 | 2008-12-24 | 西安交通大学 | Method for disposing micro-OS with self-adaption transmission model |
CN101453367A (en) * | 2007-11-30 | 2009-06-10 | 华为技术有限公司 | Software deployment method and system, software deployment server and user server |
US7950010B2 (en) * | 2005-01-21 | 2011-05-24 | Sap Ag | Software deployment system |
CN102075358A (en) * | 2010-12-31 | 2011-05-25 | 网宿科技股份有限公司 | System and method for distributing and deploying content of large-scale server cluster |
CN103577235A (en) * | 2013-11-14 | 2014-02-12 | 中安消技术有限公司 | Software deploying method, deploying server, computer to be deployed and system |
-
2014
- 2014-12-11 CN CN201410764681.9A patent/CN105743680B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7950010B2 (en) * | 2005-01-21 | 2011-05-24 | Sap Ag | Software deployment system |
CN101453367A (en) * | 2007-11-30 | 2009-06-10 | 华为技术有限公司 | Software deployment method and system, software deployment server and user server |
CN101330514A (en) * | 2008-07-15 | 2008-12-24 | 西安交通大学 | Method for disposing micro-OS with self-adaption transmission model |
CN102075358A (en) * | 2010-12-31 | 2011-05-25 | 网宿科技股份有限公司 | System and method for distributing and deploying content of large-scale server cluster |
CN103577235A (en) * | 2013-11-14 | 2014-02-12 | 中安消技术有限公司 | Software deploying method, deploying server, computer to be deployed and system |
Also Published As
Publication number | Publication date |
---|---|
CN105743680A (en) | 2016-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105743680B (en) | A kind of clustered deploy(ment) method and deployment facility | |
CN106302008B (en) | Data-updating method and device | |
CN104572644B (en) | Database update device and database update method | |
CN106155651B (en) | The automation publication of application version and the method and system of update | |
CN106802807B (en) | Application delivery method based on container platform, container platform and application delivery system | |
CN110109817A (en) | Automatic interface testing method, device, equipment and storage medium | |
CN103425585B (en) | OSGI (Open Service Gateway Initiative) integration testing method | |
CN106326128B (en) | The detection method and device of configuration file | |
CN107273122A (en) | Based on decoupling mechanism can iteration set up operation system method and its terminal | |
US20140040299A1 (en) | Automated Method of Detecting Pattern Matches between Converged Infrastructure Models and an Operating Converged Infrastructure | |
CN103942089B (en) | Simulation resource model base management system | |
CN110347378A (en) | The building method and device of item development environment | |
CN110032392A (en) | Service administering method and device, storage medium and electronic equipment | |
CN103186376B (en) | A kind of method, apparatus and equipment for being used to establish or update software development environment | |
CN109660377A (en) | Unified configuring management method, service server and operation and maintenance management platform | |
CN104598570B (en) | The grasping means of resource and device | |
CN103065000B (en) | A kind of method of carrying out SysML state machine diagram analysis verification based on model-driven engineering | |
Soukaras et al. | IoTSuite: a ToolSuite for prototyping internet of things applications | |
EP2748711A1 (en) | Data infrastructure for providing interconnectivity between platforms, devices, and operating systems | |
CN110347445A (en) | SDK call method, device, server and storage medium | |
CN109582289A (en) | The processing method of regular flow, system, storage medium and processor in regulation engine | |
CN104811403B (en) | Group list processing method, apparatus and group table configuration unit based on open flows | |
CN111984248B (en) | Page editing method and device, storage medium and electronic device | |
CN104461618B (en) | The method and device of load-on module | |
CN103186405B (en) | A kind of unified control method and device of realizing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |