CN111221564B - WEB application configuration deployment method and device - Google Patents

WEB application configuration deployment method and device Download PDF

Info

Publication number
CN111221564B
CN111221564B CN201811415020.XA CN201811415020A CN111221564B CN 111221564 B CN111221564 B CN 111221564B CN 201811415020 A CN201811415020 A CN 201811415020A CN 111221564 B CN111221564 B CN 111221564B
Authority
CN
China
Prior art keywords
web application
package
target
deployment
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811415020.XA
Other languages
Chinese (zh)
Other versions
CN111221564A (en
Inventor
吴海莉
李群
王从镔
柴永财
李金诺
胥小马
龚磊
吴丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petrochina Co Ltd
Original Assignee
Petrochina Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Petrochina Co Ltd filed Critical Petrochina Co Ltd
Priority to CN201811415020.XA priority Critical patent/CN111221564B/en
Publication of CN111221564A publication Critical patent/CN111221564A/en
Application granted granted Critical
Publication of CN111221564B publication Critical patent/CN111221564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention provides a WEB application configuration deployment method and device, wherein the method comprises the following steps: acquiring a WEB application package and a configuration template, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data; decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file; modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data; compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package; and deploying the target WEB application program package according to the type of the preset application server to be deployed. The invention can improve the efficiency of WEB application configuration and deployment, reduce error rate and save labor cost.

Description

WEB application configuration deployment method and device
Technical Field
The invention relates to a WEB application, in particular to an automatic configuration distribution deployment tool and method for a distributed WEB application.
Background
The WEB application runs on a plurality of machines in different machine rooms, configuration items related to WEB application update are distributed in a plurality of configuration files, and since version release and update relate to development environments, test environments and production environments, each environment contains configuration files with the same name but different contents, and when the WEB application is updated, the configuration files need to be changed; after the configuration file is updated, WEB applications need to be deployed, and the deployment and operation methods of the WEB applications are slightly different due to different application middleware, and the WEB applications have certain technical requirements for personnel deploying the application.
At present, the configuration and deployment process for the WEB application is as follows: step 1, a developer issues a WEB application program package; step 2, decompressing the program package; step 3: manually changing each configuration file of the decompressed program package; step 4, compressing the changed configuration file into a target program package; and 5, deploying the target program package to the application server, and performing different deployment operations according to different application servers.
The above process has the following problems:
firstly, the efficiency of the manual change of the configuration files is low, the deployment operation staff is required to have considerable knowledge of the software program, and the configuration files to be modified and the corresponding configuration items are quickly and accurately found;
secondly, manual modification inevitably generates errors, and it usually takes a long time to find the errors, increasing the workload of deployment operators.
Thirdly, for the deployment process, deployment operation staff is required to know the deployment method of the application server and can use the linux related instruction operation, so that the requirement on the deployment operation staff is high and the labor cost is high.
Disclosure of Invention
The embodiment of the invention provides a WEB application configuration deployment method, which is used for improving the efficiency of WEB application configuration and deployment, reducing error rate and saving labor cost, and comprises the following steps:
acquiring a WEB application package and a configuration template, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data;
decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file;
modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data;
compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package;
and deploying the target WEB application program package according to the type of the preset application server to be deployed.
The embodiment of the invention provides a WEB application configuration deployment device, which is used for improving the efficiency of WEB application configuration and deployment, reducing error rate and saving labor cost, and comprises the following steps:
the system comprises a data acquisition module, a configuration module and a configuration module, wherein the data acquisition module is used for acquiring a WEB application package and the configuration module, the WEB application package comprises a plurality of configuration files, and the configuration module comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data;
the decompression module is used for decompressing the WEB application program package and determining a target configuration file from a plurality of configuration files of the WEB application program package according to the identification of the target configuration file;
the configuration modification module is used for modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data;
the compression module is used for compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package;
the deployment module is used for deploying the target WEB application program package according to the type of the preset application server to be deployed.
The embodiment of the invention also provides a computer device which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the WEB application configuration deployment method is realized when the processor executes the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the WEB application configuration deployment method.
In the embodiment of the invention, a WEB application package and a configuration template are acquired, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data; decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file; according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data, the target configuration file is modified, so that the configuration efficiency is improved, the error rate is reduced, and the labor cost is saved; compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package; according to the type of the preset application server to be deployed, the target WEB application program package is deployed, so that the deployment efficiency is improved, and the labor cost is saved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flowchart of a method for deploying a WEB application configuration in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a configuration template in the practice of the present invention;
FIG. 3 is a detailed flowchart of a method for deploying a WEB application configuration in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a display interface of a WEB application package obtained in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a target configuration file determined in an embodiment of the present invention;
FIG. 6 is a diagram illustrating compression of a WEB application package to a target WEB application package in accordance with an embodiment of the present invention;
FIG. 7 is a detailed flow chart of WEB application package deployment in an embodiment of the present invention;
FIG. 8 is a diagram showing a deployment progress and a deployment log in real time in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a WEB application configuration deployment device in an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
Fig. 1 is a flowchart of a WEB application configuration deployment method in an embodiment of the present invention, where, as shown in fig. 1, the WEB application configuration deployment method in an embodiment of the present invention includes:
step 101, acquiring a WEB application package and a configuration template, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data;
step 102, decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file;
step 103, modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data;
step 104, compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package;
and step 105, deploying a target WEB application program package according to the type of the preset application server to be deployed.
As can be seen from the flow shown in fig. 1, a WEB application package and a configuration template are obtained, where the WEB application package includes a plurality of configuration files, and the configuration template includes an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file, and corresponding modification data; decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file; according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data, the target configuration file is modified, so that the configuration efficiency is improved, the error rate is reduced, and the labor cost is saved; compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package; according to the type of the preset application server to be deployed, the target WEB application program package is deployed, so that the deployment efficiency is improved, and the labor cost is saved.
In implementation, firstly, a WEB application package and a configuration template are required to be acquired, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data.
In an embodiment, the configuration template may be in various formats, for example, an XML configuration template, and it will be understood that other configuration templates may be used, and the related variations fall within the scope of the present invention.
In an embodiment, the configuration template may further include data such as a package name, an environment type, a version number, etc., for example, fig. 2 is a schematic diagram of the configuration template in the embodiment of the present invention, where as can be seen from fig. 2, the template is in XML format, the lib tag represents an application range of the configuration template, such as an oilfield or a production area, the templates tag includes a plurality of packages needing to modify the configuration file, each package is respectively represented by a template tag, an app attribute in the template tag represents a package name, a type attribute represents an environment type (such as test, development or production), a version attribute in the version tag represents a version number of the package, an src attribute in the conffile tag represents a name of the configuration file to be modified, a key attribute in the conf tag represents a configuration item of the configuration file to be modified, and a value attribute represents target data. Before the WEB application configuration deployment method provided by the embodiment of the invention is adopted, the information of the file to be configured needs to be filled into a configuration template.
In specific implementation, the WEB application package is decompressed, and the target configuration file is determined from a plurality of configuration files of the WEB application package according to the identification of the target configuration file.
In an embodiment, after decompressing the WEB application package and determining the target configuration file from the plurality of configuration files of the WEB application package according to the identification of the target configuration file, the method may further include:
and if the target configuration file is the encryption configuration file, performing decryption operation on the encryption configuration file.
In an embodiment, before compressing the WEB application package including the modified target configuration file and obtaining the target WEB application package, the method may further include:
and if the modified target configuration file is the encryption configuration file, carrying out encryption operation on the modified encryption configuration file.
In specific implementation, the modified encryption configuration file can be encrypted by adopting various encryption algorithms, such as a data encryption algorithm (Data Encryption Standard, DES) and the like, so as to ensure the security of private information of the WEB application program package.
In an embodiment, compressing the WEB application package including the modified target configuration file to obtain the target WEB application package may include:
if the WEB application package is a jar package, the files except the target configuration file in the WEB application package are compressed to the target WEB application package by adopting a data flow method, and the modified target configuration file is compressed to the target WEB application package by adopting an ant class library compression method.
If the WEB application package is a war package, compressing the WEB application package to a target WEB application package by adopting a compression method of an ant class library.
In an embodiment, according to a preset type of an application server to be deployed, the deploying a target WEB application package may include:
according to the type of the preset application server to be deployed, determining an idle application server in the application server to be deployed of the type;
and deploying the WEB application program package to an idle application server.
The types of application servers can be various, such as tomcat, webSphere, jetty, and in specific implementation, a type of application server to be deployed, such as tomcat, is preset, and then an idle application server in the tomcat type application servers is determined.
In an embodiment, before the WEB application package is deployed to the idle application server, the method may further include:
deploying a package warehouse or deploying a middleware container on the idle application server;
and deploying the target WEB application program package to the idle application server according to the deployed package warehouse or the middleware container.
In the implementation, the target WEB application program package can be sent to the idle application server, and then a package warehouse or an intermediate server is deployed on the idle application server.
The deployment package warehouse is that when the running environment required by the WEB application package does not exist, the package warehouse needs to be deployed before the WEB application package is deployed, namely, library files required by the WEB application package in deployment are downloaded from the package warehouse, and the library files in the package warehouse are dependent conditions for the correct deployment of the WEB application package. For example, a package repository may need to be deployed before WEB application packages can be made using maven. Then, the target WEB application package is deployed to the idle application server according to the library file downloaded from the package repository.
Deploying the middleware server refers to deploying the middleware container before the WEB application package is deployed when the running environment required by the WEB application package exists, wherein the middleware container provides the running environment required by the WEB application package without downloading library files required by the WEB application package during deployment. For example, the running environment required by the WEB application package may include a container such as profile of docker, wa, etc. And then, according to the running environment required by the WEB application package provided by the middleware container, deploying the target WEB application package to an idle application server.
In the implementation, if the target configuration file in the target WEB application package is an encrypted configuration file, the target configuration file needs to be decrypted first to obtain information required in deployment, for example, a database connection address, a user name, a password and the like, so that successful deployment is ensured.
In an embodiment, when the target deploys the WEB application package to the idle application server, the method may further include:
monitoring deployment log data of an application server;
and analyzing the deployment log data of the application server and outputting deployment progress data.
In specific implementation, an agent program can be adopted to monitor deployment log data of an application server, then the deployment log data is received through a Rabbit MQ, the deployment log data is analyzed, and deployment progress data is output.
In particular implementations, parsing the deployment log data may include:
acquiring a keyword set of a deployment log which should be generated by an application server in a deployment process, for example, when the application server is of a tomcat type, acquiring the keyword set of the deployment log which should be generated by the application server of the tomcat type in the deployment process;
acquiring keywords contained in deployment log data of an application server at the current moment;
matching the keywords with the keyword set to obtain deployment progress data at the current moment, wherein the deployment progress data can comprise proportion data of the deployment progress at the current moment to the total deployment progress;
the proportion data of the deployment progress at the current moment accounting for the total deployment progress is output, and a specific output mode can comprise displaying the proportion data in a progress bar mode.
In one embodiment, after deploying the WEB application package to the idle application server, further comprising:
outputting deployment result data, wherein if the deployment is successful, the deployment result data is URL accessed by the WEB application program; if the deployment fails, the deployment result data is the reason of the deployment failure.
An embodiment is provided below to illustrate a specific application of the WEB application configuration deployment method provided by the embodiment of the present invention. Fig. 3 is a detailed flowchart of a WEB application configuration deployment method in an embodiment of the present invention, and as shown in fig. 3, the WEB application configuration deployment method specifically includes the following steps:
firstly, a WEB application package and a configuration template are obtained, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identification of a target configuration file, an identification of a configuration item to be modified in the target configuration file and corresponding modification data.
Fig. 4 is a schematic diagram of a display interface of a WEB application package obtained in the embodiment of the present invention, and it can be seen that two WEB application packages are obtained in this embodiment: a11service.
Decompressing the WEB application package to obtain a plurality of configuration files, and determining the target configuration file from the plurality of configuration files of the WEB application package according to the identification of the target configuration file.
Fig. 5 is a schematic diagram of a target configuration file determined in the embodiment of the present invention, and it can be seen that two configuration files are determined in this embodiment: configuration template-Xinjiang. Xml and configuration template-southwest. Xml.
Judging whether the target configuration file is an encryption configuration file or not, and if the target configuration file is the encryption configuration file, performing decryption operation on the encryption configuration file.
And if the modified target configuration file is the encryption configuration file, carrying out encryption operation on the modified encryption configuration file by adopting a data encryption algorithm.
If the WEB application package is a jar package, the files except the target configuration file in the WEB application package are compressed to the target WEB application package by adopting a data flow method, and the modified target configuration file is compressed to the target WEB application package by adopting an ant class library compression method.
If the WEB application package is a war package, compressing the WEB application package to a target WEB application package by adopting an ant library compression method.
And deploying the target WEB application program package according to the type of the preset application server to be deployed.
FIG. 6 is a schematic diagram of compressing a WEB application package into a target WEB application package in an embodiment of the present invention, where as shown in FIG. 6, configured A11Web. War is stored under a path "C: \Users\kally\desktop\work" for selection.
Fig. 7 is a detailed flow chart of WEB application package deployment in an embodiment of the present invention, as shown in fig. 7.
Firstly, according to the type of the preset application server to be deployed, determining an idle application server in the application server to be deployed of the type.
An agent is deployed on the idle application server, the agent for monitoring deployment log data of the application server.
And sending the target WEB application package to an idle application server, then deploying a package warehouse or a deployment intermediate server on the idle application server, and deploying the WEB application package on the idle application server according to the deployed package warehouse or the intermediate container.
If the target configuration file in the target WEB application program package is an encryption configuration file, the target configuration file is firstly required to be decrypted to obtain information required in deployment, so that successful deployment is ensured.
Monitoring deployment log data of an application server by adopting an agent program, and then receiving the deployment log data through a Rabbit MQ; acquiring a keyword set of a deployment log which should be generated by an application server in a deployment process, acquiring keywords contained in deployment log data of the application server at the current moment, matching the keywords with the keyword set, acquiring deployment progress data at the current moment, and displaying the proportion data in a progress bar mode.
Fig. 8 is a schematic diagram showing a deployment progress and a deployment log in real time in an embodiment of the present invention, and as shown in fig. 8, it can be seen that the WEB application package deployment progress is 100%.
After the WEB application program package is deployed to the idle application server, the deployment result data is output, and if the deployment is successful, the deployment result data is the URL accessed by the WEB application program; if the deployment fails, the deployment result data is the reason of the deployment failure.
In the embodiment of the invention, a WEB application package and a configuration template are acquired, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data; decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file; according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data, the target configuration file is modified, so that the configuration efficiency is improved, the error rate is reduced, and the labor cost is saved; compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package; according to the type of the preset application server to be deployed, the target WEB application program package is deployed, so that the deployment efficiency is improved, and the labor cost is saved.
In addition, in the embodiment of the invention, an XML configuration template is provided, the configuration template contains a large amount of configuration data, and each WEB application program package only needs to reserve one configuration template, and other operations can be automatically executed, so that the difficulty in deploying operation and maintenance is reduced. If the modified target configuration file is an encryption configuration file, encrypting the modified encryption configuration file, so that the security of private information of the WEB application package can be ensured; if the WEB application package is a jar package, compressing files except the target configuration file in the WEB application package into the target WEB application package by adopting a data flow method, and compressing the modified target configuration file into the target WEB application package by adopting an ant class library method, wherein the target configuration file is relatively less than all files in the WEB application package, so that the compression time of the jar package file can be greatly reduced by adopting the compression method; when the deployment log data is analyzed, a keyword set of the deployment log which should be generated by the application server in the deployment process is obtained, keywords contained in the deployment log data of the application server at the current moment are obtained, the keywords are matched with the keyword set, and the mode of obtaining the deployment progress data at the current moment is not needed to be an interface of the application server, so that intervention is avoided, and the progress of analyzing the deployment log is improved.
Based on the same inventive concept, the embodiment of the invention also provides a WEB application configuration deployment device, as described in the following embodiment. Because the principles of solving the problems are similar to those of the WEB application configuration deployment method, the implementation of the device can refer to the implementation of the method, and the repetition is omitted.
Fig. 9 is a schematic diagram of a WEB application configuration deployment apparatus according to an embodiment of the present invention, as shown in fig. 9, where the apparatus includes:
the data acquisition module 901 is configured to acquire a WEB application package and a configuration template, where the WEB application package includes a plurality of configuration files, and the configuration template includes an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file, and corresponding modification data;
a decompression module 902, configured to decompress the WEB application package, and determine a target configuration file from a plurality of configuration files of the WEB application package according to the identifier of the target configuration file;
the configuration modification module 903 is configured to modify the target configuration file according to the identifier of the configuration item to be modified in the target configuration file and the corresponding modification data;
the compression module 904 is configured to compress the WEB application package including the modified target configuration file to obtain a target WEB application package;
the deployment module 905 is configured to deploy the target WEB application package according to a preset type of an application server to be deployed.
In an embodiment, the compression module 904 may be further configured to:
if the WEB application package is a jar package, compressing files except the target configuration file in the WEB application package into the target WEB application package by adopting a data flow method, and compressing the modified target configuration file into the target WEB application package by adopting an ant class library compression method;
if the WEB application package is a war package, compressing the WEB application package to a target WEB application package by adopting a compression method of an ant class library.
In an embodiment, the deployment module 905 may be further configured to:
according to the type of the preset application server to be deployed, determining an idle application server in the application server to be deployed of the type;
and deploying the target WEB application program package to an idle application server.
In the embodiment of the invention, a WEB application package and a configuration template are acquired, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data; decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file; according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data, the target configuration file is modified, so that the configuration efficiency is improved, the error rate is reduced, and the labor cost is saved; compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package; according to the type of the preset application server to be deployed, the target WEB application program package is deployed, so that the deployment efficiency is improved, and the labor cost is saved.
In addition, in the embodiment of the invention, an XML configuration template is provided, the configuration template contains a large amount of configuration data, and each WEB application program package only needs to reserve one configuration template, and other operations can be automatically executed, so that the difficulty in deploying operation and maintenance is reduced. If the modified target configuration file is an encryption configuration file, encrypting the modified encryption configuration file, so that the security of private information of the WEB application package can be ensured; if the WEB application package is a jar package, compressing files except the target configuration file in the WEB application package into the target WEB application package by adopting a data flow method, and compressing the modified target configuration file into the target WEB application package by adopting an ant class library method, wherein the target configuration file is relatively less than all files in the WEB application package, so that the compression time of the jar package file can be greatly reduced by adopting the compression method; when the deployment log data is analyzed, a keyword set of the deployment log which should be generated by the application server in the deployment process is obtained, keywords contained in the deployment log data of the application server at the current moment are obtained, the keywords are matched with the keyword set, and the mode of obtaining the deployment progress data at the current moment is not needed to be an interface of the application server, so that intervention is avoided, and the progress of analyzing the deployment log is improved.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (6)

1. A WEB application configuration deployment method, comprising:
acquiring a WEB application package and a configuration template, wherein the WEB application package comprises a plurality of configuration files, and the configuration template comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data;
decompressing the WEB application package, and determining a target configuration file from a plurality of configuration files of the WEB application package according to the identification of the target configuration file;
modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data;
compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package;
deploying a target WEB application program package according to the type of a preset application server to be deployed;
compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package, comprising:
if the WEB application package is a jar package, compressing files except the target configuration file in the WEB application package into the target WEB application package by adopting a data flow method, and compressing the modified target configuration file into the target WEB application package by adopting an ant class library compression method;
if the WEB application program package is a war package, compressing the WEB application program package to a target WEB application program package by adopting a compression method of an ant class library;
according to the type of the preset application server to be deployed, deploying a target WEB application program package, including:
according to the type of the preset application server to be deployed, determining an idle application server in the application server to be deployed of the type;
deploying the target WEB application program package to an idle application server;
before deploying the target WEB application package to the idle application server, further comprising:
deploying a package warehouse or deploying a middleware container on the idle application server;
deploying the target WEB application program package to an idle application server according to the deployed package warehouse or middleware container;
when the target WEB application package is deployed to the idle application server according to the deployed package warehouse or middleware container, the method further comprises the following steps: monitoring deployment log data of an application server; analyzing deployment log data of an application server and outputting deployment progress data;
monitoring deployment log data of an application server by adopting an agent program, receiving the deployment log data through a Rabbit MQ, analyzing the deployment log data, and outputting deployment progress data;
parsing the deployment log data includes:
acquiring a keyword set of a deployment log which should be generated by an application server in a deployment process;
acquiring keywords contained in deployment log data of an application server at the current moment;
matching the keywords with the keyword set to obtain deployment progress data at the current moment, wherein the deployment progress data comprise proportion data of the deployment progress at the current moment to the total deployment progress;
and outputting the proportion data of the deployment progress at the current moment to the total deployment progress.
2. The WEB application configuration deployment method according to claim 1, wherein after decompressing the WEB application package and determining the target configuration file from the plurality of configuration files of the WEB application package according to the identification of the target configuration file, further comprising:
and if the target configuration file is the encryption configuration file, performing decryption operation on the encryption configuration file.
3. The WEB application configuration deployment method according to claim 1, wherein before compressing the WEB application package including the modified target configuration file to obtain the target WEB application package, further comprising:
and if the target configuration file is the encryption configuration file, carrying out encryption operation on the modified encryption configuration file.
4. A WEB application configuration deployment apparatus, comprising:
the system comprises a data acquisition module, a configuration module and a configuration module, wherein the data acquisition module is used for acquiring a WEB application package and the configuration module, the WEB application package comprises a plurality of configuration files, and the configuration module comprises an identifier of a target configuration file, an identifier of a configuration item to be modified in the target configuration file and corresponding modification data;
the decompression module is used for decompressing the WEB application program package and determining a target configuration file from a plurality of configuration files of the WEB application program package according to the identification of the target configuration file;
the configuration modification module is used for modifying the target configuration file according to the identification of the configuration item to be modified in the target configuration file and the corresponding modification data;
the compression module is used for compressing the WEB application package comprising the modified target configuration file to obtain a target WEB application package;
the deployment module is used for deploying the target WEB application program package according to the type of the preset application server to be deployed;
the compression module is further to:
if the WEB application package is a jar package, compressing files except the target configuration file in the WEB application package into the target WEB application package by adopting a data flow method, and compressing the modified target configuration file into the target WEB application package by adopting an ant class library compression method;
if the WEB application program package is a war package, compressing the WEB application program package to a target WEB application program package by adopting a compression method of an ant class library;
the deployment module is used for:
according to the type of the preset application server to be deployed, determining an idle application server in the application server to be deployed of the type;
deploying the target WEB application program package to an idle application server;
before deploying the target WEB application package to the idle application server, deploying a package warehouse or deploying a middleware container on the idle application server;
deploying the target WEB application program package to an idle application server according to the deployed package warehouse or middleware container;
when the target WEB application package is deployed to the idle application server according to the deployed package warehouse or middleware container, the method further comprises the following steps: monitoring deployment log data of an application server; analyzing deployment log data of an application server and outputting deployment progress data;
monitoring deployment log data of an application server by adopting an agent program, receiving the deployment log data through a Rabbit MQ, analyzing the deployment log data, and outputting deployment progress data;
parsing the deployment log data includes:
acquiring a keyword set of a deployment log which should be generated by an application server in a deployment process;
acquiring keywords contained in deployment log data of an application server at the current moment;
matching the keywords with the keyword set to obtain deployment progress data at the current moment, wherein the deployment progress data comprise proportion data of the deployment progress at the current moment to the total deployment progress;
and outputting the proportion data of the deployment progress at the current moment to the total deployment progress.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 3 when executing the computer program.
6. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 to 3.
CN201811415020.XA 2018-11-26 2018-11-26 WEB application configuration deployment method and device Active CN111221564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811415020.XA CN111221564B (en) 2018-11-26 2018-11-26 WEB application configuration deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811415020.XA CN111221564B (en) 2018-11-26 2018-11-26 WEB application configuration deployment method and device

Publications (2)

Publication Number Publication Date
CN111221564A CN111221564A (en) 2020-06-02
CN111221564B true CN111221564B (en) 2023-09-26

Family

ID=70827746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811415020.XA Active CN111221564B (en) 2018-11-26 2018-11-26 WEB application configuration deployment method and device

Country Status (1)

Country Link
CN (1) CN111221564B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596782A (en) * 2020-12-26 2021-04-02 中国农业银行股份有限公司 Production program package generation method and related equipment
CN112380583B (en) * 2021-01-11 2021-04-20 北京拓课网络科技有限公司 Online education platform configuration item processing method and device and electronic equipment
CN113986270B (en) * 2021-11-16 2022-09-23 前海飞算云智软件科技(深圳)有限公司 Distributed application deployment method and device, storage medium and electronic equipment
CN114416109B (en) * 2021-12-15 2023-01-10 广州市玄武无线科技股份有限公司 Program deployment method and device, computer device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106130733A (en) * 2016-06-23 2016-11-16 北京海泰方圆科技股份有限公司 More newly configured methods, devices and systems
CN106610836A (en) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 Micro-service operation management tool
CN106919387A (en) * 2017-02-17 2017-07-04 上海斐讯数据通信技术有限公司 A kind of software delivery system and dissemination method
CN107864052A (en) * 2017-10-30 2018-03-30 广东亿迅科技有限公司 Method and its system based on lasting application deployment configuration automatic updating

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8725124B2 (en) * 2012-03-05 2014-05-13 Enterproid Hk Ltd Enhanced deployment of applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106130733A (en) * 2016-06-23 2016-11-16 北京海泰方圆科技股份有限公司 More newly configured methods, devices and systems
CN106610836A (en) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 Micro-service operation management tool
CN106919387A (en) * 2017-02-17 2017-07-04 上海斐讯数据通信技术有限公司 A kind of software delivery system and dissemination method
CN107864052A (en) * 2017-10-30 2018-03-30 广东亿迅科技有限公司 Method and its system based on lasting application deployment configuration automatic updating

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
万李等.《Web技术应用基础》.北京:中国铁道出版社,2017,第17页. *

Also Published As

Publication number Publication date
CN111221564A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN111221564B (en) WEB application configuration deployment method and device
US11113050B2 (en) Application architecture generation
US20150365275A1 (en) Cloud environment configuration for cloud applications
CN111162953B (en) Data processing method, system upgrading method and server
US11726800B2 (en) Remote component loader
CN110347389B (en) Method, device and system for processing algorithm file
CN112860645A (en) Processing method and device for offline compressed file, computer equipment and medium
CN112114994B (en) Exception handling method, device, equipment and medium
CN112685105A (en) Front-end component sharing method and device, computer equipment and storage medium
EP3447635A1 (en) Application architecture generation
CN113330419A (en) Equipment application installation method and device
CN113064630A (en) Mobile terminal APP automatic packaging method and system, electronic device and storage medium
CN105446759A (en) Rpm package updating method and equipment
US7917904B2 (en) Automated analysis tasks of complex computer system
CN114385509A (en) Null pointer object detection method, null pointer object detection device, computer equipment and storage medium
CN114816816A (en) Collapse stack information processing method, device, equipment and storage medium
CN113746886A (en) Analysis method and device for APK file
CN109492392B (en) Detection method and system of kernel function
CN111045720A (en) Code management method, code management system, server, and medium
KR20170101693A (en) Apparatus and method for analyzing android application, and computer-readable medium storing program for method thereof
CN105389257A (en) System parameter processing method, apparatus and system
CN112667491A (en) Function test method and device of virtual machine
CN111967961B (en) Data mining method and device
CN115543227B (en) Cross-system data migration method, system, electronic device and storage medium
US20170063597A1 (en) Api provider insights collection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant