Microservice management method and device

By parsing configuration files and directly deploying microservices on the target server, avoiding pre-installation of agents, solving the problems of microservice deployment complexity and resource consumption, and achieving efficient and flexible deployment management.

CN113741919BActive Publication Date: 2024-11-19BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111098827.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-11-19
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

The complexity of microservice deployment is increased, and agents are required to be installed in advance, resulting in high consumption of upgrade and maintenance resources and low deployment efficiency, especially in multi-server environments.

Method used

By parsing pre-set configuration files, determining module deployment information, and sending target deployment packages to target deployment servers, deploying based on module deployment information, avoiding pre-installation of agents on target servers, realizing password-free connections and personalized configurations. The control module starts and stops and monitors the operating status.

Benefits of technology

Reduces resource consumption, improves deployment efficiency and speed, supports elastic scaling deployment, reduces agent maintenance costs, and improves the flexibility and efficiency of deployment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113741919B_ABST
    Figure CN113741919B_ABST
Patent Text Reader

Abstract

The present invention discloses a microservice management method and device, which can be applied to a deployment management node, determine at least one module deployment information from a configuration file, determine one module deployment information as the current target module deployment information, send a target deployment package to a target deployment directory of at least one target deployment server, instruct each target deployment server to deploy a target microservice module, return to execute the step of determining one module deployment information as the current target module deployment information, until the microservice module deployment processing related to each module deployment information is completed. The present invention can send a target microservice module to the target deployment server based on the module deployment information by connecting to the target deployment server, instruct the target deployment server to deploy the target microservice module, without installing an agent program on the target deployment server, avoiding a large amount of resource consumption caused by the need to maintain and upgrade the agent program, and effectively reducing resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a microservice management method and device. Background Art

[0002] With the development of computer technology, the ability to develop and deploy applications continues to improve.

[0003] Currently, the access pressure of applications is increasing, and more and more applications are developed by adopting the microservice architecture, that is, splitting the monolithic application into multiple loosely coupled smaller microservice modules. This also makes the deployment complexity of applications increase dramatically.

[0004] Specifically, in the past, monolithic applications could be deployed through the Web container console, but microservice deployment faces many problems, such as a large number of deployment modules, complex parameter configuration, and a large number of target servers that need to be deployed. Currently, most of the commonly used microservice deployment methods in the industry require the installation of an agent program on the target server before deployment.

[0005] However, the agent program needs to be upgraded and maintained. When the number of target servers that need to deploy microservices is large, the resources required to upgrade and maintain the agent program are high. Summary of the invention

[0006] In view of the above problems, the present invention provides a microservice management method and device that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:

[0007] A microservice management method is applied to a deployment management node, the method comprising:

[0008] Parse a preset configuration file, and determine at least one module deployment information from the configuration file, wherein the configuration file pre-stores each module deployment information, and each module deployment information stores a microservice module name, at least one target deployment IP address, and a target deployment path;

[0009] Determine a piece of the module deployment information as current target module deployment information;

[0010] Send the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each of the target deployment servers is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information;

[0011] Respectively instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package in the target deployment directory;

[0012] Return to the step of determining a piece of the module deployment information as the current target module deployment information until the microservice module deployment processing related to each of the module deployment information is completed.

[0013] Optionally, the method further includes:

[0014] Based on the secure shell (SSH) protocol, a password-free connection is established with the target deployment server.

[0015] Optionally, each of the module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path and personalized configuration information;

[0016] The sending of the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node includes:

[0017] Sending the target deployment package and the personalized configuration information to a target deployment directory of at least one target deployment server connected to the deployment management node;

[0018] The respectively instructing each of the target deployment servers to deploy the target microservice module based on the target deployment package in the target deployment directory includes:

[0019] Instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package and the personalized configuration information in the target deployment directory.

[0020] Optionally, each of the module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path, and a module start and stop script;

[0021] The sending of the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node includes:

[0022] Sending the target deployment package and the module start and stop script to the target deployment directory of at least one target deployment server connected to the deployment management node;

[0023] The method further comprises:

[0024] In the target deployment server, the module start-stop script is used to control the deployed target microservice module to start or stop running.

[0025] Optionally, the method further includes:

[0026] In the process management list of the target deployment server, check whether the microservice module name and process identifier of the target microservice module exist correspondingly to determine whether the target microservice module is started successfully.

[0027] Optionally, the method further includes:

[0028] Collecting microservice module operation logs from each of the target deployment servers respectively;

[0029] Through the microservice module operation log, monitor whether the operation status of the corresponding target microservice module is normal.

[0030] A microservice management device is applied to a deployment management node, the device comprising: a first determination unit, a second determination unit, a sending unit, an instruction unit and a triggering unit, wherein:

[0031] The first determination unit is configured to execute: parsing a preset configuration file, determining at least one module deployment information from the configuration file, wherein the configuration file pre-stores each module deployment information, and each module deployment information stores a microservice module name, at least one target deployment IP address, and a target deployment path;

[0032] The second determining unit is configured to execute: determining a piece of the module deployment information as current target module deployment information;

[0033] The sending unit is configured to execute: sending the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each of the target deployment servers is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information;

[0034] The instruction unit is configured to execute: respectively instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package in the target deployment directory;

[0035] The triggering unit is configured to execute: triggering the second determining unit until the microservice module deployment processing related to each module deployment information is completed.

[0036] Optionally, the device further comprises: a password-free connection unit;

[0037] The password-free connection unit is configured to perform: based on the secure shell (SSH) protocol, to establish a password-free connection with the target deployment server.

[0038] Optionally, each of the module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path and personalized configuration information;

[0039] The sending unit is configured to execute: sending the target deployment package and the personalized configuration information to a target deployment directory of at least one target deployment server connected to the deployment management node;

[0040] The instruction unit is configured to execute: respectively instructing each of the target deployment servers to deploy the target microservice module based on the target deployment package and the personalized configuration information in the target deployment directory.

[0041] Optionally, each of the module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path, and a module start and stop script;

[0042] The sending unit is configured to execute: sending the target deployment package and the module start and stop script to a target deployment directory of at least one target deployment server connected to the deployment management node;

[0043] The device further comprises: a control unit;

[0044] The control unit is configured to execute: in the target deployment server, controlling the deployed target microservice module to start or stop running through the module start and stop script.

[0045] Optionally, the device further comprises: an inspection unit;

[0046] The checking unit is configured to execute: in the process management list of the target deployment server, checking whether the microservice module name and process identifier of the target microservice module exist correspondingly, so as to determine whether the target microservice module is started successfully.

[0047] Optionally, the device further includes: a collection unit and a monitoring unit;

[0048] The collection unit is configured to perform: collecting microservice module operation logs from each of the target deployment servers respectively;

[0049] The monitoring unit is configured to execute: monitoring whether the operation status of the corresponding target microservice module is normal through the microservice module operation log.

[0050] The microservice management method and device proposed in this embodiment can be applied to a deployment management node, parse a pre-set configuration file, determine at least one module deployment information from the configuration file, the configuration file pre-stores each module deployment information, each module deployment information correspondingly stores a microservice module name, at least one target deployment IP address and a target deployment path, determine one module deployment information as the current target module deployment information, and send the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each target deployment server is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information, and instruct each target deployment server to deploy the target microservice module based on the target deployment package under the target deployment directory, and return to execute the step of determining one module deployment information as the current target module deployment information until the microservice module deployment processing related to each module deployment information is completed.

[0051] The present invention can connect to the target deployment server, send the target microservice module to the target deployment server based on the module deployment information, and instruct the target deployment server to deploy the target microservice module without pre-installing the agent program on the target deployment server, thereby avoiding the situation where a large amount of resources need to be consumed due to maintenance and upgrading of the agent program, and can effectively reduce resource consumption.

[0052] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0054] Figure 1 A flowchart of a first microservice management method provided by an embodiment of the present invention is shown;

[0055] Figure 2 A flowchart of a second microservice management method provided by an embodiment of the present invention is shown;

[0056] Figure 3 A schematic diagram of the structure of a first microservice management device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0057] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0058] like Figure 1 As shown, this embodiment proposes a first microservice management method, which can be applied to a deployment management node. The method may include the following steps:

[0059] S101. Parse a preset configuration file, and determine at least one module deployment information from the configuration file. The configuration file stores the module deployment information in advance, and each module deployment information stores a microservice module name, at least one target deployment IP address, and a target deployment path.

[0060] The deployment management node may be an electronic device used for deployment management, such as a mobile phone, a tablet computer, or a desktop computer, and the present invention does not limit the specific device type of the electronic device.

[0061] The target deployment IP address may be the IP address of the target deployment server where the target microservice module needs to be deployed.

[0062] The target deployment server may be a server on which the target microservice module needs to be deployed.

[0063] The target deployment path may be a deployment path of the target microservice module in the target deployment server.

[0064] Specifically, the module deployment information may be created in advance by a technician according to the microservice module name, the target deployment IP address, and the target deployment path of the target microservice module.

[0065] It should be noted that the configuration file can be created in advance by a technician. In the present invention, the technician can save the created module deployment information to the created configuration file, or add the module deployment information to the created configuration file.

[0066] Among them, each module deployment information can record the information that the target microservice module needs to be deployed in the target deployment server. For example, in the first module deployment information, the first microservice module name, the first target deployment IP address, the second target deployment IP address and the first target deployment path can be saved accordingly. At this time, the first module deployment information can indicate that the first target microservice module corresponding to the first microservice module name can be deployed in the first target deployment server corresponding to the first target deployment IP address according to the first target deployment path, or can be deployed in the second target deployment server corresponding to the second target deployment IP address according to the first target deployment path.

[0067] Optionally, when creating module deployment information, the present invention can use a custom separator to distinguish different types of information in the module deployment information. When parsing the module deployment information, the present invention can identify, segment and extract different types of information according to the custom separator.

[0068] It is understandable that in different module deployment information, the microservice module name, the target deployment IP address and / or the target deployment path may be the same.

[0069] Specifically, when an application is split into N microservice modules and needs to be deployed to M target deployment servers, the present invention can create N module deployment information, and the microservice module name in each module deployment information can be the module name of a microservice module among the above-mentioned N microservice modules (one of the above-mentioned N microservice modules can be used as the target microservice module), and the microservice module name in each module deployment information is different, and the target deployment IP address in the N module deployment information can include the IP addresses of the M target deployment servers, and the target deployment paths in the N module deployment information can be the same.

[0070] Optionally, the module deployment information may also store relevant information such as version information of the target microservice module.

[0071] S102, determining a piece of module deployment information as current target module deployment information;

[0072] It should be noted that the present invention can execute the deployment task of the relevant target microservice module in the target deployment server based on each module deployment information respectively.

[0073] Specifically, the present invention can sequentially determine each piece of module deployment information as target module deployment information, and execute the deployment task of the relevant target microservice module in the target deployment server according to the target module deployment information.

[0074] S103, sending the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each target deployment server is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information;

[0075] The deployment management node may store the target deployment package in advance.

[0076] It should be noted that the present invention can implement deployment processing of relevant target microservice modules in the target deployment server based on various module deployment information.

[0077] Specifically, the present invention can respectively determine each module deployment information as the current target module deployment information, perform deployment processing on the relevant target microservice module according to the target module deployment information, and send the target deployment package corresponding to the microservice module name recorded in the target module deployment information to the target deployment location in the target deployment server corresponding to the target deployment IP address.

[0078] Optionally, the present invention may first connect to the target deployment server before sending the target deployment package to the target deployment server.

[0079] Optionally, the above method may further include:

[0080] Based on the Secure Shell (SSH) protocol, a password-free connection is established with the target deployment server.

[0081] Specifically, the present invention can establish a password-free connection with the target deployment server through the SSH protocol in advance, and then send the target deployment package of the target microservice module to the target deployment server.

[0082] Optionally, the target deployment package may be a jar package or other types of packages, which is not limited in the present invention.

[0083] S104, instructing each target deployment server to deploy a target microservice module based on a target deployment package in a target deployment directory;

[0084] Specifically, after sending the target deployment package to the target deployment directory of each target deployment server, the present invention can instruct each target deployment server to start the target deployment package under the target deployment directory and deploy the target deployment package, thereby realizing the deployment of the target microservice module by each target deployment server. For example, when the target deployment server includes a first target deployment server and a second target deployment server, the present invention can first instruct the first target deployment server to start the target deployment package under the target deployment directory and deploy the target deployment package after sending the target deployment package to the first target deployment server and the second target deployment server, thereby realizing the deployment of the target microservice module by the first target deployment server, and then instruct the second target deployment server to start the target deployment package under the target deployment directory and deploy the target deployment package, thereby realizing the deployment of the target microservice module by the second target deployment server.

[0085] Specifically, when the target microservice module is a Java process for implementing a certain type of function, the target deployment package can be a corresponding jar package. At this time, the present invention can send the jar package to the target deployment directory of the target deployment server, and then start the jar package through the corresponding command to generate a Java process to implement the deployment of the target microservice module on the target deployment server.

[0086] It should be noted that the present invention generates temporary files during the process of processing (such as starting) the jar package. Optionally, when the target deployment package is a jar package, the present invention can instruct each target deployment server to create a working directory under the specified path after connecting to each target deployment server, as a transfer place for storing temporary files in the subsequent process of processing (such as starting) the jar package.

[0087] S105. Return to the step of determining a piece of module deployment information as the current target module deployment information until the microservice module deployment processing related to each module deployment information is completed.

[0088] Specifically, after executing the target microservice module deployment task corresponding to one module deployment information, the present invention can return to step S102, determine another module deployment information in the configuration file as the current target module deployment information, and then execute the deployment task of the relevant target microservice module corresponding to the target module deployment information. And so on, until the deployment tasks of the relevant target microservice modules corresponding to all module deployment information in the configuration file are completed.

[0089] It can be understood that the present invention can distribute the target deployment package of the target microservice module to each target deployment server by pre-saving the target deployment package, configuration module deployment information and connecting to the target deployment server on the deployment management node, thereby realizing the deployment of the target microservice module on each target deployment server, realizing one configuration (i.e., the deployment management node) and taking effect everywhere (i.e., each target deployment server), which is beneficial to improving deployment efficiency.

[0090] It should be noted that the present invention can connect to the target deployment server, send the target microservice module to the target deployment server based on the module deployment information, and instruct the target deployment server to deploy the target microservice module without pre-installing the agent program on the target deployment server, thereby avoiding the situation where a large amount of resources need to be consumed due to maintenance and upgrading of the agent program, and can effectively reduce resource consumption.

[0091] It should be noted that, in the prior art, when a new target deployment server is needed, an agent program must be deployed on the target deployment server in advance. At this time, when a large number of target deployment servers need to be added, the deployment speed of the prior art will be significantly reduced, and the deployment efficiency will also be significantly reduced. However, when a new target deployment server needs to be added, the present invention can be achieved by setting it in the corresponding existing module deployment information. When a large number of new target deployment servers need to be added, the present invention has a significant improvement in deployment speed and efficiency compared to the prior art, and can effectively realize elastic scalable deployment.

[0092] The microservice management method proposed in this embodiment can be applied to a deployment management node, parse a pre-set configuration file, determine at least one module deployment information from the configuration file, the configuration file pre-stores each module deployment information, each module deployment information correspondingly stores a microservice module name, at least one target deployment IP address and a target deployment path, determine one module deployment information as the current target module deployment information, and send the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each target deployment server is a server corresponding to each target deployment IP address in the target module deployment information, the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information, instruct each target deployment server to deploy the target microservice module based on the target deployment package under the target deployment directory, and return to execute the step of determining one module deployment information as the current target module deployment information until the microservice module deployment processing related to each module deployment information is completed. The present invention can connect to the target deployment server, send the target microservice module to the target deployment server based on the module deployment information, and instruct the target deployment server to deploy the target microservice module without pre-installing the agent program on the target deployment server, thereby avoiding the situation where a large amount of resources need to be consumed due to maintenance and upgrading of the agent program, and can effectively reduce resource consumption.

[0093] based on Figure 1 The steps shown are as follows: Figure 2 As shown, this embodiment proposes a second microservice management method. In this method, each module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path and personalized configuration information; step 103 can be step S201, and step S104 can be step S202. Among them:

[0094] S201, sending the target deployment package and personalized configuration information to a target deployment directory of at least one target deployment server connected to the deployment management node;

[0095] It should be noted that in order to prevent developers from mistakenly bringing the configuration information of the test environment into the actual production environment during the development process, the present invention can allow technicians to extract the configuration information that needs to be externalized for the target microservice module from the target deployment package in advance, such as the database IP, user name and password that the target microservice module needs to connect to, and then the technicians use the actual production environment parameters or custom startup parameters to replace the parameter values ​​in the configuration information.

[0096] Optionally, when the target microservice module includes multiple Java processes, the personalized configuration information can be startup parameters for the multiple processes.

[0097] Specifically, the present invention can push the target deployment package and the personalized configuration information to the target deployment server together.

[0098] S202: Instruct each target deployment server to deploy a target microservice module based on the target deployment package and personalized configuration information in the target deployment directory.

[0099] Specifically, the present invention utilizes the target deployment package and personalized configuration information to implement personalized deployment of the target microservice module on the target deployment server.

[0100] The microservice management method proposed in this embodiment can push the target deployment package and personalized configuration information to the target deployment server together, and use the target deployment package and personalized configuration information to achieve personalized deployment of the target microservice module on the target deployment server.

[0101] based on Figure 1 The steps shown in this embodiment propose a third microservice management method. In this method, each module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path, and a module start and stop script; in this case, step S103 may be step S301, and the method may further include step S302. Among them:

[0102] S301, sending the target deployment package and the module start and stop script to the target deployment directory of at least one target deployment server connected to the deployment management node;

[0103] It should be noted that the present invention can pre-set a remote management module. After sending the target deployment package and the module startup script to the target deployment server, the pre-set remote management module can be used to remotely manage the target microservice module to achieve one-to-many management.

[0104] S302: In the target deployment server, the deployed target microservice module is started or stopped by controlling the module start and stop script.

[0105] Specifically, the present invention can control the deployment of a target microservice module to start, restart or stop running by calling a module startup script through a remote management module.

[0106] Specifically, the present invention can monitor the operating status of the target microservice module and determine whether the target microservice module is successfully deployed during the process of controlling the target microservice module to start, restart or stop running.

[0107] Optionally, the third microservice management method may also include:

[0108] In the process management list of the target deployment server, check whether the microservice module name and process identifier of the target microservice module exist to determine whether the target microservice module is started successfully.

[0109] Specifically, after instructing the target deployment server to deploy the target microservice module, the present invention can determine whether the target microservice module is successfully started by searching the process management list of the target deployment server for the microservice module name and process identifier corresponding to the target microservice module, thereby determining whether the target microservice module is successfully deployed.

[0110] Optionally, the third microservice management method may also include:

[0111] Collect the microservice module operation logs from each target deployment server respectively;

[0112] Monitor the running status of the corresponding target microservice module through the microservice module operation log to see whether it is normal.

[0113] The target microservice module operation log may be a log recording the operation process of the target microservice module.

[0114] Specifically, after the target microservice module on the target deployment server is deployed, the present invention can collect the microservice module operation log from the target deployment server, use the log keyword regular matching to obtain the key node information in the target microservice module operation process, and determine the operation state of the target microservice module according to the key node information, thereby determining whether the target microservice module can operate normally, and realizing the operation monitoring of the target microservice module. When it is determined that the operation process of the target microservice module is abnormal, the present invention can output an alarm to remind the staff to perform relevant inspections and maintenance work.

[0115] The microservice management method proposed in this embodiment can pre-set a remote management module. After sending the target deployment package and the module startup script to the target deployment server, the pre-set remote management module can be used to remotely manage the target microservice module to achieve one-to-many management.

[0116] based on Figure 1 The steps shown are as follows: Figure 3 As shown, this embodiment proposes a first microservice management device, which can be applied to a deployment management node. The device may include: a first determination unit 101, a second determination unit 102, a sending unit 103, an instruction unit 104 and a triggering unit 105, wherein:

[0117] The first determining unit 101 is configured to execute: parsing a preset configuration file, determining at least one module deployment information from the configuration file, wherein the configuration file pre-stores each module deployment information, and each module deployment information stores a microservice module name, at least one target deployment IP address, and a target deployment path;

[0118] The deployment management node may be an electronic device used for deployment management, such as a mobile phone, a tablet computer, or a desktop computer, and the present invention does not limit the specific device type of the electronic device.

[0119] The target deployment IP address may be the IP address of the target deployment server where the target microservice module needs to be deployed.

[0120] The target deployment server may be a server on which the target microservice module needs to be deployed.

[0121] The target deployment path may be a deployment path of the target microservice module in the target deployment server.

[0122] Specifically, the module deployment information may be created in advance by a technician according to the microservice module name, the target deployment IP address, and the target deployment path of the target microservice module.

[0123] It should be noted that the configuration file can be created in advance by a technician. In the present invention, the technician can save the created module deployment information to the created configuration file, or add the module deployment information to the created configuration file.

[0124] Each piece of module deployment information may record information that a target microservice module needs to be deployed in a target deployment server.

[0125] Optionally, when creating module deployment information, the present invention can use a custom separator to distinguish different types of information in the module deployment information. When parsing the module deployment information, the present invention can identify, segment and extract different types of information according to the custom separator.

[0126] It is understandable that in different module deployment information, the microservice module name, the target deployment IP address and / or the target deployment path may be the same.

[0127] Specifically, when an application is split into N microservice modules and needs to be deployed to M target deployment servers, the present invention can create N module deployment information, and the microservice module name in each module deployment information can be the module name of a microservice module among the above-mentioned N microservice modules (one of the above-mentioned N microservice modules can be used as the target microservice module), and the microservice module name in each module deployment information is different, and the target deployment IP address in the N module deployment information can include the IP addresses of the M target deployment servers, and the target deployment paths in the N module deployment information can be the same.

[0128] Optionally, the module deployment information may also store relevant information such as version information of the target microservice module.

[0129] The second determining unit 102 is configured to execute: determining a piece of module deployment information as current target module deployment information;

[0130] It should be noted that the present invention can execute the deployment task of the relevant target microservice module in the target deployment server based on each module deployment information respectively.

[0131] Specifically, the present invention can sequentially determine each piece of module deployment information as target module deployment information, and execute the deployment task of the relevant target microservice module in the target deployment server according to the target module deployment information.

[0132] The sending unit 103 is configured to execute: sending the target deployment package to the target deployment directory of at least one target deployment server connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each target deployment server is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information;

[0133] The deployment management node may store the target deployment package in advance.

[0134] It should be noted that the present invention can implement deployment processing of relevant target microservice modules in the target deployment server based on various module deployment information.

[0135] Specifically, the present invention can respectively determine each module deployment information as the current target module deployment information, perform deployment processing on the relevant target microservice module according to the target module deployment information, and send the target deployment package corresponding to the microservice module name recorded in the target module deployment information to the target deployment location in the target deployment server corresponding to the target deployment IP address.

[0136] Optionally, the present invention may first connect to the target deployment server before sending the target deployment package to the target deployment server.

[0137] Optionally, the above device further comprises: a password-free connection unit;

[0138] The password-free connection unit is configured to perform: a password-free connection with a target deployment server based on a secure shell (SSH) protocol.

[0139] Specifically, the present invention can establish a password-free connection with the target deployment server through the SSH protocol in advance, and then send the target deployment package of the target microservice module to the target deployment server.

[0140] Optionally, the target deployment package may be a jar package or other types of packages, which is not limited in the present invention.

[0141] The instruction unit 104 is configured to execute: respectively instruct each target deployment server to deploy a target microservice module based on a target deployment package in a target deployment directory;

[0142] Specifically, after sending the target deployment package to the target deployment directory of each target deployment server, the present invention can instruct each target deployment server to start the target deployment package under the target deployment directory and deploy the target deployment package, thereby realizing the deployment of the target microservice module by each target deployment server.

[0143] Specifically, when the target microservice module is a Java process for implementing a certain type of function, the target deployment package can be a corresponding jar package. At this time, the present invention can send the jar package to the target deployment directory of the target deployment server, and then start the jar package through the corresponding command to generate a Java process to implement the deployment of the target microservice module on the target deployment server.

[0144] It should be noted that the present invention generates temporary files during the process of processing (such as starting) the jar package. Optionally, when the target deployment package is a jar package, the present invention can instruct each target deployment server to create a working directory under the specified path after connecting to each target deployment server, as a transfer place for storing temporary files in the subsequent process of processing (such as starting) the jar package.

[0145] The triggering unit 105 is configured to execute: triggering the second determining unit 102 until the microservice module deployment processing related to each module deployment information is completed.

[0146] Specifically, the present invention can trigger the second determination unit 102 after executing the target microservice module deployment task corresponding to one module deployment information, determine another module deployment information in the configuration file as the current target module deployment information, and then execute the deployment task of the relevant target microservice module corresponding to the target module deployment information. And so on, until the deployment tasks of the relevant target microservice modules corresponding to all module deployment information in the configuration file are completed.

[0147] It can be understood that the present invention can distribute the target deployment package of the target microservice module to each target deployment server by pre-saving the target deployment package, configuration module deployment information and connecting to the target deployment server on the deployment management node, thereby realizing the deployment of the target microservice module on each target deployment server, realizing one configuration (i.e., the deployment management node) and taking effect everywhere (i.e., each target deployment server), which is beneficial to improving deployment efficiency.

[0148] It should be noted that the present invention can connect to the target deployment server, send the target microservice module to the target deployment server based on the module deployment information, and instruct the target deployment server to deploy the target microservice module without pre-installing the agent program on the target deployment server, thereby avoiding the situation where a large amount of resources need to be consumed due to maintenance and upgrading of the agent program, and can effectively reduce resource consumption.

[0149] It should be noted that, in the prior art, when a new target deployment server is needed, an agent program must be deployed on the target deployment server in advance. At this time, when a large number of target deployment servers need to be added, the deployment speed of the prior art will be significantly reduced, and the deployment efficiency will also be significantly reduced. However, when a new target deployment server needs to be added, the present invention can be achieved by setting it in the corresponding existing module deployment information. When a large number of new target deployment servers need to be added, the present invention has a significant improvement in deployment speed and efficiency compared to the prior art, and can effectively realize elastic scalable deployment.

[0150] The microservice management device proposed in this embodiment can connect to the target deployment server, send the target microservice module to the target deployment server based on the module deployment information, and instruct the target deployment server to deploy the target microservice module without pre-installing the agent program on the target deployment server, thereby avoiding the situation where a large amount of resources are consumed due to maintenance and upgrading of the agent program, and can effectively reduce resource consumption.

[0151] based on Figure 3 As shown, this embodiment proposes a second microservice management device. In the device, each module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path and personalized configuration information;

[0152] The sending unit 103 is configured to execute: sending the target deployment package and the personalized configuration information to a target deployment directory of at least one target deployment server connected to the deployment management node;

[0153] It should be noted that in order to prevent developers from mistakenly bringing the configuration information of the test environment into the actual production environment during the development process, the present invention can allow technicians to extract the configuration information that needs to be externalized for the target microservice module from the target deployment package in advance, such as the database IP, user name and password that the target microservice module needs to connect to, and then the technicians use the actual production environment parameters or custom startup parameters to replace the parameter values ​​in the configuration information.

[0154] Optionally, when the target microservice module includes multiple Java processes, the personalized configuration information can be startup parameters for the multiple processes.

[0155] Specifically, the present invention can push the target deployment package and the personalized configuration information to the target deployment server together.

[0156] The instruction unit 104 is configured to execute: instructing each target deployment server to deploy a target microservice module based on the target deployment package and the personalized configuration information in the target deployment directory.

[0157] Specifically, the present invention utilizes the target deployment package and personalized configuration information to implement personalized deployment of the target microservice module on the target deployment server.

[0158] The microservice management device proposed in this embodiment can push the target deployment package and personalized configuration information to the target deployment server, and use the target deployment package and personalized configuration information to achieve personalized deployment of the target microservice module on the target deployment server.

[0159] based on Figure 3 This embodiment proposes a third microservice management device. In the device, each module deployment information stores a microservice module name, at least one target deployment IP address, a target deployment path, and a module start / stop script. At this time, the sending unit 103 is configured to execute: sending the target deployment package and the module start / stop script to the target deployment directory of at least one target deployment server connected to the deployment management node;

[0160] It should be noted that the present invention can pre-set a remote management module. After sending the target deployment package and the module startup script to the target deployment server, the pre-set remote management module can be used to remotely manage the target microservice module to achieve one-to-many management.

[0161] At this time, the above device may further include: a control unit;

[0162] The control unit is configured to execute: in the target deployment server, controlling the start or stop operation of the deployed target microservice module through the module start and stop script.

[0163] Specifically, the present invention can control the deployment of a target microservice module to start, restart or stop running by calling a module startup script through a remote management module.

[0164] Specifically, the present invention can monitor the operating status of the target microservice module and determine whether the target microservice module is successfully deployed during the process of controlling the target microservice module to start, restart or stop running.

[0165] Optionally, the third microservice management device may further include: an inspection unit;

[0166] The checking unit is configured to execute: in the process management list of the target deployment server, check whether the microservice module name and process identifier of the target microservice module exist correspondingly, so as to determine whether the target microservice module is started successfully.

[0167] Specifically, after instructing the target deployment server to deploy the target microservice module, the present invention can determine whether the target microservice module is successfully started by searching the process management list of the target deployment server for the microservice module name and process identifier corresponding to the target microservice module, thereby determining whether the target microservice module is successfully deployed.

[0168] Optionally, the third microservice management device may further include: a collection unit and a monitoring unit;

[0169] The collection unit is configured to execute: collecting the microservice module operation log from each target deployment server respectively;

[0170] The monitoring unit is configured to execute: monitoring whether the running status of the corresponding target microservice module is normal through the microservice module running log.

[0171] The target microservice module operation log may be a log recording the operation process of the target microservice module.

[0172] Specifically, after the target microservice module on the target deployment server is deployed, the present invention can collect the microservice module operation log from the target deployment server, use the log keyword regular matching to obtain the key node information in the target microservice module operation process, and determine the operation state of the target microservice module according to the key node information, thereby determining whether the target microservice module can operate normally, and realizing the operation monitoring of the target microservice module. When it is determined that the operation process of the target microservice module is abnormal, the present invention can output an alarm to remind the staff to perform relevant inspections and maintenance work.

[0173] The microservice management device proposed in this embodiment can pre-set a remote management module. After sending the target deployment package and the module startup script to the target deployment server, the pre-set remote management module can be used to remotely manage the target microservice module to achieve one-to-many management.

[0174] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0175] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A microservice management method, It is characterized in that Applied to deploying a management node, the method includes: Parse a preset configuration file, and determine at least one module deployment information from the configuration file, wherein the configuration file pre-stores each module deployment information, and each module deployment information stores a microservice module name, at least one target deployment IP address and a target deployment path, as well as personalized configuration information or a module start and stop script; Determine a piece of the module deployment information as current target module deployment information; In the case where the module deployment information includes the personalized configuration information, sending the target deployment package and the personalized configuration information to a target deployment directory of at least one target deployment server connected to the deployment management node; Respectively instruct each of the target deployment servers to deploy a target microservice module based on the target deployment package and the personalized configuration information in the target deployment directory; In the case where the module deployment information includes the module start and stop script, sending the target deployment package and the module start and stop script to a target deployment directory of at least one target deployment server connected to the deployment management node; Respectively instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package in the target deployment directory; Return to the step of determining a piece of the module deployment information as the current target module deployment information until the microservice module deployment processing related to each of the module deployment information is completed; Among them, the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each of the target deployment servers is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information.

2. The method according to claim 1, It is characterized in that The method further comprises: Based on the secure shell (SSH) protocol, a password-free connection is established with the target deployment server.

3. The method according to claim 1, It is characterized in that In the case where the module deployment information includes the module start and stop script, the method further includes: In the target deployment server, the module start-stop script is used to control the deployed target microservice module to start or stop running.

4. The method according to claim 1, It is characterized in that In the case where the module deployment information includes the module start and stop script, the method further includes: In the process management list of the target deployment server, check whether the microservice module name and process identifier of the target microservice module exist correspondingly to determine whether the target microservice module is started successfully.

5. The method according to claim 1, It is characterized in that In the case where the module deployment information includes the module start and stop script, the method further includes: Collecting microservice module operation logs from each of the target deployment servers respectively; Through the microservice module operation log, monitor whether the operation status of the corresponding target microservice module is normal.

6. A microservice management device, It is characterized in that Applied to a deployment management node, the device comprises: a first determining unit, a second determining unit, a sending unit, an instruction unit and a triggering unit, wherein: The first determination unit is configured to execute: parsing a preset configuration file, determining at least one module deployment information from the configuration file, wherein the configuration file pre-stores each module deployment information, each module deployment information correspondingly stores a microservice module name, at least one target deployment IP address and a target deployment path, as well as personalized configuration information or a module start and stop script; The second determining unit is configured to execute: determining a piece of the module deployment information as current target module deployment information; The sending unit is configured to execute: when the module deployment information includes the personalized configuration information, sending the target deployment package and the personalized configuration information to the target deployment directory of at least one target deployment server that is connected to the deployment management node; and when the module deployment information includes the module start and stop script, sending the target deployment package and the module start and stop script to the target deployment directory of at least one target deployment server that is connected to the deployment management node; wherein the target deployment package is the deployment package of the target microservice module corresponding to the microservice module name in the target module deployment information, each of the target deployment servers is a server corresponding to each target deployment IP address in the target module deployment information, and the target deployment directory is a directory corresponding to the target deployment path in the target module deployment information; The instruction unit is configured to execute: when the module deployment information includes the personalized configuration information, instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package and the personalized configuration information in the target deployment directory; and when the module deployment information includes the module start and stop script, instruct each of the target deployment servers to deploy the target microservice module based on the target deployment package in the target deployment directory; The triggering unit is configured to execute: triggering the second determining unit until the microservice module deployment processing related to each module deployment information is completed.

7. The device according to claim 6, It is characterized in that The device further comprises: a secret-free connection unit; The password-free connection unit is configured to perform: based on the secure shell (SSH) protocol, to establish a password-free connection with the target deployment server.

8. The device according to claim 6, It is characterized in that The device further comprises: a control unit; The control unit is configured to execute: when the module deployment information includes the module start / stop script, in the target deployment server, controlling the deployed target microservice module to start or stop running through the module start / stop script.