+

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
package
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.)
Granted
Application number
CN202111397783.8A
Other languages
Chinese (zh)
Other versions
CN114064054B (en
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/CN114064054B/en
Publication of CN114064054A publication Critical patent/CN114064054A/en
Application granted granted Critical
Publication of CN114064054B publication Critical patent/CN114064054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

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.一种微服务发布方法,其特征在于,包括:1. A microservice publishing method, comprising: 按照预设周期从消息队列中获取与待发布微服务的目标发布包相关的消息数据,并从存储服务器上获取与所述消息数据对应的所述目标发布包;Obtain message data related to the target distribution package of the microservice to be published from the message queue according to a preset period, and obtain the target distribution package corresponding to the message data from the storage server; 获取部署指令,并根据所述部署指令从目标服务器集群中确定出目标服务器,以将所述目标发布包在所述目标服务器上进行发布。A deployment instruction is acquired, and a target server is determined from the target server cluster according to the deployment instruction, so as to publish the target release package on the target server. 2.根据权利要求1所述的微服务发布方法,其特征在于,所述按照预设周期从消息队列中获取与待发布微服务的目标发布包相关的消息数据之前,还包括:2. The method for publishing microservices according to claim 1, wherein before acquiring the message data related to the target publishing package of the microservice to be published from the message queue according to a preset period, the method further comprises: 在预先创建的应用发布页面对所述目标发布包的发布信息进行设置,并通过所述应用发布页面的预设接口将所述目标发布包上传至存储服务器进行存储;The release information of the target release package is set on a pre-created application release page, and the target release package is uploaded to a storage server for storage through a preset interface of the application release page; 生成与所述目标发布包对应的目标校验码,并将所述目标校验码及所述发布信息封装为所述消息数据发送至所述消息队列。A target check code corresponding to the target release package is generated, and the target check code and the release information are encapsulated as the message data and sent to the message queue. 3.根据权利要求2所述的微服务发布方法,其特征在于,所述生成与所述目标发布包对应的目标校验码,包括:3. The microservice publishing method according to claim 2, wherein the generating a target check code corresponding to the target publishing package comprises: 利用加密算法对所述目标发布包进行加密处理,以得到目标校验码。The target release package is encrypted using an encryption algorithm to obtain a target check code. 4.根据权利要求3所述的微服务发布方法,其特征在于,所述从存储服务器上获取与所述消息数据对应的所述目标发布包,包括:4. The microservice publishing method according to claim 3, wherein the acquiring the target publishing package corresponding to the message data from a storage server comprises: 对所述消息数据进行解析以得到所述目标校验码,并利用所述加密算法对所述存储服务器上的发布包进行加密处理,以从所述存储服务器的全部发布包中确定出校验码与所述目标检验码一致的所述目标发布包。Parse the message data to obtain the target check code, and use the encryption algorithm to encrypt the release package on the storage server, so as to determine the checksum from all the release packages of the storage server The target distribution package whose code is consistent with the target check code. 5.根据权利要求1所述的微服务发布方法,其特征在于,所述从存储服务器上获取与所述消息数据对应的所述目标发布包之后,还包括:5. The method for publishing microservices according to claim 1, wherein after acquiring the target publishing package corresponding to the message data from a storage server, the method further comprises: 利用应用容器引擎生成所述目标发布包的目标镜像,并将所述目标镜像存储至服务器集群的本地镜像仓库;Utilize the application container engine to generate the target image of the target release package, and store the target image in the local image warehouse of the server cluster; 相应的,所述根据所述部署指令从目标服务器集群中确定出目标服务器,以将所述目标发布包在所述目标服务器上进行发布,包括:Correspondingly, determining the target server from the target server cluster according to the deployment instruction, so as to publish the target publishing package on the target server, includes: 根据所述部署指令从所述服务器集群中确定出所述目标服务器;Determine the target server from the server cluster according to the deployment instruction; 从所述本地镜像仓库调用与所述目标发布包对应的所述目标镜像,并将所述目标镜像在所述目标服务器上进行发布。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. 6.根据权利要求5所述的微服务发布方法,其特征在于,当所述服务器集群为kubernetes服务器集群,还包括:6. The microservice publishing method according to claim 5, wherein when the server cluster is a kubernetes server cluster, it further comprises: 根据部署需求通过创建deployment和/或service的yaml配置文件方式生成反映与所述待发布微服务对应的发布服务器信息的所述部署指令;Generate the deployment instruction reflecting the publishing server information corresponding to the to-be-published microservice by creating a yaml configuration file of deployment and/or service according to deployment requirements; 相应的,所述根据所述部署指令从服务器集群中确定出目标服务器,包括:Correspondingly, determining the target server from the server cluster according to the deployment instruction includes: 根据所述部署指令中创建的deployment和/或service的yaml配置文件从所述kubernetes服务器集群中确定出所述目标服务器。The target server is determined from the kubernetes server cluster according to the yaml configuration file of the deployment and/or service created in the deployment instruction. 7.根据权利要求1至6任一项所述的微服务发布方法,其特征在于,还包括:7. The microservice publishing method according to any one of claims 1 to 6, characterized in that, further comprising: 在所述目标服务器集群中分别部署消息代理应用和微服务发布应用,以利用所述消息代理应用从所述消息队列中获取所述消息数据并利用所述微服务发布应用将所述目标发布包在所述目标服务器上进行发布。A message broker application and a microservice publishing application are respectively deployed in the target server cluster, so as to use the message broker application to obtain the message data from the message queue and use the microservice publishing application to publish the target publishing package Publish on the target server. 8.一种微服务发布装置,其特征在于,包括:8. A microservice publishing device, characterized in that, comprising: 发布包获取模块,用于按照预设周期从消息队列中获取与待发布微服务的目标发布包相关的消息数据,并从存储服务器上获取与所述消息数据对应的所述目标发布包;A release package acquisition module, 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; 微服务发布模块,用于获取部署指令,并根据所述部署指令从目标服务器集群中确定出目标服务器,以将所述目标发布包在所述目标服务器上进行发布。The microservice publishing module is 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 publishing package on the target server. 9.一种电子设备,其特征在于,所述电子设备包括处理器和存储器;其中所述存储器用于存储计算机程序,所述计算机程序由所述处理器加载并执行以实现如权利要求1至7任一项所述的微服务发布方法。9. An electronic device, characterized in that the electronic device comprises 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 claims 1 to 10 7. The microservice publishing method described in any one of the items. 10.一种计算机可读存储介质,其特征在于,用于存储计算机可执行指令,所述计算机可执行指令被处理器加载并执行时,实现如权利要求1至7任一项所述的微服务发布方法。10. A computer-readable storage medium, characterized in that it is used for storing computer-executable instructions, when the computer-executable instructions are loaded and executed by a processor, the microcomputer according to any one of claims 1 to 7 is implemented. Service publishing method.
CN202111397783.8A 2021-11-23 2021-11-23 A microservice publishing method, device, equipment and storage medium Active CN114064054B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN114064054A true CN114064054A (en) 2022-02-18
CN114064054B CN114064054B (en) 2025-06-27

Family

ID=80275609

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN114064054B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955506A (en) * 2022-09-07 2023-04-11 中科云谷科技有限公司 Micro-service publishing method, device, system and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634657A (en) * 2018-12-14 2019-04-16 武汉烽火信息集成技术有限公司 A kind of micro services are packaged dispositions method and system
CN111831269A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Application development system, operation method, equipment and storage medium
CN112181439A (en) * 2020-09-24 2021-01-05 中国建设银行股份有限公司 Micro-service deployment method and device, electronic equipment and readable storage medium
CN112468337A (en) * 2020-11-19 2021-03-09 安徽江淮汽车集团股份有限公司 Deployment method, device, equipment and storage medium of Internet of vehicles microservice
CN112968960A (en) * 2021-02-22 2021-06-15 同济大学 Micro-service architecture based on open source component

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634657A (en) * 2018-12-14 2019-04-16 武汉烽火信息集成技术有限公司 A kind of micro services are packaged dispositions method and system
CN111831269A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Application development system, operation method, equipment and storage medium
CN112181439A (en) * 2020-09-24 2021-01-05 中国建设银行股份有限公司 Micro-service deployment method and device, electronic equipment and readable storage medium
CN112468337A (en) * 2020-11-19 2021-03-09 安徽江淮汽车集团股份有限公司 Deployment method, device, equipment and storage medium of Internet of vehicles microservice
CN112968960A (en) * 2021-02-22 2021-06-15 同济大学 Micro-service architecture based on open source component

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
崔蔚 等: "面向微服务的统一应用开发平台", 电力信息与通信技术, no. 09, 15 September 2016 (2016-09-15), pages 12 - 17 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955506A (en) * 2022-09-07 2023-04-11 中科云谷科技有限公司 Micro-service publishing method, device, system and computer readable storage medium

Also Published As

Publication number Publication date
CN114064054B (en) 2025-06-27

Similar Documents

Publication Publication Date Title
CN112035228B (en) Resource scheduling method and device
US11216563B1 (en) Security assessment of virtual computing environment using logical volume image
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
JP7143417B2 (en) computing device
CN110737442A (en) edge application management method and system
WO2018103521A1 (en) Monitoring method for server, device, and storage medium
CN109687987A (en) A kind of cloud platform dispositions method, device, electronic equipment and readable storage medium storing program for executing
CN106648741A (en) Application system deployment method and device
JP6677294B2 (en) Network system, patch file application method, and program
US10649768B1 (en) Development code execution using a service proxy
CN115454636A (en) Container cloud platform GPU resource scheduling method, device and application
CN113835827A (en) Application deployment method, device and electronic device based on container Docker
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN119045805A (en) Method, device and storage medium for constructing low-code application
CN114064054B (en) A microservice publishing method, device, equipment and storage medium
CN112152988B (en) Method, system, computer device and medium for asynchronous NBMP request processing
CN110321335B (en) Modeling data downloading method and device, electronic equipment and computer storage medium
Kaur et al. Docker and its features
US20250181373A1 (en) Interface and abstraction system for edge bare metal service
EP4036720B1 (en) Hash optimized composition cache for isolated execution environments
US20250036497A1 (en) Containerized microservice architecture for management applications
US20250104016A1 (en) System for the containerization of business workstations with low-cost remote user interfaces
US20230161603A1 (en) Handling the running of software

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
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载