Movatterモバイル変換


[0]ホーム

URL:


CN113553075A - Deployment method, deployment system, computer device and storage medium for micro-services - Google Patents

Deployment method, deployment system, computer device and storage medium for micro-services
Download PDF

Info

Publication number
CN113553075A
CN113553075ACN202110860208.0ACN202110860208ACN113553075ACN 113553075 ACN113553075 ACN 113553075ACN 202110860208 ACN202110860208 ACN 202110860208ACN 113553075 ACN113553075 ACN 113553075A
Authority
CN
China
Prior art keywords
deployment
node
micro
service
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110860208.0A
Other languages
Chinese (zh)
Inventor
陈俊
王明怀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ufida Automotive Information Technology Shanghai Co ltd
Original Assignee
Ufida Automotive Information Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ufida Automotive Information Technology Shanghai Co ltdfiledCriticalUfida Automotive Information Technology Shanghai Co ltd
Priority to CN202110860208.0ApriorityCriticalpatent/CN113553075A/en
Publication of CN113553075ApublicationCriticalpatent/CN113553075A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a micro-service deployment method, a micro-service deployment system, computer equipment and a storage medium. The deployment method of the micro-service comprises the following steps: receiving a micro-service deployment instruction; obtaining a source file of the micro service to be deployed; compiling the source file, and submitting the compiled micro-service to a code warehouse corresponding to the server; configuring deployment node information of the micro-service; configuring a publishing node list of the micro service and routing information of any node in the publishing node list; and issuing a micro-service deployment instruction to any node according to the routing information. The deployment method of the micro-service provided by the invention can realize one-key deployment of the micro-service, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.

Description

Deployment method, deployment system, computer device and storage medium for micro-services
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for deploying a microservice, a computer device, and a storage medium.
Background
At present, cloud computing is rapidly developed, and in order to solve the problem of difficult cloud computing deployment, a plurality of automatic deployment methods appear in the related art, and the methods are roughly divided into two types: the combination of scripted installation deployment and various automated operation and maintenance tools. The former is to save the instructions to an executable file in a script operation mode under a manual single instruction input mode, and the executable file is operated when the instructions are deployed. The latter is an upgrade version, and the functions of multi-concurrent operation, instruction error check and the like can be realized by using the existing automatic operation and maintenance tool besides a simple input instruction. But none enable a keyed deployment.
Disclosure of Invention
The invention aims to at least solve the technical problem that the one-key deployment of the micro service cannot be realized in the prior art or the related art.
To this end, a first aspect of the present invention is to provide a method for deploying micro services.
The second aspect of the present invention is to provide a method for deploying micro services.
A third aspect of the present invention is to provide a microservice deployment system.
A fourth aspect of the present invention is to provide a microservice deployment system.
A fifth aspect of the invention is directed to a computer device.
A sixth aspect of the present invention is directed to a storage medium.
In view of this, according to a first aspect of the present invention, a method for deploying micro services is provided, where the method for deploying micro services is used for a server, and includes: receiving a micro-service deployment instruction; obtaining a source file of the micro service to be deployed; compiling the source file, and submitting the compiled micro-service to a code warehouse corresponding to the server; configuring deployment information of the micro-service, wherein the deployment information comprises deployment node information, a release node list and routing information of any node in the release node list; and issuing a micro-service deployment instruction to any node according to the routing information.
The deployment method of the micro-service provided by the invention is used for a server side. And acquiring a source file of the micro service to be deployed by receiving the micro service deployment instruction. Compiling the source file, wherein the compiled micro-service is an executable publishing packet, submitting the compiled micro-service to a code warehouse corresponding to the server, and managing the micro-service by adopting the code warehouse. And meanwhile, configuring deployment node information of the micro-service, wherein the deployment node information comprises at least one deployment node. And configuring a publishing node list according to the micro service and the routing information of each node in the publishing node list. And after the configuration is finished, the micro-service deployment instruction is sent to each node step by step according to the routing information. After each node receives the micro-service deployment instruction, deployment node information of the micro-service to be deployed is obtained from the corresponding superior node, and whether the micro-service needs to be deployed or not is judged according to the deployment node information. And if the micro service needs to be deployed, acquiring corresponding micro service deployment node information according to the routing information, thereby realizing one-key deployment of the micro service. The deployment method of the micro-service provided by the invention can realize one-key deployment of the micro-service, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
The code repository includes, but is not limited to, a GIT/SVN code repository.
The servers may be deployed in a cluster to ensure reliable operation of microservice deployment.
Issuing a micro-service deployment instruction to any node according to the routing information, specifically: any node can acquire a micro-service deployment instruction from a corresponding superior node through a polling mechanism;
specifically, the nodes include a first-level node and other-level nodes, the server may send the micro-service deployment instruction to the first-level node through the notification mechanism, and the other-level nodes acquire the micro-service deployment instruction from the corresponding upper-level node through the polling mechanism.
Specifically, the server and any node can establish communication connection, and sends the microservice deployment instruction to any node. The deployment method of the micro-service according to the present invention may further have the following technical features:
in the above technical solution, the routing information includes first routing information and second routing information.
In the technical scheme, the routing information includes first routing information and second routing information, wherein the second routing information is standby routing information. When the node cannot successfully acquire the relevant instruction and the issue packet of the micro service from the corresponding superior node, the standby route can be started to acquire the relevant instruction and the issue packet. When the server cannot successfully issue the micro-service deployment instruction, the standby route is used for issuing. By the technical scheme, each node can acquire the deployment instruction, the deployment node information and the micro-service deployment package, so that one-key deployment of the micro-service is realized.
According to a second aspect of the present invention, a method for deploying micro services is provided, where the method is used for a node, and the method includes: acquiring a micro-service deployment instruction; acquiring deployment information of the micro-service to be deployed from a superior node corresponding to the node, wherein the deployment information comprises deployment node information, a release node list and routing information corresponding to any node in the release node list; the nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers; judging whether the micro service needs to be deployed or not according to the deployment node information; and when the micro service needs to be deployed, acquiring the corresponding micro service according to the routing information.
The deployment method of the micro-service provided by the invention is used for the nodes, wherein the nodes comprise first-level nodes and other-level nodes, such as second-level nodes and third-level nodes, and the number of the first-level nodes and the number of the other-level nodes can be one, two or more. And acquiring deployment node information of the micro service to be deployed from a superior node corresponding to the node, wherein the deployment node information comprises at least one deployment node, namely a node issued by the micro service. And judging whether the micro service to be deployed needs to be deployed or not according to the deployment node information, and pulling out the corresponding micro service from the code warehouse according to the routing information if the micro service needs to be deployed according to the judgment result. According to the technical scheme, one-key deployment of the micro-services can be realized, so that large-scale and batch automatic operation and maintenance can be realized, the purpose of greatly improving operation and maintenance efficiency is achieved, careless omission and errors caused by artificial deployment are avoided, a uniform management interface is provided, cloud platform management and deployment resource management are unified, and inconvenience caused by a plurality of management platforms is avoided.
The method for acquiring the micro-service deployment instruction specifically comprises the following steps:
the node can acquire a micro-service deployment instruction from a corresponding superior node in a polling mode;
the node can also directly communicate with the control center to receive the micro-service deployment instruction sent by the control center;
the control center can send the micro-service deployment instruction to the first-level node through message sending, and other-level nodes acquire the micro-service deployment instruction from the upper-level node through the polling direction.
In any of the above technical solutions, the step of obtaining deployment information of the microservice to be deployed from a higher node corresponding to the node specifically includes: and acquiring deployment node information from a superior node corresponding to the deployment node according to a preset time interval.
In the technical scheme, because the nodes and the corresponding superior nodes thereof are in unilateral communication, each node is enabled to acquire the deployment node information of the micro-service to be deployed from the corresponding superior node thereof according to the preset time interval, so that any node can be ensured not to miss the release of any micro-service, and the omission and the error in one-key deployment are avoided.
In any of the above technical solutions, the step of determining that the microservice needs to be deployed according to the deployment node information specifically includes: judging whether the identification information of the node is the same as the identification information of any deployment node in the deployment node information; if so, determining that the micro-service needs to be deployed; otherwise, the micro-service is judged not to be required to be deployed.
In the technical scheme, whether the micro service to be deployed needs to be deployed is judged by judging whether the identification information of the node is the same as the identification information of any deployment node in the deployment node information. And if the deployment is determined to be needed, pulling the corresponding micro service from the superior node, and if the deployment is determined not to be needed, no action is needed. Through the technical scheme of the invention, one-key deployment can be realized, and omission and errors caused by manual deployment are avoided.
In any of the above technical solutions, the method for deploying a microservice further includes: the routing information comprises first routing information and second routing information; detecting the node state of a superior node; based on the normal node state, acquiring deployment node information and corresponding micro-services according to the first routing information; and acquiring the deployment node information and the corresponding micro service according to the second routing information based on the node state abnormity.
In the technical scheme, whether a standby route is started or not is judged by detecting the node state of a superior node, if the node state of the superior node is normal, a first route (a route corresponding to first route information) is used for acquiring a related instruction and a corresponding micro service from the superior node, and if the node state is abnormal, a standby route (a route corresponding to second route information) is used for acquiring a related instruction and a distribution packet of the micro service. By the technical scheme, the one-key deployment of the micro-services can be ensured to be successful.
According to a third aspect of the present invention, a deployment system of micro-services is provided, which is used for a server, and the deployment system includes: the receiving unit is used for receiving a micro-service deployment instruction; the acquiring unit is used for acquiring a source file of the micro service to be deployed; the compiling unit is used for compiling the source file and submitting the compiled micro-service to a code warehouse corresponding to the server; the configuration unit is used for configuring the deployment information of the microservice, wherein the deployment information comprises deployment node information, a release node list and routing information corresponding to any node in the release node list; and the issuing unit is used for issuing the micro-service deployment instruction to any node according to the routing information.
The deployment system of the micro-service provided by the invention is used for a server side. The deployment system comprises a receiving unit, an acquisition unit, a compiling unit, a configuration unit and a sending-down unit. The receiving unit receives the micro-service deployment instruction, and the obtaining unit obtains a source file of the micro-service to be deployed. And compiling the source file through a compiling unit, wherein the compiled micro-service is an executable publishing packet, submitting the compiled micro-service to a code warehouse corresponding to the server, and managing the micro-service by adopting the code warehouse. Meanwhile, the configuration unit configures deployment node information of the micro-service, wherein the deployment node information comprises at least one deployment node, and configures a release node list and routing information of each node in the release node list according to the micro-service. After the configuration is completed, the sending unit sends the micro-service deployment instruction to each node step by step according to the routing information. After each node receives the micro-service deployment instruction, deployment node information of the micro-service to be deployed is obtained from the corresponding superior node, and whether the micro-service needs to be deployed or not is judged according to the deployment node information. And if the micro service needs to be deployed, acquiring the corresponding micro service according to the routing information, thereby realizing the one-key deployment of the micro service. The deployment system of the micro-service provided by the invention can realize one-key deployment of the micro-service, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
The code repository includes, but is not limited to, a Git/SVN code repository.
The servers may be deployed in a cluster to ensure reliable operation of microservice deployment.
According to a fourth aspect of the present invention, a deployment system of microservices is provided, which is used for a node, and comprises: the acquisition unit is used for acquiring a micro-service deployment instruction; the acquiring unit is further configured to acquire deployment information of the micro service to be deployed from a higher-level node corresponding to the node, where the deployment information includes deployment node information, a distribution node list, and routing information corresponding to any node in the distribution node list; the deployment nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers; the judging unit is used for judging whether the micro service needs to be deployed or not according to the deployment node information; and the acquisition unit is also used for acquiring the corresponding micro service according to the routing information when the micro service needs to be deployed.
The deployment system of the micro-service provided by the invention is used for nodes, wherein the nodes comprise primary nodes and other primary nodes, such as secondary nodes and tertiary nodes, and the number of the primary nodes and the number of the other primary nodes can be one, two or more. The deployment system comprises an acquisition unit and a judgment unit. The acquisition unit acquires deployment node information of the micro-service to be deployed from a superior node corresponding to the node, wherein the deployment node information includes at least one deployment node. The judging unit judges whether the currently issued micro service needs to be deployed or not according to the deployment node information, and if the judging result is that the micro service needs to be deployed, the corresponding micro service is pulled out from the code warehouse according to the routing information. The deployment system of the micro-services provided by the invention can realize one-key deployment of the micro-services, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
According to a fifth aspect of the present invention, there is provided a computer device comprising: a memory storing a program; and the processor is used for realizing the micro-service deployment method in any one of the technical schemes when executing the program.
In the computer device provided by the present invention, when the processor executes the program, the steps of the method for deploying a microservice according to any one of the above technical solutions are implemented, so that the computer device includes all the beneficial effects of the method for deploying a microservice according to any one of the above technical solutions.
According to a sixth aspect of the present invention, a storage medium is provided, on which a program is stored, which when executed by a processor implements the method for deploying a microservice according to any of the above-mentioned aspects.
The storage medium provided by the present invention, when the program stored thereon is executed by the processor, implements the steps of the method for deploying a microservice according to any of the above technical solutions, and therefore the storage medium includes all the beneficial effects of the method for deploying a microservice according to any of the above technical solutions.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is one of the flow diagrams of a method for deploying microservices according to one embodiment of the invention;
FIG. 2 is a second flowchart of a method for deploying microservice according to an embodiment of the present invention;
FIG. 3 is a third flowchart of a method for deploying microservice according to an embodiment of the present invention;
FIG. 4 is a fourth flowchart of a method for deploying microservice according to an embodiment of the invention;
FIG. 5 is one of the schematic block diagrams of a microservice deployment system of one embodiment of the present invention;
FIG. 6 is a second schematic block diagram of a microservice deployment system of an embodiment of the present invention;
FIG. 7 is a schematic block diagram of a computer apparatus of one embodiment of the invention;
FIG. 8 is one of the overall schematic diagrams of the microservice deployment system of one embodiment of the present invention;
FIG. 9 is a second schematic diagram of the deployment system of microservices in accordance with one embodiment of the invention;
FIG. 10 is a diagram illustrating a method for deploying microservices, in accordance with an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited to the specific embodiments disclosed below.
The first embodiment is as follows:
fig. 1 is one of the flow diagrams of the deployment method of the microservice according to the embodiment of the present invention. The deployment method of the micro service comprises the following steps:
102, receiving a micro-service deployment instruction;
104, acquiring a source file of the micro service to be deployed;
106, compiling the source file, and submitting the compiled micro-service to a code warehouse corresponding to the server;
step 108, configuring deployment information of the micro-service, wherein the deployment information comprises deployment node information, a release node list and routing information of any node in the release node list;
and step 110, sending the micro-service deployment instruction to any node according to the routing information.
The deployment method of the micro-service provided by the embodiment of the invention is used for a server side. And acquiring a source file of the micro service to be deployed by receiving the micro service deployment instruction. Compiling the source file, wherein the compiled micro-service is an executable publishing packet, submitting the compiled micro-service to a code warehouse corresponding to the server, and managing the micro-service by adopting the code warehouse. And meanwhile, configuring deployment node information of the micro-service, wherein the deployment node information comprises at least one deployment node. And configuring a publishing node list according to the micro service and the routing information of each node in the publishing node list. And after the configuration is finished, the micro-service deployment instruction is sent to each node step by step according to the routing information. After each node receives the micro-service deployment instruction, deployment node information of the micro-service to be deployed is obtained from the corresponding superior node, and whether the micro-service needs to be deployed or not is judged according to the deployment node information. And if the micro service needs to be deployed, acquiring corresponding micro service deployment node information according to the routing information, thereby realizing one-key deployment of the micro service. The deployment method of the micro-service provided by the invention can realize one-key deployment of the micro-service, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
The code repository includes, but is not limited to, a Git/SVN code repository.
The servers may be deployed in a cluster to ensure reliable operation of microservice deployment.
Example two:
in the above embodiment, the routing information includes first routing information and second routing information.
In this embodiment, the routing information includes first routing information and second routing information, where the second routing information is standby routing information. When the node cannot successfully acquire the relevant instruction and the issue packet of the micro service from the corresponding superior node, the standby route can be started to acquire the relevant instruction and the issue packet. When the server cannot successfully issue the micro-service deployment instruction, the standby route is used for issuing. By the embodiment of the invention, each node can be ensured to acquire the deployment instruction, the deployment node information and the micro-service deployment package, so that one-key deployment of the micro-service is realized.
Example three:
fig. 2 is a second flowchart of a microservice deployment method according to an embodiment of the present invention. The deployment method of the micro service comprises the following steps:
step 202, acquiring a micro-service deployment instruction;
204, acquiring deployment information of the micro-service to be deployed from a superior node corresponding to the node, wherein the deployment information comprises deployment node information, a distribution node list and routing information corresponding to any node in the distribution node list;
step 206, judging whether the micro service needs to be deployed according to the deployment node information; if yes, go to step 208;
and step 208, acquiring the corresponding micro service according to the routing information.
The nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers.
The deployment method of the micro-service provided by the embodiment of the invention is used for nodes, wherein the nodes comprise first-level nodes and other-level nodes, such as second-level nodes and third-level nodes, and the number of the first-level nodes and the number of the other-level nodes can be one, two or more. And acquiring deployment node information of the micro service to be deployed from a superior node corresponding to the node, wherein the deployment node information comprises at least one deployment node, namely a node issued by the micro service. And judging whether the micro service to be deployed needs to be deployed or not according to the deployment node information, and pulling out the corresponding micro service from the code warehouse according to the routing information if the micro service needs to be deployed according to the judgment result. According to the embodiment of the invention, one-key deployment of micro-services can be realized, so that large-scale and batch automatic operation and maintenance can be realized, the purpose of greatly improving operation and maintenance efficiency is achieved, careless omission and errors caused by artificial deployment are avoided, a uniform management interface is provided, cloud platform management and deployment resource management are unified, and inconvenience caused by a plurality of management platforms is avoided.
Example four:
fig. 3 is a third schematic flowchart of a microservice deployment method according to an embodiment of the present invention. The deployment method of the micro service comprises the following steps:
step 302, acquiring a micro-service deployment instruction;
304, acquiring deployment information to be deployed from a superior node corresponding to the node, wherein the deployment information comprises deployment node information, a distribution node list and routing information corresponding to any node in the distribution node list;
step 306, judging whether the identification information of the node is the same as the identification information of any deployment node in the deployment node information; if yes, go to step 308; otherwise, go to step 310;
step 308, acquiring corresponding micro-services according to the routing information;
step 310, the microservice need not be deployed.
The nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers.
In this embodiment, whether the microservice to be deployed needs to be deployed is determined by determining whether the identification information of the node is the same as the identification information of any deployment node in the deployment node information. And if the deployment is determined to be needed, pulling the corresponding micro service from the superior node, and if the deployment is determined not to be needed, no action is needed. Through the embodiment of the invention, one-key deployment can be realized, and omission and errors caused by manual deployment are avoided.
Example five:
FIG. 4 is a fourth flowchart illustrating a method for deploying a microservice according to an embodiment of the present invention. The deployment method of the micro service comprises the following steps:
step 402, acquiring a micro-service deployment instruction;
step 404, acquiring deployment information of the micro-service to be deployed from a superior node corresponding to the node, wherein the deployment information includes deployment node information, a distribution node list, and routing information corresponding to any node in the distribution node list;
step 406, judging whether the identification information of the node is the same as the identification information of any deployment node in the deployment node information; if yes, go to step 408;
step 408, detecting the node state of the superior node;
step 410, based on the node state being normal, acquiring deployment node information and corresponding micro-service according to the first routing information; and acquiring the deployment node information and the corresponding micro service according to the second routing information based on the node state abnormity.
The nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers.
In this embodiment, whether the backup route is enabled is determined by detecting a node state of the upper node, if the node state of the upper node is normal, the relevant instruction and the corresponding micro service are obtained from the upper node by using the first route (the route corresponding to the first routing information), and if the node state is abnormal, the relevant instruction and the distribution packet of the micro service are obtained by using the backup route (i.e., the route corresponding to the second routing information). By the embodiment of the invention, the one-key deployment of the micro-service can be ensured to be successful.
Example six:
in any of the above embodiments, the step of obtaining deployment information of the microservice to be deployed from the upper node corresponding to the node specifically includes: and acquiring deployment node information from a superior node corresponding to the deployment node according to a preset time interval.
In this embodiment, since the nodes and the corresponding upper nodes are in unilateral communication, each node is enabled to obtain the deployment node information of the micro service to be deployed from the corresponding upper node according to the preset time interval, so that any node is ensured not to miss the release of any micro service, and omission and errors in one-key deployment are avoided.
Example seven:
FIG. 5 is a schematic block diagram of amicroservice deployment system 500 of one embodiment of the invention. Themicroservice deployment system 500 includes:
a receivingunit 502, configured to receive a microservice deployment instruction;
an obtainingunit 504, configured to obtain a source file of a microservice to be deployed;
acompiling unit 506, configured to compile the source file, and submit the compiled microservice to a code warehouse corresponding to the server;
aconfiguration unit 508, configured to configure deployment information of the microservice, where the deployment information includes deployment node information, a distribution node list, and routing information corresponding to any node in the distribution node list;
and theissuing unit 510 is configured to send the micro-service deployment instruction to any node according to the routing information.
Thedeployment system 500 of the micro-service provided by the embodiment of the invention is used for a server. Thedeployment system 500 includes a receivingunit 502, an obtainingunit 504, a compilingunit 506, a configuringunit 508, and aissuing unit 510. The receivingunit 502 receives a microservice deployment instruction, and the obtainingunit 504 obtains a source file of a microservice to be deployed. The source file is compiled through the compilingunit 506, the compiled microservice is an executable publishing packet, the compiled microservice is submitted to a code warehouse corresponding to the server, and the microservice is managed by the code warehouse. Meanwhile, theconfiguration unit 508 configures deployment node information of the micro service, where the deployment node information includes at least one deployment node, and configures a publishing node list and routing information of each node in the publishing node list according to the micro service. After configuration is completed, theissuing unit 510 sends the microservice deployment instruction to each node step by step according to the routing information. After each node receives the micro-service deployment instruction, deployment node information of the micro-service to be deployed is obtained from the corresponding superior node, and whether the micro-service needs to be deployed or not is judged according to the deployment node information. And if the micro service needs to be deployed, acquiring the corresponding micro service according to the routing information, thereby realizing the one-key deployment of the micro service. The deployment system of the micro-service provided by the invention can realize one-key deployment of the micro-service, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
The code repository includes, but is not limited to, a Git/SVN code repository.
The servers may be deployed in a cluster to ensure reliable operation of microservice deployment.
Example eight:
FIG. 6 is a schematic block diagram of amicroservice deployment system 600 of one embodiment of the invention. Thedeployment system 600 of the microservice includes:
an obtainingunit 602, configured to obtain a microservice deployment instruction;
the acquiringunit 602 is further configured to acquire deployment information to be deployed from a higher-level node corresponding to the node, where the deployment information includes deployment node information, a distribution node list, and routing information corresponding to any node in the distribution node list; the nodes comprise first-level nodes and other-level nodes, and the upper-level nodes corresponding to the first-level nodes are servers;
a determiningunit 604, configured to determine whether the microservice needs to be deployed according to the deployment node information;
the obtainingunit 602 is further configured to obtain a corresponding micro service according to the routing information when it is determined that the micro service needs to be deployed.
Thedeployment system 600 of the micro service provided by the embodiment of the present invention is applied to nodes, where the nodes include a first-level node and other-level nodes, such as a second-level node and a third-level node, and the number of the first-level nodes and the number of the other-level nodes may be one, two, or more. Thedeployment system 600 includes an obtainingunit 602, and a determiningunit 604, where the obtainingunit 602 obtains deployment node information of the micro service to be deployed from an upper node corresponding to a node, where the deployment node information includes at least one deployment node. The determiningunit 604 determines whether the currently issued micro service needs to be deployed according to the deployment node information, and if the determining result is that the deployment needs to be performed, the obtainingunit 602 pulls out the corresponding micro service from the code repository according to the routing information. The deployment system of the micro-services provided by the embodiment of the invention can realize one-key deployment of the micro-services, thereby realizing large-scale and batch automatic operation and maintenance, greatly improving the operation and maintenance efficiency, avoiding omission and errors caused by artificial deployment, having a uniform management interface, unifying the management of cloud platforms and the management of deployment resources, and avoiding inconvenience caused by a plurality of management platforms.
Example nine:
FIG. 7 is a schematic block diagram of acomputer device 700 of one embodiment of the present invention. Wherein, thiscomputer equipment 700 includes:
amemory 702, thememory 702 storing a program;
aprocessor 704, wherein theprocessor 704 executes a program to implement the method for deploying microservices according to any of the embodiments described above.
In thecomputer device 700 provided by the embodiment of the present invention, when theprocessor 704 executes the program, the steps of the method for deploying a micro service according to any of the above embodiments are implemented, so that thecomputer device 700 includes all the beneficial effects of the method for deploying a micro service according to any of the above embodiments.
Example ten:
according to an embodiment of a further aspect of the present invention, a storage medium is proposed, on which a program is stored, which when executed by a processor implements the method of deploying a microservice according to any of the embodiments described above.
The storage medium provided in the embodiments of the present invention, when being executed by a processor, implements the steps of the method for deploying a micro service according to any of the above embodiments, and therefore the storage medium includes all the benefits of the method for deploying a micro service according to any of the above embodiments.
The first embodiment is as follows:
fig. 8 is one of the overall schematic diagrams of the microservice deployment system of an embodiment of the present invention. The deployment system of the micro service comprises a control center and a deployment node.
The control center can be deployed in a cluster mode, and the operations of portal operation management, deployment control, detection, early warning, filing and the like are managed. The control center comprises Node _0, namely a server, and the Node _0 comprises: the system comprises a node management system, a service management system, a registration center, a configuration center, a log center and a monitoring center. The deployment Node is divided into anarea 1 and anarea 2, thearea 1 includes three nodes, respectively Node _1, Node _11 and Node _12, and thearea 2 includes three nodes, respectively Node _2, Node _21 and Node _ 22. Wherein, Node _1 and Node _2 belong to a first-level Node, and Node _11, Node _12, Node _21 and Node _22 belong to a second-level Node. Each node includes a node agent (node agent) comprising: the system comprises a registration device, a routing device, a service device and a monitoring device.
And the service management of the control center issues a deployment instruction, the application acquires a source file from the SVN/Git, and the source file is compiled and packaged through a maven command and submitted to a Git Bare warehouse of the control center. And acquiring a publishing node list configured by the registration center according to the service. And acquiring the routing information of each node of the configuration center according to the specific list information of the nodes to be issued. And pushing the deployment instruction step by step according to the routing information. If the command placement is abnormal, the alternate route placement is used. If the assignment fails, the node fails to issue. And after receiving the deployment instruction, the node pulls the release packet according to the routing information and the state information of the superior node. And when detecting the working directory, the Git executes the script through hook to start the service. The automatic operation and maintenance device can realize large-scale and batch automatic operation and maintenance, and greatly improve the operation and maintenance efficiency.
The second embodiment is as follows:
fig. 9 is a second overall schematic diagram of the microservice deployment system according to an embodiment of the present invention. The deployment system of the micro service comprises a control center and a deployment node. The control center can be deployed in a cluster mode, and the operations of portal operation management, deployment control, detection, early warning, filing and the like are managed. The control center comprises aserver 1 and aserver 2, wherein theserver 1 comprises: node management 802, service management 808, registration center 804, configuration center 810, log center 806, and monitoring center 812.
The deployment Node includes a Node _1 and a Node _2, where the Node _1 includes a Node agent (YY _ agent), and the Node agent includes a registration device 814, a routing device 818, a service device 816, a monitoring device 820, Git, Zabbix _ agent.
Node _1, executing the command issued by the control center, deploying the detection application and transmitting the command to the lower level;
node _2, executing the command issued by the control center, deploying the detection application and transmitting the command to the lower level; the node management 802 of the control center is used for managing the deployed nodes, newly adding and modifying the attributes of each node, checking the connection state of each node and the control center, and the like.
Service management 808 of the control center: the method is used for managing service release, configuring the type of service release, configuring nodes of each service release, checking each service and the current running state version of each node and the like.
Registry of control center 804: when a node (node) is deployed by a key, the node agent (node agent) automatically registers to the registry after being started. And the nodes can also be manually deployed and started, the addresses of the control centers are configured, and the nodes are manually registered in the registration centers of the control centers.
Configuration center of control center 810: the method comprises node route configuration and configures access routes of all nodes. And configuring a code base, acquiring a source code address, and supporting Git and svn. And control center database configuration, etc.
The log center 806 of the control center: the detailed log of each node service can be viewed in real time. And can make the collection log, do the log audit.
Monitoring center 812 of the control center: and monitoring the running condition of each node server and the running condition of each service through a zabbix interface. And the control center communicates with the node agent through a heartbeat mechanism to update the node state. According to the event registration, the relevant operation and maintenance personnel can be informed through Email, WeChat messages and the like.
Registration means 814 of the node agent: the system can be registered to a registration center of a control center according to configuration when being started.
The routing mechanism 818 of the node proxy: and synchronizing routing information of the control center, and when the control center cannot be connected with the control center, acquiring related instructions and a distribution packet by using the standby path according to routing configuration.
The service device 816 of the node proxy: and synchronizing the control center service configuration information.
Monitoring device 820 of node agent: and detecting the running condition of the local service. And communicating with a monitoring center of the control center. And reporting the node and the service state.
The third concrete embodiment:
FIG. 10 is a diagram illustrating a method for deploying microservices, in accordance with an embodiment of the present invention. The deployment method of the micro service comprises the following steps:
step 902, the service management issues a release instruction;
step 904, the application will obtain the source file from SVN/Git, and compile and package through maven command;
step 906, submitting the compiled packet to a Git barrel warehouse of a control center;
step 908, acquiring a publishing node list of the registry service according to the service;
step 910, acquiring routing information of each node of the configuration center according to the specific node list information to be issued;
step 912, issuing a multi-level issue instruction by a first-level route;
step 914, whether the order is successful or not; if yes, 916 is performed, otherwise 922 is performed;
step 916, the Node obtains a distribution packet according to the routing information and Git;
step 918, Git checks out the working catalog;
step 920, starting service;
and step 922, issuing an instruction by the secondary (backup) route.
Wherein, the service is a micro service to be deployed.
Specifically, the Node receives the distribution instruction, and pulls the distribution packet according to the routing information (call routing device) and the upper Node state information.
Specifically, the script is executed through hook, and the service is started.
According to the technical scheme in the embodiment of the invention, the method and the device for automatically deploying and monitoring the service system based on the GIT operation and maintenance platform can be realized, the defects in the prior art are overcome, the method for automatically deploying and monitoring the service system based on the GIT operation and maintenance platform is provided, the basic service capabilities of the existing open source software such as GIT, zabbix and the like are integrated, the components are independently developed, the one-key deployment can be realized, and the omission and the error caused by manual deployment are avoided. The cloud platform management system has a unified management interface, so that cloud platform management and resource deployment management are unified, and inconvenience brought by a plurality of management platforms is avoided.
In the description herein, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance unless explicitly stated or limited otherwise; the terms "connected," "mounted," "secured," and the like are to be construed broadly and include, for example, fixed connections, removable connections, or integral connections; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

CN202110860208.0A2021-07-282021-07-28Deployment method, deployment system, computer device and storage medium for micro-servicesPendingCN113553075A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110860208.0ACN113553075A (en)2021-07-282021-07-28Deployment method, deployment system, computer device and storage medium for micro-services

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110860208.0ACN113553075A (en)2021-07-282021-07-28Deployment method, deployment system, computer device and storage medium for micro-services

Publications (1)

Publication NumberPublication Date
CN113553075Atrue CN113553075A (en)2021-10-26

Family

ID=78133157

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110860208.0APendingCN113553075A (en)2021-07-282021-07-28Deployment method, deployment system, computer device and storage medium for micro-services

Country Status (1)

CountryLink
CN (1)CN113553075A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20180349121A1 (en)*2017-05-302018-12-06International Business Machines CorporationDynamic deployment of an application based on micro-services
CN110572436A (en)*2019-08-122019-12-13浙江讯盟科技有限公司Multi-place cross-cluster server deployment method and system
CN111666080A (en)*2020-04-282020-09-15平安科技(深圳)有限公司Micro-service cluster deployment method and device, computer equipment and storage medium
CN112181439A (en)*2020-09-242021-01-05中国建设银行股份有限公司Micro-service deployment method and device, electronic equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20180349121A1 (en)*2017-05-302018-12-06International Business Machines CorporationDynamic deployment of an application based on micro-services
CN110572436A (en)*2019-08-122019-12-13浙江讯盟科技有限公司Multi-place cross-cluster server deployment method and system
CN111666080A (en)*2020-04-282020-09-15平安科技(深圳)有限公司Micro-service cluster deployment method and device, computer equipment and storage medium
CN112181439A (en)*2020-09-242021-01-05中国建设银行股份有限公司Micro-service deployment method and device, electronic equipment and readable storage medium

Similar Documents

PublicationPublication DateTitle
US10592330B2 (en)Systems and methods for automatic replacement and repair of communications network devices
US7604162B2 (en)Method and system for management of terminal devices
JP4210155B2 (en) Monitoring system, method and computer program for remotely monitoring devices
CN106130761B (en) Method and device for identifying faulty network equipment in data center
US20020087734A1 (en)System and method for managing dependencies in a component-based system
US7974211B2 (en)Methods and apparatus for network configuration baselining and restoration
CN102047683B (en) Dynamic fault analysis for centrally managed network elements in telecommunication systems
US20080183728A1 (en)Remotely monitoring a data processing system via a communications network
US20140122140A1 (en)Advanced managed service customer edge router
CN105653329A (en)Application management method, apparatus and system
CN101212357A (en) Method and device for testing an interface
CN104731580A (en)Automation operation and maintenance system based on Karaf and ActiveMQ and implement method thereof
JP2004030642A (en) Method and apparatus for remotely monitoring a device by creating a device object for the device to be monitored
CN1934538B (en) An exception management scheme for multi-agent systems
CN114884838B (en)Monitoring method and server of Kubernetes component
US7359965B2 (en)Method and apparatus for providing multiple vendor support to remotely monitored devices
CN113672336A (en)K8S container cluster deployment method, device, equipment and readable storage medium
CN103516735A (en)Method and apparatus for upgrading network node
CN100477839C (en) Method and system for updating manufacturer-specific hardware information on a manufacturer-neutral operation and maintenance center-network management center interface in a mobile radio
US7519729B2 (en)Method and apparatus for monitoring remote devices through a local monitoring station and communicating with a central station supporting multiple manufacturers
CN112764956A (en)Database exception handling system, and database exception handling method and device
CN119917137A (en) Update instruction sending method and device, storage medium and electronic device
CN114942875A (en) Container cloud cluster node anomaly detection method and system
CN113553075A (en)Deployment method, deployment system, computer device and storage medium for micro-services
JP4673532B2 (en) Comprehensive alignment process in a multi-manager environment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp