CN114064054A - Micro-service publishing method, device, equipment and storage medium - Google Patents

Micro-service publishing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114064054A
CN114064054A CN202111397783.8A CN202111397783A CN114064054A CN 114064054 A CN114064054 A CN 114064054A CN 202111397783 A CN202111397783 A CN 202111397783A CN 114064054 A CN114064054 A CN 114064054A
Authority
CN
China
Prior art keywords
target
publishing
server
micro
service
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
CN202111397783.8A
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.)
Kingdee Deeking Cloud Computing Co ltd
Original Assignee
Kingdee Deeking Cloud Computing 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 Kingdee Deeking Cloud Computing Co ltd filed Critical Kingdee Deeking Cloud Computing Co ltd
Priority to CN202111397783.8A priority Critical patent/CN114064054A/en
Publication of CN114064054A publication Critical patent/CN114064054A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The application discloses a method, a device, equipment and a storage medium for publishing micro-services, which comprise the following steps: acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period, and acquiring the target publishing packet corresponding to the message data from the storage server; and acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server. According to the method and the system, based on the interactive architecture of the message queue, the storage server and the server cluster, the issue package is automatically operated periodically between the storage server and the server cluster through the message data in the message queue, the problem that the micro-service issue process cannot be automatically processed due to the code incompatibility problem when different servers manage the issue package is avoided, and therefore the micro-service can be issued and deployed uniformly on different server clusters efficiently.

Description

Micro-service publishing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for publishing a micro service.
Background
Microservice is an architectural and organizational method of developing software that consists of small, independent services that communicate through well-defined APIs. The microservice architecture makes applications easier to expand and develop faster, speeding innovation and shortening time-to-market for new functionality. After the micro-service is developed, Independent Software developers (ISVs) need to publish and deploy the micro-service to corresponding environments for operation, and in order to save cost, improve work efficiency and server resource utilization, specific deployment tools and Software code management tools are usually adopted for processing. However, when the micro-service is released to the servers of other subjects, since the code management tool is inconsistent with the code management tool inside the subject, it is difficult to adopt the Continuous Integration (CI) and the Continuous Delivery (CD) flow inside the subject, so that the micro-service is released with low efficiency.
Therefore, how to efficiently publish and deploy microservices on different servers is a technical problem to be urgently solved by the technical personnel in the field.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a storage medium for distributing micro-services, which can improve the efficiency of distributing micro-services. The specific scheme is as follows:
a first aspect of the present application provides a micro-service publishing method, including:
acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period, and acquiring the target publishing packet corresponding to the message data from the storage server;
and acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server.
Optionally, before obtaining the message data related to the target publishing packet of the micro service to be published from the message queue according to the preset period, the method further includes:
setting the publishing information of the target publishing packet in a pre-created application publishing page, and uploading the target publishing packet to a storage server for storage through a preset interface of the application publishing page;
and generating a target check code corresponding to the target release packet, packaging the target check code and the release information into message data, and sending the message data to the message queue.
Optionally, generating a target check code corresponding to the target publishing packet includes:
and encrypting the target issuing packet by using an encryption algorithm to obtain a target check code.
Optionally, obtaining the target publishing packet corresponding to the message data from the storage server includes:
and analyzing the message data to obtain a target check code, and encrypting the issuing packet on the storage server by using an encryption algorithm to determine a target issuing packet with the check code consistent with the target check code from all issuing packets of the storage server.
Optionally, after obtaining the target publishing packet corresponding to the message data from the storage server, the method further includes:
generating a target mirror image of the target distribution package by using an application container engine, and storing the target mirror image to a local mirror image warehouse of the server cluster;
correspondingly, the step of determining the target server from the target server cluster according to the deployment instruction so as to issue the target issue packet on the target server comprises the following steps:
determining a target server from the server cluster according to the deployment instruction;
and calling the target mirror image corresponding to the target publishing package from the local mirror image warehouse, and publishing the target mirror image on the target server.
Optionally, when the server cluster is a kubernets server cluster, the method further includes:
generating a deployment instruction reflecting publishing server information corresponding to the micro service to be published in a way of creating a yaml configuration file of the deployment request and/or the service according to the deployment requirement;
correspondingly, determining the target server from the server cluster according to the deployment instruction comprises the following steps:
and determining a target server from the kubernets server cluster according to the yaml configuration file of the deploymentof the deployed object and/or the service.
Optionally, the micro-service publishing method further includes:
and respectively deploying the message agent application and the micro-service publishing application in the target server cluster so as to acquire message data from the message queue by using the message agent application and publish the target publishing packet on the target server by using the micro-service publishing application.
A second aspect of the present application provides a microservice publishing device, comprising:
the publishing packet acquiring module is used for acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period and acquiring the target publishing packet corresponding to the message data from the storage server;
and the micro-service issuing module is used for acquiring the deployment instruction, determining the target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server.
A third aspect of the application provides an electronic device comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the aforementioned microservice issuing method.
A fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the method for issuing a micro service is implemented.
According to the method, firstly, message data related to a target publishing packet of the micro service to be published is obtained from a message queue according to a preset period, and the target publishing packet corresponding to the message data is obtained from a storage server; and then acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server. Therefore, the method and the device are based on the interactive architecture of the message queue, the storage server and the server cluster, the storage server is used for uniformly storing the publishing packet of the micro-service, the publishing packet is periodically and automatically operated between the storage server and the server cluster through the message data in the message queue, the problem that the publishing flow of the micro-service cannot be automatically processed due to the incompatibility problem of codes when different servers manage the publishing packet is avoided, the micro-service can be uniformly published and deployed on different server clusters, and the publishing efficiency of the micro-service is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for publishing a micro service provided in the present application;
FIG. 2 is a timing diagram of a specific message broker provided herein;
FIG. 3 is a diagram of a particular microservice distribution architecture provided herein;
FIG. 4 is a timing diagram illustrating a specific distribution package distribution based on a mirror repository according to the present application;
fig. 5 is a flowchart of a specific micro service publishing method provided in the present application;
FIG. 6 is a schematic diagram of a specific application publishing interface provided by the present application;
FIG. 7 is a timing diagram illustrating an upload of a specific distribution package according to the present application;
FIG. 8 is a schematic structural diagram of a microservice distribution apparatus according to the present application;
fig. 9 is a structural diagram of an electronic device for distributing microservices according to the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
After the micro-service development is completed, an independent software developer needs to publish and deploy the micro-service to a corresponding environment for operation, and in order to save cost and improve work efficiency and server resource utilization, a specific deployment tool and a software code management tool are usually adopted for processing. However, when publishing the micro service to the servers of other subjects, since the code management tool is inconsistent with the code management tool inside the subject, it is difficult to adopt the continuous integration and continuous delivery flow inside the subject, so that the publishing efficiency of the micro service is low. In order to overcome the technical defects, the micro-service publishing scheme is provided, based on an interactive architecture of a message queue, a storage server and a server cluster, a publishing packet of the micro-service is uniformly stored by using the storage server, and the publishing packet is periodically and automatically operated between the storage server and the server cluster through message data in the message queue, so that the problem that the publishing flow of the micro-service cannot be automatically processed due to the problem of incompatible codes when different servers manage the publishing packet is avoided, the micro-service can be uniformly published and deployed on different server clusters, and the publishing efficiency of the micro-service is improved.
Fig. 1 is a flowchart of a method for publishing a micro service according to an embodiment of the present disclosure. Referring to fig. 1, the micro-service publishing method includes:
s11: and acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period, and acquiring the target publishing packet corresponding to the message data from the storage server.
In this embodiment, the message data related to the target publishing packet of the micro service to be published is acquired from the message queue according to the preset period, and the target publishing packet corresponding to the message data is acquired from the storage server. Microservice is an architectural and organizational method of developing software that consists of small, independent services that communicate through well-defined APIs. These services are developed by individual small independent software development teams, i.e., by independent software developers specializing in the development, production, sale, and service of software. And after the independent software developer completes the development of the micro-service, uploading the release package of the micro-service after the development to a storage server for storage.
In this embodiment, the message queue is a container for storing messages during the transmission process of the messages, and is used for storing messages issued by the microservice. Other applications may retrieve messages from the message queue and then perform publish operations. It will be appreciated that a container is a standard software unit that packages code and all its dependencies so that an application can run quickly and reliably from one computing environment to another. The container can virtualize the operating system and run anywhere, regardless of whether the target environment is a private data center, a public cloud, or a developer's personal laptop. Accordingly, a message broker application is deployed in the cluster server to obtain message data from the message queue using the message broker application. The storage server can be an object storage server, and stores the publishing package of the micro service in an object storage mode. Where object store is a generic term used to describe a method of resolving and processing discrete units, objects no longer have a hierarchy in a hierarchy, and are characterized by extended metadata. In order to improve the uploading efficiency, the configuration and the uploading of the distribution package may be performed through a specific application distribution webpage, and for this part, specific contents disclosed in the following embodiments may be referred to, and details are not described here.
S12: and acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server.
In this embodiment, after the target distribution package is obtained from the storage server, when the micro-service is distributed, the deployment instruction is further obtained, and then the target server is determined from the target server cluster according to the deployment instruction, so that the target distribution package is distributed on the target server. Specifically, the micro-service publishing application may be deployed in the corresponding target server cluster, so that the micro-service publishing application is used to publish the target publishing packet on the target server. Wherein the interaction between the message queue, the message broker application and the microservice publishing application is as shown in figure 2. To make microservice deployment easier and more efficient, the target server cluster may be a kubernets cluster comprising a plurality of servers (one or more of which are primary servers) deploying open source kubernets applications, for example, deployed using Docker + kubernets. Based on this, the micro-service publishing architecture in this embodiment may refer to fig. 3, where an operator is a person performing micro-service publishing operation, and may be a professional operation and maintenance person, a developer, a manager, and the like.
As shown in fig. 3, a local mirror repository (Harbor) is also arranged in the server cluster, the Harbor refers to a server storing mirror images, and all applications in a kubernets cluster can acquire mirror images from the server. After the target distribution package is obtained, a target mirror image of the target distribution package can be further generated by using the application container engine, and the target mirror image is stored in a local mirror image warehouse of the kubernetes server cluster. And when the deployment instruction is acquired, determining a target server from the kubernets server cluster according to the deployment instruction, calling a target mirror image corresponding to the target issuing package from a local mirror image warehouse, and issuing the target mirror image on the target server. Fig. 4 is a timing chart corresponding to the above process.
It should be noted that the deployment instruction represents on which servers the micro service is published, and the deployment instruction reflecting the information of the publishing server corresponding to the micro service to be published can be generated by creating a yaml configuration file of the deployment agent and/or the service according to the deployment requirement. Correspondingly, the target server is determined from the kubernets server cluster according to the deployed deployment instruction created yaml configuration file of the deployment and/or service. Specifically, in order to ensure security, when an operator issues an ISV micro-service, files (which may include a configmap. yaml file) such as deployment element. yaml, service. yaml, and the like are written as required, so that the ISV micro-service is deployed to several special servers, and isolation between the micro-services is achieved. Therefore, even if the system is subjected to virus, crash, occupation of a large amount of system resources and the like, the microservices deployed on other servers cannot be influenced. Meanwhile, because the micro-service publishing application integrates the API of Kubernets, the flexible deployment and resource allocation (the occupation of the CPU and the memory of the server is limited) of the micro-service can be realized by configuring publishing files such as deployment.
As can be seen, in the embodiment of the application, firstly, message data related to a target publishing packet of a micro service to be published is obtained from a message queue according to a preset period, and the target publishing packet corresponding to the message data is obtained from a storage server; and then acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server. The method and the device for the micro-service release are based on an interaction architecture of the message queue, the storage server and the server cluster, the storage server is used for uniformly storing the release packet of the micro-service, the release packet is periodically and automatically operated between the storage server and the server cluster through message data in the message queue, the problem that automatic processing cannot be carried out on the release flow of the micro-service due to the code incompatibility problem when different servers manage the release packet is avoided, the micro-service can be uniformly released and deployed on different server clusters, and the micro-service release efficiency is improved.
Fig. 5 is a flowchart of a specific micro-service publishing method according to an embodiment of the present disclosure. Referring to fig. 5, the micro-service publishing method includes:
s21: and setting the publishing information of the target publishing packet in a pre-created application publishing page, and uploading the target publishing packet to a storage server for storage through a preset interface of the application publishing page.
In this embodiment, the publishing information of the target publishing packet is set in a pre-created application publishing page, and the target publishing packet is uploaded to the storage server for storage through a preset interface of the application publishing page. In order to facilitate the application publishing and management, the application publishing interface is displayed in a web page form, as shown in fig. 6, an operator fills in microservice information to be published, such as which product belongs to, the number of the application to be published, and the like, in the interface of fig. 6, then selects a file (update package) to be published, and then performs a publishing operation.
S22: and generating a target check code corresponding to the target release packet, packaging the target check code and the release information into message data, and sending the message data to the message queue.
In this embodiment, after the verification input information of the application publishing website passes, a target verification code corresponding to the target publishing packet is generated, and the target verification code and the publishing information are packaged into message data and sent to the message queue. Specifically, the target release packet may be encrypted by using an encryption algorithm to obtain the target check code. For example, an MD5 encryption algorithm is adopted to prevent the check code from being cracked, and the safety is improved. That is, the selected file is encrypted and uploaded to the object storage server, and after the file is successfully uploaded, a message is generated and sent to a message queue for storage, as shown in fig. 7.
S23: and acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period, and acquiring the target publishing packet corresponding to the message data from the storage server.
S24: and acquiring a deployment instruction, and analyzing the message data according to the deployment instruction to obtain a target check code.
S25: and encrypting the issuing packet on the storage server by using an encryption algorithm so as to determine a target issuing packet with the check code consistent with the target check code from all issuing packets of the storage server.
S26: and issuing the target issuing package on the target server.
In this embodiment, the message broker application deployed on the server cluster will actively acquire message data from the message queue at a time interval (e.g., 10 seconds), and multiple deployments may implement mass texting of messages. For example, when there are 10 kubernets clusters that need to publish the micro-service, only one message broker application needs to be deployed in each cluster, because each server in the cluster can acquire the message published by the micro-service from the message queue. The message contains the address of the application which really needs to process the message (generally obtained after decryption), then the microservice publishing application is forwarded in the server intranet according to the address, then the microservice publishing application executes microservice publishing operation, and the message agent application is also a microservice. In addition, the kubernets cluster pulls the message from the message queue through the message agent application, and does not need to open more ports to the outside for other people to access, so that the system security is further ensured.
In this embodiment, after the micro-service publishing application obtains the message data from the message broker application, it starts to execute a publishing operation. The method comprises the steps of firstly analyzing message data to obtain a target check code and issued information such as file codes and the like, simultaneously encrypting all issued packages on a storage server by using the same encryption algorithm (MD5 encryption algorithm) to obtain corresponding check codes, and screening the check codes consistent with the target check codes through comparison to determine the target issued packages. After the verification is passed, the micro-service publishing application starts to call the API of Docker to package to generate a mirror image, then the mirror image is pushed to a local mirror image warehouse, after the operation is successful, the API of Kubernetes is called to execute the publishing operation, the publishing result is further returned to the application publishing website, and an operator can check the publishing result on the application publishing website page.
Therefore, before micro-service publishing is performed, the application publishing website is created in advance, the publishing information of the target publishing packet is set through the page of the application publishing website, and the target publishing packet is uploaded to the storage server through the preset interface to be stored. And simultaneously generating a target check code corresponding to the target release packet, packaging the target check code and release information into message data, sending the message data to a message queue, and determining the target release packet by using the target check code for release after the message data is obtained. The method realizes the automatic deployment based on the application publishing website and the micro-service publishing package, and supports any software development language capable of realizing containerized deployment.
Referring to fig. 8, an embodiment of the present application further discloses a micro service distribution device, which includes:
the publishing packet obtaining module 11 is configured to obtain, according to a preset period, message data related to a target publishing packet of the micro service to be published from the message queue, and obtain, from the storage server, the target publishing packet corresponding to the message data;
and the micro-service issuing module 12 is configured to obtain the deployment instruction, determine the target server from the target server cluster according to the deployment instruction, and issue the target issue packet on the target server.
As can be seen, in the embodiment of the application, firstly, message data related to a target publishing packet of a micro service to be published is obtained from a message queue according to a preset period, and the target publishing packet corresponding to the message data is obtained from a storage server; and then acquiring a deployment instruction, determining a target server from the target server cluster according to the deployment instruction, and issuing the target issuing package on the target server. The method and the device for the micro-service release are based on an interaction architecture of the message queue, the storage server and the server cluster, the storage server is used for uniformly storing the release packet of the micro-service, the release packet is periodically and automatically operated between the storage server and the server cluster through message data in the message queue, the problem that automatic processing cannot be carried out on the release flow of the micro-service due to the code incompatibility problem when different servers manage the release packet is avoided, the micro-service can be uniformly released and deployed on different server clusters, and the micro-service release efficiency is improved.
In some embodiments, the microservice issuing apparatus further includes:
the publishing packet uploading module is used for setting publishing information of the target publishing packet on a pre-established application publishing page and uploading the target publishing packet to the storage server for storage through a preset interface of the application publishing page;
the message data generation module is used for generating a target check code corresponding to the target release packet, packaging the target check code and release information into message data and sending the message data to a message queue;
the application deployment module is used for respectively deploying the message agent application and the micro-service release application in the target server cluster;
correspondingly, the release packet obtaining module 11 specifically includes:
the message data acquisition unit is used for acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period;
the analysis unit is used for acquiring the deployment instruction and analyzing the message data according to the deployment instruction to obtain a target check code;
the verification unit is used for encrypting the issuing packets on the storage server by using an encryption algorithm so as to determine target issuing packets with the verification codes consistent with the target check codes from all the issuing packets of the storage server;
correspondingly, the micro-service publishing module 12 is specifically configured to obtain message data from the message queue by using the message broker application and publish the target publishing packet on the target server by using the micro-service publishing application.
In some embodiments, the microservice issuing apparatus further includes:
the mirror image storage module is used for generating a target mirror image of the target distribution package by using the application container engine and storing the target mirror image to a local mirror image warehouse of the server cluster;
the configuration module is used for generating a deployment instruction reflecting information of the issuing server corresponding to the micro service to be issued in a way of creating a yaml configuration file of the deployment agent and/or the service according to the deployment requirement when the server cluster is a kubbernees server cluster;
correspondingly, the micro-service publishing module 12 specifically includes:
the mirror image determining unit is used for acquiring a deployment instruction and determining a target server from the kubernets server cluster according to a yaml configuration file of the deployment instruction and/or service created in the deployment instruction;
and the mirror image calling unit is used for calling the target mirror image corresponding to the target publishing package from the local mirror image warehouse and publishing the target mirror image on the target server.
Further, the embodiment of the application also provides electronic equipment. FIG. 9 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and nothing in the figure should be taken as a limitation on the scope of use of the present application.
Fig. 9 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. 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. The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the micro-service issuing method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working 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 an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, and the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the micro-service distribution method performed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include published package data collected by the electronic device 20, and the like.
Further, an embodiment of the present application further discloses a storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the steps of the micro-service publishing method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the storage medium for publishing the micro-service provided by the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A micro-service publishing method is characterized by comprising the following steps:
acquiring message data related to a target publishing packet of the micro service to be published from a message queue according to a preset period, and acquiring the target publishing packet corresponding to the message data from a storage server;
and acquiring a deployment instruction, determining a target server from a target server cluster according to the deployment instruction, and issuing the target issuing package on the target server.
2. The method according to claim 1, wherein before the obtaining the message data related to the target publishing packet of the micro service to be published from the message queue according to the preset period, the method further comprises:
setting the publishing information of the target publishing packet on a pre-created application publishing page, and uploading the target publishing packet to a storage server for storage through a preset interface of the application publishing page;
and generating a target check code corresponding to the target release packet, packaging the target check code and the release information into the message data, and sending the message data to the message queue.
3. The micro-service publishing method according to claim 2, wherein the generating of the target check code corresponding to the target publishing packet comprises:
and encrypting the target issuing packet by using an encryption algorithm to obtain a target check code.
4. The micro-service publishing method according to claim 3, wherein the obtaining the target publishing packet corresponding to the message data from the storage server comprises:
analyzing the message data to obtain the target check code, and encrypting the issuing packet on the storage server by using the encryption algorithm to determine the target issuing packet with the check code consistent with the target check code from all issuing packets of the storage server.
5. The micro-service publishing method according to claim 1, further comprising, after obtaining the target publishing packet corresponding to the message data from the storage server:
generating a target mirror image of the target distribution package by using an application container engine, and storing the target mirror image to a local mirror image warehouse of a server cluster;
correspondingly, the determining a target server from a target server cluster according to the deployment instruction to issue the target issue package on the target server includes:
determining the target server from the server cluster according to the deployment instruction;
and calling the target mirror image corresponding to the target publishing packet from the local mirror image warehouse, and publishing the target mirror image on the target server.
6. The micro-service distribution method according to claim 5, wherein when the server cluster is a kubernets server cluster, the method further comprises:
generating the deployment instruction reflecting the information of the release server corresponding to the micro-service to be released in a way of creating a yaml configuration file of the release agent and/or the service according to the deployment requirement;
correspondingly, the determining a target server from the server cluster according to the deployment instruction includes:
and determining the target server from the kubernets server cluster according to the yaml configuration file of the deployment and/or service created in the deployment instruction.
7. The microservice publishing method according to any of claims 1 to 6, further comprising:
and respectively deploying a message agent application and a micro-service publishing application in the target server cluster so as to acquire the message data from the message queue by using the message agent application and publish the target publishing packet on the target server by using the micro-service publishing application.
8. A microservice distribution apparatus, comprising:
the publishing packet acquiring module is used for acquiring message data related to a target publishing packet of the micro service to be published from the message queue according to a preset period and acquiring the target publishing packet corresponding to the message data from the storage server;
and the micro-service issuing module is used for acquiring a deployment instruction, determining a target server from a target server cluster according to the deployment instruction, and issuing the target issuing package on the target server.
9. An electronic device, comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the microservice publishing method of any of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a processor, implement the microservice distribution method of any of claims 1 to 7.
CN202111397783.8A 2021-11-23 2021-11-23 Micro-service publishing method, device, equipment and storage medium Pending CN114064054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111397783.8A CN114064054A (en) 2021-11-23 2021-11-23 Micro-service publishing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111397783.8A CN114064054A (en) 2021-11-23 2021-11-23 Micro-service publishing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114064054A true CN114064054A (en) 2022-02-18

Family

ID=80275609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111397783.8A Pending CN114064054A (en) 2021-11-23 2021-11-23 Micro-service publishing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114064054A (en)

Similar Documents

Publication Publication Date Title
US9529613B2 (en) Methods and apparatus to reclaim resources in virtual computing environments
US9307019B2 (en) Apparatus, systems and methods for deployment and management of distributed computing systems and applications
US10613853B2 (en) Updating software components through online stores
CN110737442A (en) edge application management method and system
CN112035228B (en) Resource scheduling method and device
US11216563B1 (en) Security assessment of virtual computing environment using logical volume image
JP6677294B2 (en) Network system, patch file application method, and program
JP7143417B2 (en) computing device
Tang et al. Application centric lifecycle framework in cloud
US10140054B2 (en) Retrospective snapshots in log structured storage systems
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN106550002B (en) paas cloud hosting system and method
CN114064054A (en) Micro-service publishing method, device, equipment and storage medium
CN112152988B (en) Method, system, computer device and medium for asynchronous NBMP request processing
Kaur et al. Docker and its features
US11163636B2 (en) Chronologically ordered log-structured key-value store from failures during garbage collection
CN115485677A (en) Secure data replication in a distributed data storage environment
CN110321335B (en) Modeling data downloading method and device, electronic equipment and computer storage medium
EP4036720B1 (en) Hash optimized composition cache for isolated execution environments
US20230161603A1 (en) Handling the running of software
CN109246167B (en) Container scheduling method and device
US20230176839A1 (en) Automatic management of applications in a containerized environment
CN114327752A (en) Micro-service configuration method, device and equipment
CN117909027A (en) Hierarchical container arrangement system and container arrangement method
CN117909028A (en) Hierarchical container arrangement system and container arrangement method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination