CN111209012A - Linux system-oriented software agent end automatic deployment method - Google Patents

Linux system-oriented software agent end automatic deployment method Download PDF

Info

Publication number
CN111209012A
CN111209012A CN201911415473.7A CN201911415473A CN111209012A CN 111209012 A CN111209012 A CN 111209012A CN 201911415473 A CN201911415473 A CN 201911415473A CN 111209012 A CN111209012 A CN 111209012A
Authority
CN
China
Prior art keywords
deployment
agent
server
automatic
module
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
CN201911415473.7A
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
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
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 State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI filed Critical State Grid Corp of China SGCC
Priority to CN201911415473.7A priority Critical patent/CN111209012A/en
Publication of CN111209012A publication Critical patent/CN111209012A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for automatically deploying a software agent side facing a Linux system, which comprises the following steps: setting deployment configuration information; starting an automatic deployment module, wherein the automatic deployment module starts multithreading to connect a plurality of servers according to the deployment configuration information; the automatic deployment module uploads an agent program to a server which is successfully connected; the server runs the agent end program according to the received running command, the automatic deployment of the agent end is completed, and the problem of large workload caused by manual deployment of the agent end to a host where each monitored system is located is solved.

Description

Linux system-oriented software agent end automatic deployment method
Technical Field
The application relates to the field of software agent end automatic deployment, in particular to a Linux system-oriented software agent end automatic deployment method.
Background
In a company or organization, there are many running and new systems, the code versions of these systems are not uniformly managed, and when these new and to-be-upgraded systems need to be deployed online, it is impossible to know whether their codes are consistent with the original test versions. Often, in the process of online deployment, a program always has a small problem or a new requirement, and a technical support person of a manufacturer directly changes a code on site in order to reduce trouble, which may cause a new vulnerability and increase the risk of system attack. In order to effectively control the code versions of these systems and reduce security risks, version consistency management systems have been designed and developed. This system has two subsystems: one is a management center; one is the proxy side. The agent terminal is responsible for collecting the change condition of the monitored system code or file and uploading the change file to the management center; the management center is responsible for storing each system version, displaying and comparing file changes so as to determine whether to perform the test again.
In the implementation and deployment process of the version consistency management system, the agent end of the version consistency management system needs to be deployed to the host where each monitored system is located, and if manual operation is performed, the workload is large due to the large number of machines.
Disclosure of Invention
The application provides a Linux system-oriented software agent automatic deployment method, which solves the problem of large workload caused by manually deploying an agent to a host where each monitored system is located.
The application provides a method for automatically deploying a software agent terminal facing a Linux system, which comprises the following steps:
setting deployment configuration information;
starting an automatic deployment module, wherein the automatic deployment module starts multithreading to connect a plurality of servers according to the deployment configuration information;
the automatic deployment module uploads an agent program to a server which is successfully connected;
and the server operates the agent program according to the received operation command to complete the automatic deployment of the agent.
Preferably, after the step of setting the deployment configuration information, the method further includes:
and saving the deployment configuration information.
Preferably, the starting of the automated deployment module by the automated deployment module according to the deployment configuration information, the multithreading connection with the plurality of servers for deployment, includes:
starting an automatic deployment module, and calling the deployment configuration information by the automatic deployment module;
and the automatic deployment module starts multithreading to connect a plurality of servers according to the acquired deployment configuration information.
Preferably, the uploading, by the automated deployment module, the agent program to the server with a successful connection includes:
the automatic deployment module sends a query command to a server which is successfully connected through SSH service, and the type and version of an operating system of the server are obtained through the query command;
and the automatic deployment module uploads a corresponding agent program through an SCP according to the type and the version of the operating system of the server.
Preferably, after the step of uploading, by the automation deployment module, the corresponding agent program according to the type and version of the operating system of the server, the method further includes:
and the server receives and stores the agent program to the local disk through the local SSH service.
Preferably, the server runs the agent program according to the received running command, and completes the automatic deployment of the agent, including:
the server management center sends a command for operating an agent program through SSH service;
if the command is successfully sent, the server operates the agent program according to the received operation command, and the automatic deployment module marks the deployment result as successful deployment.
Preferably, after the step that the server runs the agent program according to the received running command and the automated deployment module marks the deployment result as successful deployment, the method further includes:
after the agent side service runs, sending heartbeat information to a heartbeat detection module of the management center;
and the heartbeat detection module marks the state of the agent end as a running state after receiving the heartbeat information of the agent end.
Preferably, the method further comprises the following steps:
the automated deployment module marks the deployment status of the server with the failed connection as a failure.
Preferably, the method further comprises the following steps:
according to the Linux system-oriented software agent automatic deployment method, the Linux system-oriented software agent is automatically deployed to a plurality of hosts through a multithreading technology developed by a Python technology.
The application provides a Linux system-oriented software agent end automatic deployment method, through a multithreading technology developed by a Python technology, an automatic deployment module starts a multithreading connection server according to deployment configuration information, uploads an agent end program to the server, and runs the agent end program through a running command, so that the Linux system software agent end is automatically deployed on a plurality of hosts, and the problem of large workload caused by manual deployment of the agent end on each monitored system host is solved.
Drawings
Fig. 1 is a schematic flowchart of a method for automated deployment of a software agent facing a Linux system according to an embodiment of the present application;
FIG. 2 is a flowchart of an implementation of a method for automated deployment of a software agent oriented to a Linux system according to an embodiment of the present application;
FIG. 3 is an agent end deployment page according to an embodiment of the present application;
FIG. 4 is a proxy side status view and management page according to an embodiment of the present application;
fig. 5 is a simplified flow diagram of automated deployment according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
Fig. 1 is a schematic flowchart of a method for automated deployment of a software agent oriented to a Linux system according to the present application, and the method provided in the present application is described in detail below with reference to fig. 1.
Step S101, setting deployment configuration information.
As shown in fig. 3, before deployment, a user needs to configure deployment information, which includes an IP address of a server to be deployed, a Port used by an SSH service, a user name and a password for connecting the SSH, and finally a directory for deployment of the agent. This deployment configuration information is then appended to the deployment list via an "add" button, saving the deployment configuration information.
The management center in fig. 2 is mainly responsible for executing the automated deployment, and the monitored system may be understood as a server to be deployed, and the software agent-side automated deployment of the Linux system is completed by receiving and running an agent-side program sent by the management center, and updating an agent-side service.
And S102, starting an automatic deployment module, and starting multithreading connection with a plurality of servers by the automatic deployment module according to the deployment configuration information.
As shown in fig. 2, after the deployment configuration information is set, the automatic deployment module is started, and the automatic deployment module calls the deployment configuration information; and the automatic deployment module starts multithreading to connect a plurality of servers according to the acquired deployment configuration information. The automated deployment module may initiate multithreading to account for the deployment of multiple servers. In one thread, firstly, the connection of the server IP where the monitored system is located is tried, if the connection is not up, the deployment state of the server is updated to be failure to be in the database, and then the deployment of the next server is carried out.
And step S103, the automatic deployment module uploads the agent program to the server which is successfully connected.
The automation deployment module sends a query command to the server which is successfully connected through the SSH service, queries the type and version of the operating system (such as CentOS6, CentOS7, ubuntu16.04, etc.) where the monitored system is located, and obtains the type and version of the operating system of the server through the query command, where the monitored system is a backup device to be updated.
And the automatic deployment module uploads a corresponding agent program through an SCP according to the type and the version of the operating system of the server. And selecting a corresponding agent program (the agent has different versions on different operating systems) to upload the file according to different operating system types. After the automatic deployment module selects the correct agent version, the agent program is uploaded to the server of the monitored system through the SCP.
After the automatic deployment module selects the correct agent version, the agent program is uploaded to the server of the monitored system through the SCP. And the server receives and stores the agent program to the local disk through the local SSH service.
And step S104, the server operates the agent program according to the received operation command to complete the automatic deployment of the agent.
And the server management center sends a command for operating the agent end program to an operating system of the monitored system through the SSH service. The command is also related to the type of the operating system where the monitored system is located, if the command is sent successfully, the server runs the agent program according to the received running command, and the automatic deployment module marks the deployment result as successful deployment. The deployment result in the updating deployment configuration table is 'deployment success'. After the agent side service runs, sending heartbeat information to a heartbeat detection module of the management center; and after receiving the heartbeat information of the agent terminal, the heartbeat detection module marks the state of the agent terminal as a running state and updates the state of the agent terminal in the agent terminal table to be running. The automated deployment module marks the deployment status of the server with the failed connection as a failure.
According to the Linux system-oriented software agent automatic deployment method, the Linux system-oriented software agent is automatically deployed to a plurality of hosts through a multithreading technology developed by a Python technology.
In the above process, if the agent deployment on one server fails, the deployment of the agents on other servers is not affected. The reason of the failed deployment can be written into the deployment configuration table, so that an administrator can conveniently check the reason and perform the deployment once through the 'deployment' button after repairing the problem. In the scheme, the multithreading technology is adopted for concurrent deployment so as to shorten the deployment time.
The following describes specific operation steps of the method for automatically deploying the software agent side of the Linux system with reference to fig. 3 and 4. Fig. 2 is an agent side automatic batch deployment page. Before deployment, the user needs to configure deployment information, which includes the IP address of the server to be deployed, the Port used by the SSH service, and the username and password for connecting the SSH, and finally, specifies the directory for agent deployment. This deployment configuration information is then appended to the deployment list via an "add" button. When the information configuration of all the servers to be deployed is completed, the user clicks a batch deployment button to perform automatic deployment work on a plurality of servers at one time. In addition, if the configuration information input by the user is wrong, the configuration information can be deleted and then added again. And the system also supports the agent-side deployment of a single server, and can perform individual deployment only by clicking a deployment button on the right side of a certain configuration record, and particularly for a server with failed deployment, can perform multiple individual deployments until the deployment problem is solved (possibly, the server network is not available, or a user name or password is input incorrectly).
When the agent terminal is deployed successfully, the agent terminal sends heartbeat information to the management center, and the management center updates the state of the agent terminal. When the status is "running", the status column in the table of fig. 4 shows that the agent end deployment is successful and is running normally.
The method provided by the application is also suitable for systems and software which need to deploy the agent end to a plurality of servers.
The simplified flow of the automated deployment provided by the present application is shown in fig. 5, and the simplified flow includes the following 6 steps:
1) and the user inputs the deployment configuration information of the server and stores the deployment configuration information in a deployment configuration table.
2) And realizing the concurrent automatic deployment of a plurality of servers based on the multithreading technology.
3) And issuing an operating system type query command to the deployment server through an SSH protocol, and selecting a corresponding agent program version for deployment according to the returned operating system type on the server.
4) And uploading the agent end program to a deployment server through an SCP protocol.
5) And issuing a command for operating the agent end to the deployment server through an SSH protocol.
6) And determining whether the agent end normally operates or not through heartbeat information initiated by the agent end to the management center.
The method is a distributed automatic deployment method facing a Linux system, based on Python multithreading technology, deployment of multiple hosts is completed by means of uploading files and issuing commands and the like through SCP and SSH protocols, deployment information can be collected to a MySQL database, and finally deployment results are displayed to users through WEB.
The application provides a Linux system-oriented software agent end automatic deployment method, through a multithreading technology developed by a Python technology, an automatic deployment module starts a multithreading connection server according to deployment configuration information, uploads an agent end program to the server, and runs the agent end program through a running command, so that the Linux system software agent end is automatically deployed on a plurality of hosts, and the problem of large workload caused by manual deployment of the agent end on each monitored system host is solved. The deployment work of the agent end is greatly simplified, the labor cost is saved, and the probability of problems caused by manual operation is reduced.
Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can make modifications and equivalents to the embodiments of the present invention without departing from the spirit and scope of the present invention, which is set forth in the claims of the present application.

Claims (9)

1. A method for automatically deploying a software agent end facing a Linux system is characterized by comprising the following steps:
setting deployment configuration information;
starting an automatic deployment module, wherein the automatic deployment module starts multithreading to connect a plurality of servers according to the deployment configuration information;
the automatic deployment module uploads an agent program to a server which is successfully connected;
and the server operates the agent program according to the received operation command to complete the automatic deployment of the agent.
2. The method of claim 1, further comprising, after the step of setting the deployment configuration information:
and saving the deployment configuration information.
3. The method of claim 1, wherein starting an automated deployment module, the automated deployment module starting multithreading to connect a plurality of servers for deployment according to the deployment configuration information, comprises:
starting an automatic deployment module, and calling the deployment configuration information by the automatic deployment module;
and the automatic deployment module starts multithreading to connect a plurality of servers according to the acquired deployment configuration information.
4. The method of claim 1, wherein the automated deployment module uploads the agent to the successfully connected server, comprising:
the automatic deployment module sends a query command to a server which is successfully connected through SSH service, and the type and version of an operating system of the server are obtained through the query command;
and the automatic deployment module uploads a corresponding agent program through an SCP according to the type and the version of the operating system of the server.
5. The method according to claim 4, wherein after the step of uploading the corresponding agent-side program by the automation deployment module according to the type and version of the operating system of the server, the method further comprises:
and the server receives and stores the agent program to the local disk through the local SSH service.
6. The method of claim 1, wherein the server runs the agent program according to the received running command to complete the automatic deployment of the agent, and the method comprises:
the server management center sends a command for operating an agent program through SSH service;
if the command is successfully sent, the server operates the agent program according to the received operation command, and the automatic deployment module marks the deployment result as successful deployment.
7. The method according to claim 1 or 6, wherein after the step that the server runs the agent program according to the received running command, and the automated deployment module marks the deployment result as successful deployment, the method further comprises:
after the agent side service runs, sending heartbeat information to a heartbeat detection module of the management center;
and the heartbeat detection module marks the state of the agent end as a running state after receiving the heartbeat information of the agent end.
8. The method of claim 1 or 4, further comprising:
the automated deployment module marks the deployment status of the server with the failed connection as a failure.
9. The method of claim 1, further comprising:
according to the Linux system-oriented software agent automatic deployment method, the Linux system-oriented software agent is automatically deployed to a plurality of hosts through a multithreading technology developed by a Python technology.
CN201911415473.7A 2019-12-31 2019-12-31 Linux system-oriented software agent end automatic deployment method Pending CN111209012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911415473.7A CN111209012A (en) 2019-12-31 2019-12-31 Linux system-oriented software agent end automatic deployment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415473.7A CN111209012A (en) 2019-12-31 2019-12-31 Linux system-oriented software agent end automatic deployment method

Publications (1)

Publication Number Publication Date
CN111209012A true CN111209012A (en) 2020-05-29

Family

ID=70789861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415473.7A Pending CN111209012A (en) 2019-12-31 2019-12-31 Linux system-oriented software agent end automatic deployment method

Country Status (1)

Country Link
CN (1) CN111209012A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342357A (en) * 2021-06-28 2021-09-03 北京天空卫士网络安全技术有限公司 Deployment method and device of software system
CN114666348A (en) * 2022-05-25 2022-06-24 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727343A (en) * 2009-11-30 2010-06-09 英业达股份有限公司 Software installation and deployment method for distributed server
CN104536899A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Software deploying and maintaining method based on intelligent cluster
CN109656570A (en) * 2018-12-18 2019-04-19 江苏满运软件科技有限公司 Group system and its operation method, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727343A (en) * 2009-11-30 2010-06-09 英业达股份有限公司 Software installation and deployment method for distributed server
CN104536899A (en) * 2015-01-20 2015-04-22 成都益联科创科技有限公司 Software deploying and maintaining method based on intelligent cluster
CN109656570A (en) * 2018-12-18 2019-04-19 江苏满运软件科技有限公司 Group system and its operation method, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342357A (en) * 2021-06-28 2021-09-03 北京天空卫士网络安全技术有限公司 Deployment method and device of software system
CN114666348A (en) * 2022-05-25 2022-06-24 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language
CN114666348B (en) * 2022-05-25 2022-11-11 广东睿江云计算股份有限公司 Method for quickly constructing distributed system based on python language

Similar Documents

Publication Publication Date Title
US10545469B2 (en) Systems and methods for self provisioning building equipment
US10592330B2 (en) Systems and methods for automatic replacement and repair of communications network devices
US7483968B1 (en) System and method for configuring resource groups
US10019250B2 (en) Forcibly completing upgrade of distributed software in presence of failures
US10915311B2 (en) Automated firmware update management on huge big-data clusters
CN112199197B (en) Server management method and system
US20100169470A1 (en) System and method for operational management of computer system
WO2001029661A2 (en) Method and apparatus for maintaining a computer system
CN111209012A (en) Linux system-oriented software agent end automatic deployment method
TWI801730B (en) Server with system setting data synchronization function
CN115809096B (en) Batch self-adaptive upgrading method for operating system
CN116844087A (en) Monitoring method and device of operating system and BMC
US20100281294A1 (en) Method of managing operations for administration, maintenance and operational upkeep, management entity and corresponding computer program product
US9207928B2 (en) Computer-readable medium, apparatus, and methods of automatic capability installation
JP2006113754A (en) Software update device and method
CN104158906A (en) Server agent manipulation system and manipulation method
CN114448788B (en) Method, system, equipment and medium for installing switch system
CN107438011B (en) Method and device for determining configuration information, network manager and system
Cisco Release Notes for Cisco Transport Manager Release 2.2
JPH10326208A (en) Failure restoration system and record medium
Cisco Troubleshooting Cisco UGM
CN113657702A (en) Automatic operation and maintenance method and device for internet data center and readable storage medium
CN112351098A (en) Copying service cluster system, control method, device and medium
CN113886218B (en) Method, device, equipment and readable medium for verifying BIOS refreshing
CN115372803B (en) Motherboard test system, method, device and storage medium

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