Nothing Special   »   [go: up one dir, main page]

CN108897547B - Software automation deployment method and device - Google Patents

Software automation deployment method and device Download PDF

Info

Publication number
CN108897547B
CN108897547B CN201810676465.7A CN201810676465A CN108897547B CN 108897547 B CN108897547 B CN 108897547B CN 201810676465 A CN201810676465 A CN 201810676465A CN 108897547 B CN108897547 B CN 108897547B
Authority
CN
China
Prior art keywords
end code
deployment
software
target software
compiling
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
CN201810676465.7A
Other languages
Chinese (zh)
Other versions
CN108897547A (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.)
China Science and Technology (Beijing) Co., Ltd.
Original Assignee
Dingfu Intelligent Technology 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 Dingfu Intelligent Technology Co ltd filed Critical Dingfu Intelligent Technology Co ltd
Priority to CN201810676465.7A priority Critical patent/CN108897547B/en
Publication of CN108897547A publication Critical patent/CN108897547A/en
Application granted granted Critical
Publication of CN108897547B publication Critical patent/CN108897547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a software automation deployment method and device, relates to the technical field of computer software, and aims to solve the problems of high maintenance cost and poor flexibility in the prior art. The method adopts an Angle script for editing, and mainly comprises the following steps: acquiring a front-end code of target software, wherein the front-end code comprises at least one front-end code module; acquiring a back-end code corresponding to the front-end code; compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result; merging and packaging the front-end code compiling result and the back-end code compiling result into an archiving compression package; and executing the archive compression package and deploying the target software. The method and the device are mainly applied to the process of automatic software deployment.

Description

Software automation deployment method and device
Technical Field
The application relates to the technical field of computer software, in particular to a software automation deployment method and device.
Background
Java is an object-oriented programming language, absorbs various advantages of C + + language, abandons concepts such as multiple inheritance, pointers and the like which are difficult to understand in C + +, and has the characteristics of simplicity, object-oriented property, distribution, robustness, safety, portability and polymorphism. In order to enhance the portability of Java, a software deployment manner of automated deployment is generally adopted in the software deployment process. Software deployment refers to the entire workflow of placing software code into a software runtime environment for a user to use a newly deployed program. The whole work flow comprises code detection, software packaging, software uploading, software publishing, environment parameter modification and software running environment restarting. The software automatic deployment means that the software deployment is realized on the premise of using tools as much as possible and avoiding manual intervention. If the software is deployed in an automatic software deployment mode, the predictability of the software can be increased, the overall quality of the software is provided, and meanwhile, the efficiency of software deployment is improved.
In the prior art, the automatic deployment of software based on Java is generally completed only according to Jenkins tools and related plug-ins. Jenkins is a continuous integration tool developed based on Java, is used for monitoring continuous repeated work, and aims to provide an open and easy-to-use software platform to enable continuous integration of software. Software automatic deployment is carried out based on Jenkins, a Jenkins tool must be installed, or software deployment cannot be carried out. In the process of using the Jenkins tool to deploy software, not only the Jenkins tool itself needs to be maintained, but also Jenkins related plug-ins need to be maintained. Once the requirement that Jenkins related plug-ins cannot be realized appears, the automatic deployment of the software cannot be realized. In a word, the software automation deployment mode based on Jenkins has the defects of high maintenance cost and poor flexibility.
Disclosure of Invention
The application provides a software automation deployment method and device, which aim to solve the problems of high maintenance cost and poor flexibility in the prior art.
In a first aspect, the present application provides a software automation deployment method, where the method uses an anchor script for editing, and the method includes: acquiring a front-end code of target software, wherein the front-end code comprises at least one front-end code module; acquiring a back-end code corresponding to the front-end code; compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result; merging and packaging the front-end code compiling result and the back-end code compiling result into an archiving compression package; and executing the archive compression package and deploying the target software.
With reference to the first aspect, in a first possible implementation manner of the first aspect, before the obtaining the front-end code of the target software, the method further includes: and constructing a user operation interface, and acquiring a front-end code submission version number, a rear-end code submission version number, a deployment environment parameter and a deployment operation parameter according to the user operation interface.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the obtaining the front-end code of the target software includes: acquiring a front-end code of the target software according to the front-end code submission version number; correspondingly, the obtaining of the back-end code corresponding to the front-end code includes: acquiring a back-end code corresponding to the front-end code according to the submitted version number of the back-end code; correspondingly, the executing the archive compression package, and the deploying the target software comprises: and executing the archive compression package according to the deployment environment parameters and the deployment operation parameters, and deploying the target software.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the deployment environment parameter includes an internet protocol IP address, a user name, a password, and a preset storage location; correspondingly, the executing the archive compression package according to the deployment environment parameters and the deployment operation parameters to deploy the target software includes: according to the user name and the password, the archiving compression packet is stored to the preset storage position of the terminal corresponding to the IP address; stopping running the network environment of the terminal, and searching and deleting the software codes in the running directory corresponding to the filing compressed packet; decompressing the archive compression packet to the run directory; modifying a parameter configuration file of the terminal according to the deployment operation parameters; and restarting the network environment to complete the deployment of the target software.
With reference to the first aspect, in a fourth possible implementation manner of the first aspect, after the executing the archive compression package and deploying the target software, the method further includes: acquiring an updated front-end code; judging whether the updated front-end code can be independently compiled or not; if the judgment result is yes, compiling the updated front-end code to obtain an updated front-end code compiling result; and executing the updated front-end code compiling result, and redeploying the target software.
In a second aspect, the present application further provides a software automation deployment apparatus, which includes modules for executing the method steps in the various implementations of the first aspect.
In a third aspect, the present application further provides a terminal, including: a processor and a memory; the processor may execute the programs or instructions stored in the memory to implement the software automation deployment method in the various implementations of the first aspect.
In a fourth aspect, the present application further provides a storage medium, where the computer storage medium may store a program, and the program may implement, when executed, some or all of the steps in the embodiments of the software automation deployment method provided in the present application.
According to the software automation deployment method and device, the Ansible script is adopted for editing, the front end code of the target software is obtained specifically, the front end code comprises at least one front end code module, then the rear end code corresponding to the front end code is obtained, the front end code and the rear end code are compiled in parallel, the compiling result of the front end code and the compiling result of the rear end code are combined and packaged into the filing compression package, and finally the filing compression package is executed, and the target software is deployed. Compared with the prior art, in the process of realizing software automatic deployment, due to the modular characteristic that the infrastructure supports any language compiling, related plug-ins do not need to be loaded, the compiling process is not limited by the functions of the plug-ins, the automatic deployment is easy to realize, and meanwhile, the maintenance is easy and the cost is saved. The front-end code and the back-end code are independently compiled and deployed, and the front-end code is independently compiled and deployed in a modularized mode, so that the deployment granularity is reduced, and the flexibility of software deployment is improved. The front-end code and the back-end code are independently compiled in parallel, and the front-end code is compiled in a modularized parallel mode, so that the compiling speed is increased, and the software automation deployment efficiency is also improved.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a software automation deployment method provided in the present application;
FIG. 2 is a flow chart of another software automation deployment method provided by the present application;
FIG. 3 is a flowchart of a method for updating target software provided herein;
FIG. 4 is a block diagram illustrating an exemplary software automation deployment apparatus provided herein;
fig. 5 is a block diagram illustrating another software automation deployment apparatus provided in the present application.
Detailed Description
In the prior art, the automatic deployment process is completely realized only by Jenkins related plug-ins, and once the requirement that the plug-ins cannot be realized appears, the automatic deployment cannot be realized. While the infrastructure is developed based on Python, integrates the advantages of a plurality of operation and maintenance tools (puppet, cfengine, chef, func, fabric), and realizes functions of batch system configuration, batch program deployment, batch operation commands and the like. In the process of compiling the front-end code or the back-end code based on the infrastructure tool, other relevant plug-ins do not need to be loaded, and the compiling work can be guaranteed not to be limited by the plug-ins. In the present application, an Angle script is used for editing. Referring to fig. 1, a flowchart of a software automation deployment method provided by the present application is shown. As shown in fig. 1, the method includes:
101. the method comprises the steps of obtaining a front-end code of target software, wherein the front-end code comprises at least one front-end code module.
The front end is a software interface that the user can see to operate. The front-end code is program code for realizing a software interface, and the programming language of the program code is Java language. Before the software is automatically deployed, codes of all software modules are written. The software automation deployment is a process of reintegrating and compiling the written software module codes. The target software is the ultimate target of the automated deployment.
The front-end code of the target software at least comprises a front-end code module, the front-end code module can be divided according to functions, code programmers and software interfaces, and the division basis of the front-end code module is not limited in the embodiment of the application. The front-end code is selected according to the deployment purpose of the target software, and the deployment purpose can be releasing the target software, updating the target software or testing the target software.
In the application, the front-end code submission version number is identification information of the front-end code, and the front-end code of the target software, namely all front-end code modules of the front-end code of the target software, can be obtained by submitting the version number through the front-end code.
102. And acquiring a back-end code corresponding to the front-end code.
The back end refers to a software part which is responsible for processing business logic later after a user operates a software front-end interface. The front end and the back end have a specific corresponding relationship. Software deployment can be realized only if the interface of the front-end code can be realized by the back-end code, so that the back-end code corresponding to the front-end code needs to be obtained.
In the application, the front-end code corresponds to the back-end code, and the back-end code may also comprise at least one back-end code module; when the back-end code has only one back-end code module, the front-end code and the back-end code may correspond to the same back-end code no matter how many front-end code modules are included in the front-end code of the target software. The back-end code may also include a plurality of back-end code modules, and the front-end code and the back-end code may correspond in a manner that one front-end code module corresponds to one back-end code module.
In the application, the back-end code submission version number is identification information of the back-end code, and the back-end code of the target software can be acquired by submitting the version number through the back-end code.
103. And compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result.
The front-end code and the back-end code are compiled respectively in a parallel mode and do not influence each other in the compiling process, so that the front-end code and the back-end code can be deployed independently, the deployment granularity is reduced, and the updating and deployment speed of software is accelerated. And compiling each front-end module and back-end code contained in the front-end codes in a parallel mode. In the compiling process, different code modules are compiled in parallel, so that a large amount of code compiling time is saved.
104. And merging and packing the front-end code compiling result and the back-end code compiling result into an archiving compression package.
And merging and packaging the front-end code compiling result and the rear-end code compiling result into an archiving compression package, wherein the archiving compression package is a war package. In order to facilitate program deployment, the compiling result is packaged into an archive compression package, the process is similar to the process of packaging Java class files into JAR files, relevant resources can be distributed together in a centralized mode by using a war archive file, and the war file is used as a deployment unit in the process.
105. And executing the archive compression package and deploying the target software.
And the target software is deployed, namely software codes are put into a software running environment to enable a user to use the whole workflow of the new deployment program. And executing the archiving compression package, or operating the archiving compression package, so as to achieve the purpose of automatically deploying the target software. In the application, the compiling of the front-end code, the compiling of the back-end code, the merging and packaging of the front-end and back-end compiling results and the deployment are all realized through corresponding ansable script commands, and the automation deployment is carried out by completely separating Jenkins.
According to the software automation deployment method, the Ansible script is adopted for editing, specifically, the front end code of the target software is obtained, the front end code comprises at least one front end code module, then the rear end code corresponding to the front end code is obtained, then the front end code and the rear end code are compiled in parallel, then the compiling result of the front end code and the compiling result of the rear end code are combined and packaged into a filing compression package, finally the filing compression package is executed, and the target software is deployed. Compared with the prior art, in the process of realizing software automatic deployment, due to the modular characteristic that the infrastructure supports any language compiling, related plug-ins do not need to be loaded, the compiling process is not limited by the functions of the plug-ins, the automatic deployment is easy to realize, and meanwhile, the maintenance is easy and the cost is saved. The front-end code and the back-end code are independently compiled and deployed, and the front-end code is independently compiled and deployed in a modularized mode, so that the deployment granularity is reduced, and the flexibility of software deployment is improved. The independent parallel compiling of the front-end code and the back-end code and the modularized parallel compiling of the front-end code both improve the compiling speed and improve the efficiency of software automatic deployment.
Referring to fig. 2, a flowchart of another software automation deployment method provided by the present application is shown. As shown in fig. 2, the method includes:
201. and constructing a user operation interface, and acquiring a front-end code submission version number, a rear-end code submission version number, a deployment environment parameter and a deployment operation parameter according to the user operation interface.
The user operation interface refers to the overall design of human-computer interaction, operation logic and attractive interface of software. The user operation interface is constructed based on Jenkins, and a construction platform is provided for realizing automatic deployment of software. It should be noted that, the user operation interface of the present application, a parameter selection interface designed to implement automatic software deployment, is not an interface formed after automatic deployment.
In the application, the user operation interface includes a front-end code selection menu, a back-end code selection menu, a code branch selection menu, an environment selection menu and an operation selection menu. According to the user operation interface, the front-end code submission version number, the rear-end code submission version number, the deployment environment parameter and the deployment operation parameter can be obtained.
The front-end code selection menu is used for selecting a front-end code submission version number, the front-end code submission version number is identification information of a front-end code, the rear-end code selection menu is used for selecting a rear-end code submission version number, and the rear-end code submission version number is identification information of a rear-end code. Different front-end modules and front-end codes have different front-end code submission version numbers, and the contents of the front-end codes can be searched according to the version numbers. The front-end code submits a version number, which is controlled by the version control system. The version control system can record each change of the code file and add the front-end code submission version number for each change, so that any change of the code can be traced back according to the submission of the version number of the front-end code. The version control system of the front-end code is of the type Git, SVN, etc.
The code branch menu is used for selecting code branches, wherein the code branches are all branch information obtained from a Git version library through a Groovy script. The front-end code branch and the back-end code branch are stored independently, each code branch has a plurality of nodes, and each node corresponds to a commit version number.
In the application, the method for obtaining the front-end code submission version number according to the user operation interface comprises the following steps:
the first method comprises the following steps: and acquiring the front-end code submission version number according to a front-end code selection menu of the user operation interface.
On a user operation interface, directly selecting a pull-down option in a front-end code selection menu to obtain a front-end code submission version number; each front-end code commit version number is unique.
The second method comprises the following steps: and acquiring the front-end code submission version number according to a front-end code selection menu and a code branch menu of the user operation interface.
After selecting a code branch in the code branch menu on the user operation interface, the front-end code selection menu can default to select the latest version of the front-end code submission version number as the front-end code submission version number.
Or, on the user operation interface, after selecting the code branch in the code branch menu, one front-end code submission version number in the front-end code selection menu can be selected as the front-end code submission version number according to the requirement. The front-end code commit version number is not the latest version front-end code commit version number.
The back-end code selection menu is used for selecting a back-end code submission version number, similar to the front-end code, the back-end code also has a different back-end code submission version number, and the back-end code can be searched according to the back-end code submission version number. The back-end code submits a version number, which is controlled by the version control system. The version control system can record each change of the code file and add the back-end code submission version number for each change, so that any change of the code can be traced back according to the submission of the version number of the back-end code. Similarly, the version control system of the backend code is of type Git, SVN, etc.
In the present application, the method for obtaining the submitted version number of the back-end code according to the user operation interface is similar to the method for obtaining the submitted version number of the front-end code according to the user operation interface, and specific reference is made to the above description, which is not repeated herein.
The environment selection menu is used for selecting deployment environment parameters, and the deployment environment parameters are obtained from the infrastructure environment parameter configuration file through a Groovy script. The deployment environment may include a development environment (dev), a test environment (test), a production environment (prod), and from another dimension, the deployment environment may be further divided into xx development environment, xx test environment, xx production environment, and the like according to a project occurrence location or a project attribution, which is not limited specifically herein. For example, web _ dev _ beijing, is denoted as beijing development environment, where web is an abbreviation of project, dev is an abbreviation of development environment, and beijing is a project place or a project place of ownership. In addition, test environment is abbreviated as test, and production environment is abbreviated as prod.
The operation selection menu is used to select deployment operation parameters.
202. And acquiring the front-end code of the target software according to the submitted version number of the front-end code.
The front-end code submission version number can be the latest version control system or can be manually selected by a user on a user operation interface. In the application, the front-end code is obtained according to the submitted version number of the front-end code, wherein the front-end code is in a modular design, namely the front-end code comprises at least one front-end code module.
203. And acquiring a back-end code corresponding to the front-end code according to the submitted version number of the back-end code.
And acquiring the back-end code corresponding to the front-end code according to the submitted version number of the back-end code. The back-end code corresponds to the front-end code, and the back-end code can also comprise at least one back-end code module; when the back-end code has only one back-end code module, the front-end code and the back-end code may correspond to the same back-end code no matter how many front-end code modules are included in the front-end code of the target software. The back-end code may also include a plurality of back-end code modules, and the front-end code and the back-end code may correspond in a manner that one front-end code module corresponds to one back-end code module.
204. And compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result.
The front-end code and the back-end code are compiled in a parallel mode, and each front-end code module contained in the front-end code can also be compiled in a parallel mode to respectively obtain a front-end code compiling result and a back-end code compiling result, wherein the front-end code compiling result comprises compiling results of a plurality of front-end code modules.
If the back-end code also comprises a plurality of back-end code modules, the back-end code modules can be compiled in parallel to obtain a compiling result of the back-end code, and the compiling result of the back-end code comprises compiling results of the back-end code modules.
The front-end code and the back-end code are compiled in parallel, and the code is compiled in a modularized parallel mode, so that the compiling speed is increased, and the software automation deployment efficiency is improved.
205. And merging and packaging the front-end code compiling result and the back-end code compiling result into an archiving compression package.
In this application, when the front-end code module is a plurality of, and the back-end code module is one, it specifically does to merge and pack the front-end code compilation result and the back-end code compilation result into a filing compression package:
and directly combining and packaging the compiling results corresponding to the front-end code modules and the compiling results of the rear-end codes into an archiving compression package.
In this application, when the front end code module is N, corresponding back end code module also is N, merge the front end code compilation result and pack into filing compression package with the back end code compilation result, and N more than or equal to 2 specifically is:
merging and packaging the compiling result of the 1 st front-end code module and the compiling result of the corresponding 1 st rear-end code module to obtain a 1 st filing compression package;
and by analogy, merging and packaging the compiling result of the Nth front-end code module and the compiling result of the corresponding Nth back-end code module to obtain an Nth filing compression package.
206. And executing the archiving compression package according to the deployment environment parameters and the deployment operation parameters, and deploying the target software.
The deployment environment is obtained from the infrastructure environment parameter file through the Groovy script. The Groovy language is used without having to write too much code, while having other properties in both closed-form and dynamic languages. The deployment environment parameters also comprise information such as IP addresses, user names, passwords, preset storage positions and the like of all environment machines, so that the users do not need to remember the IP addresses of the specific deployment machines when deploying, and only need to select the deployment environment parameters. This is especially convenient when there are multiple machines in the same deployment environment. The method specifically comprises the following steps: according to the user name and the password, the archiving compression packet is stored to the preset storage position of the terminal corresponding to the IP address; stopping running the network environment of the terminal, and searching and deleting the software codes in the running directory corresponding to the filing compressed packet; decompressing the archive compression packet to the run directory; modifying a parameter configuration file of the terminal according to the deployment operation parameters; and restarting the network environment to complete the deployment of the target software. And finally, successfully deploying the target software on the terminal corresponding to the target IP address.
In the application, the unified configuration of the deployment environment can be realized, and in the process of realizing the deployment environment parameters, the configuration parameters (e.g., web _ dev, web _ test, web _ prod) are read from the configuration file to dynamically generate the deployment environment parameters. When the deployment is carried out, the IP address of a specific deployment machine is not remembered, and only the parameters of the deployment environment are selected. This is particularly convenient when there are multiple machines in a deployment environment. For example, there are two machines in a web _ prod environment.
Software deployment refers to the entire workflow of placing software code into a software runtime environment for a user to use a newly deployed program. The whole workflow generally comprises code detection, software packaging, software uploading, software release, environment parameter modification and software running environment restarting according to the execution sequence. The deployment operation may be any step in the overall workflow. The code detection is to download the software code from the version control system, and the software code may be the latest code or a certain version of software code according to the version number. Software packaging is a software package that packages software code into a specific format according to the requirements of a software operating environment, and in this application, packages the software code into a war format. Software upload is the copying of a software package onto a machine on which the software execution environment resides. Software release is the placement of a new software package into the software runtime environment. The software runtime environment herein uses a Tomcat container, and then first stops the Tomcat container, deletes the old software package in the webapps directory under the Tomcat directory, and then places the new software package in the webapps directory under the Tomcat directory. The environment parameter modification can modify the Tomcat configuration file and modify the machine IP address, which is not required to be modified every deployment and needs to be set according to the actual situation. The software running environment is restarted. Here, the Tomcat container needs to be restarted to allow the Tomcat to reload the software code for the user to access and use the software. And correspondingly generating all menu options of the operation selection menu according to the software deployment steps. The user can select the deployment operation according to the actual requirement.
According to the software automation deployment method, the Ansible script is adopted for editing, specifically, the front end code of the target software is obtained, the front end code comprises at least one front end code module, then the rear end code corresponding to the front end code is obtained, then the front end code and the rear end code are compiled in parallel, then the compiling result of the front end code and the compiling result of the rear end code are combined and packaged into a filing compression package, finally the filing compression package is executed, and the target software is deployed. Compared with the prior art, in the process of realizing software automatic deployment, due to the modular characteristic that the infrastructure supports any language compiling, related plug-ins do not need to be loaded, the compiling process is not limited by the functions of the plug-ins, the automatic deployment is easy to realize, and meanwhile, the maintenance is easy and the cost is saved. The front-end code and the back-end code are independently compiled and deployed, and the front-end code is independently compiled and deployed in a modularized mode, so that the deployment granularity is reduced, and the flexibility of software deployment is improved. The front-end code and the back-end code are compiled in parallel, and the front-end code is compiled in a modularized parallel mode, so that the compiling speed is increased, and the software automation deployment efficiency is improved.
On the basis of the method shown in fig. 1 or 2, after the target software deployment is finished, the target software may also be updated. Referring to fig. 3, a flowchart of a method for updating target software is provided. As shown in fig. 3, after the archive compression package is executed and the target software is deployed, the method further includes:
301. and acquiring the updated front-end code.
The update front-end code may refer to all front-end codes, or may refer to one or several front-end code modules.
302. And compiling the updated front-end code to obtain an updated front-end code compiling result.
303. And executing the updated front-end code compiling result, and redeploying the target software.
Similar to executing the archive compression package and deploying the target software, specifically executing the updated front-end code compilation result, and relocating the target software includes: storing the updated front-end code compiling result to the preset storage position; stopping running the network environment of the terminal, and searching and deleting the software codes in the running catalog corresponding to the front-end codes; storing the compiling result of the updated front-end code to the running directory; modifying a parameter configuration file of the terminal according to the deployment operation parameters; and restarting the network environment to complete the deployment of the target software.
And only the updated front-end code is compiled to obtain an updated front-end code compiling result, the compiling result has less content, and the target software does not need to be redeployed after compression. The front-end code deployment mode only compiling and updating is the independent deployment of the front-end code. In the process of independent compiling and independent deployment of the front-end codes, the back-end codes do not need to be recompiled, the compiling time can be saved, the time for downloading and updating the codes by the terminal is also saved, compression and decompression are not needed, and the time can be saved and the efficiency can be improved in a word. The front-end code realizes independent deployment, reduces deployment granularity and provides flexibility of software automation deployment.
Referring to fig. 4, a block diagram of a software automation deployment apparatus provided in the present application is shown. Referring to fig. 5, a block diagram of another software automation deployment device provided by the present application is shown. As a specific implementation of the method shown in fig. 1 and fig. 2, in the software automation deployment device provided by the present application, as shown in fig. 4, the editing of the device by using an anchor script by the device includes:
a first obtaining unit 41, configured to obtain a front-end code of target software, where the front-end code includes at least one front-end code module;
a second obtaining unit 42, configured to obtain a back-end code corresponding to the front-end code;
a first compiling unit 43, configured to compile the front-end code and the back-end code in parallel, and obtain a front-end code compiling result and a back-end code compiling result respectively;
a first packing unit 44, configured to merge and pack the front-end code compilation result and the back-end code compilation result into an archive compression package;
and a first deployment unit 45, configured to execute the archive compression package and deploy the target software.
Further, as shown in fig. 5, the apparatus further includes:
the constructing unit 46 is configured to construct a user operation interface before the front-end code of the target software is obtained, and obtain a front-end code submission version number, a back-end code submission version number, a deployment environment parameter, and a deployment operation parameter according to the user operation interface.
Further, as shown in fig. 5, the first obtaining unit 41 includes:
the first obtaining subunit 411 is configured to obtain a front-end code of the target software according to the front-end code submission version number;
correspondingly, the second obtaining unit 42 includes:
a second obtaining subunit 421, configured to obtain, according to the submitted version number of the back-end code, a back-end code corresponding to the front-end code;
the first deployment unit 45 includes:
the first deployment subunit 451 is configured to execute the archive compression package according to the deployment environment parameter and the deployment operation parameter, and deploy the target software.
Further, as shown in fig. 5, the deployment environment parameters include an internet protocol IP address, a user name, a password, and a preset storage location;
accordingly, the first deployment subunit 451 comprises:
a saving module 4511, configured to save the archive compression packet to the preset storage location of the terminal corresponding to the IP address according to the user name and the password;
a stopping module 4512, configured to stop running the network environment of the terminal, and search and delete the software code in the running directory corresponding to the archived compressed packet;
a decompression module 4513, configured to decompress the archive compressed packets to the run directory;
a modifying module 4514, configured to modify a parameter configuration file of the terminal according to the deployment operation parameter;
and a restart module 4515, configured to restart the network environment to complete deployment of the target software.
Further, as shown in fig. 5, the apparatus further includes:
a third obtaining unit 47, configured to obtain an updated front-end code after the archive compression package is executed and the target software is deployed;
a second compiling unit 48, configured to compile the updated front-end code to obtain an updated front-end code compiling result;
and a second deployment unit 49, configured to execute the update archive compression package, and deploy the updated front-end code.
According to the software automation deployment method, the Ansible script is adopted for editing, specifically, the front end code of the target software is obtained, the front end code comprises at least one front end code module, then the rear end code corresponding to the front end code is obtained, then the front end code and the rear end code are compiled in parallel, then the compiling result of the front end code and the compiling result of the rear end code are combined and packaged into a filing compression package, finally the filing compression package is executed, and the target software is deployed. Compared with the prior art, in the process of realizing software automatic deployment, due to the modular characteristic that the infrastructure supports any language compiling, related plug-ins do not need to be loaded, the compiling process is not limited by the functions of the plug-ins, the automatic deployment is easy to realize, and meanwhile, the maintenance is easy and the cost is saved. The front-end code and the back-end code are independently compiled and deployed, and the front-end code is independently compiled and deployed in a modularized mode, so that the deployment granularity is reduced, and the flexibility of software deployment is improved. The front-end code and the back-end code are compiled in parallel, and the front-end code is compiled in a modularized parallel mode, so that the compiling speed is increased, and the software automation deployment efficiency is improved.
In a specific implementation, the present invention further provides a terminal, including: a processor and a memory; the processor may execute the programs or instructions stored in the memory to implement some or all of the steps in the embodiments of the software automation deployment method provided by the present invention.
In specific implementation, the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the software automation deployment method provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the description in the method embodiment. The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention.

Claims (10)

1. A software automation deployment method is characterized in that the method adopts an Angle script for editing, and the method comprises the following steps:
acquiring a front-end code of target software, wherein the front-end code comprises at least one front-end code module, and the front-end code is selected according to the deployment purpose of the target software;
acquiring a back-end code corresponding to the front-end code;
compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result;
merging and packaging the front-end code compiling result and the back-end code compiling result into an archiving compression package;
executing the archive compression package and deploying the target software;
the acquiring the front-end code of the target software comprises the following steps: submitting a version number according to the front-end code to obtain the front-end code of the target software; the acquiring the back-end code corresponding to the front-end code comprises: and acquiring a back-end code corresponding to the front-end code according to the submitted version number of the back-end code.
2. The method of claim 1, wherein prior to obtaining the front-end code of the target software, the method further comprises:
and constructing a user operation interface, and acquiring a front-end code submission version number, a rear-end code submission version number, a deployment environment parameter and a deployment operation parameter according to the user operation interface.
3. The method of claim 2, wherein the executing the archive compression package, deploying the target software comprises:
and executing the archive compression package according to the deployment environment parameters and the deployment operation parameters, and deploying the target software.
4. The method of claim 3, wherein the deployment environment parameters include an Internet Protocol (IP) address, a username, a password, and a preset storage location;
correspondingly, the executing the archive compression package according to the deployment environment parameters and the deployment operation parameters to deploy the target software includes:
according to the user name and the password, the archiving compression packet is stored to the preset storage position of the terminal corresponding to the IP address;
stopping running the network environment of the terminal, and searching and deleting the software codes in the running directory corresponding to the filing compressed packet;
decompressing the archive compression packet to the run directory;
modifying a parameter configuration file of the terminal according to the deployment operation parameters;
and restarting the network environment to complete the deployment of the target software.
5. The method of any of claims 1-4, wherein the executing the archive compression package, after deploying the target software, further comprises:
acquiring an updated front-end code;
compiling the updated front-end code to obtain an updated front-end code compiling result;
and executing the updated front-end code compiling result, and redeploying the target software.
6. The utility model provides a software automation deploys device, its characterized in that, the device adopts the Ansible script to carry out the editor, the device includes:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a front-end code of target software, the front-end code comprises at least one front-end code module, and the front-end code is selected according to the deployment purpose of the target software;
the second acquisition unit is used for acquiring a back-end code corresponding to the front-end code;
the first compiling unit is used for compiling the front-end code and the back-end code in parallel to respectively obtain a front-end code compiling result and a back-end code compiling result;
the first packing unit is used for merging and packing the front-end code compiling result and the back-end code compiling result into an archiving compression package;
the first deployment unit is used for executing the archive compression package and deploying the target software;
the first acquisition unit includes:
the first acquiring subunit is used for acquiring the front-end code of the target software according to the submitted version number of the front-end code;
the second acquisition unit includes:
and the second acquiring subunit is used for acquiring the back-end code corresponding to the front-end code according to the submitted version number of the back-end code.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the construction unit is used for constructing a user operation interface before the front-end code of the target software is acquired, and acquiring a front-end code submission version number, a rear-end code submission version number, a deployment environment parameter and a deployment operation parameter according to the user operation interface.
8. The apparatus of claim 7, wherein the first deployment unit comprises:
the first deployment subunit is configured to execute the archive compression package according to the deployment environment parameter and the deployment operation parameter, and deploy the target software.
9. The apparatus of claim 8, wherein the deployment environment parameters include an Internet Protocol (IP) address, a username, a password, and a preset storage location;
accordingly, the first deployment subunit comprises:
the storage module is used for storing the archiving compression packet to the preset storage position of the terminal corresponding to the IP address according to the user name and the password;
the stopping module is used for stopping running the network environment of the terminal and searching and deleting the software codes in the running directory corresponding to the filing compressed packet;
the decompression module is used for decompressing the archive compressed packet to the operation directory;
the modification module is used for modifying the parameter configuration file of the terminal according to the deployment operation parameters;
and the restarting module is used for restarting the network environment to complete the deployment of the target software.
10. The apparatus of any of claims 6-9, wherein the apparatus further comprises:
a third obtaining unit, configured to obtain an updated front-end code after the archive compression package is executed and the target software is deployed;
the second compiling unit is used for compiling the updated front-end code to obtain an updated front-end code compiling result;
and the second deployment unit is used for executing the updated front-end code compiling result and redeploying the target software.
CN201810676465.7A 2018-06-27 2018-06-27 Software automation deployment method and device Active CN108897547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810676465.7A CN108897547B (en) 2018-06-27 2018-06-27 Software automation deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810676465.7A CN108897547B (en) 2018-06-27 2018-06-27 Software automation deployment method and device

Publications (2)

Publication Number Publication Date
CN108897547A CN108897547A (en) 2018-11-27
CN108897547B true CN108897547B (en) 2022-04-05

Family

ID=64346454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810676465.7A Active CN108897547B (en) 2018-06-27 2018-06-27 Software automation deployment method and device

Country Status (1)

Country Link
CN (1) CN108897547B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650662A (en) * 2019-10-10 2021-04-13 上海哔哩哔哩科技有限公司 Test environment deployment method and device
CN110888652B (en) * 2019-10-24 2023-07-07 福建天泉教育科技有限公司 Multi-version construction method and terminal based on jenkins plug-in
CN111142884B (en) * 2019-12-12 2024-03-26 北京达佳互联信息技术有限公司 Version deployment method and device of applet, electronic equipment and storage medium
CN113031970A (en) * 2019-12-24 2021-06-25 北京神州泰岳软件股份有限公司 Automatic installation and deployment method and system
CN111399814A (en) * 2020-03-09 2020-07-10 中国邮政储蓄银行股份有限公司 Visual arrangement method and device for construction tasks
CN111367531B (en) * 2020-03-26 2023-05-12 北京中指讯博数据信息技术有限公司 Code processing method and device
CN112685503A (en) * 2021-01-04 2021-04-20 上海圣剑网络科技股份有限公司 Data processing method, device and system based on automatic operation and maintenance tool
CN115016808B (en) * 2022-07-15 2024-10-22 北京中亦安图科技股份有限公司 Front-end application deployment method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207884A (en) * 2011-06-02 2011-10-05 深圳市茁壮网络股份有限公司 File compiling method and device
CN106775730A (en) * 2016-12-21 2017-05-31 深圳Tcl数字技术有限公司 Program dissemination method and system
CN107577469A (en) * 2017-08-21 2018-01-12 厦门悦讯教育科技有限公司 A kind of Software package method for release management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207884A (en) * 2011-06-02 2011-10-05 深圳市茁壮网络股份有限公司 File compiling method and device
CN106775730A (en) * 2016-12-21 2017-05-31 深圳Tcl数字技术有限公司 Program dissemination method and system
CN107577469A (en) * 2017-08-21 2018-01-12 厦门悦讯教育科技有限公司 A kind of Software package method for release management

Also Published As

Publication number Publication date
CN108897547A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108897547B (en) Software automation deployment method and device
CN108037961B (en) Application program configuration method, device, server and storage medium
CN109491695B (en) Incremental updating method for integrated android application
CN107193615B (en) Project code information updating and deploying method and device
US8595693B2 (en) Model driven deployment of composite applications
CN106406960B (en) Method for rapidly deploying software in linux environment
CN112711411B (en) CI/CD pipeline system based on Kubernetes and docker
CN106610839B (en) Method for issuing upgrade package, lightweight upgrade method, device and system
CN107885551A (en) A kind of service arrangement method, apparatus, computer-readable recording medium and storage control
CN104793946A (en) Application deployment method and system based on cloud computing platform
CN109032631B (en) Application program patch package obtaining method and device, computer equipment and storage medium
CN105335173A (en) Method, apparatus and system for initializing intelligent terminal device
CN110083360B (en) Compiling method, device, equipment and storage medium of application program code
CN111857801B (en) Construction method of mobile application
CN113254054B (en) Intelligent contract one-stop development system and method
CN114489833B (en) Implementation method and device for submitting flash job to yarn cluster in application program
CN110795139A (en) Client batch packaging method and device, computer equipment and storage medium
CN113360156B (en) IOS compiling method and related equipment
CN111147291B (en) Service maintenance method and device
CN108694049B (en) Method and equipment for updating software
CN111722875A (en) Method for rapidly transplanting and compiling open source program by Shenwei platform
CN112256247B (en) Method, device, computer equipment and storage medium for processing dependence of module assembly
CN110806891A (en) Method and device for generating software version of embedded equipment
CN113535230B (en) Method and system for dynamically adapting engineering source code to different hardware resources
CN112685051A (en) Method, device, platform and storage medium for automatically executing shell script

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190904

Address after: Room 630, 6th floor, Block A, Wanliu Xingui Building, 28 Wanquanzhuang Road, Haidian District, Beijing

Applicant after: China Science and Technology (Beijing) Co., Ltd.

Address before: Room 601, Block A, Wanliu Xingui Building, 28 Wanquanzhuang Road, Haidian District, Beijing

Applicant before: Beijing Shenzhou Taiyue Software Co., Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 230000 zone B, 19th floor, building A1, 3333 Xiyou Road, hi tech Zone, Hefei City, Anhui Province

Applicant after: Dingfu Intelligent Technology Co., Ltd

Address before: Room 630, 6th floor, Block A, Wanliu Xingui Building, 28 Wanquanzhuang Road, Haidian District, Beijing

Applicant before: DINFO (BEIJING) SCIENCE DEVELOPMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant