A microservice publishing method, device, equipment and storage medium

By adopting the interactive architecture of message queue and storage server in microservice release, the problem of low efficiency of microservice release on different servers is solved, and unified release deployment on different server clusters is realized, and release efficiency is improved.

CN114064054BActive Publication Date: 2025-06-27KINGDEE DEEKING CLOUDCOMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111397783.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2025-06-27
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

There are difficulties in efficiently publishing and deploying microservices on different servers. This is mainly because the management code tool is inconsistent with the code management tool inside the target body, which leads to the inability to automate the processing of the microservice release process, which reduces the release efficiency.

Method used

Through an interactive architecture based on message queue, storage server and server cluster, the storage server is used to uniformly store the publishing packages of microservices, and periodically automate operations between the storage server and the server cluster through the message data in the message queue, determine the target server and publish it.

Benefits of technology

It realizes unified release and deployment of microservices on different server clusters, avoiding the difficulty of automated processing caused by code incompatibility, and thus improving the efficiency of microservice release.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064054B_ABST
    Figure CN114064054B_ABST
Patent Text Reader

Abstract

The present application discloses a microservice publishing method, device, equipment and storage medium, including: obtaining message data related to a target publishing package of a microservice to be published from a message queue according to a preset period, and obtaining the target publishing package corresponding to the message data from a storage server; obtaining a deployment instruction, and determining a target server from a target server cluster according to the deployment instruction, so as to publish the target publishing package on the target server. Based on the interaction architecture of the message queue, storage server and server cluster, the present application automates the operation of the publishing package periodically between the storage server and the server cluster through the message data in the message queue, avoiding the inability to automate the microservice publishing process due to code incompatibility problems when managing the publishing package on different servers, thereby enabling the unified publishing and deployment of microservices on different server clusters efficiently.
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 particularly relates to a microservice publishing method, apparatus, device and storage medium. Background Art

[0002] Microservices are an architecture and organizational approach for developing software, where the software consists of small, independent services that communicate via well-defined APIs. The microservices architecture makes applications easier to scale and develop more quickly, thus accelerating innovation and shortening the time to market for new features. After independent software vendors (ISVs) complete the development of microservices, they need to publish and deploy them to the corresponding environment for operation. To save costs, improve work efficiency, and server resource utilization, specific deployment tools and software code management tools are usually used for processing. However, when publishing microservices to the servers of other entities, due to the inconsistency between the management code tools and the internal code management tools of the entity, it is difficult to adopt the internal continuous integration (CI) and continuous delivery (CD) processes of the entity, resulting in low microservice publishing efficiency.

[0003] Therefore, how to efficiently publish and deploy microservices on different servers is a technical problem that those skilled in the art need to solve urgently. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a microservice publishing method, apparatus, device and storage medium, which can improve the microservice publishing efficiency. The specific solutions are as follows:

[0005] The first aspect of the present application provides a microservice publishing method, including:

[0006] Obtaining message data related to the target release package of the microservice to be released from the message queue according to a preset period, and obtaining the target release package corresponding to the message data from the storage server;

[0007] Obtaining a deployment instruction, and determining a target server from the target server cluster according to the deployment instruction to publish the target release package on the target server.

[0008] Optionally, before obtaining the message data related to the target release package of the microservice to be released from the message queue according to a preset period, it further includes:

[0009] Setting the release information of the target release package on a pre-created application release page, and uploading the target release package to the storage server for storage through a preset interface of the application release page;

[0010] Generate a target verification code corresponding to the target release package, and encapsulate the target verification code and release information into message data and send it to the message queue.

[0011] Optionally, generating a target verification code corresponding to the target release package includes:

[0012] Use an encryption algorithm to encrypt the target release package to obtain the target verification code.

[0013] Optionally, obtaining the target release package corresponding to the message data from the storage server includes:

[0014] Parse the message data to obtain the target verification code, and use an encryption algorithm to encrypt the release package on the storage server to determine the target release package with the same verification code as the target verification code from all the release packages on the storage server.

[0015] Optionally, after obtaining the target release package corresponding to the message data from the storage server, it further includes:

[0016] Use the application container engine to generate a target image of the target release package and store the target image in the local image repository of the server cluster;

[0017] Correspondingly, determine the target server from the target server cluster according to the deployment instruction to publish the target release package on the target server, including:

[0018] Determine the target server from the server cluster according to the deployment instruction;

[0019] Call the target image corresponding to the target release package from the local image repository and publish the target image on the target server.

[0020] Optionally, when the server cluster is a kubernetes server cluster, it further includes:

[0021] Generate a deployment instruction reflecting the release server information corresponding to the microservice to be released by creating a yaml configuration file of deployment and / or service according to the deployment requirement;

[0022] Correspondingly, determine the target server from the server cluster according to the deployment instruction, including:

[0023] Determine the target server from the kubernetes server cluster according to the yaml configuration file of deployment and / or service created in the deployment instruction.

[0024] Optionally, the microservice release method further includes:

[0025] Deploy a message broker application and a microservice publishing application in the target server cluster respectively, so as to use the message broker application to obtain message data from the message queue and use the microservice publishing application to publish the target release package on the target server.

[0026] The second aspect of this application provides a microservice publishing device, including:

[0027] A release package acquisition module, configured to obtain message data related to the target release package of the microservice to be released from the message queue according to a preset period, and obtain the target release package corresponding to the message data from the storage server;

[0028] A microservice publishing module, configured to obtain a deployment instruction, and determine a target server from the target server cluster according to the deployment instruction, so as to publish the target release package on the target server.

[0029] The third aspect of this application provides an electronic device, which includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the foregoing microservice publishing method.

[0030] The fourth aspect of this application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the foregoing microservice publishing method is implemented.

[0031] In this application, first, obtain message data related to the target release package of the microservice to be released from the message queue according to a preset period, and obtain the target release package corresponding to the message data from the storage server; then obtain a deployment instruction, and determine a target server from the target server cluster according to the deployment instruction, so as to publish the target release package on the target server. It can be seen that based on the interaction architecture of the message queue, the storage server and the server cluster, this application uses the storage server to uniformly store the release packages of microservices, and through the message data in the message queue, automatically operates on the release packages periodically between the storage server and the server cluster, avoiding the inability to automate the microservice release process due to code incompatibility issues when managing release packages on different servers, so that microservices can be uniformly released and deployed on different server clusters to improve the microservice release efficiency. Description of the Drawings

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.

[0033] Figure 1 It is a flowchart of a microservice publishing method provided by this application;

[0034] Figure 2 It is a specific message broker timing diagram provided by this application;

[0035] Figure 3 It is a specific microservice publishing architecture diagram provided by this application;

[0036] Figure 4 It is a specific timing diagram of publishing package publishing based on the image repository provided by this application;

[0037] Figure 5 It is a flowchart of a microservice publishing method provided by this application;

[0038] Figure 6 It is a schematic diagram of a specific application publishing interface provided by this application;

[0039] Figure 7 It is a specific timing diagram of publishing package uploading provided by this application;

[0040] Figure 8 It is a schematic diagram of the structure of a microservice publishing device provided by this application;

[0041] Figure 9 It is a structural diagram of a microservice publishing electronic device provided by this application. Specific implementation manners

[0042] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0043] After an independent software developer completes the development of microservices, they need to release and deploy them to the corresponding environment for operation. To save costs, improve work efficiency, and server resource utilization, specific deployment tools and software code management tools are usually used for processing. However, when releasing microservices to the servers of other entities, due to the inconsistency between the management code tools and the internal code management tools of the entity, it is difficult to adopt the continuous integration and continuous delivery processes within the entity, resulting in a low release efficiency of microservices. To address the above technical deficiencies, this application provides a microservice release solution. Based on the interaction architecture of a message queue, a storage server, and a server cluster, the storage server is used to uniformly store the release packages of microservices. Through the message data in the message queue, automated operations on the release packages are periodically performed between the storage server and the server cluster, avoiding the inability to automate the microservice release process due to code incompatibility issues when managing release packages on different servers. Thus, microservices can be uniformly released and deployed on different server clusters to improve the microservice release efficiency.

[0044] Figure 1 This is a flowchart of a microservice release method provided by an embodiment of this application. Refer to Figure 1 As shown, this microservice release method includes:

[0045] S11: Obtain the message data related to the target release package of the microservice to be released from the message queue according to a preset period, and obtain the target release package corresponding to the message data from the storage server.

[0046] In this embodiment, the message data related to the target release package of the microservice to be released is obtained from the message queue according to a preset period, and the target release package corresponding to the message data is obtained from the storage server. A microservice is an architectural and organizational approach to developing software, where the software consists of small independent services that communicate through well-defined APIs. These services are developed by various small independent software development teams, that is, by independent software developers who specialize in the development, production, sales, and service of software. When an independent software developer completes the development of a microservice, the release package of the developed microservice is uploaded to the storage server for storage.

[0047] In this embodiment, the message queue is a container that stores messages during the message transmission process and is used to store the messages published by microservices. Other application programs can obtain messages from the message queue and then perform publishing operations. It can be understood that a container is a standard software unit that packages code and all its dependencies, so that an application program can run quickly and reliably from one computing environment to another. A container can virtualize the operating system and run anywhere, regardless of whether the target environment is a private data center, a public cloud, or the developer's personal laptop. Correspondingly, a message broker application is deployed in the cluster server to obtain message data from the message queue. The storage server can be an object storage server to store the published packages of microservices in the form of object storage. Among them, object storage is a general term used to describe the method of solving and processing discrete units. An object does not have a hierarchical structure in a layer structure and is characterized by extended metadata. To improve the upload efficiency, the published package can be set and uploaded through a specific application publishing web page. For specific content in this part, reference can be made to the specific content disclosed in the following embodiments, and details will not be elaborated here.

[0048] S12: Obtain a deployment instruction, and determine a target server from the target server cluster according to the deployment instruction, so as to publish the target published package on the target server.

[0049] In this embodiment, after obtaining the target published package from the storage server, when performing microservice publishing, a deployment instruction will be further obtained, and then the target server will be determined from the target server cluster according to the deployment instruction, so as to publish the target published package on the target server. Specifically, a microservice publishing application can be deployed in the corresponding target server cluster to use the microservice publishing application to publish the target published package on the target server. Among them, the interaction between the message queue, the message broker application, and the microservice publishing application is as Figure 2 shown. To make microservice deployment more convenient and efficient, the target server cluster can be a Kubernetes cluster including multiple servers (one or more of which are master servers) deployed with the open-source kubernetes application, such as deploying using Docker + Kubernetes. Based on this, the microservice publishing architecture in this embodiment can refer to Figure 3 , where the operator is the person performing the microservice publishing operation, who can be a professional operation and maintenance personnel, or a developer, a manager, etc.

[0050] As Figure 3As shown, a local image repository (Harbor) is also set up in the server cluster. Harbor refers to a server for storing images, and all applications within a Kubernetes cluster can obtain images from this server. After obtaining the target release package, the application container engine can be further used to generate the target image of the target release package and store the target image in the local image repository of the kubernetes server cluster. When a deployment instruction is obtained, the target server is determined from the kubernetes server cluster according to the deployment instruction, and the target image corresponding to the target release package is called from the local image repository and the target image is published on the target server. Among them, Figure 4 is the sequence diagram corresponding to the above process.

[0051] It should be noted that the deployment instruction indicates on which servers to publish the microservices, and the deployment instruction reflecting the release server information corresponding to the microservices to be published can be generated by creating a yaml configuration file of deployment and / or service according to the deployment requirements. Correspondingly, the target server is determined from the kubernetes server cluster according to the deployment and / or service yaml configuration file created in the deployment instruction. Specifically, for security reasons, when an operator publishes the microservices of the ISV, files such as deployment.yaml and service.yaml (which may include the configmap.yaml file) will be written as needed, with the aim of deploying the microservices of the ISV to several dedicated servers, thus achieving isolation between microservices. In this way, even if it has problems such as viruses, crashes, or occupying a large amount of system resources, it will not affect the microservices deployed on other servers. At the same time, since the microservice publishing application integrates the API of Kubernetes, flexible deployment and resource allocation (limiting the CPU and memory occupied by the server) of the microservices can be achieved by configuring release files such as deployment.yaml and service.yaml.

[0052] It can be seen that in the embodiments of the present application, first, message data related to the target release package of the microservice to be released is obtained from the message queue according to a preset period, and the target release package corresponding to the message data is obtained from the storage server; then a deployment instruction is obtained, and a target server is determined from the target server cluster according to the deployment instruction, so as to release the target release package on the target server. Based on the interaction architecture of the message queue, the storage server, and the server cluster, the embodiments of the present application use the storage server to uniformly store the release packages of the microservices, and perform automated operations on the release packages periodically between the storage server and the server cluster through the message data in the message queue, avoiding the inability to automate the microservice release process due to code incompatibility issues when managing release packages on different servers, thereby enabling unified release and deployment of microservices on different server clusters to improve the microservice release efficiency.

[0053] Figure 5 It is a flowchart of a specific microservice release method provided by the embodiments of the present application. Refer to Figure 5 As shown, the microservice release method includes:

[0054] S21: Set the release information of the target release package on the pre-created application release page, and upload the target release package to the storage server for storage through a preset interface on the application release page.

[0055] In this embodiment, the release information of the target release package is set on the pre-created application release page, and the target release package is uploaded to the storage server for storage through a preset interface on the application release page. For the convenience of application release and management, the application release interface is displayed in the form of a web page. As Figure 6 shown, the operator fills in the microservice information to be released in the Figure 6 interface, such as which product it belongs to, the number of the application to be released, etc., then selects the file (update package) to be released, and then executes the release operation.

[0056] S22: Generate a target verification code corresponding to the target release package, and encapsulate the target verification code and the release information as message data and send it to the message queue.

[0057] In this embodiment, after the application release website verifies the input information, a target verification code corresponding to the target release package is generated, and the target verification code and the release information are encapsulated as message data and sent to the message queue. Specifically, the target release package can be encrypted using an encryption algorithm to obtain the target verification code. For example, the MD5 encryption algorithm is used to prevent the verification code from being cracked and improve security. That is, the selected file will be encrypted and uploaded to the object storage server. After the file is successfully uploaded, a message will be generated and sent to the message queue for storage. As Figure 7 shown.

[0058] S23: Obtain message data related to the target release package of the microservice to be released from the message queue according to a preset period, and obtain the target release package corresponding to the message data from the storage server.

[0059] S24: Obtain a deployment instruction, and parse the message data according to the deployment instruction to obtain a target verification code.

[0060] S25: Encrypt the release package on the storage server by using an encryption algorithm to determine a target release package whose verification code is consistent with the target verification code from all the release packages on the storage server.

[0061] S26: Release the target release package on the target server.

[0062] In this embodiment, the message proxy application deployed on the server cluster will actively obtain message data from the message queue at regular intervals (for example, every 10 seconds), and multi-site deployment can achieve mass sending of messages. For example, when 10 Kubernetes clusters need to perform microservice releases, only one message proxy application needs to be deployed in each cluster because each server in the cluster can obtain the microservice release message from the message queue. The message contains the address of the application that really needs to process the message (usually obtained after decryption), and then forwards the microservice release application in the server intranet according to the address. Then the microservice release application performs the microservice release operation, and the message proxy application itself is also a microservice. In addition, the Kubernetes cluster pulls messages from the message queue through the message proxy application, and does not need to open more ports to allow others to access, further ensuring the system security.

[0063] In this embodiment, after the microservice release application obtains the message data from the message proxy application, it starts to perform the release operation. First, parse the message data to obtain the target verification code and release information such as file encoding, and at the same time use the same encryption algorithm (MD5 encryption algorithm) to encrypt all the release packages on the storage server to obtain the corresponding verification codes. By comparing and screening, the verification code consistent with the target verification code is determined, so as to determine the target release package. After passing the verification, the microservice release application starts to call the API of Docker to package and generate an image, and then pushes the image to the local image repository. After the operation is successful, it calls the API of Kubernetes to perform the release operation, and further returns the release result to the "application release website", and the operator can view the release result on the application release website page.

[0064] It can be seen that before the microservice is released in the embodiment of the present application, an application release website is created in advance, and the release information of the target release package is set through its page, and the target release package is uploaded to the storage server for storage through a preset interface. At the same time, a target verification code corresponding to the target release package is generated, and the target verification code and release information are encapsulated into message data and sent to the message queue. When the message data is obtained, the target release package is determined by using the target verification code for release. It realizes the automatic deployment based on the application release website and microservice release package, and supports any software development language that can be containerized.

[0065] See Figure 8 As shown, the embodiment of the present application also correspondingly discloses a microservice release device, including:

[0066] A release package acquisition module 11, configured to acquire message data related to the target release package of the microservice to be released from the message queue according to a preset period, and acquire the target release package corresponding to the message data from the storage server;

[0067] A microservice release module 12, configured to acquire a deployment instruction, and determine a target server from the target server cluster according to the deployment instruction, so as to release the target release package on the target server.

[0068] It can be seen that the embodiment of the present application first acquires message data related to the target release package of the microservice to be released from the message queue according to a preset period, and acquires the target release package corresponding to the message data from the storage server; then acquires a deployment instruction, and determines a target server from the target server cluster according to the deployment instruction, so as to release the target release package on the target server. The embodiment of the present application is based on the interaction architecture of the message queue, storage server and server cluster, uses the storage server to uniformly store the release packages of the microservice, and automatically operates the release packages periodically between the storage server and the server cluster through the message data in the message queue, avoiding the inability to automate the microservice release process due to code incompatibility issues when managing release packages on different servers, so that the microservice can be uniformly released and deployed on different server clusters to improve the microservice release efficiency.

[0069] In some specific embodiments, the microservice release device further includes:

[0070] A release package upload module, configured to set the release information of the target release package on the pre-created application release page, and upload the target release package to the storage server for storage through a preset interface of the application release page;

[0071] A message data generation module, configured to generate a target verification code corresponding to the target release package, and encapsulate the target verification code and release information into message data and send it to the message queue;

[0072] An application deployment module, configured to deploy a message broker application and a microservice publishing application in a target server cluster respectively;

[0073] Correspondingly, the publishing package acquisition module 11 specifically includes:

[0074] A message data acquisition unit, configured to acquire message data related to a target publishing package of a microservice to be published from a message queue according to a preset period;

[0075] An analysis unit, configured to acquire a deployment instruction, and analyze the message data according to the deployment instruction to obtain a target verification code;

[0076] A verification unit, configured to encrypt the publishing packages on a storage server by using an encryption algorithm to determine a target publishing package whose verification code is consistent with the target verification code from all the publishing packages on the storage server;

[0077] Correspondingly, the microservice publishing module 12 is specifically configured to acquire message data from a message queue by using the message broker application and publish the target publishing package on a target server by using the microservice publishing application.

[0078] In some specific embodiments, the microservice publishing device further includes:

[0079] An image storage module, configured to generate a target image of a target publishing package by using an application container engine and store the target image in a local image repository of the server cluster;

[0080] A configuration module, configured to, when the server cluster is a kubernetes server cluster, generate a deployment instruction reflecting publishing server information corresponding to a microservice to be published by creating a yaml configuration file of a deployment and / or a service according to deployment requirements;

[0081] Correspondingly, the microservice publishing module 12 specifically includes:

[0082] An image determination unit, configured to acquire a deployment instruction and determine a target server from the kubernetes server cluster according to the created yaml configuration file of a deployment and / or a service in the deployment instruction;

[0083] An image invocation unit, configured to invoke a target image corresponding to a target publishing package from a local image repository and publish the target image on the target server.

[0084] Furthermore, an embodiment of the present application further provides an electronic device. Figure 9It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure should not be regarded as any limitation on the scope of use of this application.

[0085] Figure 9 It is a schematic structural diagram of an electronic device 20 provided by an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the microservice publishing method disclosed in any of the foregoing embodiments.

[0086] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.

[0087] In addition, as a carrier for resource storage, the memory 22 can be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon can include an operating system 221, a computer program 222, and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0088] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222 to enable the processor 21 to perform operations and processing on the massive data 223 in the memory 22. It can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the microservice publishing method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks. The data 223 can include published package data collected by the electronic device 20, etc.

[0089] Furthermore, an embodiment of this application also discloses a storage medium. When a computer program stored in the storage medium is loaded and executed by a processor, the steps of the microservice publishing method disclosed in any of the foregoing embodiments are implemented.

[0090] In the present specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part.

[0091] Finally, it should also be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent in such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0092] The above has introduced in detail the microservice publishing method, apparatus, device and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present invention.

Claims

1. A microservice publishing method, characterized in that, Including: Obtaining message data related to a target release package of a microservice to be released from a message queue according to a preset period, and obtaining the target release package corresponding to the message data from a storage server; Obtaining a deployment instruction, and determining a target server from a target server cluster according to the deployment instruction to release the target release package on the target server; Wherein, before obtaining the message data related to the target release package of the microservice to be released from the message queue according to the preset period, it further includes: Setting release information of the target release package on a pre-created application release page, and uploading the target release package to the storage server for storage through a preset interface of the application release page; Generating a target verification code corresponding to the target release package, and encapsulating the target verification code and the release information into the message data and sending it to the message queue; The generating the target verification code corresponding to the target release package includes: Performing an encryption process on the target release package by using an encryption algorithm to obtain a target verification code; After obtaining the target release package corresponding to the message data from the storage server, it further includes: Generating a target image of the target release package by using an application container engine, and storing the target image in a local image repository of the server cluster; Correspondingly, the determining a target server from the target server cluster according to the deployment instruction to release the target release package on the target server includes: Determining the target server from the server cluster according to the deployment instruction; Invoking the target image corresponding to the target release package from the local image repository, and releasing the target image on the target server; It further includes: Deploying a message proxy application and a microservice release application in the target server cluster respectively, so as to obtain the message data from the message queue by using the message proxy application and release the target release package on the target server by using the microservice release application.

2. The microservice publishing method according to claim 1, wherein The obtaining the target release package corresponding to the message data from the storage server includes: Parsing the message data to obtain the target verification code, and performing an encryption process on the release package on the storage server by using the encryption algorithm to determine the target release package with the verification code consistent with the target verification code from all the release packages on the storage server.

3. The microservice publishing method according to claim 1, wherein When the server cluster is a kubernetes server cluster, it further includes: Generating the deployment instruction reflecting the release server information corresponding to the microservice to be released by creating a yaml configuration file of deployment and / or service according to the deployment requirement; Correspondingly, the determining a target server from the target server cluster according to the deployment instruction includes: Determining the target server from the kubernetes server cluster according to the yaml configuration file of deployment and / or service created in the deployment instruction.

4. A microservice publishing device, characterized in that, Including: A release package acquisition module, configured to acquire message data related to a target release package of a microservice to be released from a message queue according to a preset period, and acquire the target release package corresponding to the message data from a storage server; A microservice release module, configured to acquire a deployment instruction, and determine a target server from a target server cluster according to the deployment instruction, so as to release the target release package on the target server; Wherein, before acquiring the message data related to the target release package of the microservice to be released from the message queue according to the preset period, it further includes: Setting release information of the target release package on a pre-created application release page, and uploading the target release package to the storage server for storage through a preset interface of the application release page; Generating a target verification code corresponding to the target release package, and encapsulating the target verification code and the release information into the message data and sending the message data to the message queue; The generating the target verification code corresponding to the target release package includes: Performing encryption processing on the target release package by using an encryption algorithm to obtain a target verification code; After acquiring the target release package corresponding to the message data from the storage server, it further includes: Generating a target image of the target release package by using an application container engine, and storing the target image in a local image repository of the server cluster; Correspondingly, the determining a target server from the target server cluster according to the deployment instruction to release the target release package on the target server includes: Determining the target server from the server cluster according to the deployment instruction; Invoking the target image corresponding to the target release package from the local image repository, and releasing the target image on the target server; It further includes: Deploying a message proxy application and a microservice release application in the target server cluster respectively, so as to acquire the message data from the message queue by using the message proxy application and release the target release package on the target server by using the microservice release application.

5. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the microservice release method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, For storing computer-executable instructions, when the computer-executable instructions are loaded and executed by a processor, the microservice release method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • A micro-service packaging deployment method and system

    CN109634657A

  • Micro-service deployment method and device, electronic equipment and readable storage medium

    CN112181439A