CN113204352A - Application deployment method, target server, scheduling engine and distributed system - Google Patents
Application deployment method, target server, scheduling engine and distributed system Download PDFInfo
- Publication number
- CN113204352A CN113204352A CN202110629716.8A CN202110629716A CN113204352A CN 113204352 A CN113204352 A CN 113204352A CN 202110629716 A CN202110629716 A CN 202110629716A CN 113204352 A CN113204352 A CN 113204352A
- Authority
- CN
- China
- Prior art keywords
- target server
- application deployment
- agent process
- workflow
- application
- 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
- 238000000034 method Methods 0.000 title claims abstract description 244
- 230000008569 process Effects 0.000 claims abstract description 189
- 230000006378 damage Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 16
- 230000001360 synchronised effect Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses an application deployment method, a target server, a scheduling engine and a distributed system, and relates to the field of distributed systems. The method comprises the steps of initializing an agent process when an application deployment workflow pushed by a scheduling engine of the distributed system is received; executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system; and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction. According to the method, the agent process created on the target server is used for deploying the application on the target server in a mode of executing the application deployment workflow, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on target server resources and application is eliminated, and the safety of application deployment is improved.
Description
Technical Field
The invention relates to the field of distributed technology, in particular to an application deployment method, a target server, a scheduling engine and a distributed system.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Manual deployment is a common application deployment approach. After the application formal version is issued, operation and maintenance personnel acquire the application software package, manually customize parameters to be modified in the issued version according to the requirements of an installation manual and the parameters of a production environment, and then wait for a production deployment time point. When the application is deployed, operation and maintenance personnel manually copy the customized application software package to a production environment through a tool and then start the application software package, and for the application software package to be deployed on a plurality of servers, the copying and starting operations of the application software package need to be repeatedly performed on the plurality of servers, so that the parallel operation cannot be realized, the application deployment efficiency is reduced, and the risk of manual operation errors is increased due to the manual deployment; meanwhile, the advantages brought by the virtualization technology cannot be played by manual deployment after the virtualization technology is used.
Disclosure of Invention
The embodiment of the invention provides an application deployment method, which is applied to a target server of a distributed system and is used for improving the efficiency and safety of application deployment, and the application deployment method comprises the following steps:
initializing an agent process when an application deployment workflow pushed by a scheduling engine of a distributed system is received;
executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system;
and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction.
The embodiment of the present invention further provides a target server, which is applied to a distributed system, and is used for improving efficiency and security of application deployment, and the target server includes:
the agent initialization module is used for initializing an agent process when receiving an application deployment workflow pushed by a scheduling engine of the distributed system;
the application deployment module is used for executing the application deployment workflow by using the agent process so as to deploy the application on the target server and feeding back the application deployment progress to a scheduling engine of the distributed system;
and the agent process destroying module is used for destroying the agent process on the target server according to the received destroying instruction after the agent process is used for executing the application deployment workflow.
The embodiment of the invention provides an application deployment method, which is applied to a scheduling engine of a distributed system and is used for improving the efficiency and safety of application deployment, and the application deployment method comprises the following steps:
pushing the application deployment workflow to a target server so that the target server initializes an agent process when receiving the application deployment workflow pushed by a scheduling engine;
receiving an application deployment progress fed back by a target server when executing an application deployment workflow by using an agent process to deploy an application;
and after the target server executes the application deployment workflow by using the agent process, sending a destroying instruction to the target server so that the target server destroys the agent process according to the destroying instruction.
The embodiment of the present invention further provides a scheduling engine, which is applied to a distributed system, and is used to improve efficiency and security of application deployment, where the scheduling engine includes:
the workflow pushing module is used for pushing the application deployment workflow to the target server so that the target server initializes the agent process when receiving the application deployment workflow pushed by the scheduling engine;
the deployment progress receiving module is used for receiving the application deployment progress fed back by the target server when executing the application deployment workflow by using the agent process to deploy the application;
and the destruction instruction sending module is used for sending a destruction instruction to the target server after the target server executes the application deployment workflow by using the agent process so as to enable the target server to destroy the agent process according to the destruction instruction.
The embodiment of the invention also provides a distributed system for improving the efficiency and the safety of application deployment, wherein the distributed system comprises a target server and a scheduling engine;
the scheduling engine is used for pushing the application deployment workflow to the target server;
the target server is used for initializing the agent process when receiving the application deployment workflow pushed by the scheduling engine;
the target server is also used for executing the application deployment workflow by using the agent process so as to deploy the application, and feeding back the application deployment progress to the scheduling engine;
the scheduling engine is also used for sending a destruction instruction to the target server after the target server executes the application deployment workflow by using the agent process;
and the target server is also used for destroying the agent process of the application deployment workflow executed on the target server according to the received destroying instruction.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the application deployment method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the application deployment method is stored in the computer-readable storage medium.
In the embodiment of the invention, an agent process is initialized when an application deployment workflow pushed by a scheduling engine of a distributed system is received; executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system; and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction. According to the embodiment of the invention, the agent process is created on the target server, and the application is deployed on the target server in a mode of executing the application deployment workflow by the agent process, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on target server resources and application is eliminated, and the safety of application deployment is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an implementation of an application deployment method according to an embodiment of the present invention;
fig. 2 is a flowchart of implementing step 101 in the application deployment method according to the embodiment of the present invention;
fig. 3 is a flowchart of another implementation of the application deployment method according to the embodiment of the present invention;
FIG. 4 is a functional block diagram of a target server according to an embodiment of the present invention;
FIG. 5 is a block diagram illustrating an agent initialization module 401 in a target server according to an embodiment of the present invention;
FIG. 6 is a block diagram of another function of a target server according to an embodiment of the present invention;
FIG. 7 is a flowchart of yet another implementation of a method for deploying an application according to an embodiment of the present invention;
FIG. 8 is a functional block diagram of a scheduling engine provided in an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a distributed system provided in an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a distributed system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 shows an implementation flow of an application deployment method provided by an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown, and the detailed description is as follows:
as shown in fig. 1, the application deployment method is applied to a target server of a distributed system. The application deployment method comprises the following steps:
101, initializing an agent process when receiving an application deployment workflow pushed by a scheduling engine of a distributed system;
102, executing an application deployment workflow by using an agent process to deploy an application on a target server, and feeding back an application deployment progress to a scheduling engine of a distributed system;
and 103, destroying the agent process on the target server according to the received destroying instruction after the agent process is used for executing the application deployment workflow.
The distributed system at least comprises a target server and a scheduling engine, wherein the target server is a server of the application to be deployed. When an application is deployed on a target server of a distributed system, a scheduling engine of the distributed system pushes an application deployment workflow to the target server. When the target server receives the application deployment workflow pushed by the scheduling engine, it is stated that the application needs to be deployed at the target server, and at this time, the agent process is initialized on the target server.
After the agent process is initialized on the target server, the target server executes the application deployment workflow pushed by the scheduling engine by using the initialized agent process so as to deploy the application on the target server. The application is deployed on the target server in a mode that the agent process executes the application deployment workflow, so that the application deployment efficiency can be greatly improved. Meanwhile, the target server feeds back the application deployment progress (execution progress of the application deployment workflow) to the scheduling engine so that the scheduling engine can control the application deployment progress at any time.
And finally, after the target server executes the application deployment workflow by using the agent process, the scheduling engine sends a destruction instruction to the target server, and the target server destroys the agent process executing the application deployment workflow according to the received destruction instruction. The agent process of the application deployment workflow is destroyed and executed, so that the influence of the agent process on the target server resources and the application can be reduced as much as possible, and the safety of the application deployment is greatly improved.
In the embodiment of the invention, an agent process is initialized when an application deployment workflow pushed by a scheduling engine of a distributed system is received; executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system; and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction. According to the embodiment of the invention, the agent process is created on the target server, and the application is deployed on the target server in a mode of executing the application deployment workflow by the agent process, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on target server resources and application is eliminated, and the safety of application deployment is improved.
Fig. 2 shows an implementation flow of step 101 in the application deployment method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to improve efficiency of initializing an agent process, as shown in fig. 2, step 101, initializing the agent process when receiving an application deployment workflow pushed by a scheduling engine of a distributed system, includes:
The method comprises the steps that when a scheduling engine of the distributed system pushes an application deployment workflow, an agent execution code is pushed, and after a target server receives the agent execution code pushed by the scheduling engine of the distributed system and the application deployment workflow, the target server creates and starts an agent process according to the agent execution code so as to initialize the agent process. The agent process is initialized in a mode of executing the code by the agent, so that the efficiency of initializing the agent process can be improved.
In the embodiment of the invention, an agent execution code and an application deployment workflow pushed by a scheduling engine of a distributed system are received; and creating and starting the agent process according to the agent execution code. The embodiment of the invention initializes the agent process in a mode of executing the code by the agent, and can improve the efficiency of initializing the agent process.
Fig. 3 illustrates another implementation flow of the application deployment method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are illustrated, and the detailed description is as follows:
in an embodiment of the present invention, in order to improve the security of the connection between the scheduling engine and the target server, as shown in fig. 3, on the basis of the above method steps, the application deployment method further includes:
When the dispatching engine of the distributed system is connected with the target server of the distributed system, the target server and the dispatching engine can be connected in an SSH remote connection mode, so that the connection safety is improved.
In an embodiment of the present invention, in order to improve the convenience of logging in the target server, as shown in fig. 3, on the basis of the above method steps, the application deployment method further includes:
and step 302, logging in a target server of the distributed system without secret in a mode of configuring the SSH KEY.
The target server of the distributed system can be logged in a secret-free mode by configuring the SSH KEY, so that the convenience of logging in the target server of the distributed system is improved.
In an embodiment of the present invention, in order to facilitate querying an application deployment situation, as shown in fig. 3, on the basis of the above method steps, the application deployment method further includes:
When the target server executes the application deployment workflow by using the agent process to deploy the application, the application deployment log generated on the target server can be synchronized to the web side, so that the distributed system queries the application deployment condition.
In an embodiment of the present invention, in order to know a connection status of the scheduling engine and the target server, as shown in fig. 3, on the basis of the above method steps, the application deployment method further includes:
and step 304, utilizing a heartbeat detection program to keep heartbeat synchronization between a scheduling engine of the distributed system and an agent process of the target server according to a preset frequency.
When the target server executes the application deployment workflow by using the agent process, the heartbeat detection program can be used for carrying out heartbeat synchronization on the scheduling engine of the distributed system and the agent process of the target server according to a preset frequency (timing), namely the heartbeat detection program is used for regularly checking the connection state between the scheduling engine and the target server, so that the connection between the scheduling engine and the target server is reestablished when the connection state between the scheduling engine and the target server is abnormal.
In an embodiment of the present invention, to implement data synchronization between the target server and the distributed system database, as shown in fig. 3, on the basis of the above method steps, the application deployment method further includes:
and 305, carrying out data synchronization on the agent process of the target server and the database of the distributed system.
And when the target server executes the application deployment workflow by using the agent process, the target server also performs data synchronization with the database of the distributed system by using the agent process.
In the embodiment of the invention, the target server and the scheduling engine of the distributed system are connected in an SSH remote connection mode, so that the connection safety of the scheduling engine and the target server can be improved; the convenience of logging in the target server can be realized by configuring the SSH KEY in a way of logging in the target server of the distributed system without secret; the method comprises the steps that when an agent process is used for executing an application deployment workflow, an application deployment log generated on a target server is synchronized to a web side, so that the application deployment condition can be conveniently inquired; according to the preset frequency, a heartbeat detection program is utilized to keep the heartbeat synchronization between the scheduling engine of the distributed system and the agent process of the target server, so that the connection state of the scheduling engine and the target server can be known; and the agent process of the target server performs data synchronization with the database of the distributed system, so that the data synchronization of the target server and the database of the distributed system can be realized.
The embodiment of the present invention further provides a target server, as described in the following embodiments. Because the principle of solving the problem of the target servers is similar to the application deployment method applied to the target servers, the implementation of the target servers can refer to the implementation of the application deployment method applied to the target servers, and repeated details are not repeated.
Fig. 4 shows functional modules of a target server provided in an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
referring to fig. 4, each module included in the target server is used to execute each step in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which is not repeated herein. In the embodiment of the invention, the target server is applied to a distributed system. The target server includes agent initialization module 401, application deployment module 402, and agent process destruction module 403.
The agent initialization module 401 is configured to initialize an agent process when receiving an application deployment workflow pushed by a scheduling engine of the distributed system.
An application deployment module 402, configured to execute an application deployment workflow by using an agent process to deploy an application on a target server, and feed back an application deployment progress to a scheduling engine of a distributed system;
and the agent process destruction module 403 is configured to destroy, after the agent process is used to execute the application deployment workflow, the agent process on the target server according to the received destruction instruction.
In the embodiment of the present invention, the agent initialization module 401 initializes the agent process when receiving the application deployment workflow pushed by the scheduling engine of the distributed system; the application deployment module 402 executes the application deployment workflow by using the agent process to deploy the application on the target server, and feeds back the application deployment progress to a scheduling engine of the distributed system; after the agent process destruction module 403 executes the application deployment workflow by using the agent process, destroys the agent process on the target server according to the received destruction instruction. According to the embodiment of the invention, the agent initialization module 401 establishes the agent process on the target server, and the application deployment module 402 deploys the application on the target server in a mode of executing the application deployment workflow by the agent process, so that the application deployment efficiency is greatly improved; meanwhile, the agent process destruction module 403 destroys the agent process executing the application deployment workflow, so that the influence on the target server resources and the application is eliminated, and the safety of application deployment is improved.
Fig. 5 shows a structural schematic diagram of agent initialization module 401 in the target server provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve efficiency of initializing an agent process, referring to fig. 5, each unit included in the agent initialization module 401 is configured to execute each step in the embodiment corresponding to fig. 2, specifically please refer to fig. 2 and related descriptions in the embodiment corresponding to fig. 2, which are not described herein again. In the embodiment of the present invention, the agent initialization module 401 includes a workflow receiving unit 501 and an agent process initialization unit 502.
A workflow receiving unit 501, configured to receive agent execution codes and application deployment workflows pushed by a scheduling engine of the distributed system.
The agent process initialization unit 502 is used for creating and starting the agent process according to the agent execution code.
In the embodiment of the present invention, the workflow receiving unit 501 receives an agent execution code and an application deployment workflow pushed by a scheduling engine of a distributed system; the agent process initialization unit 502 creates and starts an agent process according to the agent execution code. The agent process initializing unit 502 initializes the agent process in the form of an agent execution code, which can improve the efficiency of initializing the agent process.
Fig. 6 illustrates another functional module of the target server provided in the embodiment of the present invention, and for convenience of description, only the portion related to the embodiment of the present invention is illustrated, and the detailed description is as follows:
in an embodiment of the present invention, in order to improve the security of the connection between the scheduling engine and the target server, referring to fig. 6, each module included in the target server is used to execute each step in the embodiment corresponding to fig. 3, and specifically, please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3, which is not described herein again. In the embodiment of the present invention, based on the above module structure, the target server further includes an SSH connection module 601.
The SSH connection module 601 is configured to connect a target server and a scheduling engine of the distributed system in an SSH remote connection manner.
In an embodiment of the present invention, in order to improve the convenience of logging in the target server, referring to fig. 6, on the basis of the above-mentioned module structure, the target server further includes an SSH privacy-free login module 602.
And an SSH secure login module 602, configured to log in a target server of the distributed system in a secure manner by configuring an SSH KEY.
In an embodiment of the present invention, in order to facilitate querying the application deployment situation, referring to fig. 6, on the basis of the above module structure, the target server further includes a log synchronization module 603.
The log synchronization module 603 is configured to synchronize the application deployment log generated on the target server to the web end while executing the application deployment workflow by using the agent process.
In an embodiment of the present invention, in order to know the connection status of the scheduling engine and the target server, referring to fig. 6, on the basis of the above module structure, the target server further includes a heartbeat detection module 604.
And a heartbeat detection module 604, configured to utilize a heartbeat detection program to keep heartbeat synchronization between the scheduling engine of the distributed system and the agent process of the target server according to a preset frequency.
In an embodiment of the present invention, in order to implement data synchronization between the target server and the distributed system database, referring to fig. 6, on the basis of the above module structure, the target server further includes a data synchronization module 605.
And the data synchronization module 605 is configured to perform data synchronization between the agent process of the target server and the database of the distributed system.
In the embodiment of the present invention, the SSH connection module 601 connects the target server and the scheduling engine of the distributed system in an SSH remote connection manner, which can improve the security of connection between the scheduling engine and the target server; the SSH privacy-free login module 602 logins the target server of the distributed system in a privacy-free manner by configuring the SSH KEY, and can log in the target server conveniently; the log synchronization module 603 synchronizes the application deployment log generated on the target server to the web side while executing the application deployment workflow by using the agent process, so that the application deployment condition can be conveniently inquired; the heartbeat detection module 604 utilizes a heartbeat detection program to keep heartbeat synchronization between the scheduling engine of the distributed system and the agent process of the target server according to a preset frequency, so that the connection state of the scheduling engine and the target server can be known; the agent process of the target server and the database of the distributed system perform data synchronization by the data synchronization module 605, so that the data synchronization between the target server and the database of the distributed system can be realized.
Fig. 7 illustrates a further implementation flow of the application deployment method provided by the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are illustrated, and the detailed description is as follows:
as shown in fig. 7, the deployment method is applied to the dispatch index of the distributed system. The application deployment method comprises the following steps:
In the embodiment of the invention, the distributed system at least comprises a target server and a scheduling engine, wherein the target server is a server of the application to be deployed. When an application is deployed on a target server of a distributed system, a scheduling engine of the distributed system pushes an application deployment workflow to the target server. When the target server receives the application deployment workflow pushed by the scheduling engine, it is stated that the application needs to be deployed at the target server, and at this time, the agent process is initialized on the target server.
After the agent process is initialized on the target server, the target server executes the application deployment workflow pushed by the scheduling engine by using the initialized agent process so as to deploy the application on the target server. The application is deployed on the target server in a mode that the agent process executes the application deployment workflow, so that the application deployment efficiency can be greatly improved. Meanwhile, the target server feeds back the application deployment progress (execution progress of the application deployment workflow) to the scheduling engine so that the scheduling engine can control the application deployment progress at any time.
And finally, after the target server executes the application deployment workflow by using the agent process, the scheduling engine sends a destruction instruction to the target server, and the target server destroys the agent process executing the application deployment workflow according to the received destruction instruction. The agent process of the application deployment workflow is destroyed and executed, so that the influence of the agent process on the target server resources and the application can be reduced as much as possible, and the safety of the application deployment is greatly improved.
In the embodiment of the invention, the application deployment workflow is pushed to the target server, so that the target server initializes the agent process when receiving the application deployment workflow pushed by the scheduling engine; receiving an application deployment progress fed back by a target server when executing an application deployment workflow by using an agent process to deploy an application; and after the target server executes the application deployment workflow by using the agent process, sending a destroying instruction to the target server so that the target server destroys the agent process according to the destroying instruction. According to the embodiment of the invention, the agent process is created on the target server, and the application is deployed on the target server in a mode of executing the application deployment workflow by the agent process, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on target server resources and application is eliminated, and the safety of application deployment is improved.
Embodiments of the present invention further provide a scheduling engine, as described in the following embodiments. Because the principle of solving the problem of the scheduling engines is similar to the application deployment method applied to the scheduling engines, the implementation of the scheduling engines can refer to the implementation of the application deployment method applied to the scheduling engines, and repeated details are not repeated.
Fig. 8 illustrates functional modules of a scheduling engine provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are illustrated, and the details are as follows:
referring to fig. 8, each module included in the scheduling engine is configured to execute each step in the embodiment corresponding to fig. 7, and please refer to fig. 7 and the related description in the embodiment corresponding to fig. 7 for details, which are not described herein again. In the embodiment of the invention, the scheduling engine is applied to a distributed system. The scheduling engine comprises a workflow pushing module 801, a deployment progress receiving module 802 and a destruction instruction sending module 803.
The workflow pushing module 801 is configured to push an application deployment workflow to a target server, so that the target server initializes an agent process when receiving the application deployment workflow pushed by the scheduling engine.
The deployment progress receiving module 802 is configured to receive an application deployment progress fed back by the target server while executing the application deployment workflow by using the agent process to deploy the application.
A destroy instruction sending module 803, configured to send a destroy instruction to the target server after the target server executes the application deployment workflow by using the agent process, so that the target server destroys the agent process according to the destroy instruction.
In the embodiment of the present invention, the workflow pushing module 801 pushes an application deployment workflow to a target server, so that the target server initializes an agent process when receiving the application deployment workflow pushed by a scheduling engine; the deployment progress receiving module 802 receives an application deployment progress fed back while a target server executes an application deployment workflow by using an agent process to deploy an application; the destroy instruction sending module 803 sends a destroy instruction to the target server after the target server executes the application deployment workflow by using the agent process, so that the target server destroys the agent process according to the destroy instruction. In the embodiment of the present invention, the workflow pushing module 801 creates an agent process on the target server, and the deployment progress receiving module 802 deploys an application on the target server in a manner that the agent process executes the application deployment workflow, thereby greatly improving the efficiency of application deployment; meanwhile, the destroy instruction sending module 803 destroys the agent process of the application deployment workflow after the execution, eliminates the influence on the target server resources and the application, and improves the safety of the application deployment.
Fig. 9 shows a structural schematic diagram of a distributed system provided by an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
referring to fig. 9, each module included in the distributed system is used to execute each step in the embodiment corresponding to fig. 1 and 7, and specific reference is made to fig. 1 and 7 and the related description in the embodiment corresponding to fig. 1 and 7, which are not repeated herein. In the embodiment of the present invention, the distributed system includes a target server 901 and a scheduling engine 902.
And the scheduling engine 902 is used for pushing the application deployment workflow to the target server 901.
And the target server 901 is used for initializing the agent process when receiving the application deployment workflow pushed by the scheduling engine 902.
The target server 901 is further configured to execute the application deployment workflow by using the agent process to deploy the application, and feed back the application deployment progress to the scheduling engine 902.
The scheduling engine 902 is further configured to send a destroy instruction to the target server 901 after the target server 901 executes the application deployment workflow by using the agent process.
The target server 901 is further configured to destroy, according to the received destroy instruction, the agent process that is executed on the target server 901 and finishes the application deployment workflow.
The distributed system at least comprises a target server 901 and a scheduling engine 902, wherein the target server 901 is a server of an application to be deployed. When an application is deployed on a target server 901 of a distributed system, a scheduling engine 902 of the distributed system pushes an application deployment workflow to the target server 901. When receiving the application deployment workflow pushed by the scheduling engine 902, the target server 901 indicates that an application needs to be deployed on the target server 901, and at this time, the agent process is initialized on the target server 901.
After agent processes are initialized on target server 901, target server 901 executes the application deployment workflow pushed by scheduler engine 902 using the initialized agent processes to deploy applications on target server 901. The application is deployed on the target server 901 in a manner that the agent process executes the application deployment workflow, which can greatly improve the application deployment efficiency. Meanwhile, the target server 901 feeds back the application deployment progress (execution progress of the application deployment workflow) to the scheduling engine 902, so that the scheduling engine 902 can master the application deployment progress at any time.
Finally, after the target server 901 executes the application deployment workflow by using the agent process, the scheduling engine 902 sends a destroy instruction to the target server 901, and the target server 901 destroys the agent process which executes the application deployment workflow according to the received destroy instruction. The agent process of the application deployment workflow is destroyed and executed, so that the influence of the agent process on the target server 901 resources and the application can be reduced as much as possible, and the safety of application deployment is greatly improved.
In the embodiment of the present invention, the agent process is initialized when the application deployment workflow pushed by the scheduling engine 902 of the distributed system is received; executing an application deployment workflow by using an agent process to deploy an application on a target server 901, and feeding back an application deployment progress to a scheduling engine 902 of the distributed system; after the agent process is used to execute the application deployment workflow, the agent process on the target server 901 is destroyed according to the received destroy instruction. According to the embodiment of the invention, the agent process is created on the target server 901, and the application is deployed on the target server 901 by using the agent process to execute the application deployment workflow, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on the target server 901 resources and the application is eliminated, and the application deployment safety is improved.
Fig. 10 shows an architecture schematic of a distributed system provided by an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
as shown in fig. 10, the distributed system includes:
a service correlation module: the method mainly comprises software version management, deployment management, server management, command management and automatic operation and maintenance. The service related module mainly completes the configuration information related to the version and the parameters. Configuring and managing the parameter information of each level of the application through a configuration center in a deployment management module; the software management module is responsible for importing the version information of the product into the system and analyzing the relevant records into the system; the server management is responsible for configuring relevant information of each deployment server in the system, including IP addresses of the servers and types of the middleware to be deployed, under a server management menu; the command management module modifies and configures standardized execution scripts in the system; and the automatic operation and maintenance module comprises online checking of the application parameters and version independent capacity expansion action.
A scheduling server module: the scheduling engine is responsible for task scheduling, concurrency control, agent management and information synchronization, and adopts an event-driven mode, and the functions can be extended in a pluggable mode.
A parameter calculation engine: and the parameter calculation engine is responsible for calculating all parameters and deployment schemes required by the deployment of the version package under the specified environment.
Job flow orchestration engine: and selecting a workflow template according to the deployment scheme, instantiating the workflow template through a rule engine, and customizing the workflow by a user.
The method creates the agent in real time on the target server and cleans the agent on site after deployment is completed, thereby greatly avoiding possible influence on the target environment and occupation on resources and simultaneously obtaining powerful guarantee on the safety problem.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the application deployment method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the application deployment method is stored in the computer-readable storage medium.
The application deployment method and the application deployment device provided by the invention can be applied to the financial field and can also be applied to other application fields except the financial field, and the embodiment of the invention does not particularly limit the application deployment method and the device.
In summary, in the embodiment of the present invention, the agent process is initialized when the application deployment workflow pushed by the scheduling engine of the distributed system is received; executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system; and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction. According to the embodiment of the invention, the agent process is created on the target server, and the application is deployed on the target server in a mode of executing the application deployment workflow by the agent process, so that the application deployment efficiency is greatly improved; and meanwhile, the agent process of the application deployment workflow is destroyed, so that the influence on target server resources and application is eliminated, and the safety of application deployment is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the 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.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. An application deployment method is characterized in that a target server applied to a distributed system comprises the following steps:
initializing an agent process when an application deployment workflow pushed by a scheduling engine of a distributed system is received;
executing the application deployment workflow by using the agent process to deploy the application on the target server, and feeding back the application deployment progress to a scheduling engine of the distributed system;
and after the agent process is used for executing the application deployment workflow, destroying the agent process on the target server according to the received destroying instruction.
2. The application deployment method of claim 1, wherein initializing the agent process upon receiving an application deployment workflow pushed by a scheduler engine of the distributed system comprises:
receiving agent execution codes and application deployment workflows pushed by a scheduling engine of the distributed system;
and creating and starting the agent process according to the agent execution code.
3. The application deployment method of claim 1, further comprising:
connecting a target server and a scheduling engine of the distributed system in an SSH remote connection mode; and/or
A target server of the distributed system is logged in a secret-free manner by configuring an SSH KEY; and/or
The method comprises the steps that when an agent process is used for executing an application deployment workflow, an application deployment log generated on a target server is synchronized to a web side; and/or
According to the preset frequency, a heartbeat detection program is utilized to keep the heartbeat synchronization between a scheduling engine of the distributed system and an agent process of a target server; and/or
And carrying out data synchronization on the agent process of the target server and the database of the distributed system.
4. A target server, applied to a distributed system, includes:
the agent initialization module is used for initializing an agent process when receiving an application deployment workflow pushed by a scheduling engine of the distributed system;
the application deployment module is used for executing the application deployment workflow by using the agent process so as to deploy the application on the target server and feeding back the application deployment progress to a scheduling engine of the distributed system;
and the agent process destroying module is used for destroying the agent process on the target server according to the received destroying instruction after the agent process is used for executing the application deployment workflow.
5. The target server of claim 4, wherein the agent initialization module comprises:
the workflow receiving unit is used for receiving agent execution codes and application deployment workflows pushed by a scheduling engine of the distributed system;
and the agent process initialization unit is used for creating and starting the agent process according to the agent execution code.
6. An application deployment method is characterized in that a scheduling engine applied to a distributed system comprises the following steps:
pushing the application deployment workflow to a target server so that the target server initializes an agent process when receiving the application deployment workflow pushed by a scheduling engine;
receiving an application deployment progress fed back by a target server when executing an application deployment workflow by using an agent process to deploy an application;
and after the target server executes the application deployment workflow by using the agent process, sending a destroying instruction to the target server so that the target server destroys the agent process according to the destroying instruction.
7. A scheduling engine, for use in a distributed system, comprising:
the workflow pushing module is used for pushing the application deployment workflow to the target server so that the target server initializes the agent process when receiving the application deployment workflow pushed by the scheduling engine;
the deployment progress receiving module is used for receiving the application deployment progress fed back by the target server when executing the application deployment workflow by using the agent process to deploy the application;
and the destruction instruction sending module is used for sending a destruction instruction to the target server after the target server executes the application deployment workflow by using the agent process so as to enable the target server to destroy the agent process according to the destruction instruction.
8. A distributed system is characterized by comprising a target server and a scheduling engine;
the scheduling engine is used for pushing the application deployment workflow to the target server;
the target server is used for initializing the agent process when receiving the application deployment workflow pushed by the scheduling engine;
the target server is also used for executing the application deployment workflow by using the agent process so as to deploy the application, and feeding back the application deployment progress to the scheduling engine;
the scheduling engine is also used for sending a destruction instruction to the target server after the target server executes the application deployment workflow by using the agent process;
and the target server is also used for destroying the agent process of the application deployment workflow executed on the target server according to the received destroying instruction.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the application deployment method of any one of claims 1 to 3, or 6 when executing the computer program.
10. A computer-readable storage medium storing a computer program for executing the application deployment method according to any one of claims 1 to 3, or 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110629716.8A CN113204352A (en) | 2021-06-07 | 2021-06-07 | Application deployment method, target server, scheduling engine and distributed system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110629716.8A CN113204352A (en) | 2021-06-07 | 2021-06-07 | Application deployment method, target server, scheduling engine and distributed system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113204352A true CN113204352A (en) | 2021-08-03 |
Family
ID=77024194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110629716.8A Pending CN113204352A (en) | 2021-06-07 | 2021-06-07 | Application deployment method, target server, scheduling engine and distributed system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113204352A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115150291A (en) * | 2022-07-05 | 2022-10-04 | 中国银行股份有限公司 | Operation and maintenance system and method based on event driving |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110209140A1 (en) * | 2010-02-25 | 2011-08-25 | Microsoft Corporation | Automated deployment and servicing of distributed applications |
CN105208095A (en) * | 2015-08-24 | 2015-12-30 | 用友网络科技股份有限公司 | Filtering service deployment recommendation device and method |
CN108769124A (en) * | 2018-04-28 | 2018-11-06 | Oppo广东移动通信有限公司 | Application dispositions method, device, server and the storage medium of PaaS platform |
CN110881059A (en) * | 2019-10-12 | 2020-03-13 | 平安银行股份有限公司 | Application deployment system and method, release engine and computer equipment |
CN112363820A (en) * | 2020-12-01 | 2021-02-12 | 成都精灵云科技有限公司 | Uniform resource pooling container scheduling engine based on heterogeneous hardware and scheduling method thereof |
-
2021
- 2021-06-07 CN CN202110629716.8A patent/CN113204352A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110209140A1 (en) * | 2010-02-25 | 2011-08-25 | Microsoft Corporation | Automated deployment and servicing of distributed applications |
CN105208095A (en) * | 2015-08-24 | 2015-12-30 | 用友网络科技股份有限公司 | Filtering service deployment recommendation device and method |
CN108769124A (en) * | 2018-04-28 | 2018-11-06 | Oppo广东移动通信有限公司 | Application dispositions method, device, server and the storage medium of PaaS platform |
CN110881059A (en) * | 2019-10-12 | 2020-03-13 | 平安银行股份有限公司 | Application deployment system and method, release engine and computer equipment |
CN112363820A (en) * | 2020-12-01 | 2021-02-12 | 成都精灵云科技有限公司 | Uniform resource pooling container scheduling engine based on heterogeneous hardware and scheduling method thereof |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115150291A (en) * | 2022-07-05 | 2022-10-04 | 中国银行股份有限公司 | Operation and maintenance system and method based on event driving |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220179682A1 (en) | Task processing method, apparatus, and system based on distributed system | |
CN110572436B (en) | Multi-place cross-cluster server deployment method and system | |
JP6968903B2 (en) | Backup and restore framework for distributed computing systems | |
US8104043B2 (en) | System and method for dynamic cooperative distributed execution of computer tasks without a centralized controller | |
US8151277B2 (en) | Method and system for dynamic remote injection of in-process agents into virtual machine based applications | |
US10402302B1 (en) | Reproduction of testing scenarios in a continuous integration environment | |
CN109298868B (en) | Intelligent dynamic deployment and uninstallation method for mapping image data processing software | |
US8914329B1 (en) | Automated time-based testing method for distributed system | |
US9043781B2 (en) | Algorithm for automated enterprise deployments | |
US10248703B2 (en) | System and method for cluster-wide replication of embedded component configuration | |
WO2015062217A1 (en) | Connection processing method and device for peripheral in virtual desktop system | |
EP3230865B1 (en) | Recovery execution system using programatic generation of actionable workflows | |
CN111651352A (en) | Warehouse code merging method and device | |
CN106951357A (en) | A kind of server end application issue monitoring method and device based on finger daemon | |
CN112000567A (en) | Regulation and control software test service method based on cloud platform | |
US7085853B2 (en) | System and method for a distributed shell in a java environment | |
EP3683675A1 (en) | System, apparatus and method of integrated deployment | |
CN114443295A (en) | Heterogeneous cloud resource management scheduling method, device and system | |
CN108241545B (en) | Debugging method and device for system fault | |
CN113204352A (en) | Application deployment method, target server, scheduling engine and distributed system | |
CN110618884A (en) | Fault monitoring method, virtualized network function module manager and storage medium | |
CN117215635B (en) | Task processing method, device and storage medium | |
KR101191985B1 (en) | Computer Job Log management system and The method to Automate for PCBANG | |
CN111104130A (en) | Program installation method and device | |
WO2013183249A1 (en) | Deployment device and deployment method |
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 |