CN110795105A - Automatic compiling and deploying method and system for power distribution automation master station system - Google Patents

Automatic compiling and deploying method and system for power distribution automation master station system Download PDF

Info

Publication number
CN110795105A
CN110795105A CN201911039997.0A CN201911039997A CN110795105A CN 110795105 A CN110795105 A CN 110795105A CN 201911039997 A CN201911039997 A CN 201911039997A CN 110795105 A CN110795105 A CN 110795105A
Authority
CN
China
Prior art keywords
compiling
server
distribution automation
power distribution
master station
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
Application number
CN201911039997.0A
Other languages
Chinese (zh)
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.)
State Grid Corp of China SGCC
Xuji Group Co Ltd
XJ Electric Co Ltd
Electric Power Research Institute of State Grid Henan Electric Power Co Ltd
Xuchang XJ Software Technology Co Ltd
Original Assignee
Xuji Group Co Ltd
XJ Electric Co Ltd
Electric Power Research Institute of State Grid Henan Electric Power Co Ltd
Xuchang XJ Software 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 Xuji Group Co Ltd, XJ Electric Co Ltd, Electric Power Research Institute of State Grid Henan Electric Power Co Ltd, Xuchang XJ Software Technology Co Ltd filed Critical Xuji Group Co Ltd
Priority to CN201911039997.0A priority Critical patent/CN110795105A/en
Publication of CN110795105A publication Critical patent/CN110795105A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment

Abstract

The invention relates to an automatic compiling and deploying method and system for a power distribution automation master station system, and belongs to the field of power distribution automation. The method comprises the steps of firstly, uniformly storing codes uploaded by developers in an archive, compiling the codes by a compiling server when a preset compiling period is reached or the codes in the archive are found to be changed, sending an alarm signal if the compiling is failed, packaging files generated by the compiling when the compiling is successful, and deploying a target server by the deploying source server after the address of the target server to be deployed is determined by the deploying source server in the follow-up process. The method realizes the automatic realization of compiling and deploying without manual operation, and obviously improves the development, code maintenance and system deploying efficiency of the power distribution automation system.

Description

Automatic compiling and deploying method and system for power distribution automation master station system
Technical Field
The invention relates to an automatic compiling and deploying method and system for a power distribution automation master station system, and belongs to the field of power distribution automation.
Background
With the development of social economy, the power consumption of enterprises and residential users increases day by day, the traditional power distribution monitoring and scheduling System cannot meet the requirements of real-time performance, economy and reliability, and a power Distribution Automation System (DAS) is produced accordingly. The distribution automation system can monitor, coordinate and operate distribution equipment in a remote place, support demand side management and geographic information access, and greatly improve the economy and stability of power grid operation.
However, because the structure of the distribution automation system is complex, and the number of functional modules is numerous, so that the number of development team members of the system is also large, on one hand, the modification frequency of codes is very high, and new errors can be introduced into the codes during each modification, if manual self-checking is carried out during each code modification, the working efficiency of developers can be greatly reduced, and the errors in the codes written by the developers are often difficult to find by checking the developers; on the other hand, due to the large number of functional modules and the large number of developers, the difficulty of realizing the software integration of the distribution automation system is increased. Finally, the efficiency of the existing distribution automation system development and maintenance and the subsequent system deployment are low.
Disclosure of Invention
The invention aims to provide an automatic compiling and deploying method and system for a power distribution automation master station system, which aim to solve the problems of low development, code maintenance and system deploying efficiency of the conventional power distribution automation system.
In order to achieve the above object, the present invention provides an automatic compiling and deploying method for a power distribution automation master station system, which comprises the following steps:
after a developer uploads a code to a designated archive, when a preset compiling period is reached or a code version in the archive is updated, compiling the code by a compiling server;
when the compiling is wrong, sending out a compiling failure warning; when the compiling is passed, packaging the file generated by compiling, and uploading the file to a specified server;
and downloading the latest file package in the specified server to a deployment source server, determining the network address of the target server to be deployed, and deploying the target server by the deployment source server.
The invention has the beneficial effects that:
the invention firstly carries out unified recording and storage on the codes developed by developers through a specified archive, and then carries out code compiling by a compiling server when a preset compiling period is reached or code version updating in the archive is detected, namely code content updating is detected, so that the whole process does not need manual participation, and is accurate and rapid. When an error occurs in the compiling, the error in the code can be checked in a targeted manner according to the code submitted between the compiling and the last compiling, so that the checking range is reduced, and the management and maintenance task amount of developers and maintainers is greatly simplified. When deployment is carried out after compilation is successful, the method can also automatically deploy after the address of the target server is determined, thereby avoiding the situation that a large amount of repetitive work is required when developers and maintainers manually deploy, and greatly improving the deployment efficiency.
Further, in order to achieve more efficient management, the archive is an SVN archive.
Further, also for more efficient management, the designated server is an SVN server.
Further, in order to better complete compiling and deploying, the method further comprises the step of configuring the SVN archive, which comprises the following steps: and configuring the SVN archive path, the compiling period, the uploading path of the compiled file packet and the network address information of the target server.
Further, in order to provide a better configuration method, the method for configuring the SVN archive comprises the following steps: and installing an SVN client in the compiling server, and configuring through a web page.
Further, the network address is an IP address.
Further, in order to distinguish the files generated by packaging each time more conveniently, when the files generated by compiling are packaged, version number information and time information of the current time are attached.
Further, naming the file package generated by compiling according to the time of the current moment.
Further, in order to complete deployment more efficiently and improve efficiency, the deployment source server deploys the target server using the script.
In order to achieve the above object, the present invention further provides an automatic compiling and deploying system for a power distribution automation master station system, which includes a storage module and an execution module, wherein the storage module is connected to the execution module, and the execution module is used for executing the following automatic compiling and deploying methods stored in the storage module:
after a developer uploads a code to a designated archive, when a preset compiling period is reached or a code version in the archive is updated, compiling the code by a compiling server;
when the compiling is wrong, sending out a compiling failure warning; when the compiling is passed, packaging the file generated by compiling, and uploading the file to a specified server;
and downloading the latest file package in the specified server to a deployment source server, determining the network address of the target server to be deployed, and deploying the target server by the deployment source server.
The invention has the beneficial effects that:
the invention firstly carries out unified recording and storage on the codes developed by developers through a specified archive, and then carries out code compiling by a compiling server when a preset compiling period is reached or code version updating in the archive is detected, namely code content updating is detected, so that the whole process does not need manual participation, and is accurate and rapid. When an error occurs in the compiling, the error in the code can be checked in a targeted manner according to the code submitted between the compiling and the last compiling, so that the checking range is reduced, and the management and maintenance task amount of developers and maintainers is greatly simplified. When deployment is carried out after compilation is successful, the method can also automatically deploy after the address of the target server is determined, thereby avoiding the situation that a large amount of repetitive work is required when developers and maintainers manually deploy, and greatly improving the deployment efficiency.
Further, in order to achieve more efficient management, the archive is an SVN archive.
Further, also for more efficient management, the designated server is an SVN server.
Further, in order to better complete compiling and deploying, the method further comprises the step of configuring the SVN archive, which comprises the following steps: and configuring the SVN archive path, the compiling period, the uploading path of the compiled file packet and the network address information of the target server.
Further, in order to provide a better configuration method, the method for configuring the SVN archive comprises the following steps: and installing an SVN client in the compiling server, and configuring through a web page.
Further, the network address is an IP address.
Further, in order to distinguish the files generated by packaging each time more conveniently, when the files generated by compiling are packaged, version number information and time information of the current time are attached.
Further, naming the file package generated by compiling according to the time of the current moment.
Further, in order to complete deployment more efficiently and improve efficiency, the deployment source server deploys the target server using the script.
Drawings
Fig. 1 is a flowchart of an automatic compiling and deploying method of a distribution automation master station system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings and examples, but the embodiments of the present invention are not limited thereto.
The embodiment of the method provided by the invention comprises the following steps:
the method adopts the SVN version control system as a platform, and the automatic compiling and deploying process of the embodiment is explained by taking the SVN version control system as an example. The SVN is an open-source version control system, adopts a branch management system to realize high-efficiency management, can jointly develop the same project by multiple people and realize resource sharing; the SVN version control system can manage data changing along with time, the data is stored in a corresponding archive library of the control system, and the archive library records each change of contents in the archive library.
Of course, this embodiment is merely preferred. As other embodiments, other kinds of version control systems can also be adopted by the automatic compiling and deploying method.
Fig. 1 is a flowchart of an automatic compiling and deploying method of a distribution automation master station system according to this embodiment, and the specific process of the method is as follows:
first, various configuration work is performed, including:
a code storage archive of a power distribution automation master station system is established on an SVN server, and developers developing the power distribution automation master station system need to upload codes to the archive in a unified mode.
The method comprises the steps of setting up a compiling environment on a compiling server, installing an SVN client, deploying Web engineering and Tomcat related to a configuration interface on the compiling server at the same time, starting the Tomcat, entering the configuration interface in a browser, configuring an SVN archive uploading path of codes on the interface, compiling period, packaging and uploading path of files after compiling is successful, mailbox information of an administrator, and information such as IP addresses, user names and passwords of target servers needing deploying. In the compiling period, the setting is selected to be one day in the embodiment, so that the situation that the compiling is too frequent and the version is complicated due to too short period setting is avoided, and the situation that the position of an error code cannot be quickly and accurately positioned due to too many codes submitted between two compiling tasks due to too long period setting is avoided.
Because the essence of automatic deployment is to copy the deployment script to the target server for execution and to copy the installation files to the target server, ssh privacy between the deployment source server and the target server may be configured. The steps for configuring ssh privacy are as follows:
executing the command ssh-keygen-t rsa on each server generates two files, i _ rsa and i _ rsa.pub, under the $ HOME/. ssh directory, copies the id _ rsa.pub of all deployment target servers to the deployment source server, adds all key contents to the file authorized _ keys, synchronizes the file to all target servers to be deployed, and completes the ssh password-free configuration.
If more target servers need to be deployed, the ssh password-free configuration steps are complicated, and at this time, the shell command for executing configuration can be written into the script and an expect aid is adopted for automatic configuration. The expect assistant tool can realize the automatic interaction between the servers according to the rules set by the user, namely, the user name, the password or other confirmation information is automatically input in the script execution process, the ssh password-free configuration is automatically completed, and the efficiency is improved without manual operation. Other auxiliary tools may also be used for automatic configuration during the process.
After the configuration is completed, the SVN server, the compiling server and the deployment source server operate, and in the operation process:
after the preset compiling period is reached or the code content in the SVN archive is identified to be changed, the automatic compiling script downloads the latest code in the SVN archive to the compiling server for compiling.
When an error occurs in the compiling, the compiling server automatically sends a compiling error warning mail to a pre-configured administrator mailbox according to the smtp protocol, and after receiving the warning mail, an administrator can pertinently carry out code check on codes uploaded to the SVN archive library from the last compiling to the present compiling, so that the code check range is effectively reduced, and the check efficiency is improved.
And when the compiling is successful, compressing the file generated by compiling to generate a compressed packet, attaching version number information, naming the compressed packet by the current time, and uploading the compressed packet to a specified path of the SVN server for storage. By attaching version number information to the compressed packet and naming the compressed packet at the current moment, the compiled files generated each time can be effectively distinguished, and management is facilitated.
After the compilation is completed, subsequent deployment work is required. After compiling is successful and a compression package of a compiled file is obtained, the compression package stored in the SVN server needs to be downloaded to a deployment source server, then an automatic deployment script completes file distribution, configuration file modification, file authority modification, database backup recovery and other operations according to pre-configured target server information and a single-machine or cluster deployment mode, and when the automatic deployment script is executed, automatic deployment of the power distribution automation master station system can be completed.
In the embodiment, ssh privacy protection between the deployment source server and the target server is particularly set, and automatic compiling and deployment are completed by using scripts. In other embodiments, ssh privacy-free setting between the deployment source server and the target server may not be performed, or automatic compilation and deployment may be completed in other ways.
The embodiment of the system provided by the invention comprises the following steps:
the system comprises a storage module and an execution module, wherein the storage module is connected with the execution module, and the execution module is used for executing a set automatic compiling and deploying method of the power distribution automation master station system, which is stored in the storage module, and the automatic compiling and deploying method is actually the automatic compiling and deploying method in the method embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting the same, and although the present invention is described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications and equivalents may be made to the embodiments of the invention without departing from the spirit and scope of the invention, which is to be covered by the claims.

Claims (10)

1. An automatic compiling and deploying method for a power distribution automation master station system is characterized by comprising the following steps:
after the codes are stored in the archive, when a preset compiling period is reached or the code version in the archive is updated, compiling the codes by the compiling server;
when the compiling is wrong, sending out a compiling failure warning; when the compiling is passed, packaging the file generated by compiling, and uploading the file to a specified server;
and downloading the latest file package in the specified server to a deployment source server, determining the network address of the target server to be deployed, and deploying the target server by the deployment source server.
2. The automatic compilation and deployment method of a distribution automation master station system of claim 1, wherein the archive is an SVN archive.
3. The automatic compilation and deployment method of a power distribution automation master station system according to claim 1 or 2, characterized in that the designated server is an SVN server.
4. The automatic compilation and deployment method of a power distribution automation master station system according to claim 2, further comprising the step of configuring the SVN archive, comprising: and configuring the SVN archive path, the compiling period, the uploading path of the compiled file packet and the network address information of the target server.
5. The automatic compilation and deployment method of a power distribution automation master station system as claimed in claim 4, wherein the method for configuring the SVN archive comprises: and installing an SVN client in the compiling server, and configuring through a web page.
6. The automatic compilation and deployment method for the power distribution automation master station system according to claim 4 or 5, wherein the network address is an IP address.
7. The automatic compiling and deploying method of a power distribution automation master station system according to claim 1 or 2, characterized in that when packing the files generated by compiling, version number information and time information of the current time are attached.
8. The automatic compilation deployment method of a power distribution automation master station system of claim 7, wherein the compiled packages are named at the time of the current time.
9. The automatic compilation deployment method of the power distribution automation master station system according to claim 1 or 2, wherein the deployment source server deploys the target server by using a script.
10. An automatic compiling and deploying system of a power distribution automation master station system, which is characterized by comprising a storage module and an execution module, wherein the storage module is connected with the execution module, and the execution module is used for executing the automatic compiling and deploying method of the power distribution automation master station system, which is stored in the storage module, according to any one of claims 1 to 9.
CN201911039997.0A 2019-10-29 2019-10-29 Automatic compiling and deploying method and system for power distribution automation master station system Pending CN110795105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911039997.0A CN110795105A (en) 2019-10-29 2019-10-29 Automatic compiling and deploying method and system for power distribution automation master station system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911039997.0A CN110795105A (en) 2019-10-29 2019-10-29 Automatic compiling and deploying method and system for power distribution automation master station system

Publications (1)

Publication Number Publication Date
CN110795105A true CN110795105A (en) 2020-02-14

Family

ID=69442041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911039997.0A Pending CN110795105A (en) 2019-10-29 2019-10-29 Automatic compiling and deploying method and system for power distribution automation master station system

Country Status (1)

Country Link
CN (1) CN110795105A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434151A (en) * 2021-06-10 2021-09-24 中国铁道科学研究院集团有限公司电子计算技术研究所 Service deployment method, server and system
CN113721917A (en) * 2021-08-03 2021-11-30 北京科东电力控制系统有限责任公司 Power grid dispatching control system automatic compiling method and device based on domestic chip
TWI805488B (en) * 2022-08-09 2023-06-11 大陸商鼎捷軟件股份有限公司 Automatic compilation system and automatic compilation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035892A (en) * 2010-12-23 2011-04-27 中科方德软件有限公司 System and method for automatically releasing operating system version and automatically updating software package
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN107729066A (en) * 2017-11-08 2018-02-23 重庆扬讯软件技术股份有限公司 One kind is based on SVN resources banks automation structure dissemination method and device
US10162877B1 (en) * 2013-12-17 2018-12-25 VCE IP Holding Company LLC Automated compilation of content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035892A (en) * 2010-12-23 2011-04-27 中科方德软件有限公司 System and method for automatically releasing operating system version and automatically updating software package
US10162877B1 (en) * 2013-12-17 2018-12-25 VCE IP Holding Company LLC Automated compilation of content
CN104793946A (en) * 2015-04-27 2015-07-22 广州杰赛科技股份有限公司 Application deployment method and system based on cloud computing platform
CN107729066A (en) * 2017-11-08 2018-02-23 重庆扬讯软件技术股份有限公司 One kind is based on SVN resources banks automation structure dissemination method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于红雨;李燕;: "Windows平台的软件自动构建与发布技术研究" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434151A (en) * 2021-06-10 2021-09-24 中国铁道科学研究院集团有限公司电子计算技术研究所 Service deployment method, server and system
CN113721917A (en) * 2021-08-03 2021-11-30 北京科东电力控制系统有限责任公司 Power grid dispatching control system automatic compiling method and device based on domestic chip
TWI805488B (en) * 2022-08-09 2023-06-11 大陸商鼎捷軟件股份有限公司 Automatic compilation system and automatic compilation method

Similar Documents

Publication Publication Date Title
CN107577475B (en) Software package management method and system of data center cluster system
CN107729066B (en) Automatic construction and release method and device based on SVN (singular value decomposition) resource library
CN110825420B (en) Method, device, equipment and storage medium for updating configuration parameters of distributed cluster
CN102609281B (en) Distributed software patch update method and system
CN110795105A (en) Automatic compiling and deploying method and system for power distribution automation master station system
CN110990026B (en) Automatic deployment method and system for PaaS platform
JP2009519544A (en) Automated software testing framework
CN113434158B (en) Custom management method, device, equipment and medium for big data component
CN104994177A (en) Synchronized method of network disk system, terminal equipment and network disk system
CN111162953A (en) Data processing method, system upgrading method and server
CN106406980B (en) A kind of dispositions method and device of virtual machine
CN112084008A (en) Method for rapidly deploying cloud pipe system based on container technology
CN111651352B (en) Warehouse code merging method and device
CN116089011A (en) Method and device for creating mirror warehouse, storage medium and electronic equipment
CN116820493A (en) Mirror image file deployment method, system, equipment and storage medium
CN117112122A (en) Cluster deployment method and device
CN111831567B (en) Application test environment configuration method, device, system and medium
CN111813683B (en) Universal automatic synchronization method for software testing environment
CN110162312B (en) BeeGFS configuration method and device based on IML
CN113127009A (en) Automatic deployment method and device for big data management platform
CN109086048A (en) Multiple modules individually issue the implementation method of AAR under a kind of Android client project
CN114281367A (en) Big data platform deployment method and system for trust and creation environment
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN114443356A (en) Container cluster processing method and system
CN112783653A (en) Resource scheduling method and device based on containerization

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: 20200902

Address after: No. 1706 Xuchang City, Henan province 461000 XJ Avenue

Applicant after: XUCHANG XUJI SOFTWARE TECHNOLOGY Co.,Ltd.

Applicant after: XJ Group Corp.

Applicant after: XJ ELECTRIC Co.,Ltd.

Applicant after: STATE GRID HENAN ELECTRIC POWER CORPORATION ELECTRIC POWER SCIENCE Research Institute

Applicant after: STATE GRID CORPORATION OF CHINA

Address before: No. 1706 Xuchang City, Henan province 461000 XJ Avenue

Applicant before: XUCHANG XUJI SOFTWARE TECHNOLOGY Co.,Ltd.

Applicant before: XJ Group Corp.

Applicant before: XJ ELECTRIC Co.,Ltd.

Applicant before: STATE GRID HENAN ELECTRIC POWER CORPORATION ELECTRIC POWER SCIENCE Research Institute

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200214