[go: up one dir, main page]

CN114968286A - Microservice publishing method, device, storage medium and electronic device - Google Patents

Microservice publishing method, device, storage medium and electronic device Download PDF

Info

Publication number
CN114968286A
CN114968286A CN202210668328.5A CN202210668328A CN114968286A CN 114968286 A CN114968286 A CN 114968286A CN 202210668328 A CN202210668328 A CN 202210668328A CN 114968286 A CN114968286 A CN 114968286A
Authority
CN
China
Prior art keywords
service
target
services
information
issuing
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.)
Withdrawn
Application number
CN202210668328.5A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210668328.5A priority Critical patent/CN114968286A/en
Publication of CN114968286A publication Critical patent/CN114968286A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a micro-service publishing method, a micro-service publishing device, a storage medium and electronic equipment. Wherein, the method comprises the following steps: configuring service basic information and deployment information, wherein the service basic information at least comprises a service name of a service to be published; receiving a service release request of a target object, wherein the service release request at least carries identification information corresponding to a plurality of target services to be released and the dependency relationship of the plurality of target services; determining the issuing priority of each target service in the plurality of target services according to the dependency relationship of the plurality of target services; and releasing each target service in batch according to the release priority, the service basic information and the deployment information. The method and the system solve the technical problems that due to the fact that the business system completes micro-service transformation, the service quantity is greatly increased, new services are published and upgraded through Jenkins, development, operation and maintenance communication cost is high, publication time is long, and the technical problems such as actual requirements cannot be met.

Description

微服务发布方法、装置、存储介质及电子设备Microservice publishing method, device, storage medium and electronic device

技术领域technical field

本申请涉及云原生领域,具体而言,涉及一种微服务发布方法、装置、存储介质及电子设备。The present application relates to the field of cloud native, in particular, to a microservice publishing method, apparatus, storage medium and electronic device.

背景技术Background technique

为了使服务更加稳定和灵活,可对应用系统进行了微服务改造,改造后服务数可从以前的上百个增加到上千个,同时业务系统可能需要定期升级一次,每次升级的服务数量可达上百个。In order to make the service more stable and flexible, the application system can be transformed with micro-services. After the transformation, the number of services can be increased from the previous hundreds to thousands. At the same time, the business system may need to be upgraded regularly. The number of services upgraded each time Up to hundreds.

相关技术中,一般可通过Jenkins进行新服务的发布以及升级,但这种方式,存在开发和运维沟通成本高,发布时间长,不能满足实际需求等技术问题。In related technologies, new services can generally be released and upgraded through Jenkins, but this method has technical problems such as high development and operation and maintenance communication costs, long release time, and inability to meet actual needs.

针对上述的问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种微服务发布方法、装置、存储介质及电子设备,以至少解决由于业务系统完成微服务化改造,服务数量大幅度增长,通过Jenkins进行新服务的发布以及升级,所造成开发和运维沟通成本高,发布时间长,不能满足实际需求等技术问题的技术问题。The embodiments of the present application provide a microservice publishing method, device, storage medium, and electronic device, so as to at least solve the problem that due to the completion of the microservice transformation of the business system, the number of services has greatly increased, and new services are published and upgraded through Jenkins. Technical problems such as high development and operation and maintenance communication costs, long release time, and inability to meet actual needs.

根据本申请实施例的一个方面,提供了一种微服务发布方法,该方法应用于云原生环境下,包括:配置服务基础信息以及部署信息,其中,服务基础信息至少包括待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务。According to an aspect of the embodiments of the present application, a method for publishing microservices is provided. The method is applied in a cloud native environment and includes: configuring basic service information and deployment information, wherein the basic service information includes at least the service name of the service to be published. , the deployment information includes at least the running location of the service to be published and the number of instances to be started; receiving a service publishing request from the target object, wherein the service publishing request at least carries the identification information corresponding to the multiple target services to be published, and the multiple target services. Service dependencies; determine the release priority of each target service in the multiple target services according to the dependencies of the multiple target services; batch release each target service according to the release priority, basic service information and deployment information.

可选地,根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务,包括:检测目标时刻是否为预定升级时刻,在目标时刻为预定升级时刻的情况下,读取待发布服务列表,其中,待发布服务列表包括:各个目标服务;查询各个目标服务对应的目标服务基础信息以及目标部署信息;根据发布优先级确定各个目标服务的发布顺序,根据发布顺序,目标服务基础信息以及目标部署信息发布目标服务。Optionally, according to the release priority, service basic information and deployment information, each target service is released in batches, including: detecting whether the target time is the scheduled upgrade time, and in the case of the target time being the scheduled upgrade time, reading the list of services to be published, The list of services to be released includes: each target service; query the basic information of the target service and target deployment information corresponding to each target service; determine the release order of each target service according to the release priority, and according to the release order, the basic information of the target service and the target deployment Information release target service.

可选地,根据发布优先级确定各个目标服务的发布顺序,根据发布顺序,目标服务基础信息以及目标部署信息发布目标服务,包括:检测多个目标服务中当前待发布的第一目标服务,判断第一目标服务是否存在依赖服务,得到判断结果;在判断结果指示第一目标服务不存在依赖服务的情况下,根据第一目标服务对应的第一目标服务基础信息以及第一目标部署信息发布第一目标服务。Optionally, determining the release order of each target service according to the release priority, and publishing the target service according to the release order, the basic information of the target service and the target deployment information, including: detecting the first target service currently to be released among the plurality of target services, and judging. Whether there is a dependent service in the first target service, obtain a judgment result; if the judgment result indicates that the first target service does not have a dependent service, publish the first target service basic information and the first target deployment information corresponding to the first target service. A target service.

可选地,根据发布优先级确定各个目标服务的发布顺序,根据发布顺序,目标服务基础信息以及目标部署信息发布目标服务,包括:检测多个目标服务中当前待发布的第一目标服务,判断第一目标服务是否存在依赖服务,得到判断结果;在判断结果指示第一目标服务存在依赖服务的情况下,发布依赖服务,其中,依赖服务的依赖关系包括:普通依赖关系和强依赖关系,强依赖关系的优先级高于普通依赖关系。Optionally, determining the release order of each target service according to the release priority, and publishing the target service according to the release order, the basic information of the target service and the target deployment information, including: detecting the first target service currently to be released among the plurality of target services, and judging. Whether there is a dependent service in the first target service, a judgment result is obtained; if the judgment result indicates that the first target service has a dependent service, the dependent service is published, wherein the dependency of the dependent service includes: a common dependency relationship and a strong dependency relationship. Dependencies take precedence over normal dependencies.

可选地,发布依赖服务,包括:检测依赖服务是否发布成功,在依赖服务发布失败的情况下,停止发布第一目标服务。Optionally, publishing the dependent service includes: detecting whether the dependent service is successfully published, and when the dependent service fails to publish, stopping publishing the first target service.

可选地,在依赖服务发布成功的情况下,发布第一目标服务。Optionally, in the case that the dependent service is successfully published, the first target service is published.

可选地,在第一目标服务发布失败的情况下,依赖服务回滚至发布前的状态Optionally, in the event that the first target service fails to be published, the dependent service is rolled back to the state before the publication

根据本申请实施例的另一方面,还提供了一种微服务发布装置,其特征在于,包括:配置模块,用于配置服务基础信息以及部署信息,其中,服务基础信息至少包括指示待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;接收模块,用于接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;确定模块,用于根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;发布模块,用于根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务。According to another aspect of the embodiments of the present application, a microservice publishing apparatus is further provided, which is characterized by comprising: a configuration module configured to configure basic service information and deployment information, wherein the basic service information includes at least an indication of a service to be published The deployment information includes at least the running location of the service to be published and the number of instances to be started; the receiving module is used to receive the service publishing request of the target object, wherein the service publishing request at least carries a plurality of target services to be published corresponding to each identification information, and the dependencies of multiple target services; the determination module is used to determine the release priority of each target service in the multiple target services according to the dependencies of the multiple target services; the release module is used to determine the release priority of each target service according to the release priority , service basic information and deployment information to publish each target service in batches.

根据本申请实施例的另一方面,还提供了一种非易失性存储介质,其特征在于,存储介质包括存储的程序,其中,在程序运行时控制存储介质所在设备执行任意一项微服务发布方法。According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, wherein the storage medium includes a stored program, and when the program is running, the device where the storage medium is located is controlled to execute any microservice publish method.

根据本申请实施例的另一方面,还提供了一种电子设备,其特征在于,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行指令,以实现任一项微服务发布方法。According to another aspect of the embodiments of the present application, an electronic device is further provided, which is characterized by comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to achieve Any microservice publishing method.

在本申请实施例中,采用云原生环境下,基于元数据配置的智能发布系统发布微服务的方式,通过配置服务基础信息以及部署信息,接收目标对象的服务发布请求以及根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级,达到了根据发布优先级智能将待升级服务发布至各自对应运行平台,简化运维工作提高部署效率的目的,从而实现了将发布顺序的复杂逻辑以简单表达式方式表呈现在开发、运维人员面前,并通过系统自动智能解析执行的技术效果,进而解决了由于业务系统完成微服务化改造,服务数量大幅度增长,通过Jenkins进行新服务的发布以及升级,所造成开发和运维沟通成本高,发布时间长,不能满足实际需求等技术问题的技术问题。In the embodiment of the present application, in the cloud native environment, the intelligent publishing system based on metadata configuration publishes micro-services, by configuring basic service information and deployment information, receiving service publishing requests from target objects and according to multiple target services. The dependency relationship determines the release priority of each target service in multiple target services, and achieves the purpose of intelligently releasing the service to be upgraded to its corresponding operating platform according to the release priority, simplifying the operation and maintenance work and improving the deployment efficiency. The complex logic of the sequence is presented in front of the development and operation and maintenance personnel in the form of simple expressions, and the technical effect of the execution is automatically and intelligently analyzed by the system, which solves the problem that the number of services has increased significantly due to the completion of the microservice transformation of the business system. Through Jenkins The release and upgrade of new services cause technical problems such as high development and operation and maintenance communication costs, long release time, and technical problems that cannot meet actual needs.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:

图1是根据本申请实施例的一种可选的为服务发布方法的流程图;1 is a flowchart of an optional method for publishing a service according to an embodiment of the present application;

图2是根据本申请实施例的一种可选的基于云原生智能发布系统的实现步骤流程图;FIG. 2 is a flowchart of implementation steps of an optional cloud-native intelligent publishing system according to an embodiment of the present application;

图3是根据本申请实施例的一种可选的智能发布模块划分示意图;3 is a schematic diagram of an optional intelligent publishing module division according to an embodiment of the present application;

图4是根据本申请实施例的一种可选的微服务发布装置的结构示意图;4 is a schematic structural diagram of an optional microservice publishing apparatus according to an embodiment of the present application;

图5是根据本申请实施例的一种可选的示例电子设备的示意性框图。FIG. 5 is a schematic block diagram of an optional exemplary electronic device according to an embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only The embodiments are part of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

为了便于本领域技术人员更好的理解本申请相关实施例,现将本申请实施例可能涉及的技术术语或者部分名词解释如下:In order to facilitate those skilled in the art to better understand the relevant embodiments of the present application, the technical terms or some terms that may be involved in the embodiments of the present application are now explained as follows:

SLA,是Service-Level Agreement的缩写,中文名为:服务等级协议,一般是协议双方做的彼此承诺,在运维的领域,很重要的一个结果指标就是系统的SLA,这个是技术向业务做的一个承诺。系统SLA的定制方法一般有两种,一种是通过时间维度进行测算,另外一种是通过用户请求状态进行测算。SLA is the abbreviation of Service-Level Agreement. The Chinese name is: Service-Level Agreement. It is generally a promise made by both parties to the agreement. In the field of operation and maintenance, a very important result indicator is the SLA of the system. a promise. There are generally two ways to customize the system SLA, one is to measure and calculate through the time dimension, and the other is to measure and calculate through the user request status.

Pod,是Kubernetes为部署、管理、编排容器化应用提出的概念,也是Kubernetes中的最小部署单元,直译过来的意思是“豆荚”;是由一组紧耦合的容器组成的容器组,其所用容器会被一致调度、同节点部署,并且在一个“共享环境”中运行。这里的“共享环境”包括:所有容器共享一个IP地址和端口空间,;允许容器之间共享存储卷,通过文件系统交互信息;容器之间可以通过IPC(inter-process communication)进行通信。Pod is a concept proposed by Kubernetes for deploying, managing, and orchestrating containerized applications. It is also the smallest deployment unit in Kubernetes. Literally translated, it means "pod"; it is a container group composed of a group of tightly coupled containers. Will be consistently scheduled, deployed on the same node, and run in a "shared environment". The "shared environment" here includes: all containers share an IP address and port space; allow containers to share storage volumes and exchange information through the file system; containers can communicate through IPC (inter-process communication).

根据本申请实施例,提供了一种微服务发布的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。According to an embodiment of the present application, an embodiment of a method for publishing microservices is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer-executable instructions, and, Although a logical order is shown in the flowcharts, in some cases steps shown or described may be performed in an order different from that herein.

图1是根据本申请实施例的微服务发布的方法,如图1所示,该方法包括如下步骤:FIG. 1 is a method for publishing microservices according to an embodiment of the present application. As shown in FIG. 1 , the method includes the following steps:

步骤S102,配置服务基础信息以及部署信息,其中,服务基础信息至少包括待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数。Step S102, configure basic service information and deployment information, wherein the basic service information includes at least the service name of the service to be published, and the deployment information at least includes the running location of the service to be published and the number of instances to be started.

在步骤S102中,首先将服务基本信息和部署信息元数据化,然后再对服务基础信息以及部署信息进行配置,由此便连接了智能发布平台到容器云集群的认证,使其能调用服务器进行服务管理。In step S102, the basic service information and deployment information are metadataized first, and then the basic service information and deployment information are configured, thereby connecting the intelligent publishing platform to the authentication of the container cloud cluster, so that the server can be called for Service management.

步骤S104,接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系。Step S104: Receive a service release request from the target object, wherein the service release request at least carries identification information corresponding to multiple target services to be released, and dependencies of the multiple target services.

在步骤S104中,接受目标对象的服务发布请求,可由开发人员完成,服务发布请求中所携带的目标服务具有不同的种类,同时每一种类都有各自对应的标识信息,可根据标识信息判断目标服务的种类以及各个目标服务的依赖关系。In step S104, the service release request of the target object is accepted, which can be completed by the developer. The target service carried in the service release request has different types, and each type has its own corresponding identification information, and the target service can be determined according to the identification information. The kind of service and the dependencies of each target service.

举例而言,服务可以分为具有依赖关系的服务和不具有依赖关系的服务,不具有依赖关系的服务称为本服务,其标识信息记为dep,具有依赖关系的服务可以分为普通依赖关系服务和强依赖关系服务,其中,普通依赖关系记为dep+,强依赖关系记为dep++。For example, services can be divided into services with dependencies and services without dependencies. A service without dependencies is called this service, and its identification information is recorded as dep. Services with dependencies can be divided into ordinary dependencies. Services and services with strong dependencies, where common dependencies are recorded as dep+, and strong dependencies are recorded as dep++.

步骤S106,根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级。Step S106, determining the release priority of each target service in the plurality of target services according to the dependencies of the plurality of target services.

在步骤S106中,多个目标服务的依赖关系至少包括:普通依赖关系、强依赖关系,其中,强依赖关系的优先级强于普通依赖关系。In step S106, the dependencies of the multiple target services at least include: common dependencies and strong dependencies, wherein the priority of the strong dependencies is stronger than that of the normal dependencies.

举例而言,例如A服务发布强依赖B服务先发布并且执行完数据库脚本C,配置为Adep B+,A dep C+,且自动配置B、C执行优先级高于A。For example, for example, the release of service A strongly depends on the release of service B first and the database script C is executed, and the configuration is Adep B+, A dep C+, and the execution priority of automatic configuration B and C is higher than that of A.

步骤S108,根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务。Step S108: Publish each target service in batches according to the publishing priority, basic service information and deployment information.

在步骤S108中,批量发布时,根据发布优先级顺序,优先发布优先级高的服务,再发布优先级低的服务。In step S108, when publishing in batches, according to the priority order of publishing, the services with higher priorities are published first, and then the services with lower priorities are published.

需要说明的是,在发布目标服务之前,首先检测目标时刻是否为预定升级时刻,再确定目标时刻为预定升级时刻的情况下,读取待发布服务列表,其中,待发布服务列表包括:各个目标服务;查询各个目标服务对应的目标服务基础信息以及目标部署信息;根据发布优先级确定各个目标服务的发布顺序,根据发布顺序,目标服务基础信息以及目标部署信息发布目标服务。It should be noted that, before publishing the target service, it is first detected whether the target time is the scheduled upgrade time, and then if the target time is determined to be the scheduled upgrade time, the list of services to be published is read, wherein the list of services to be published includes: each target service; query the basic information of the target service and target deployment information corresponding to each target service; determine the release order of each target service according to the release priority, and release the target service according to the release order, the basic information of the target service and the target deployment information.

可选地,根据发布顺序,目标服务基础信息以及目标部署信息发布目标服务,包括:检测多个目标服务中当前待发布的第一目标服务,判断第一目标服务是否存在依赖服务,得到判断结果。Optionally, publishing the target service based on the target service basic information and target deployment information according to the publishing sequence includes: detecting a first target service currently to be published among multiple target services, judging whether the first target service has a dependent service, and obtaining a judgment result .

本申请一些可选的实施例中,具体地,若判断结果指示第一目标服务不存在依赖服务,则根据第一目标服务对应的第一目标服务基础信息以及第一目标部署信息发布第一目标服务,若判断结果指示第一目标服务存在依赖服务,则发布依赖服务,其中,依赖服务的依赖关系包括:普通依赖关系和强依赖关系,强依赖关系的优先级高于普通依赖关系。In some optional embodiments of the present application, specifically, if the judgment result indicates that the first target service does not have a dependent service, the first target service is published according to the basic information of the first target service corresponding to the first target service and the first target deployment information. For the service, if the judgment result indicates that the first target service has a dependent service, the dependent service is published, wherein the dependencies of the dependent service include: common dependencies and strong dependencies, and the priority of strong dependencies is higher than that of common dependencies.

需要说明的是,在发布依赖服务之后,需要检测依赖服务是否发布成功,若依赖服务发布失败,则停止发布第一目标服务;若依赖服务发布成功,则发布第一目标服务;在第一目标服务发布失败的情况下,依赖服务回滚至发布前的状态。It should be noted that after publishing the dependent service, it is necessary to check whether the dependent service is successfully published. If the dependent service fails to be published, stop publishing the first target service; if the dependent service is successfully published, publish the first target service; In the case of service release failure, the dependent service is rolled back to the state before release.

举例而言,在批量发布时,优先发布优先级高的服务,并且检查其依赖关系,如强依赖服务未发布则将此服务压入堆栈,先发布强依赖关系服务,如强依赖服务发布失败,则本服务停止发布:例如上述例子中,A发布时,检查B、C是否发布成功,如B未发布,则先发布B服务,如B发布失败,A也将停止发布;如A发布失败,其强关联且发布成功的B、C服务如果是dep++强依赖模式将进行回滚。For example, when publishing in batches, first publish services with high priority and check their dependencies. If a strongly dependent service is not published, push the service into the stack and publish the strongly dependent service first. If the strongly dependent service fails to publish , then the service will stop publishing: For example, in the above example, when A publishes, check whether B and C are published successfully, if B is not published, then publish B service first, if B fails to publish, A will also stop publishing; if A fails to publish , the B and C services that are strongly associated and successfully released will be rolled back if they are in the dep++ strong dependency mode.

图2是根据本申请实施例的一种可选的基于云原生智能发布系统的实现步骤流程图,如图2所示,首先配置服务基本信息和部署信息,然后在申请发布的时候,确定是否具有依赖关系,若不存在依赖关系,则直接发布服务,若存在依赖关系,则该服务目前处于依赖服务状态,然后判断该依赖服务是否已经发布,若未发布,则直接发布该依赖服务。FIG. 2 is a flowchart of the implementation steps of an optional cloud-native intelligent publishing system according to an embodiment of the present application. As shown in FIG. 2 , first configure basic service information and deployment information, and then determine whether to apply for publishing There is a dependency relationship. If there is no dependency relationship, the service will be published directly. If there is a dependency relationship, the service is currently in a dependent service state, and then it is judged whether the dependent service has been published. If not, the dependent service will be published directly.

图3是根据本申请实施例的一种可选的智能发布模块划分示意图。如图3所示,该模块包括:FIG. 3 is a schematic diagram of an optional intelligent publishing module division according to an embodiment of the present application. As shown in Figure 3, the module includes:

微服务管理模块,用于维护微服务基本信息和部署等信息,其中,服务基本信息包括服务名称、所属业务、SLA指标等,部署信息包括所属集群、命名空间、POD数量、健康检查脚本、发布成功标志等。The microservice management module is used to maintain the basic information and deployment information of microservices. The basic service information includes service name, business, SLA indicators, etc., and deployment information includes the cluster to which it belongs, namespace, number of PODs, health check scripts, and releases. success signs etc.

智能发布模块,定义依赖关系表达式,提供图形化展示功能和解析引擎,确保服务按正确顺序发布;The intelligent publishing module defines dependency expressions, provides graphical display functions and a parsing engine, and ensures that services are published in the correct order;

云原生平台模块,容器编排平台,为服务提供运行环境,进行服务全生命周期管理,并对外提供API接口。The cloud native platform module, the container orchestration platform, provides an operating environment for services, manages the full life cycle of services, and provides external API interfaces.

在该智能发布模块划分中,微服务管理模块,用于维护微服务基本信息和部署等信息,其中,服务基本信息包括服务名称、所属业务、SLA指标等,部署信息包括所属集群、命名空间、POD数量、健康检查脚本、发布成功标志等。智能发布模块,定义依赖关系表达式,提供图形化展示功能和解析引擎,确保服务按正确顺序发布;云原生平台模块,容器编排平台,为服务提供运行环境,进行服务全生命周期管理,并对外提供API接口,达到了根据发布优先级智能将待升级服务发布至各自对应运行平台,简化运维工作提高部署效率的目的,从而实现了将发布顺序的复杂逻辑以简单表达式方式表呈现在开发、运维人员面前,并通过系统自动智能解析执行的技术效果,进而解决了由于业务系统完成微服务化改造,服务数量大幅度增长,而这些服务之间存在网状调用关系所造成的如何将发布顺序的复杂逻辑以简单方式呈现技术问题。In this intelligent publishing module division, the microservice management module is used to maintain the basic information and deployment information of microservices. The basic service information includes service name, business, SLA indicators, etc. Number of PODs, health check scripts, release success signs, etc. The intelligent publishing module defines dependency expressions, provides a graphical display function and an analysis engine, and ensures that services are published in the correct order; the cloud native platform module, the container orchestration platform, provides a running environment for services, manages the full life cycle of services, and provides external Provides an API interface to intelligently release the services to be upgraded to their respective operating platforms according to the release priority, simplifying the operation and maintenance work and improving the deployment efficiency, thereby realizing the complex logic of the release sequence in the form of simple expressions. , in front of the operation and maintenance personnel, and through the system's automatic and intelligent analysis of the technical effect of execution, it solves the problem of how to use the network call relationship between these services due to the completion of the micro-service transformation of the business system and the large increase in the number of services. The complex logic of the release order presents technical issues in a simple way.

图4是根据本申请实施例的一种微服务发布装置,如图4所示,该装置包括:FIG. 4 is a microservice publishing apparatus according to an embodiment of the present application. As shown in FIG. 4 , the apparatus includes:

配置模块40,用于配置服务基础信息以及部署信息,其中,服务基础信息至少包括指示待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;The configuration module 40 is used for configuring basic service information and deployment information, wherein the basic service information includes at least a service name indicating the service to be published, and the deployment information includes at least the running location of the service to be published and the number of instances to be started;

接收模块42,用于接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;A receiving module 42, configured to receive a service release request of the target object, wherein the service release request at least carries the respective identification information corresponding to the multiple target services to be released, and the dependencies of the multiple target services;

确定模块44,用于根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;A determination module 44, configured to determine the release priority of each target service in the plurality of target services according to the dependencies of the plurality of target services;

发布模块46,用于根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务。The publishing module 46 is configured to publish each target service in batches according to the publishing priority, basic service information and deployment information.

该微服务的发布装置中,配置模块40,用于配置服务基础信息以及部署信息,其中,服务基础信息至少包括指示待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;接收模块42,用于接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;确定模块44,用于根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;发布模块46,用于根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务,达到了根据发布优先级智能将待升级服务发布至各自对应运行平台,简化运维工作提高部署效率的目的,从而实现了将发布顺序的复杂逻辑以简单表达式方式表呈现在开发、运维人员面前,并通过系统自动智能解析执行的技术效果,进而解决了由于业务系统完成微服务化改造,服务数量大幅度增长,通过Jenkins进行新服务的发布以及升级,所造成开发和运维沟通成本高,发布时间长,不能满足实际需求等技术问题技术问题。In the microservice publishing apparatus, the configuration module 40 is configured to configure basic service information and deployment information, wherein the basic service information includes at least a service name indicating the service to be published, and the deployment information includes at least the running location of the service to be published and the to-be-launched service. The receiving module 42 is used to receive the service release request of the target object, wherein the service release request at least carries the identification information corresponding to each of the multiple target services to be released, and the dependencies of the multiple target services; the determining module 44 , used to determine the release priority of each target service in the multiple target services according to the dependencies of the multiple target services; the release module 46 is used to release each target service in batches according to the release priority, basic service information and deployment information, so as to achieve The purpose of intelligently releasing the services to be upgraded to their respective operating platforms according to the release priority, simplifying the operation and maintenance work and improving the deployment efficiency, thus realizing the complex logic of the release order is presented in front of the development and operation and maintenance personnel in the form of simple expressions. , and through the system's automatic and intelligent analysis of the technical effect of execution, it solves the problem of high development and operation and maintenance communication costs caused by the completion of the micro-service transformation of the business system, the substantial increase in the number of services, and the release and upgrade of new services through Jenkins. Technical problems such as technical problems such as long release time and inability to meet actual needs.

根据本申请实施例的另一方面,还提供了一种非易失性存储介质,存储介质包括存储的程序,其中,在程序运行时控制存储介质所在设备执行任意一项微服务发布的方法。According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, the storage medium includes a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute any method for publishing microservices.

具体地,上述存储介质用于存储以下功能的程序指令,实现以下功能:Specifically, the above-mentioned storage medium is used to store the program instructions of the following functions to realize the following functions:

配置服务基础信息以及部署信息,其中,服务基础信息至少包括待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务Configure basic service information and deployment information, where the basic service information includes at least the service name of the service to be published, and the deployment information at least includes the running location of the service to be published and the number of instances to be started; receive a service publication request from the target object, where the service The publishing request carries at least the respective identification information of the multiple target services to be published, and the dependencies of the multiple target services; the publishing priority of each target service in the multiple target services is determined according to the dependencies of the multiple target services; Release priority, service basic information and deployment information Batch release each target service

需要说明的是,在本实施例中,上述存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。上述存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。It should be noted that, in this embodiment, the above storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of the above storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

在本申请一示例性实施例中,还提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现上述任一项的微服务发布的方法。In an exemplary embodiment of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, any one of the foregoing microservice publishing methods is implemented.

可选地,该计算机程序在被处理器执行时可实现如下步骤:Optionally, the computer program can implement the following steps when executed by the processor:

配置服务基础信息以及部署信息,其中,服务基础信息至少包括待发布服务的服务名称,部署信息至少包括待发布服务的运行位置以及待启动的实例数;接收目标对象的服务发布请求,其中,服务发布请求至少携带有待发布的多个目标服务各自对应的标识信息,以及多个目标服务的依赖关系;根据多个目标服务的依赖关系确定多个目标服务中每个目标服务的发布优先级;根据发布优先级,服务基础信息以及部署信息批量发布各个目标服务。Configure basic service information and deployment information, where the basic service information includes at least the service name of the service to be published, and the deployment information at least includes the running location of the service to be published and the number of instances to be started; receive a service publication request from the target object, where the service The publishing request carries at least the respective identification information of the multiple target services to be published, and the dependencies of the multiple target services; the publishing priority of each target service in the multiple target services is determined according to the dependencies of the multiple target services; Publish priority, service basic information and deployment information to publish each target service in batches.

根据本申请的实施例提供了一种电子设备,该电子设备包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述任一项的微服务发布的方法。According to an embodiment of the present application, an electronic device is provided, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions Executed by at least one processor, so that the at least one processor can execute any one of the above-mentioned methods for publishing microservices.

可选地,上述电子设备还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入设备输出设备和上述处理器连接。Optionally, the above electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the above-mentioned processor, and the input device and the output device are connected to the above-mentioned processor.

图5示出了可以用来实施本申请的实施例的示例电子设备500的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。FIG. 5 shows a schematic block diagram of an example electronic device 500 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.

如图5所示,设备500包括计算单元501,其可以根据存储在只读存储器(ROM)502中的计算机程序或者从存储单元508加载到随机访问存储器(RAM)503中的计算机程序,来执行各种适当的动作和处理。在RAM 503中,还可存储设备500操作所需的各种程序和数据。计算单元501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG. 5 , the device 500 includes a computing unit 501 that can be executed according to a computer program stored in a read only memory (ROM) 502 or loaded from a storage unit 508 into a random access memory (RAM) 503 Various appropriate actions and handling. In the RAM 503, various programs and data necessary for the operation of the device 500 can also be stored. The computing unit 501 , the ROM 502 , and the RAM 503 are connected to each other through a bus 504 . An input/output (I/O) interface 505 is also connected to bus 504 .

设备500中的多个部件连接至I/O接口505,包括:输入单元506,例如键盘、鼠标等;输出单元507,例如各种类型的显示器、扬声器等;存储单元508,例如磁盘、光盘等;以及通信单元509,例如网卡、调制解调器、无线通信收发机等。通信单元509允许设备500通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Various components in the device 500 are connected to the I/O interface 505, including: an input unit 506, such as a keyboard, mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc. ; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元501可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元501的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元501执行上文所描述的各个方法和处理,例如微服务的发布方法。例如,在一些实施例中,方法XXX可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元508。在一些实施例中,计算机程序的部分或者全部可以经由ROM 502和/或通信单元509而被载入和/或安装到设备500上。当计算机程序加载到RAM 503并由计算单元801执行时,可以执行上文描述的微服务的发布方法的一个或多个步骤。备选地,在其他实施例中,计算单元501可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行微服务发布的方法。Computing unit 501 may be various general-purpose and/or special-purpose processing components with processing and computing capabilities. Some examples of computing units 501 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 executes the various methods and processes described above, such as the publishing method of the microservice. For example, in some embodiments, method XXX may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508 . In some embodiments, part or all of the computer program may be loaded and/or installed on device 500 via ROM 502 and/or communication unit 509 . When the computer program is loaded into RAM 503 and executed by computing unit 801, one or more steps of the above-described publishing method of microservices may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method of microservice publishing by any other suitable means (eg, by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein above may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips system (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.

用于实施本申请的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, performs the functions/functions specified in the flowcharts and/or block diagrams. Action is implemented. The program code may execute entirely on the machine, partly on the machine, partly on the machine and partly on a remote machine as a stand-alone software package or entirely on the remote machine or server.

在本申请的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this application, a machine-readable medium may be a tangible medium that may contain or store the program for use by or in connection with the instruction execution system, apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a distributed system server, or a server combined with blockchain.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are only illustrative, for example, the division of units may be a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or integrated into Another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of units or modules, and may be in electrical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes .

以上仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are only the preferred embodiments of the present application. It should be pointed out that for those skilled in the art, some improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as The protection scope of this application.

Claims (10)

1. A micro-service release method is applied to a cloud native environment and comprises the following steps:
configuring service basic information and deployment information, wherein the service basic information at least comprises a service name of a service to be published, and the deployment information at least comprises an operation position of the service to be published and the number of instances to be started;
receiving a service release request of a target object, wherein the service release request at least carries identification information corresponding to a plurality of target services to be released and the dependency relationship of the plurality of target services;
determining the issuing priority of each target service in the target services according to the dependency relationship of the target services;
and releasing each target service in batch according to the release priority, the service basic information and the deployment information.
2. The method according to claim 1, wherein the mass publishing of the target services by the service basic information and the deployment information according to the publishing priority comprises:
detecting whether a target moment is a preset upgrading moment, and reading the service list to be issued under the condition that the target moment is the preset upgrading moment, wherein the service list to be issued comprises: each target service;
inquiring target service basic information and target deployment information corresponding to each target service;
and determining the issuing sequence of each target service according to the issuing priority, and issuing the target service according to the issuing sequence, the target service basic information and the target deployment information.
3. The method according to claim 2, wherein determining a distribution order of each target service according to the distribution priority, and distributing the target service according to the distribution order, the target service basic information, and the target deployment information comprises:
detecting a first target service to be issued currently in the plurality of target services, and judging whether the first target service has a dependent service to obtain a judgment result;
and issuing the first target service according to first target service basic information and first target deployment information corresponding to the first target service under the condition that the judgment result indicates that the first target service does not have the dependent service.
4. The method according to claim 2, wherein determining a distribution order of each target service according to the distribution priority, and distributing the target service according to the distribution order, the target service basic information, and the target deployment information comprises:
detecting a first target service to be issued currently in the plurality of target services, and judging whether the first target service has a dependent service to obtain a judgment result;
issuing the dependent service under the condition that the judgment result indicates that the first target service has the dependent service, wherein the dependent relationship of the dependent service comprises: the system comprises a normal dependency relationship and a strong dependency relationship, wherein the priority of the strong dependency relationship is higher than that of the normal dependency relationship.
5. The method of claim 4, wherein publishing the dependent service comprises:
and detecting whether the dependent service is successfully issued, and stopping issuing the first target service under the condition that the dependent service is unsuccessfully issued.
6. The method of claim 5, wherein the first target service is published if the dependent service publication is successful.
7. The method of any one of claims 3 to 6, wherein in case of a failure of the first target service to publish, the dependent service rolls back to a pre-publication state.
8. A microservice distribution apparatus, comprising:
the system comprises a configuration module, a service management module and a service release module, wherein the configuration module is used for configuring service basic information and deployment information, the service basic information at least comprises a service name indicating a service to be released, and the deployment information at least comprises an operation position of the service to be released and the number of instances to be started;
a receiving module, configured to receive a service publishing request of a target object, where the service publishing request at least carries identification information corresponding to a plurality of target services to be published, and a dependency relationship between the plurality of target services;
the determining module is used for determining the issuing priority of each target service in the target services according to the dependency relationship of the target services;
and the issuing module is used for issuing each target service in batch according to the issuing priority, the service basic information and the deployment information.
9. A non-volatile storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the micro-service issuing method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the microservice issuing method of any of claims 1-7.
CN202210668328.5A 2022-06-14 2022-06-14 Microservice publishing method, device, storage medium and electronic device Withdrawn CN114968286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210668328.5A CN114968286A (en) 2022-06-14 2022-06-14 Microservice publishing method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210668328.5A CN114968286A (en) 2022-06-14 2022-06-14 Microservice publishing method, device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114968286A true CN114968286A (en) 2022-08-30

Family

ID=82962074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210668328.5A Withdrawn CN114968286A (en) 2022-06-14 2022-06-14 Microservice publishing method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114968286A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914403A (en) * 2022-11-16 2023-04-04 中国工商银行股份有限公司 Distributed service registration processing method and device
CN115955506A (en) * 2022-09-07 2023-04-11 中科云谷科技有限公司 Micro-service publishing method, device, system and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130880A (en) * 2020-09-27 2020-12-25 平安医疗健康管理股份有限公司 Micro-service publishing method and device, computer equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130880A (en) * 2020-09-27 2020-12-25 平安医疗健康管理股份有限公司 Micro-service publishing method and device, computer equipment and storage medium

Cited By (2)

* 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
CN115914403A (en) * 2022-11-16 2023-04-04 中国工商银行股份有限公司 Distributed service registration processing method and device

Similar Documents

Publication Publication Date Title
CN111831420B (en) Method for task scheduling, related device and computer program product
US7673029B2 (en) Grid automation bus to integrate management frameworks for dynamic grid management
US9015278B2 (en) Transaction correlation using three way handshake
CN113220420B (en) Service monitoring method, device, equipment, storage medium and computer program product
CN112052133B (en) Method and device for monitoring service system based on Kubernetes
CN114968286A (en) Microservice publishing method, device, storage medium and electronic device
CN110134488A (en) A container application monitoring method and system
US10223407B2 (en) Asynchronous processing time metrics
EP4239979A1 (en) Data download method and apparatus, electronic device, and readable storage medium
CN114547046A (en) Standing book data management method, device, equipment and computer storage medium
CN117009000A (en) Component, method, device, apparatus and medium for operating open source buddha system
CN117149413A (en) Cloud service integrated deployment system and method for universal AI algorithm model
CN117314440A (en) Data processing method and device, electronic equipment and storage medium
US11966723B2 (en) Automatic management of applications in a containerized environment
CN114201564A (en) Map production task processing method and device, electronic equipment and storage medium
CN114584605B (en) Service distribution method and device, electronic equipment and storage medium
CN115036044B (en) A message processing method, device, electronic device and storage medium
CN117251250B (en) Container management method based on cloud native platform and related equipment
CN114386838B (en) Indicator configuration method, device, computer equipment and computer readable storage medium
CN117082049B (en) File transfer method and device
WO2025074399A1 (en) Method and system for handling of event(s) concerning policies related to one or more operations
CN117806797A (en) Unified scheduling method and device for tasks, electronic equipment and storage medium
WO2025069096A1 (en) Method and system for communication between a microservice and a policy execution engine (peegn)
CN119271216A (en) Cloud phone script publishing method, device, electronic device and storage medium
CN117632492A (en) Resource management method, device, storage medium and electronic equipment

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220830

WW01 Invention patent application withdrawn after publication