A cross-domain automated deployment method for microservices

By setting up deployment service modules in each domain, the cross-domain deployment of microservices is achieved, and the problems of repetitive labor, operational errors and insufficient environmental adaptability in the existing technology are solved, and rapid, secure and precise cross-domain deployment is achieved. .

CN115766421BActive Publication Date: 2025-02-11CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211397274.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-02-11
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

The prior art has problems such as repetitive labor, operational errors and inability to match x86 and arm environments simultaneously when deploying microservices across domains.

Method used

By setting up deployment service modules in each domain, a cross-domain automated deployment method is implemented. This method includes checking the k8s cluster, deleting renamed resources, synchronizing resource configuration, and cross-domain deployment management, suitable for x86 and arm environments.

Benefits of technology

It realizes the rapid, secure and accurate cross-domain deployment of microservices, avoids repeated operational errors, and is suitable for a variety of environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766421B_ABST
    Figure CN115766421B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of microservice cross-domain deployment, and provides a microservice cross-domain automated deployment method, including: checking whether a deployment service module manages an available k8s cluster; checking whether resources in the available k8s cluster have duplicate names through the deployment service module, and deleting duplicated resources; synchronizing the resource configuration of the resources in step S2 to each domain; and deploying the application from the original domain to the target domain according to the front-end cross-domain application deployment request. A microservice cross-domain automated deployment method according to an exemplary embodiment of the present invention can improve the efficiency, accuracy and applicability of microservice cross-domain deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of microservice cross-domain deployment, and in particular to a microservice cross-domain automated deployment method. Background Art

[0002] The microservice platform provides convenient service management and flow control and degradation functions, allowing business services to focus more on the development of their own business codes. When deploying the online platform, users often need to perform the same deployment operations on different domains, and these operations will cause great duplication of work because most of the configurations and software packages are consistent. In particular, when there are many domains to be deployed, operation and maintenance developers may make operational errors, fill in less or incorrect information, causing deployment failures and unnecessary losses. In addition, the existing deployment cannot match both the x86 environment and the arm environment at the same time.

[0003] Therefore, how to provide a more efficient, accurate and applicable cross-domain deployment method for microservices has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, in order to overcome the shortcomings of the prior art, the present invention provides a microservice cross-domain automated deployment method, which deploys microservices in one domain, and the system platform automatically synchronizes application information to other domains to automatically deploy cross-domain applications.

[0005] The present invention provides a microservice cross-domain automated deployment method, comprising:

[0006] Step S1: Check whether the deployment service module is managed in the available k8s cluster;

[0007] Step S2: Check whether the resources in the available k8s cluster have duplicate names through the deployment service module, and delete the duplicated resources;

[0008] Step S3: Synchronize the resource configuration of the resources in step S2 to each domain;

[0009] Step S4: According to the front-end cross-domain application deployment request, the application is deployed from the original domain to the target domain.

[0010] Furthermore, step S1 of the microservice cross-domain automated deployment method of the present invention includes:

[0011] Check whether the deployment service module is connected to the available k8s cluster;

[0012] Check whether the deployment service module has loaded the kube config file of the target k8s cluster and whether it has obtained the control permission of the target k8s cluster.

[0013] Furthermore, step S2 of the microservice cross-domain automated deployment method of the present invention includes:

[0014] Deploy the service module to check whether the microservice namespace, application group, container namespace, and container application have the same name.

[0015] When the deployment service module detects that resources in the available k8s cluster have duplicate names, the resources corresponding to the application information with the original name are deleted.

[0016] Furthermore, step S3 of the microservice cross-domain automated deployment method of the present invention includes:

[0017] Synchronize resource deployment configuration to the application deployment unit that deploys service modules in each domain;

[0018] Synchronize the microservice configuration and access governance policy configuration of resources to the microservice configuration units of the service modules deployed in each domain.

[0019] Furthermore, the deployment configuration in the microservice cross-domain automated deployment method of the present invention includes: deployment type, operation configuration, resource configuration, access configuration, routing configuration and elasticity rules.

[0020] Furthermore, the operation configuration in the microservice cross-domain automated deployment method of the present invention includes: version number, startup parameters, environment variables, monitoring checks and affinity configuration.

[0021] Furthermore, step S4 of the microservice cross-domain automated deployment method of the present invention includes: according to the cross-domain application deployment request of the front end, calling the cross-domain deployment receiver on the target domain through the cross-domain deployment caller in the original domain to perform cross-domain deployment and management.

[0022] Furthermore, in step S4 of the microservice cross-domain automated deployment method of the present invention, cross-domain deployment and management are performed, including:

[0023] Specify resource management network access for cross-domain deployed applications according to deployment configuration through application deployment units in the target domain;

[0024] The microservice configuration is sent to the cross-domain deployed application through the microservice configuration unit in the target domain, and the access governance policy configuration is sent to the microservice governance unit in the target domain;

[0025] The microservice governance unit in the target domain formulates a governance policy to govern cross-domain deployed applications based on the received access governance policy configuration.

[0026] Furthermore, the microservice cross-domain automated deployment method of the present invention further includes: performing lifecycle management on the cross-domain deployed application through an application lifecycle management unit, wherein the lifecycle management includes starting, stopping, and scaling the application.

[0027] The microservice cross-domain automated deployment method of the present invention has the following beneficial effects:

[0028] 1. Through the settings of cross-domain deployment caller and cross-domain deployment receiver, users can quickly and safely deploy microservices across domains;

[0029] 2. Through cluster inspection, resource inspection, deletion of duplicated resources, and synchronization of resource configuration information, the possibility of operational errors caused by repeated cross-domain application deployment is avoided.

[0030] 3. By setting up the deployment service module in the domain, cross-domain deployment of microservices applicable to both x86 environment and arm environment is possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 The architecture diagram of the service module deployed in the present invention.

[0033] Figure 2 This is a schematic diagram of the cross-domain deployment of the present invention.

[0034] Figure 3 The figure is a flowchart of a method for cross-domain automated deployment of microservices according to an exemplary first embodiment of the present invention.

[0035] Figure 4 The figure is a schematic diagram of a flowchart of a method for cross-domain automated deployment of microservices according to an exemplary second embodiment of the present invention.

[0036] Figure 5 This is a flowchart of a method for cross-domain automated deployment of microservices according to the third exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0037] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0038] It should be noted that the following embodiments and features in the embodiments may be combined with each other in the absence of conflict; and, based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making any creative work are within the scope of protection of the present disclosure.

[0039] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0040] The technical principles of the present invention are as follows:

[0041] like Figure 1 As shown, the present invention sets a deployment service module in each domain, and the deployment service module includes a cross-domain deployment caller, a cross-domain deployment receiver, an application deployment unit, an application lifecycle management unit, a microservice configuration unit and a microservice governance unit.

[0042] like Figure 2 As shown, when a deployment service module in an original domain receives a cross-domain application deployment request from a front-end, a cross-domain deployment receiver on a target domain is called through a cross-domain deployment caller in the original domain to perform cross-domain deployment and management.

[0043] Figure 3 FIG. 1 is a flowchart of a microservice cross-domain automated deployment method according to an exemplary first embodiment of the present invention. Figure 3 As shown, the method of this embodiment includes:

[0044] Step S1: Check whether the deployment service module is managed in the available k8s cluster;

[0045] Step S2: Check whether the resources in the available k8s cluster have duplicate names through the deployment service module, and delete the duplicated resources;

[0046] Step S3: Synchronize the resource configuration of the resources in step S2 to each domain;

[0047] Step S4: According to the front-end cross-domain application deployment request, the application is deployed from the original domain to the target domain.

[0048] This embodiment avoids the possibility of operational errors caused by repeated execution of cross-domain application deployment through cluster inspection, resource inspection, deletion of duplicated resources, and synchronization of resource configuration information.

[0049] The second exemplary embodiment of the present invention provides a microservice cross-domain automated deployment method. Figure 3A preferred embodiment of the method is shown. Figure 4 Schematic diagram of the process from step S1 to step S3 of the method of this embodiment.

[0050] like Figure 3 and Figure 4 As shown, step S1 of the method of this embodiment includes:

[0051] Check whether the deployment service module is connected to the available k8s cluster;

[0052] Check whether the deployment service module has loaded the kube config file of the target k8s cluster and whether it has obtained the control permission of the target k8s cluster.

[0053] Step S2 of the method of this embodiment includes:

[0054] Deploy the service module to check whether the microservice namespace, application group, container namespace, and container application have the same name.

[0055] When the deployment service module detects that resources in the available k8s cluster have duplicate names, the resources corresponding to the application information with the original name are deleted.

[0056] Step S3 of the method of this embodiment includes:

[0057] Synchronize resource deployment configuration to the application deployment unit that deploys service modules in each domain;

[0058] Synchronize the microservice configuration and access governance policy configuration of resources to the microservice configuration units of the service modules deployed in each domain.

[0059] In the method of this embodiment, the deployment configuration includes: deployment type, operation configuration, resource configuration, access configuration, routing configuration and elasticity rules. The operation configuration includes: version number, startup parameters, environment variables, monitoring check and affinity configuration.

[0060] The third exemplary embodiment of the present invention provides a microservice cross-domain automated deployment method. Figure 3 A preferred embodiment of the method shown, step S4 of the method of this embodiment, includes: according to the cross-domain application deployment request of the front end, calling the cross-domain deployment receiver on the target domain through the cross-domain deployment caller in the original domain, and performing cross-domain deployment and management.

[0061] like Figure 5 As shown, in actual applications, cross-domain deployment and management are performed, including:

[0062] Specify resource management network access for cross-domain deployed applications according to deployment configuration through application deployment units in the target domain;

[0063] The microservice configuration is sent to the cross-domain deployed application through the microservice configuration unit in the target domain, and the access governance policy configuration is sent to the microservice governance unit in the target domain;

[0064] The microservice governance unit in the target domain formulates a governance policy to govern cross-domain deployed applications based on the received access governance policy configuration.

[0065] In actual applications, the method of this embodiment further includes: performing lifecycle management on the cross-domain deployed application through an application lifecycle management unit, wherein the lifecycle management includes starting, stopping, and scaling the application.

[0066] This embodiment enables users to quickly and safely perform cross-domain deployment of microservices through the settings of a cross-domain deployment caller and a cross-domain deployment receiver; by setting a deployment service module in the domain, it is applicable to cross-domain deployment of microservices in both x86 environment and arm environment.

[0067] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A microservice cross-domain automated deployment method, characterized in that: The method comprises: Step S1: Check whether the deployment service module is managed in the available k8s cluster; Step S2: Check whether the resources in the available k8s cluster have duplicate names through the deployment service module, and delete the resources with duplicate names; Step S3: Synchronize the resource configuration of the resources in step S2 to each domain; Step S4: deploy the application from the original domain to the target domain according to the front-end cross-domain application deployment request; Step S4, including: according to the cross-domain application deployment request of the front end, calling the cross-domain deployment receiver on the target domain through the cross-domain deployment caller in the original domain to perform cross-domain deployment and management; In step S4, cross-domain deployment and management are performed, including: Specify resource management network access for cross-domain deployed applications according to deployment configuration through application deployment units in the target domain; The microservice configuration is sent to the cross-domain deployed application through the microservice configuration unit in the target domain, and the access governance policy configuration is sent to the microservice governance unit in the target domain; The microservice governance unit in the target domain formulates a governance policy to govern cross-domain deployed applications based on the received access governance policy configuration.

2. According to claim 1, a microservice cross-domain automated deployment method is characterized in that: Step S1 includes: Check whether the deployment service module is connected to the available k8s cluster; Check whether the deployment service module has loaded the kube config file of the target k8s cluster and whether it has obtained the control permission of the target k8s cluster.

3. The microservice cross-domain automated deployment method according to claim 1, characterized in that: Step S2 comprises: Deploy the service module to check whether the microservice namespace, application group, container namespace, and container application have the same name. When the deployment service module detects that resources in the available k8s cluster have duplicate names, the resources corresponding to the application information with the original name are deleted.

4. The microservice cross-domain automated deployment method according to claim 1, characterized in that: Step S3 includes: Synchronize resource deployment configuration to the application deployment unit that deploys service modules in each domain; Synchronize the microservice configuration and access governance policy configuration of resources to the microservice configuration units of the service modules deployed in each domain.

5. The microservice cross-domain automated deployment method according to claim 4 is characterized in that: The deployment configuration includes: deployment type, operation configuration, resource configuration, access configuration, routing configuration and elasticity rules.

6. The microservice cross-domain automated deployment method according to claim 5, characterized in that: The running configuration includes: version number, startup parameters, environment variables, monitoring checks and affinity configuration.

7. The microservice cross-domain automated deployment method according to claim 1, characterized in that: The method further includes: performing lifecycle management on the cross-domain deployed application through an application lifecycle management unit, wherein the lifecycle management includes starting, stopping and scaling the application.

Citation Information

Patent Citations

  • Multi-place cross-cluster server deployment method and system

    CN110572436A