CN111258561A - Method for starting and monitoring software automatic compiling and deploying - Google Patents
Method for starting and monitoring software automatic compiling and deploying Download PDFInfo
- Publication number
- CN111258561A CN111258561A CN202010024157.3A CN202010024157A CN111258561A CN 111258561 A CN111258561 A CN 111258561A CN 202010024157 A CN202010024157 A CN 202010024157A CN 111258561 A CN111258561 A CN 111258561A
- Authority
- CN
- China
- Prior art keywords
- compiling
- program
- project
- deployment
- online
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method for starting and monitoring software automatic compiling and deploying, which comprises the following steps: bonding ofJenkinsPlatform ofLinuxInstallation deployment on a serverMavenClient and dependent services; executing a compiling command, executing a script execution comparison and backup instruction, and deploying to an online compiling storage path; write one toself.confStoring the named self-describing file in a project path of a program deployment server, and deploying the compiled code to an online program directory by using an online program control terminal; and starting the online program by using an online program control end tool, and monitoring the execution flow. Compilation in daily work of developers is greatly simplified by establishing a universal system and modelThe deployment, the starting and the monitoring work avoid unnecessary work errors, and the functions of automatic contrast backup and the like can lead a developer to have clear cognition on the developed software update and carry out subsequent version rollback.
Description
Technical Field
The invention relates to the technical field of monitoring, in particular to a method for starting and monitoring software automatic compiling, deploying and monitoring.
Background
In current daily work of the IT industry, software compiling and deploying are important work components of software development, and meanwhile, the software compiling and deploying often require a large amount of time to process. How to simplify software compilation and deployment is not only a need to simplify development work, but also an important guarantee whether a fast iterative software product can be quickly brought to the market.
Disclosure of Invention
Aiming at the technical problems in the related art, the invention provides a method for starting and monitoring software automatic compiling and deploying, which can overcome the defects in the prior art.
In order to achieve the technical purpose, the technical scheme of the invention is realized as follows:
a method for software automation compiling, deploying and starting monitoring comprises the following steps:
s1: bonding ofJenkinsPlatform ofLinuxInstallation deployment on a serverMavenA client and a dependent service, wherein,Jenkinsplatform is open source basedJavaA continuous integrated tool platform for programming language development,Mavenis composed ofJavaA project building tool of a programming language;
s2: using compiling serversJenkinsThe software pulls the code of the specified version, executes the compiling command, executes the script execution comparison and backup instruction, and deploys to an online compiling storage path;
s3: write one toself.conThe named self-describing file is stored under the project path of the program deployment server, the compiled code is deployed to the online program directory by adopting the online program control terminal, wherein,self.confis a configuration file;
s4: and starting the online program by using an online program control end tool, and monitoring the execution flow.
Further, the step S2 includes the following steps:
s21: logging in a Jenkins manager account number home page, creating a new task, inputting a task name, selecting a software project type, and selectingGitWarehouse code, specifyingGitThe project address, the configuration compilation parameter and the execution script, and the storage of the operation flow and the data information;
s22: selectingJenkinsClicking the task to immediately construct, acquiring the constructed history information, outputting the history information to a console, acquiring the corresponding constructed output log, and checkingConstructing a result;
s23: executeJenkinsAnd (4) defining a task.
Further, the step S23 includes the following steps:
s231: fromGitThe address obtains code information of the appointed branch;
s232: switching to a code of a specified version;
S233:Mavencompiling, multi-environment deployment project;
s234: backup code source, execute script, moveMavenAnd compiling the directory to an online compiling storage path.
Further, the step of deploying the project in the multi-environment in step S233 includes the following steps:
s2331: by usingMavenProfileMechanism for creating under item directoryresourcesA directory;
s2332: dividing environments;
s2333: placing the project configuration file into the environment subdirectory;
s2334: configuration ofMavenThe invocation parameter specifies a specific context.
Further, the control end tool executes a synchronous code logic instruction, a thread state checking logic instruction, a program starting logic instruction, a program stopping logic instruction, and a program restarting logic instruction.
The invention has the beneficial effects that: the system and the model greatly simplify the compiling, deploying, starting and monitoring work in daily work of a developer by establishing a universal system and a universal model, avoid unnecessary work errors, and enable the developer to have clear cognition on the developed software update and perform subsequent version rollback by automatically comparing the functions of backup and the like.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a method for monitoring software automation compiling, deploying and starting according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
As shown in fig. 1, a method for software automation compiling, deploying and starting monitoring according to an embodiment of the present invention includes the following steps:
s1: bonding ofJenkinsPlatform ofLinuxInstallation deployment on a serverMavenA client and a dependent service, wherein,Jenkinsplatform is open source basedJavaA continuous integrated tool platform for programming language development,Mavenis composed ofJavaA project building tool of a programming language;
s2: using compiling serversJenkinsThe software pulls the code of the specified version, executes the compiling command, executes the script execution comparison and backup instruction, and deploys to an online compiling storage path;
s3: write one toself.confThe named self-describing file is stored under the project path of the program deployment server, and the compiled code is deployed to the online program directory by adopting the online program control terminal, wherein,self.confis a configuration file;
s4: and starting the online program by using an online program control end tool, and monitoring the execution flow.
Step S2 includes the following steps:
s21: login toJenkinsThe method comprises the steps of creating a new task by a home page of an administrator account, inputting a task name, selecting a software project type, and selectingGitWarehouse code, specifyingGitProject address, configuration compilation parameters and executionThe script stores the operation flow and the data information;
s22: selectingJenkinsThe task is clicked to be constructed immediately, construction history information is obtained, the history information is output to a console, a corresponding construction output log is obtained, and a construction result is checked;
s23: executeJenkinsAnd (4) defining a task.
Step S23 includes the following steps:
s231: fromGitThe address obtains code information of the appointed branch;
s232: switching to a code of a specified version;
S233:Mavencompiling, multi-environment deployment project;
s234: backup code source, execute script, moveMavenAnd compiling the directory to an online compiling storage path.
The multi-environment deployment project step in step S233 includes the steps of:
s2331: by usingMavenProfileMechanism for creating under item directoryresourcesA directory;
s2332: dividing environments;
s2333: placing the project configuration file into the environment subdirectory;
s2334: configuration ofMavenThe invocation parameter specifies a specific context.
In one embodiment of the present invention, the control-side tool executes a synchronization code logic instruction, a view thread state logic instruction, a view program state logic instruction, a start program logic instruction, a stop program logic instruction, a restart program logic instruction.
In order to facilitate understanding of the above-described technical aspects of the present invention, the above-described technical aspects of the present invention will be described in detail below in terms of specific usage.
1) The invention is combinedJenkinsPlatform, first inLinuxInstalling and deploying the service and the dependent service on the server, e.g. installing and deployingMavenClient and configuration package repository address (i.e., local)MavenA warehouse address);
2) login toJenkinsAdministrator account number home pageCreating a new task, inputting the name of the task, selecting 'building a free style software project', selectingGitWarehouse code (i.e. local)GitProject address), configuring compiling parameters and executing scripts, and then storing;
3) after the task is created, the task is selected when the task needs to be executedJenkinsAnd clicking the task to construct immediately, wherein a construction history appears, clicking the console to output, seeing the corresponding constructed output log, and finally checking whether the construction is successful.
In generalJenkinsThe task definition is executed by the following steps:
fromGitAddress pulling the code of the specified branch;
switch to a specified version (default)HEAD) The code of (1);
Mavencompilation, requiring utilization to achieve multi-environment deployment of projectsMavenProfileMechanism for creating under item directoryresourcesDirectory, sub-environment places project configuration files under subdirectories, and then configuresMavenCalling parameters to specify a specific environment;
executing script will backup code source first and then willMavenThe compile directory moves to the on-line compile storage path (note: any of the above process-faulting tasks will end up with a failed interrupt);
4) when a program needs to be deployed on a certain server, one is written toself.confThe named self-describing file is stored in a program deployment server project path, wherein the file comprises a configuration file version, a project description, a project name, a code pulling path, a project type, a process file address, a log to be monitored, program running environment configuration (including a memory and the like), a program running environment version and contact information;
5) using an on-line program-controlled end tool (denominated asjktool) Operating procedure inself.confUnder the project path of the self-describing file, dependent thereonself.confThe configuration has the following functions:
startstart-up procedure
stopStop procedure
restartRestart procedure
statusViewing program status
threadsViewing thread state
syncSynchronization code
E.g. under item deployment directoryjktoolrestartRestarting the program, wherein the logic of the tool at the online program control end:
obtaining the current path, and judging whether the current path contains the current pathself.confIf the file does not contain the file, the program is ended, and an error message of 'not found' is promptedself.confFile! ";
loadingself.confAnd the file judges the program running environment version set in the file, loads the corresponding program running environment according to the set program running environment version, and if the corresponding program running environment is not found, the program is ended and error information is prompted.
The tool executes according to the input specific command:
syncsynchronous code logic, Loadingself.confAnd pulling a path by the code set in the file, judging whether the path is empty or not, finishing the empty program, and prompting that the source address is not set and the synchronization cannot be completed. Will be provided withJenkinsCompiling the installed program directory and synchronously entering the current deployment project directory;
threadsview thread state logic, loadself.confJudging whether a process file address set in a file exists or not, judging whether a process number set in the process file exists or not without prompting error information, namely 'status unable to detect!', judging whether a process number set in the process file exists or not without prompting a program to be started, if the program is started, capturing thread information to the file, and outputting the thread informationID、CPUOccupancy, run time, thread name;
statusview program status logic, loadself.confThe process file address set in the file judges whether the process exists, and no prompt error information exists, namely the undetectable state, detects and judges whether the process exists, and prompts that the program is in operation, and the program is not started;
startstartup program logic, Loadingself.confThe process file address set in the file judges whether the process file address exists, and the prompt error information of 'status unable to detect!' does not exist, checks the process status, and judges whether the process exists, and the prompt 'the program is already running!' exists. Judgment ofself.confStarting a program according to the item type set in the file, if the type does not define and prompts that the program type is not supported and the program cannot be started, judging whether a process exists, prompting that the program is started successfully, and prompting that the program fails does not exist;
stopstopping program logic, loadingself.confThe process file address set in the file judges whether the process file address exists, and no prompt error information exists, namely the undetectable state!, checks the process state, judges whether the process exists, and does not prompt that the program is not started!. Judgment ofself.confAnd (4) setting the item type in the file, and stopping the program according to the item type. Judging whether a process still exists, wherein a prompt of stopping successfully is not presented, and a prompt of stopping unsuccessfully is presented;
restartand the restart program logic executes the stop program and the start program in sequence.
In summary, by means of the technical scheme of the invention, compiling, deploying, starting and monitoring work in daily work of a developer is greatly simplified by establishing a universal system and a universal model, unnecessary work errors are avoided, and functions such as automatic contrast backup and the like can enable the developer to clearly know about developed software update and carry out subsequent version rollback.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (5)
1. A method for starting and monitoring software automation compiling deployment is characterized by comprising the following steps:
s1: bonding ofJenkinsPlatformIn aLinuxInstallation deployment on a serverMavenA client and a dependent service, wherein,Jenkinsplatform is open source basedJavaA continuous integrated tool platform for programming language development,Mavenis composed ofJavaA project building tool of a programming language;
s2: using compiling serversJenkinsThe software pulls the code of the specified version, executes the compiling command, executes the script execution comparison and backup instruction, and deploys to an online compiling storage path;
s3: write one toself.confThe named self-describing file is stored under the project path of the program deployment server, and the compiled code is deployed to the online program directory by adopting the online program control terminal, wherein,self.confis a configuration file;
s4: and starting the online program by using an online program control end tool, and monitoring the execution flow.
2. The method for software automation compilation deployment initiation monitoring as claimed in claim 1, wherein the step S2 comprises the steps of:
s21: login toJenkinsThe method comprises the steps of creating a new task by a home page of an administrator account, inputting a task name, selecting a software project type, and selectingGitWarehouse code, specifyingGitThe project address, the configuration compilation parameter and the execution script, and the storage of the operation flow and the data information;
s22: selectingJenkinsThe task is clicked to be constructed immediately, construction history information is obtained, the history information is output to a console, a corresponding construction output log is obtained, and a construction result is checked;
s23: executeJenkinsAnd (4) defining a task.
3. The method for software automation compilation deployment initiation monitoring as claimed in claim 2, wherein the step S23 comprises the steps of:
s231: fromGitThe address obtains code information of the appointed branch;
s232: switching to a code of a specified version;
S233:Mavencompiling, multi-environment deployment project;
s234: backup code source, execute script, moveMavenAnd compiling the directory to an online compiling storage path.
4. The method of claim 3, wherein the step of deploying the project in the multi-environment in the step S233 comprises the steps of:
s2331: by usingMaven ProfileMechanism for creating under item directoryresourcesA directory;
s2332: dividing environments;
s2333: placing the project configuration file into the environment subdirectory;
s2334: configuration ofMavenThe invocation parameter specifies a specific context.
5. The method of claim 1, wherein the control tool executes a synchronization code logic instruction, a view thread state logic instruction, a view program state logic instruction, a start program logic instruction, a stop program logic instruction, and a restart program logic instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010024157.3A CN111258561A (en) | 2020-01-10 | 2020-01-10 | Method for starting and monitoring software automatic compiling and deploying |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010024157.3A CN111258561A (en) | 2020-01-10 | 2020-01-10 | Method for starting and monitoring software automatic compiling and deploying |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111258561A true CN111258561A (en) | 2020-06-09 |
Family
ID=70945071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010024157.3A Pending CN111258561A (en) | 2020-01-10 | 2020-01-10 | Method for starting and monitoring software automatic compiling and deploying |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258561A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111782263A (en) * | 2020-07-22 | 2020-10-16 | 网易(杭州)网络有限公司 | Game packaging processing method and device |
CN112115056A (en) * | 2020-09-23 | 2020-12-22 | 北京达佳互联信息技术有限公司 | Project deployment method and device, server and storage medium |
CN113360143A (en) * | 2021-07-08 | 2021-09-07 | 中国邮政储蓄银行股份有限公司 | Remote software development method, device, storage medium and processor |
CN113687818A (en) * | 2021-08-17 | 2021-11-23 | 北京市商汤科技开发有限公司 | Task execution method, device, equipment and computer readable storage medium |
CN113721918A (en) * | 2021-08-06 | 2021-11-30 | 苏州浪潮智能科技有限公司 | Method and device for compiling and software source manufacturing based on koji |
CN113946350A (en) * | 2021-10-28 | 2022-01-18 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
CN114363143A (en) * | 2021-12-14 | 2022-04-15 | 杭州东信北邮信息技术有限公司 | Operation and maintenance operation method and system based on small program |
CN114416109A (en) * | 2021-12-15 | 2022-04-29 | 广州市玄武无线科技股份有限公司 | Program deployment method and device, computer device, and storage medium |
CN115951929A (en) * | 2022-12-28 | 2023-04-11 | 广州宇中网络科技有限公司 | Third-party library source code management method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050015762A1 (en) * | 2003-06-09 | 2005-01-20 | Steckler Steven James | Methods and systems for deploying computer source code |
CN106095408A (en) * | 2016-05-31 | 2016-11-09 | 浙江网新恒天软件有限公司 | A kind of system and method for data monitoring and Code automatic build and deployment |
CN106708509A (en) * | 2016-11-28 | 2017-05-24 | 上海宝尊电子商务有限公司 | Automatic software project development all-link configuration management system |
CN109597644A (en) * | 2018-12-05 | 2019-04-09 | 江苏风云科技服务有限公司 | Project dispositions method and device |
-
2020
- 2020-01-10 CN CN202010024157.3A patent/CN111258561A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050015762A1 (en) * | 2003-06-09 | 2005-01-20 | Steckler Steven James | Methods and systems for deploying computer source code |
CN106095408A (en) * | 2016-05-31 | 2016-11-09 | 浙江网新恒天软件有限公司 | A kind of system and method for data monitoring and Code automatic build and deployment |
CN106708509A (en) * | 2016-11-28 | 2017-05-24 | 上海宝尊电子商务有限公司 | Automatic software project development all-link configuration management system |
CN109597644A (en) * | 2018-12-05 | 2019-04-09 | 江苏风云科技服务有限公司 | Project dispositions method and device |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111782263A (en) * | 2020-07-22 | 2020-10-16 | 网易(杭州)网络有限公司 | Game packaging processing method and device |
CN111782263B (en) * | 2020-07-22 | 2024-01-23 | 网易(杭州)网络有限公司 | Game packaging processing method and device |
CN112115056A (en) * | 2020-09-23 | 2020-12-22 | 北京达佳互联信息技术有限公司 | Project deployment method and device, server and storage medium |
CN112115056B (en) * | 2020-09-23 | 2024-06-04 | 北京达佳互联信息技术有限公司 | Project deployment method and device, server and storage medium |
CN113360143A (en) * | 2021-07-08 | 2021-09-07 | 中国邮政储蓄银行股份有限公司 | Remote software development method, device, storage medium and processor |
CN113721918B (en) * | 2021-08-06 | 2023-08-04 | 苏州浪潮智能科技有限公司 | Method and device for compiling and making software source based on koji |
CN113721918A (en) * | 2021-08-06 | 2021-11-30 | 苏州浪潮智能科技有限公司 | Method and device for compiling and software source manufacturing based on koji |
CN113687818A (en) * | 2021-08-17 | 2021-11-23 | 北京市商汤科技开发有限公司 | Task execution method, device, equipment and computer readable storage medium |
CN113946350A (en) * | 2021-10-28 | 2022-01-18 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
CN113946350B (en) * | 2021-10-28 | 2022-08-19 | 苏州万店掌网络科技有限公司 | Deployment method and system of shared working space |
CN114363143A (en) * | 2021-12-14 | 2022-04-15 | 杭州东信北邮信息技术有限公司 | Operation and maintenance operation method and system based on small program |
CN114416109A (en) * | 2021-12-15 | 2022-04-29 | 广州市玄武无线科技股份有限公司 | Program deployment method and device, computer device, and storage medium |
CN115951929A (en) * | 2022-12-28 | 2023-04-11 | 广州宇中网络科技有限公司 | Third-party library source code management method |
CN115951929B (en) * | 2022-12-28 | 2024-03-19 | 广州宇中网络科技有限公司 | Third party library source code management method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111258561A (en) | Method for starting and monitoring software automatic compiling and deploying | |
CN108399083B (en) | System deployment method, device, electronic equipment and storage medium | |
US20040060035A1 (en) | Automated method and system for building, deploying and installing software resources across multiple computer systems | |
CN113703730A (en) | Continuous integration method and device, computer equipment and storage medium | |
CN105389187B (en) | System updating method | |
CN111966366A (en) | Cluster deployment method and device of multi-CPU architecture | |
US7934199B2 (en) | Automated operation of IT resources with multiple choice configuration | |
US7395526B2 (en) | Method and system for managing application server lifecycle | |
CN112363731A (en) | Application automation deployment method and device and computer readable storage medium | |
CA3129985A1 (en) | Abnormal operation environment restoration method and device, computer equipment and storage medium | |
CN112214227A (en) | Edge server mirror image customization and deployment system and method | |
CN116820493A (en) | Mirror image file deployment method, system, equipment and storage medium | |
CN112860251A (en) | Method and system for constructing website front end | |
CN115220863A (en) | Operation and maintenance method and device for container application, computer equipment and storage medium | |
CN112711575A (en) | Deployment method, system and related device of database cluster | |
CN113127329B (en) | Script debugging method and device and computer storage medium | |
US20040216138A1 (en) | Method and system for processing input from a command line interface | |
CN114253531A (en) | Micro-service publishing system | |
CN112231231A (en) | Method, system and device for debugging cloud service | |
CN111966364A (en) | Weblogic automatic environment building method and system based on docker | |
CN107315602B (en) | Application program upgrading method and terminal | |
US20030212770A1 (en) | System and method of controlling software components | |
JP4872357B2 (en) | Program test support system, method and program | |
CN112748933A (en) | On-line downloading method for programmable logic controller | |
CN115269442B (en) | Debugging method and tool based on graphic interface architecture and management project |
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 |