Service grid deployment method and device based on cloud platform, and electronic equipment

By deploying a service grid on the cloud platform, combined with the image warehouse and application configuration templates, the problem of low business processing efficiency in the microservice architecture is solved, and the deep integration and efficient configuration of the service grid and the microservice architecture are achieved.

CN118540335APending Publication Date: 2024-08-23INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Patent Information

Application Number
CN202410763344.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing microservice architecture cannot meet the computing needs of the cloud platform, and it lacks an effective solution to combine the service grid with the cloud platform, resulting in low business processing efficiency.

Method used

Obtain the image collection required by the service grid, copy it to the cloud platform node machine, upload it to the private image warehouse, deploy the application image based on the private image warehouse address information, generate container instances, perform service discovery and application configuration, and combine monitoring , distributed tracking, registration center and other components to optimize the service grid configuration.

Benefits of technology

It realizes the in-depth combination of service grid and microservice architecture, improves configuration efficiency and business processing efficiency, provides communication and management capabilities between applications, and improves the processing capabilities of the cloud platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540335A
    Figure CN118540335A
Patent Text Reader

Abstract

The invention discloses a service grid deployment method and device based on a cloud platform and electronic equipment, and relates to the field of cloud computing, the field of financial science and technology or other related technical fields, and the deployment method comprises the steps: obtaining a mirror image set needed by a service grid, and copying the mirror image set to a node machine of the cloud platform; uploading the mirror image set to a private mirror image warehouse, and obtaining address information of the private mirror image warehouse; deploying the application mirror images in the mirror image set to a node machine based on the address information of the private mirror image warehouse to obtain a deployed service grid; and performing service discovery and application configuration on the deployed service grid to obtain a target service grid, the application configuration being performed based on an application configuration template. According to the invention, the technical problems of lack of a technical scheme of combining a service grid with a cloud platform and low business processing efficiency in the related technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing, financial technology or other related technical fields, and in particular to a service grid deployment method and device based on a cloud platform, and an electronic device. Background Art

[0002] Currently, cloud computing technology is becoming more mature, and more and more applications and services are deployed on the cloud. With the development and evolution of software, microservice architecture has become the mainstream architecture. In this architecture, programs with different functions are deployed as a service in the operating environment, that is, deployed in the cloud platform.

[0003] As the scale of applications expands, the demand for computing is gradually increasing. The existing microservice architecture is difficult to meet the demand. How to optimize the microservice architecture of the cloud platform to meet business needs has become an urgent problem to be solved in the current cloud computing field.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a service grid deployment method and device based on a cloud platform, and an electronic device, so as to at least solve the technical problems in the related art, namely, the lack of a technical solution for combining a service grid with a cloud platform and low business processing efficiency.

[0006] According to one aspect of an embodiment of the present invention, a service grid deployment method based on a cloud platform is provided, comprising: obtaining a mirror set required for the service grid, and copying the mirror set to a node machine of the cloud platform, wherein the mirror set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; uploading the mirror set to a private mirror repository, and obtaining the address information of the private mirror repository; deploying the application images in the mirror set to the node machine based on the address information of the private mirror repository to obtain a deployed service grid, wherein after each application image in the mirror set is deployed to the node machine, a container instance is generated on the node machine; performing service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

[0007] Optionally, after deploying the application image in the image collection to the node machine based on the address information of the private image repository, it also includes: obtaining additional components of the service grid, wherein the service grid additional components include at least: a monitoring component and a distributed tracing component, the monitoring component is used to monitor the cloud platform, and the distributed tracing component is used to process request tracing across microservice instances; deploying the additional components of the service grid.

[0008] Optionally, after deploying the application image in the image collection to the node machine based on the address information of the private image repository, it also includes: registering the application under the service grid to the registration center based on the interface of the registration center; and updating the service list information of the registration center based on the registered application.

[0009] Optionally, the step of performing service discovery on the deployed service grid includes: configuring an information synchronization protocol for the registration center of the cloud platform; the service grid pulls service list information from the registration center based on the information synchronization protocol; converts the service list information into a service discovery protocol, and sends the service discovery protocol to each sidecar agent of the service grid to perform service discovery on applications registered with the cloud platform.

[0010] Optionally, the application configuration includes at least: application namespace configuration, and the step of performing application namespace configuration on the deployed service grid includes: dividing the applications based on application attributes of all applications in the service grid, and creating namespaces for the divided applications; calling a namespace configuration template, and configuring namespace information for the namespace based on the namespace configuration template, wherein the namespace information includes at least: identification information of the namespace, description information of the application under the namespace, sidecar automatic injection label information, and access permission information of the namespace.

[0011] Optionally, the application configuration also includes: application routing policy configuration, and the steps of performing application routing policy configuration on the deployed service grid include: calling a routing policy template, and selecting a target routing policy for the application under the namespace based on the routing policy template; allocating traffic routing ratios to different versions of the application based on the target routing policy; and obtaining the application routing policy for each application under the service grid based on the target routing policy and the traffic routing ratio.

[0012] Optionally, the application configuration also includes: application troubleshooting configuration, and the step of performing application troubleshooting configuration on the deployed service grid includes: configuring a traffic mirroring strategy for the application under the service grid based on an application troubleshooting template, wherein the traffic mirroring strategy is used to copy and route the traffic to a container instance for debugging based on the selected target routing strategy, and troubleshoot the traffic through the processing result of the traffic by the container instance for debugging; configuring a fault injection strategy for the application under the service grid based on the application troubleshooting template, wherein the fault injection strategy includes at least: a delayed access fault injection strategy and an interrupted access fault strategy, and the fault injection strategy is used to simulate a fault condition based on the selected target routing strategy.

[0013] According to another aspect of an embodiment of the present invention, a service grid deployment device based on a cloud platform is also provided, including: an acquisition unit, used to acquire a mirror set required for the service grid, and copy the mirror set to a node machine of the cloud platform, wherein the mirror set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; an upload unit, used to upload the mirror set to a private image warehouse, and obtain the address information of the private image warehouse; a deployment unit, used to deploy the application images in the mirror set to the node machine based on the address information of the private image warehouse, to obtain a deployed service grid, wherein after each application image in the mirror set is deployed to the node machine, a container instance is generated on the node machine; a configuration unit, used to perform service discovery and application configuration on the deployed service grid, to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

[0014] Optionally, the cloud platform-based service grid deployment device also includes: a first acquisition module, used to acquire additional components of the service grid, wherein the service grid additional components include at least: a monitoring component and a distributed tracing component, the monitoring component is used to monitor the cloud platform, and the distributed tracing component is used to process request tracing across microservice instances; a first deployment module, used to deploy the additional components of the service grid.

[0015] Optionally, the cloud platform-based service grid deployment device also includes: a first registration module, used to register the application under the service grid to the registration center based on the interface of the registration center; and a first update module, used to update the service list information of the registration center based on the registered application.

[0016] Optionally, the configuration unit includes: a first configuration module, used to configure an information synchronization protocol for the registration center of the cloud platform; a first pulling module, used for the service grid to pull service list information from the registration center based on the information synchronization protocol; a first sending module, used to convert the service list information into a service discovery protocol, and send the service discovery protocol to each sidecar agent of the service grid to perform service discovery for applications registered with the cloud platform.

[0017] Optionally, the application configuration includes at least: application namespace configuration, and the configuration unit also includes: a first division module, used to divide the applications based on application attributes of all applications in the service grid and create namespaces for the divided applications; a second configuration module, used to call a namespace configuration template, and configure namespace information for the namespace based on the namespace configuration template, wherein the namespace information includes at least: identification information of the namespace, description information of the application under the namespace, sidecar automatic injection label information, and access permission information of the namespace.

[0018] Optionally, the application configuration also includes: application routing policy configuration, and the configuration unit also includes: a first selection module, used to call the routing policy template, and select a target routing policy for the application under the namespace based on the routing policy template; a first allocation unit, used to allocate traffic routing ratios for different versions of the application based on the target routing policy; a second acquisition module, used to obtain the application routing policy of each application under the service grid based on the target routing policy and the traffic routing ratio.

[0019] Optionally, the application configuration also includes: application troubleshooting configuration, and the configuration unit also includes: a third configuration module, used to configure a traffic mirroring strategy for the application under the service grid based on the application troubleshooting template, wherein the traffic mirroring strategy is used to copy and route the traffic to the container instance for debugging based on the selected target routing strategy, and troubleshoot the traffic through the processing result of the traffic by the container instance for debugging; a fourth configuration module, used to configure a fault injection strategy for the application under the service grid based on the application troubleshooting template, wherein the fault injection strategy includes at least: a delayed access fault injection strategy and an interrupted access fault strategy, and the fault injection strategy is used to simulate the fault situation based on the selected target routing strategy.

[0020] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned cloud platform-based service grid deployment methods.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is further provided, the computer program product comprising a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned cloud platform-based service grid deployment methods is implemented.

[0022] In the present application, the following steps are performed: first, the image set required for the service grid is obtained, and the image set is copied to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; then, the image set is uploaded to a private image warehouse, and the address information of the private image warehouse is obtained; then, based on the address information of the private image warehouse, the application images in the image set are deployed to the node machine to obtain the deployed service grid; wherein, after each application image in the image set is deployed to the node machine, a container instance is generated on the node machine; finally, service discovery and application configuration are performed on the deployed service grid to obtain the target service grid, wherein the application configuration is performed based on the application configuration template.

[0023] In this application, the service grid is deployed to the cloud platform in a mirrored manner, and service discovery is performed on the deployed service grid. The service grid is deeply integrated with the existing microservice architecture. At the same time, the service grid is configured based on the application configuration template to speed up the configuration efficiency of the service grid. The service grid manages the original microservice applications and provides communication between applications, thereby improving the cloud platform's business processing efficiency, thereby solving the technical problems in related technologies such as the lack of technical solutions for combining service grids with cloud platforms and low business processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 is a flow chart of an optional cloud platform-based service grid deployment method according to an embodiment of the present invention;

[0026] Figure 2 is an optional service grid application configuration flow chart according to an embodiment of the present invention;

[0027] Figure 3 It is a schematic diagram of service discovery of an optional service grid application and stock application according to an embodiment of the present invention;

[0028] Figure 4 is a schematic diagram of an optional service grid traffic policy configuration according to an embodiment of the present invention;

[0029] Figure 5 is a schematic diagram of an optional cloud platform-based service grid deployment device according to an embodiment of the present invention;

[0030] Figure 6 It is a hardware structure block diagram of an electronic device (or mobile device) according to a cloud platform-based service grid deployment method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] To facilitate those skilled in the art to understand the present invention, some terms or nouns involved in the embodiments of the present invention are explained below:

[0034] Uniform Resource Identifier, abbreviated as URI, is a string used to identify resources on the Internet.

[0035] Sidecar proxy is a concept in the service mesh architecture. It is a lightweight network proxy that is deployed with the application container or process and runs in the same network namespace. It is used to handle all network communications in and out of the application instance, and the application itself does not need to understand these communication details.

[0036] It should be noted that the cloud platform-based service grid deployment method and its device in the present application can be used in the field of blockchain technology when encrypted data is verified based on blockchain, and can also be used in any field outside the field of blockchain technology when encrypted data is verified based on blockchain. The application does not limit the application field of the cloud platform-based service grid deployment method and its device.

[0037] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0038] It should be noted that in this application, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.

[0039] The following embodiments of the present invention can be applied to various systems / applications / devices deployed with a service grid based on a cloud platform. The present invention deploys a service grid on a cloud platform in a mirrored manner, and proposes a solution for application discovery compatible with the service grid and the microservice framework, so that the service grid can be deeply integrated with the microservice architecture, work together, and quickly deploy the service grid to the cloud platform.

[0040] The present invention automatically configures universal configuration information by applying configuration templates during the application configuration process, effectively improving the work efficiency of developers and reducing the risk of errors, thereby further improving the stability and reliability of the entire system.

[0041] The present invention is described in detail below in conjunction with various embodiments.

[0042] Embodiment 1

[0043] According to an embodiment of the present invention, an embodiment of a service grid deployment method based on a cloud platform is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0044] Figure 1 is a flow chart of an optional cloud platform-based service grid deployment method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0045] Step S101, obtaining the image set required by the service grid, and copying the image set to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer;

[0046] Step S102, uploading the image set to a private image repository and obtaining the address information of the private image repository;

[0047] Step S103, deploying the application images in the image set to the node machine based on the address information of the private image repository to obtain a deployed service grid, wherein after each application image in the image set is deployed to the node machine, a container instance is generated on the node machine;

[0048] Step S104, performing service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

[0049] Through the above steps, first obtain the image set required for the service grid, and copy the image set to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer. Then upload the image set to the private image warehouse, and obtain the address information of the private image warehouse. Then, based on the address information of the private image warehouse, deploy the application images in the image set to the node machine to obtain the deployed service grid, wherein each application image in the image set is deployed to the node machine, and a container instance is generated on the node machine. Finally, service discovery and application configuration are performed on the deployed service grid to obtain the target service grid, wherein the application configuration is based on the application configuration template.

[0050] In this embodiment, the service grid is deployed to the cloud platform in a mirrored manner, and service discovery is performed on the deployed service grid. The service grid is deeply integrated with the existing microservice architecture. At the same time, the service grid is configured based on the application configuration template to speed up the configuration efficiency of the service grid. The service grid manages the original microservice applications and provides communication between applications, thereby improving the cloud platform's business processing efficiency, thereby solving the technical problems in related technologies such as the lack of technical solutions for combining service grids with cloud platforms and low business processing efficiency.

[0051] The embodiment of the present invention is described in detail below in combination with the above steps.

[0052] With the gradual popularization of microservice architecture and the expansion of the scale of applications, the demand for cloud platforms is also increasing. How to deploy cloud platform resources more reasonably so that the microservice architecture can focus on business processing has become an urgent problem to be solved. In order to solve the complexity of inter-service communication in the microservice architecture, a service grid can be introduced in the cloud platform. The service grid can be deployed on the cloud platform as a microservice governance solution to achieve the management of microservice applications and enhance the communication between microservice applications. The service grid provides a variety of functions including load balancing, service discovery, circuit breaking, dynamic routing, secure communication, multi-language and multi-protocol support, indicators and distributed tracing, retries and deadlines, thereby enhancing the visibility, manageability, robustness and security of the microservice architecture.

[0053] In the related technologies, the configuration items of the service grid are too complicated and poorly integrated with the existing cloud platforms on the market. Developers can only develop and operate based on commands, which places high demands on users. In addition, when installing, deploying and using the service grid in an intranet environment, development and operation will face great difficulties. At the same time, after the service grid is deployed to the cloud platform, how to discover and communicate between services with existing old applications is also an urgent problem that needs to be solved.

[0054] Step S101, obtain the image set required by the service grid, and copy the image set to the node machine of the cloud platform.

[0055] The above image set includes N application images, where the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer.

[0056] It should be noted that the embodiment of the present invention is based on the image-based service grid deployment method, which has no requirements for the deployment environment. For example, the service grid can be deployed in an intranet environment. Since it is impossible to connect to an open image repository in an intranet environment, it can be deployed by creating a private image repository and image copies.

[0057] In this embodiment, when deploying the service grid, it is first necessary to obtain the applications required by the service grid, including but not limited to: grid control plane, sidecar application, etc., and package the application machine dependencies into an application image. Once the image is created, it can be used to generate a container instance deployed in the cloud platform. When the container is started, it can automatically load the image content to provide related services to the outside world. In this embodiment, the required image set is copied to the node machine of the cloud platform (which may include: physical server, virtual machine, etc.) for installing the service grid on the node machine of the cloud platform.

[0058] Step S102: upload the image set to a private image repository, and obtain address information of the private image repository.

[0059] The service grid solution of this embodiment is not limited to a certain business environment, and is also applicable to environments such as intranets that cannot connect to open image repositories on the Internet. After obtaining the image collection, a private image repository is created in the business environment where the service grid is to be deployed. All node machines can access the private image repository and obtain application images from the private image repository. The private image repository stores all application images required for the service grid, and the versions of the application images are updated in real time. The image collection copied to the node machines is uploaded to the private image repository, and the address information of the private image repository is obtained to facilitate subsequent acquisition of application images from the address.

[0060] Step S103, deploying the application image in the image set to the node machine based on the address information of the private image repository to obtain a deployed service grid.

[0061] After each application image in the above image set is deployed to a node machine, a container instance will be generated on the node machine.

[0062] In this embodiment, the application image in the image collection is installed on each node machine of the cloud platform according to the address information of the private image warehouse. During the installation, first check whether the service grid environment variables are correctly configured; then modify the default warehouse address in the installation configuration file of the service grid to the private image warehouse address, and configure the verification policy to verify the deployed target service grid; install the application image based on the installation configuration file to obtain the deployed service grid, and finally configure the service type of the service grid gateway to the IP type within the cluster to realize the deployment of the service grid on the cloud platform.

[0063] Optionally, after deploying the application image in the image collection to the node machine based on the address information of the private image repository, it also includes: obtaining additional components of the service grid, wherein the service grid additional components include at least: a monitoring component and a distributed tracing component, the monitoring component is used to monitor the cloud platform, and the distributed tracing component is used to handle request tracking across microservice instances; deploying the additional components of the service grid.

[0064] It should be noted that after installing the application image of the service grid on the node machine, the monitoring component and distributed tracing component also need to be installed on the node machine to monitor and collect indicators of microservices on the cloud platform, as well as to track requests across multiple microservice instances, so as to facilitate rapid handling of faults.

[0065] Optionally, after deploying the application image in the image collection to the node machine based on the address information of the private image repository, it also includes: registering the application under the service grid to the registration center based on the interface of the registration center; and updating the service list information of the registration center based on the registered application.

[0066] It should be noted that after the service mesh is deployed to the cloud platform, the applications under the service mesh framework are new applications for the cloud platform. In order to deeply integrate the service mesh with the microservice architecture, the applications under the service mesh framework need to be registered with the registration center for providing external services.

[0067] Step S104, performing service discovery and application configuration on the deployed service grid to obtain a target service grid.

[0068] In this embodiment, service discovery refers to the process of identifying available services in the cloud platform. After the service grid is deployed, new applications under the service grid framework need to discover services for existing applications under the microservice framework to achieve communication between applications and external services of the service grid.

[0069] In this embodiment, some common application information of the service grid is configured based on a pre-built application configuration template, which speeds up application configuration efficiency and improves configuration accuracy.

[0070] Figure 2 is an optional service grid application configuration flow chart according to an embodiment of the present invention, such as Figure 2As shown, the application configuration of the service grid includes: application namespace configuration, application routing policy configuration, application troubleshooting configuration, etc. The specific steps include: start; determine whether there is a namespace in the service grid framework; if not, create a namespace, that is, perform application namespace configuration; if it exists, create an application template; perform circuit breaker and current limiting configuration, that is, perform application troubleshooting configuration; determine whether to perform traffic management; if not, determine whether to expose it to the outside; if so, perform application traffic management configuration, that is, perform application routing policy configuration; if so, perform external service configuration for the application, if not, end this application configuration.

[0071] Optionally, the steps of performing service discovery on the deployed service grid include: configuring an information synchronization protocol for the registration center of the cloud platform; the service grid pulls service list information from the registration center based on the information synchronization protocol; converts the service list information into a service discovery protocol, and sends the service discovery protocol to each sidecar agent of the service grid to perform service discovery on applications registered with the cloud platform.

[0072] It should be noted that after the service grid is deployed to the cloud platform, service discovery is required for the service grid so that applications under the service grid framework can communicate with applications under the microservice architecture and provide services to the outside world. Specifically, it is first necessary to configure an information synchronization protocol for the registration center. The information synchronization protocol is used to synchronize information with the service grid. The service grid pulls the service list information from the registration center and converts it into a service discovery protocol. Through the service discovery protocol, the service list information can be sent to the sidecar agent. The service discovery protocol contains multiple sub-protocols, each of which is responsible for the transmission of different types of configuration information.

[0073] It should be noted that the service list information covers service discovery, service metadata, health status configuration information, etc. This information can help the service grid to achieve traffic management, fault recovery, security management, etc. The service list information can include: service registration information, service metadata information, service health status, etc. Among them, the service registration information includes the service name, IP address, port number, etc.; the service metadata information includes the service version, label, etc. The metadata information of the service can be used for multi-copy routing and load balancing of the service; the service health status information includes the health status of the registered services in the registration center.

[0074] Figure 3 is a schematic diagram of service discovery of an optional service grid application and stock application according to an embodiment of the present invention, such as Figure 3As shown in the figure, the cloud platform provides external services based on a joint gateway composed of a microservice gateway and a service mesh gateway. The container under the microservice architecture contains existing service consumers and existing service providers, and the container under the service mesh architecture contains new service providers and new service consumers. Service providers register services with the registration center, and service consumers subscribe to services with the registration center. After the service mesh is deployed, the service mesh pulls the service list and service-related information from the registration center, and sends the pulled service list and information to the sidecar agents corresponding to the new service consumers based on a specific protocol.

[0075] Optionally, the application configuration includes at least: application namespace configuration, and the step of performing application namespace configuration on the deployed service grid includes: dividing the applications based on the application attributes of all applications in the service grid, and creating namespaces for the divided applications; calling the namespace configuration template, and configuring namespace information for the namespace based on the namespace configuration template, wherein the namespace information includes at least: identification information of the namespace, description information of the application under the namespace, sidecar automatic injection label information, and access permission information of the namespace.

[0076] It should be noted that this embodiment pre-creates a namespace configuration template. The fields of the namespace configuration template include the namespace name, application description, and activation of the service governance function. According to the namespace configuration template, the user can customize the values ​​of the above fields. When performing namespace configuration, it is first necessary to determine whether there is a namespace under the service grid framework. The namespace contains multiple applications of the same type. If there is no existing namespace, the applications under the service grid can be divided, and applications with the same attributes can be divided into one namespace, for example, applications under the same business can be divided into one application space.

[0077] In this embodiment, relevant information of the newly added application can also be configured based on the pre-built application management template, including adding application version, storage settings, number of copies, mirror settings, environment variables, port mapping, deployment node labels, etc. to the application.

[0078] Optionally, the application configuration also includes: application routing policy configuration, and the steps of configuring the application routing policy for the deployed service grid include: calling the routing policy template, selecting the target routing policy for the application under the namespace based on the routing policy template; allocating traffic routing ratios for different versions of the application based on the target routing policy; and obtaining the application routing policy for each application under the service grid based on the target routing policy and the traffic routing ratio.

[0079] This embodiment provides configuration and management of routing policies based on the namespace of the sidecar field injection function of the service grid. When configuring the routing policy for the application under the namespace, first select a target routing policy from the routing policy template. The routing policy template may include the following routing policies: routing according to parameters in the request header; routing according to different URIs; routing according to different request methods; dividing the incoming traffic equally for each version of the container, etc., and then allocate traffic routing ratios for different versions of applications according to the target routing policy, that is, controlling the traffic ratio of different versions entering the same application, and finally obtaining the application routing policy of each application under the service grid based on the target routing policy and the traffic routing ratio.

[0080] Optionally, the application configuration also includes: application troubleshooting configuration, and the steps of performing application troubleshooting configuration on the deployed service grid include: configuring a traffic mirroring strategy for the application under the service grid based on the application troubleshooting template, wherein the traffic mirroring strategy is used to copy and route the traffic to the container instance for debugging based on the selected target routing strategy, and troubleshoot the traffic through the processing result of the traffic by the container instance for debugging; configuring a fault injection strategy for the application under the service grid based on the application troubleshooting template, wherein the fault injection strategy includes at least: a delayed access fault injection strategy and an interrupted access fault strategy, and the fault injection strategy is used to simulate the fault situation based on the selected target routing strategy.

[0081] It should be noted that after selecting the target routing strategy, further troubleshooting configuration can be performed based on the selected target routing strategy to help developers effectively reduce the risks brought by the launch of new applications. Troubleshooting specifically includes two configuration items: traffic mirroring and fault injection. Fault injection includes two sub-configuration items: delayed access and interrupted access. Based on the pre-built application troubleshooting configuration, a traffic mirroring strategy is configured for the application under the service grid. The traffic mirroring strategy is to copy the actual traffic of the production environment and route it to the container for debugging under the specified routing strategy without affecting the normal operation of the actual version of the production application. At the same time, it can completely restore the online scenario and check whether there is any abnormality in the traffic. In addition, based on the pre-built application troubleshooting template, a fault injection strategy can be configured for the application under the service grid, including delayed / interrupted access. Delayed / interrupted access is to inject faults into the traffic according to a set ratio to simulate fault scenarios, which are used to delay or interrupt access injection to the specified target address. It is used to simulate the system's ability to respond to faults when problems occur with service providers such as third parties during the test process, and verify the robustness of the system.

[0082] This embodiment can also provide current limiting, fuse, and timeout retry functions to ensure high availability of the system in the actual production environment. After selecting the target routing strategy, the maximum number of connections of the input restricted protocol is set, and the current limiting strategy is configured. The retry strategy is used to count error information when a business request fails. When the specified error information appears n times within the specified time period, a retry will be performed.

[0083] The above application configuration policies can be modified and applied on the visual interface without the need to configure them by writing commands, thereby ensuring the flexibility and real-time nature of application configuration.

[0084] Figure 4 is a schematic diagram of an optional service grid traffic policy configuration according to an embodiment of the present invention, such as Figure 4 As shown in the figure, when performing application configurations such as application routing policy configuration and troubleshooting policy configuration, the grayscale release policy configuration, service assurance policy configuration and troubleshooting policy configuration are performed based on the selected target routing policy. Specifically, grayscale release includes one configuration item, traffic weight, service assurance includes two configuration items, namely, circuit breaker and flow limiting, and timeout retry, and troubleshooting includes three configuration items, namely, delayed access, traffic mirroring and interrupted access.

[0085] In this embodiment, the external access configuration under the application grid architecture includes:

[0086] Applications are accessed through a unified gateway entrance, and different request ports are used to distinguish between microservice framework applications and applications within the service mesh.

[0087] When providing access to microservice applications outside the mesh, obtain a unified access entry from the microservice gateway. Different applications are distinguished based on the context configuration of each application.

[0088] Applications within the grid uniformly use objects in the cloud platform that provide services to forward external network traffic to the cluster to provide services for business requests.

[0089] This embodiment provides an overview of the node status and the operating status of containers in different namespaces through the configuration management platform. The actual operating status of containers in each node and namespace of the cloud platform is displayed to users. Users can check the usage of nodes at any time through the management platform and solve operation and maintenance problems such as storage space in a timely manner to ensure stable operation of the system.

[0090] The configuration import and export module in the management platform supports the import and export of various cloud platform resources, which is convenient for deployment in the production environment. Due to the diversity and complexity of the flow control function of the service grid, the system can generate application configuration templates through the persistent configuration information stored in the database to reduce the risks in the version handover process. At the same time, it reduces the tedious links in the version release process, thereby reducing production problems caused by operational errors.

[0091] The management platform is equipped with a link information monitoring module, which can visualize the access link information between applications in the service grid. The specific implementation method is that the sidecar application carried by the application will send the application's access traffic information to the cache space, and the link information monitoring module will capture the measurement information from the cache space and calculate the access traffic between each application in combination with the service registration list. Based on the above information, the link information monitoring module will transmit the data to the front end and draw it through the front-end data drawing component, thereby realizing the visualization of the link information.

[0092] The management platform is also equipped with an image management module, in which users can manage the images already included in the private image repository. At the same time, users can also build and upload packaged source program files to the private image repository with one click, or manually upload the built images. At the same time, this module also supports the modification of image names and tags. Specifically,

[0093] Image viewing and deletion functions: the background logic accesses the open interface of the private image repository through access requests, and performs unified viewing and deletion operations on the images.

[0094] One-click build and upload function, users can select the compressed package file to be built on the front end, and after clicking upload, the system uploads the file to be built to the specified directory of the private image warehouse of the specified server through the file transfer function. The image building command is spliced ​​according to the image name and tag name filled in by the user. The system logs in to the server through secure access technology, connects to the communication, and executes the spliced ​​command. During the process, the execution log will be displayed on the front page for users to view.

[0095] Image push function, users can select the locally built image file on the front end, click upload, the system will upload the file to be packaged to the specified directory of the private image warehouse of the specified server through the file transfer function. According to the image name and tag name filled in by the user, the image renaming instruction and the command to push the remote image warehouse are spliced. The system logs in to the server through secure access technology, connects the communication, and executes the spliced ​​commands. During the process, the execution log will be displayed on the front page for users to view.

[0096] For applications in a namespace that has enabled automatic injection of the service grid sidecar, the embodiment of the present invention automatically creates three types of resources when the application is started or stopped, saving developers' time and improving development efficiency.

[0097] The first is the Service resource of the application. The automation step will automatically create an IP-type Service resource in the cluster based on the exposed port set in the application template. The Service resource is used to provide a fixed IP address and port for the application under the service mesh architecture.

[0098] The second type is the routing policy custom resource of the container corresponding to the application version of the application, which is used to perform different versions of routing on the traffic entering the application.

[0099] The third is to configure custom resources for the routing labels of the container corresponding to the application version. This is used to indicate the routing labels of the application. The replica labels specified in the routing policy can be associated with the corresponding application containers. Then, when processing business requests, the traffic can be routed to the container specified by the replica labels.

[0100] The following is a detailed description in conjunction with another embodiment.

[0101] Embodiment 2

[0102] A cloud platform-based service grid deployment device provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can refer to the above-mentioned method embodiments and will not be repeated here.

[0103] Figure 5 is a schematic diagram of an optional cloud platform-based service grid deployment device according to an embodiment of the present invention, such as Figure 5 As shown, the cloud platform-based service grid deployment device may include: an acquisition unit 51, a construction unit 52, a deployment unit 53, and a configuration unit 54, wherein:

[0104] The acquisition unit 51 is used to acquire the image set required by the service grid and copy the image set to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer;

[0105] The uploading unit 52 is used to upload the image set to the private image warehouse and obtain the address information of the private image warehouse;

[0106] A deployment unit 53 is used to deploy the application images in the image set to the node machine based on the address information of the private image repository to obtain a deployed service grid, wherein after each application image in the image set is deployed to the node machine, a container instance is generated on the node machine;

[0107] The configuration unit 54 is used to perform service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

[0108] The above-mentioned service grid deployment device based on the cloud platform obtains the image set required by the service grid through the acquisition unit 51, and copies the image set to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; the image set is uploaded to the private image warehouse through the upload unit 52, and the address information of the private image warehouse is obtained; the application image in the image set is deployed to the node machine based on the address information of the private image warehouse through the deployment unit 53 to obtain the deployed service grid, wherein each application image in the image set is deployed to the node machine, and a container instance is generated on the node machine; the deployed service grid is subjected to service discovery and application configuration through the configuration unit 54 to obtain the target service grid, wherein the application configuration is performed based on the application configuration template.

[0109] In this embodiment, the service grid is deployed to the cloud platform in a mirrored manner, and service discovery is performed on the deployed service grid. The service grid is deeply integrated with the existing microservice architecture. At the same time, the service grid is configured based on the application configuration template to speed up the configuration efficiency of the service grid. The service grid manages the original microservice applications and provides communication between applications, thereby improving the cloud platform's business processing efficiency, thereby solving the technical problems in related technologies such as the lack of technical solutions for combining service grids with cloud platforms and low business processing efficiency.

[0110] Optionally, the cloud platform-based service grid deployment device also includes: a first acquisition module, used to acquire additional components of the service grid, wherein the service grid additional components include at least: a monitoring component and a distributed tracing component, the monitoring component is used to monitor the cloud platform, and the distributed tracing component is used to process request tracing across microservice instances; a first deployment module, used to deploy the additional components of the service grid.

[0111] Optionally, the cloud platform-based service grid deployment device also includes: a first registration module, used to register applications under the service grid to the registration center based on the interface of the registration center; and a first update module, used to update the service list information of the registration center based on the registered application.

[0112] Optionally, the configuration unit 54 includes: a first configuration module, used to configure an information synchronization protocol for the registration center of the cloud platform; a first pulling module, used for the service grid to pull service list information from the registration center based on the information synchronization protocol; a first sending module, used to convert the service list information into a service discovery protocol, and send the service discovery protocol to each sidecar agent of the service grid to perform service discovery for applications registered with the cloud platform.

[0113] Optionally, the application configuration includes at least: application namespace configuration, and the configuration unit also includes: a first division module, used to divide the application based on the application attributes of all applications in the service grid, and create a namespace for the divided application; a second configuration module, used to call the namespace configuration template, and configure namespace information for the namespace based on the namespace configuration template, wherein the namespace information includes at least: identification information of the namespace, description information of the application under the namespace, sidecar automatic injection label information, and access permission information of the namespace.

[0114] Optionally, the application configuration also includes: application routing policy configuration, and the configuration unit also includes: a first selection module, used to call the routing policy template, and select the target routing policy for the application under the namespace based on the routing policy template; a first allocation unit, used to allocate traffic routing ratios for different versions of the application based on the target routing policy; a second acquisition module, used to obtain the application routing policy of each application under the service grid based on the target routing policy and the traffic routing ratio.

[0115] Optionally, the application configuration also includes: application troubleshooting configuration, and the configuration unit also includes: a third configuration module, which is used to configure a traffic mirroring strategy for the application under the service grid based on the application troubleshooting template, wherein the traffic mirroring strategy is used to copy and route the traffic to the container instance for debugging based on the selected target routing strategy, and troubleshoot the traffic through the processing result of the traffic by the container instance for debugging; a fourth configuration module, which is used to configure a fault injection strategy for the application under the service grid based on the application troubleshooting template, wherein the fault injection strategy includes at least: a delayed access fault injection strategy and an interrupted access fault strategy, and the fault injection strategy is used to simulate the fault situation based on the selected target routing strategy.

[0116] The above-mentioned cloud platform-based service grid deployment device may also include a processor and a memory. The above-mentioned acquisition unit 51, upload unit 52, deployment unit 53, configuration unit 54, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0117] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the service grid can be deployed on the cloud platform by adjusting the kernel parameters.

[0118] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0119] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the above-mentioned cloud platform-based service grid deployment methods.

[0120] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned cloud platform-based service grid deployment methods.

[0121] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any of the above-mentioned cloud platform-based service grid deployment methods is implemented.

[0122] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a mirror set required for a service grid, and copying the mirror set to a node machine of a cloud platform, wherein the mirror set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; uploading the mirror set to a private mirror repository, and obtaining the address information of the private mirror repository; deploying the application images in the mirror set to the node machine based on the address information of the private mirror repository to obtain a deployed service grid, wherein after each application image in the mirror set is deployed to the node machine, a container instance is generated on the node machine; performing service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

[0123] Figure 6 1 is a hardware structure block diagram of an electronic device (or mobile device) according to a cloud platform-based service grid deployment method according to an embodiment of the present invention. Figure 6 As shown, the electronic device may include one or more ( Figure 6602a, 602b, ..., 602n are used to illustrate) processor 602 (processor 602 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and memory 604 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 6 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations are shown.

[0124] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0125] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0128] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. 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.

[0130] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A service grid deployment method based on a cloud platform, characterized in that: include: Obtain the image set required by the service grid, and copy the image set to the node machine of the cloud platform, wherein the image set includes N application images, and the application image is obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; Upload the image set to a private image repository and obtain the address information of the private image repository; Deploy the application image in the image set to the node machine based on the address information of the private image repository to obtain a deployed service grid, wherein after each application image in the image set is deployed to the node machine, a container instance is generated on the node machine; Perform service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

2. The deployment method according to claim 1, characterized in that: After the application image in the image set is deployed to the node machine based on the address information of the private image warehouse, the method further includes: Obtain additional components of the service grid, wherein the service grid additional components include at least: a monitoring component and a distributed tracing component, the monitoring component is used to monitor the cloud platform, and the distributed tracing component is used to process request tracing across microservice instances; Deploy additional components of the service mesh.

3. The deployment method according to claim 1, characterized in that: After the application image in the image set is deployed to the node machine based on the address information of the private image warehouse, the method further includes: Registering the application under the service grid to the registration center based on the interface of the registration center; The service list information of the registration center is updated based on the registered application.

4. The deployment method according to claim 1, characterized in that: The steps of performing service discovery on the deployed service grid include: Configuring an information synchronization protocol for a registration center of the cloud platform; The service grid pulls service list information from the registration center based on the information synchronization protocol; The service list information is converted into a service discovery protocol, and the service discovery protocol is sent to each sidecar agent of the service grid to perform service discovery on the applications registered with the cloud platform.

5. The deployment method according to claim 1, characterized in that: The application configuration at least includes: application namespace configuration, and the steps of performing application namespace configuration on the deployed service grid include: Dividing the applications based on application attributes of all applications in the service grid, and creating namespaces for the divided applications; Call a namespace configuration template, and configure namespace information for the namespace based on the namespace configuration template, wherein the namespace information includes at least: identification information of the namespace, description information of applications under the namespace, sidecar automatic injection label information, and access permission information of the namespace.

6. The deployment method according to claim 5, characterized in that: The application configuration also includes: application routing policy configuration, and the steps of applying routing policy configuration to the deployed service grid include: Calling a routing policy template, and selecting a target routing policy for the application under the namespace based on the routing policy template; Allocating traffic routing ratios for different versions of the application based on the target routing strategy; Based on the target routing strategy and the traffic routing ratio, an application routing strategy for each application under the service grid is obtained.

7. The deployment method according to claim 6, characterized in that: The application configuration also includes: application fault troubleshooting configuration, and the steps of performing application fault troubleshooting configuration on the deployed service grid include: Based on the application troubleshooting template, a traffic mirroring strategy is configured for the application under the service grid, wherein the traffic mirroring strategy is used to copy and route the traffic to the container instance for debugging based on the selected target routing strategy, and troubleshoot the traffic through the result of the processing of the traffic by the container instance for debugging; Based on the application troubleshooting template, a fault injection strategy is configured for the application under the service grid, wherein the fault injection strategy includes at least: a delayed access fault injection strategy and an interrupted access fault strategy, and the fault injection strategy is used to simulate the fault situation based on the selected target routing strategy.

8. A service grid deployment device based on a cloud platform, characterized in that: include: An acquisition unit is used to acquire an image set required by the service grid, and copy the image set to a node machine of the cloud platform, wherein the image set includes N application images, and the application images are obtained by encapsulating the application and the configuration information corresponding to the application, and N is a positive integer; An uploading unit, used to upload the image set to a private image repository and obtain address information of the private image repository; A deployment unit, configured to deploy the application images in the image set to the node machine based on the address information of the private image repository to obtain a deployed service grid, wherein after each application image in the image set is deployed to the node machine, a container instance is generated on the node machine; A configuration unit is used to perform service discovery and application configuration on the deployed service grid to obtain a target service grid, wherein the application configuration is performed based on an application configuration template.

9. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the cloud platform-based service grid deployment method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, wherein when the computer program is executed by a processor, the cloud platform-based service grid deployment method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Application migration method and system based on service grid and medium

    CN112783570A

  • Method and device for generating service grid system, and the service grid system

    CN113765965A

  • Cloud micro-service architecture application deployment and operation and maintenance management method and system

    CN115309500A

  • Method and system for service registration and discovery supporting namespace awareness

    CN115378993A

  • Method, system and device for realizing adaptation of service grid to traditional micro-service registration center

    CN115695537A

Cited By

  • Inference result determination method and device, computer equipment and storage medium

    CN120409713A