CN109871241A - A kind of configuration method of Cross-environment application server - Google Patents
A kind of configuration method of Cross-environment application server Download PDFInfo
- Publication number
- CN109871241A CN109871241A CN201910002053.XA CN201910002053A CN109871241A CN 109871241 A CN109871241 A CN 109871241A CN 201910002053 A CN201910002053 A CN 201910002053A CN 109871241 A CN109871241 A CN 109871241A
- Authority
- CN
- China
- Prior art keywords
- configuration
- environment
- application server
- file
- application
- 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.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of configuration methods of Cross-environment application server, pass through the judgement according to environment where application server, for application server configuration configuration file compatible with its application environment, realize automatically configuring for the configuration file of the application server in each application environment, the allocative efficiency for improving application server has reached the technical effect for reducing application server configuration error rate.
Description
Technical field
The present invention relates to IT technical field, hardware environment management aspect more particularly to a kind of Cross-environment application server
Configuration method.
Background technique
The existing deployment scheme for varying environment mainly uses different script executions or is manually replaced,
Common following several methods:
1) developer is before compiling, the environment issued as needed, is replaced using corresponding configuration file local
Configuration file, then be compiled, generate deployment package publication.
2) developer unlocks deployment package after compiling out deployment package, replaces configuration text using corresponding configuration file
Part, then it is packaged as deployment package publication.
3) script is write when perform script compiles for varying environment carry out packing compiling using different configuration files,
Generate deployment package.
4) after using deployment package publication, configuration file is replaced according to environment by hand.
For development project, for different environment, different configuration files is needed to configure, such as database
Location, IP address and environmental information etc., usually by being replaced by hand after manually perhaps being disposed before compiling or for varying environment
Write compilation script, when execution is compiled using different configuration files, and efficiency is lower and error-prone.
Therefore, a kind of file dispositions method of configuration file that the corresponding environment is automatically configured according to application environment is needed.
Summary of the invention
The technical problems to be solved by the invention: in development project, for different where application server
Application environment needs manually to compile and configures the configuration file for being suitable for each environment, and efficiency is lower and error-prone.
The present invention provides a kind of configuration methods of Cross-environment application server, comprising:
Construction step: building configuration files database configures so that it is preserved with different application environment correspondingly
File;
Environment obtaining step: the application environment of application server to be configured is obtained;
Extraction step: it is extracted from the configuration files database corresponding with the application environment of application server to be configured
Configuration file, obtain the associated configuration file of the application server to be configured with this;
Configuration step: using the associated configuration file of application server to be configured with this to the application to be configured
Server is configured.
Preferably, the configuration method of above-mentioned Cross-environment application server further include:
Initial step: the application server to be configured in different application environment is carried out using same initial configuration file
Initial configuration;
In the configuration step, for each application server to be configured, using from the configuration files database
The associated configuration file of the application server to be configured with this of middle extraction come replace the application server to be configured just
Beginning configuration file, to realize the configuration of the application server to be configured.
Preferably, the initial step includes:
Deployment package is generated, and makes deployment package that there is the initial configuration file;
The deployment package is individually copied in each application server to be configured in different application environment, to realize
The initial configuration of these application servers.
Preferably, also there is file to be released in the deployment package of generation.
Preferably, deployment package is generated, and makes deployment package that there is the initial configuration file and the file to be released, packet
It includes:
Source code is compiled using maven tool, obtains binary file to be released;
According to the deployment package document directory structure defined in file, by the initial configuration file and have described to be released
The file to be released of binary file is packaged into deployment package.
Preferably, the deployment package is generated by compiler server.
Preferably, the deployment package is individually copied to by deployment packet server each wait match in different application environment
In the application server set, to realize the initial configuration of these application servers.
Preferably, the configuration files database is stored in configuration management server, is realized by deployment packet server
The environment obtaining step realizes the extraction step and the configuration step by the configuration management server.
Preferably, the configuration management server and the deployment packet server are under the jurisdiction of PaaS platform.
Preferably, the application environment includes exploitation environment, test environment and production environment.
Compared with prior art, one or more embodiments in above scheme can have following advantage or beneficial to effect
Fruit:
The present invention provides a kind of configuration methods of Cross-environment application server, by according to ring where application server
The judgement in border is application server configuration configuration file compatible with its application environment, realizes answering in each application environment
With automatically configuring for server, the allocative efficiency of application server is improved, has reached reduction application server configuration error rate
Technical effect.
Detailed description of the invention
The detailed description for reading hereafter exemplary embodiment in conjunction with the accompanying drawings is better understood the scope of the present invention.Its
In included attached drawing be:
Fig. 1 shows the flow diagram of the configuration method of Cross-environment application server;
Fig. 2 shows the Cross-environment application server configuration system schematics based on PaaS platform;And
Fig. 3 shows the flow diagram of the Cross-environment application server configuration method based on PaaS platform.
Specific embodiment
From the detailed description provided hereinafter, it will be evident that other application field of the invention.It is understood, however, that
Detailed description the being merely to illustrate property purpose of exemplary embodiment, accordingly, it is not intended that must limit the scope of the invention.
The existing deployment scheme for varying environment mainly uses different script executions or is manually replaced,
Common following several methods:
1) developer is before compiling, the environment issued as needed, is replaced using corresponding configuration file local
Configuration file, then be compiled, generate deployment package publication.
2) developer unlocks deployment package after compiling out deployment package, replaces configuration text using corresponding configuration file
Part, then it is packaged as deployment package publication.
3) script is write when perform script compiles for varying environment carry out packing compiling using different configuration files,
Generate deployment package.
4) after using deployment package publication, configuration file is replaced according to environment by hand.
For development project, for different environment, different configuration files is needed to configure, such as database
Location, IP address and environmental information etc., usually by being replaced by hand after manually perhaps being disposed before compiling or for varying environment
Write compilation script, when execution is compiled using different configuration files, and efficiency is lower and error-prone.
For above-mentioned in development project, for the different application environments where application server, need artificial
Compiling and configuration are suitable for the configuration file of each environment, and efficiency is lower and error-prone.The present invention provides a kind of Cross-environments to answer
Ring is applied with it for application server configuration according to the judgement of environment where application server with the configuration method of server
The compatible configuration file in border, realizes automatically configuring for the configuration file of the application server in each application environment.
Each embodiment of the invention will be described in detail below.
Embodiment one
The present embodiment is related to a kind of configuration method of Cross-environment application server.Specifically, Fig. 1 shows Cross-environment application
The flow diagram of the configuration method of server.As shown in Figure 1, the configuration method master of the Cross-environment application server of the present embodiment
It to include step S101 to step S105.
In the construction step of step S101, configuration files database is constructed, so that it is preserved and different application environment
One-to-one configuration file.
Specifically, application environment locating for application server includes exploitation environment, test environment and production environment, configuration text
It is stored in part database and the one-to-one configuration file of above-mentioned three kinds of application environments.Here, configuration files database can be with
Be construct online be also possible to construct offline.
In the initial step of step S102, using same initial configuration file to be configured in different application environment
Application server carries out initial configuration.Specifically:
Firstly, generating has initial configuration file, for the binary file of publication and the deployment package of picture file.
Specifically, source code is compiled using Maven tool, obtains binary file to be released.Here, Maven is
One project management and synthesis tool.Maven provides developer and constructs a complete sdlc frame.Development teams
It can be automatically performed the master tool construction of project, Maven constructs life cycle using the bibliographic structure and default of standard.It is pending
Cloth file includes binary file to be released, relies on the files such as packet, resource (picture etc.).
Then, according to define file pom.xml in deployment package document directory structure, by the initial configuration file and to
File publishing is packaged into deployment package, and deployment package is individually copied to each application service to be configured in different application environment
In device, to realize the initial configuration of these application servers.
After the completion of this step, the configuration of each application server is substantially the same, copies each application server to
In file to be released be also identical.
In the environment obtaining step of step S103, the application environment of application server to be configured is obtained.
Specifically, it is obtained according to the IP address of the application server to be configured for each application server to be configured
Affiliated application environment.For example, for a certain application server A to be configured for being located at exploitation environment, IP address is
10.1.1.1.It, can be according to the IP of application server A to be configured when needing to obtain the application environment of application server A to be configured
Address learns that the application server is located at exploitation environment, so that the application environment where obtaining application server A to be configured is to open
Hair ring border.
It is worth noting that, the present embodiment, which is not intended to limit step S101, executes sequence to step S103, it is also possible to walk
The sequence etc. of rapid S101 to step S103 to step S102.
In the extraction step of step S104, extracted from the configuration files database and application server to be configured
The corresponding configuration file of application environment, obtain the associated configuration file of the application server to be configured with this.Here, due to
The one-to-one mapping relations of application environment and configuration file are stored in configuration files database, therefore, in known applications
In the case where environment, it can be extracted from configuration files database and the one-to-one configuration file of the application environment.
In the configuration step of step S105, using the associated configuration file of application server to be configured with this to institute
Application server to be configured is stated to be configured.
Specifically, for each application server to be configured, using extracted from the configuration files database with
The associated configuration file of application server to be configured come the initial configuration file of replacing the application server to be configured,
Complete the configuration file configuration of the application server to be configured.
For being located at the application server to be configured of exploitation environment, in step S104, from the profile data
Exploitation environment special configuration file is extracted in library.S105 is entered step later, the exploitation environment special configuration file that will be extracted
It is sent to application server to be configured, and replaces the text of the initial configuration in the application server to be configured with the configuration file
Part is automatically configured with completing the configuration file of application server to be configured.
Compared with prior art, the embodiment of above scheme can have following advantage or the utility model has the advantages that
The configuration method for the Cross-environment application server that the present embodiment is proposed, according to environment where application server
Judgement is application server configuration configuration file compatible with its application environment, realizes the application in each application environment
The configuration file of server automatically configures, and improves the allocative efficiency of application server configuration file and effectively reduces configuration
The error rate of step.
Embodiment two
The present embodiment is related to a kind of Cross-environment application server configuration system based on PaaS platform.Specifically, PaaS is flat
Platform is (Platform-as-a-Service: platform services), and PaaS is a kind of cloud service, it provides opening for application program
Hair and running environment, PaaS platform described in the present embodiment, support the multi-environment management of software, provide compiling and the portion of software
Affix one's name to function.
Fig. 2 shows the Cross-environment application server configuration system schematics based on PaaS platform.As shown in Fig. 2, this reality
The Cross-environment application server configuration system based on PaaS platform for applying example mainly includes source code management server, compiling service
Device, deployment packet server and configuration management server.
Source code management server, for receiving the source code submitted by developer (for generating binary system text to be released
Part), initial configuration file and other files to be released (such as rely on packet, resource (picture) etc.), and above-mentioned data information is sent out
It send to compiler server.
Compiler server receives source code, initial configuration file and other files to be released that source code management server is sent,
And source code is compiled, to generate binary file to be released.Later by binary file to be released, initial configuration file and
Other files to be released (such as dependence packet, resource (picture) etc.) are packaged into deployment package and are sent to deployment packet server.
Packet server is disposed, receives the deployment package from compiler server, and be individually copied to different application environment
In each application server to be configured in, to realize the initial configuration of each application server.
Configuration management server is provided with configuration files database, preserves in the database and different application ring
The one-to-one configuration file in border.The configuration management server realizes the concrete configuration of each application server.
Above-mentioned source code management server, compiler server, configuration management server and deployment packet server are under the jurisdiction of together
One PaaS platform.
The mistake that Cross-environment application server configuration system configures each application server is described in detail below with reference to Fig. 3
Journey.As shown in figure 3, the Cross-environment application server configuration method based on PaaS platform of the present embodiment mainly includes step S201
To step S203.
In step s 201, compiler server is compiled source code, obtains binary file to be released, and accordingly and
First platform configuration file and remaining file generated deployment package to be released.
Specifically, it is compiled using the source code that compiler server submits developer, with life binary system to be released
File.Compiler server is waited for by binary file to be released and from the received initial configuration file of source code management server with remaining
File publishing (such as rely on packet, resource (picture) etc.) be packaged into deployment package and be sent to deployment package server.
In step S202, deployment package server by utilizing deployment package carries out initial configuration to application server to be configured.
Specifically, deployment packet server receives the deployment package that compiler server is sent, and deployment package is individually copied to not
With in each application server to be configured in application environment, to realize the initial configuration of each application server.
It is each application server configuration to be configured configuration file corresponding with its application environment in step S203.
Specifically:
Firstly, being directed to each application server to be configured, the application environment where it is obtained.It is prestored in deployment packet server
There are the IP address and its local environment type of all application servers to be configured of its subsequent connection.For each application to be configured
Server, when that need to obtain the application environment of the application server to be configured, deployment packet server can be according to the application to be configured
The IP address of server obtains the application environment belonging to it, and sends it to configuration management server.
Later, configuration management server is extracted with the application server to be configured from configuration files database using ring
The corresponding configuration file in border, and the configuration file is sent to application server to be configured.
Application server to be configured replaces application service to be configured after receiving configuration file, using the configuration file
Existing initial configuration file in device, to realize the configuration process of the application server to be configured.
With a certain being located at exploitation environment, for IP address is the application server A to be configured of 10.1.1.1.When needs obtain
When taking the application environment of application server A to be configured, deployment packet server, can according to the IP address of application server A to be configured
Know that the application server is located at exploitation environment, so that the application environment where obtaining application server A to be configured is exploitation environment.
Later, configuration management server extracts exploitation environment special configuration file from configuration files database, and should
Special configuration file is sent to application server A to be configured.
Application server A to be configured is replaced after receiving exploitation environment special configuration file using the special configuration file
Its existing initial configuration file is changed, application server A configuration to be configured is corresponding with its application environment to match to be embodied as
Set file, that is, exploitation environment special configuration file.
Compared with prior art, the embodiment of above scheme can have following advantage or the utility model has the advantages that
The Cross-environment application server configuration system based on PaaS platform that the present embodiment is proposed, by being taken to deployment package
The identification of the environment coding of business device, environment where judging application server to be configured are answered using configuration management server for this
Configuration file compatible with its application environment is configured with server, realizes matching for the application server in each application environment
Automatically configuring for file is set, the allocative efficiency of application server configuration file is improved and effectively reduces the error of configuration step
Rate.
Although the embodiment that the present invention is invented is as above, the content is only to facilitate understanding the present invention and adopting
Embodiment is not intended to limit the invention.Any those skilled in the art to which this invention pertains are not departing from this
Under the premise of inventing invented spirit and scope, any modification and change can be made in the implementing form and in details,
But protection scope of the present invention still should be subject to the scope of the claims as defined in the appended claims.
Claims (10)
1. a kind of configuration method of Cross-environment application server characterized by comprising
Construction step: building configuration files database, so that it is preserved and the one-to-one configuration file of different application environment;
Environment obtaining step: the application environment of application server to be configured is obtained;
Extraction step: match corresponding with the application environment of application server to be configured is extracted from the configuration files database
File is set, the associated configuration file of the application server to be configured with this is obtained;
Configuration step: using the associated configuration file of application server to be configured with this to the application service to be configured
Device is configured.
2. the method according to claim 1, wherein further include:
Initial step: the application server to be configured in different application environment is carried out using same initial configuration file initial
Configuration;
In the configuration step, for each application server to be configured, mentioned using from the configuration files database
The associated configuration file of the application server to be configured with this taken replaces initially matching for the application server to be configured
File is set, to realize the configuration of the application server to be configured.
3. according to the method described in claim 2, it is characterized in that, the initial step includes:
Deployment package is generated, and makes deployment package that there is the initial configuration file;
The deployment package is individually copied in each application server to be configured in different application environment, to realize these
The initial configuration of application server.
4. according to the method described in claim 3, it is characterized in that, also there is file to be released in the deployment package generated.
5. according to the method described in claim 4, it is characterized in that, generate deployment package, and there is deployment package and described initially match
Set file and the file to be released, comprising:
Source code is compiled using maven tool, obtains binary file to be released;
According to define file in deployment package document directory structure, by the initial configuration file and have described to be released two into
The file to be released of file processed is packaged into deployment package.
6. according to the method described in claim 5, it is characterized in that, generating the deployment package by compiler server.
7. according to the method described in claim 3, it is characterized in that, the deployment package is individually copied to by deployment packet server
In each application server to be configured in different application environment, to realize the initial configuration of these application servers.
8. method according to any one of claim 1 to 7, which is characterized in that the configuration files database is stored in
In configuration management server, the environment obtaining step is realized by deployment packet server, is realized by the configuration management server
The extraction step and the configuration step.
9. according to the method described in claim 8, it is characterized in that, the configuration management server and the deployment packet server
It is under the jurisdiction of PaaS platform.
10. method according to any one of claim 1 to 7, which is characterized in that the application environment includes exploitation ring
Border, test environment and production environment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910002053.XA CN109871241A (en) | 2019-01-02 | 2019-01-02 | A kind of configuration method of Cross-environment application server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910002053.XA CN109871241A (en) | 2019-01-02 | 2019-01-02 | A kind of configuration method of Cross-environment application server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109871241A true CN109871241A (en) | 2019-06-11 |
Family
ID=66917394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910002053.XA Pending CN109871241A (en) | 2019-01-02 | 2019-01-02 | A kind of configuration method of Cross-environment application server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109871241A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110764835A (en) * | 2019-09-18 | 2020-02-07 | 平安科技(深圳)有限公司 | File configuration method and device of application environment, computer equipment and storage medium |
CN110912745A (en) * | 2019-11-28 | 2020-03-24 | 上海风秩科技有限公司 | Server configuration method and device, computer equipment and readable storage medium |
CN111273912A (en) * | 2020-01-19 | 2020-06-12 | 深圳创维-Rgb电子有限公司 | Method for distributing independent environment, intelligent terminal and storage medium |
CN115473930A (en) * | 2022-09-13 | 2022-12-13 | 陕西交建云数据科技有限公司 | Cross-operation-environment file presetting method |
CN115599399A (en) * | 2022-11-30 | 2023-01-13 | 广东省科技基础条件平台中心(Cn) | Application program deployment method and device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373401A (en) * | 2015-10-27 | 2016-03-02 | 上海钢富电子商务有限公司 | Method and system for automatically releasing software package |
CN106528170A (en) * | 2016-11-25 | 2017-03-22 | 上海找钢网信息科技股份有限公司 | Software package release method and system based on multi-language environment |
CN106815052A (en) * | 2017-01-10 | 2017-06-09 | 南威软件股份有限公司 | A kind of method of the rapid deployment system for being adapted to multi-environment configuration |
CN108551487A (en) * | 2018-04-26 | 2018-09-18 | Oppo广东移动通信有限公司 | Application dispositions method, device, server and the storage medium of PaaS platform |
CN110572436A (en) * | 2019-08-12 | 2019-12-13 | 浙江讯盟科技有限公司 | Multi-place cross-cluster server deployment method and system |
-
2019
- 2019-01-02 CN CN201910002053.XA patent/CN109871241A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373401A (en) * | 2015-10-27 | 2016-03-02 | 上海钢富电子商务有限公司 | Method and system for automatically releasing software package |
CN106528170A (en) * | 2016-11-25 | 2017-03-22 | 上海找钢网信息科技股份有限公司 | Software package release method and system based on multi-language environment |
CN106815052A (en) * | 2017-01-10 | 2017-06-09 | 南威软件股份有限公司 | A kind of method of the rapid deployment system for being adapted to multi-environment configuration |
CN108551487A (en) * | 2018-04-26 | 2018-09-18 | Oppo广东移动通信有限公司 | Application dispositions method, device, server and the storage medium of PaaS platform |
CN110572436A (en) * | 2019-08-12 | 2019-12-13 | 浙江讯盟科技有限公司 | Multi-place cross-cluster server deployment method and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110764835A (en) * | 2019-09-18 | 2020-02-07 | 平安科技(深圳)有限公司 | File configuration method and device of application environment, computer equipment and storage medium |
CN110764835B (en) * | 2019-09-18 | 2024-01-26 | 平安科技(深圳)有限公司 | File configuration method and device for application environment, computer equipment and storage medium |
CN110912745A (en) * | 2019-11-28 | 2020-03-24 | 上海风秩科技有限公司 | Server configuration method and device, computer equipment and readable storage medium |
CN111273912A (en) * | 2020-01-19 | 2020-06-12 | 深圳创维-Rgb电子有限公司 | Method for distributing independent environment, intelligent terminal and storage medium |
CN111273912B (en) * | 2020-01-19 | 2024-04-02 | 深圳创维-Rgb电子有限公司 | Independent environment distribution method, intelligent terminal and storage medium |
CN115473930A (en) * | 2022-09-13 | 2022-12-13 | 陕西交建云数据科技有限公司 | Cross-operation-environment file presetting method |
CN115473930B (en) * | 2022-09-13 | 2024-02-20 | 陕西交建云数据科技有限公司 | Cross-running environment file presetting method |
CN115599399A (en) * | 2022-11-30 | 2023-01-13 | 广东省科技基础条件平台中心(Cn) | Application program deployment method and device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109871241A (en) | A kind of configuration method of Cross-environment application server | |
CN105100191B (en) | The method, apparatus and system of Java application installations are realized in a kind of cloud compiling | |
CN104412229B (en) | Adaptive portable library | |
CN102413022B (en) | Application debugging method and system | |
CN109491674A (en) | A kind of method and system of the automatic deployment service in Kubernetes cluster | |
CN109491695A (en) | A kind of increment updating method of integrated Android application | |
US20130167123A1 (en) | Application debugging | |
US10175967B2 (en) | Migrating applications to updated environments | |
CN107943486A (en) | A kind of multilingual code compiling method, distribution method, device and system | |
CN104346184A (en) | Application packaging device and application packaging method | |
CN111857801B (en) | Construction method of mobile application | |
CN105718251A (en) | Multilanguage SDK (software development kit) automatic implementation method and system | |
CN103713902B (en) | A kind of BOA Compilation Methods and system based on android system | |
CN104615462B (en) | Cross-platform Mobile solution generation service end and system | |
CN105516154B (en) | Security policy configuration method and device applied to SEAndroid system | |
CN111090433A (en) | Data processing method, device and storage medium | |
CN104298534B (en) | Programmed method and device based on Lua language | |
CN109542459A (en) | Application program packaging method and device, computer installation and computer storage medium | |
CN110187902A (en) | Project remodeling method, device, equipment and storage medium based on spring boot | |
CN110059456A (en) | Code protection method, code protection device, storage medium and electronic equipment | |
CN102929643A (en) | Method and system developing Java 2 platform enterprise edition (J2EE) application | |
CN107832056B (en) | JNI-based JAVA function calling method in C + + | |
CN116783581A (en) | Deploying software release on a data center configured in a cloud platform | |
CN103581310B (en) | A kind of automatic generation method of web service agent | |
Buisson et al. | Safe reconfiguration of Coqcots and Pycots components |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190611 |
|
RJ01 | Rejection of invention patent application after publication |