System, method and device for deploying cloud database

By using container orchestration clusters and instance management modules for resource tuning in a multi-cluster environment, the limitations of cloud native architectures when supporting distributed databases are solved, and high-availability cloud database deployment across cities and computer rooms is realized, and the financial High availability demand in the industry.

CN119271349APending Publication Date: 2025-01-07JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411264841.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Cloud-native architectures have limitations when supporting distributed databases, especially in high availability and cross-client room disaster recovery scenarios, which are difficult to meet the needs of the financial industry.

Method used

By using the first and second container orchestration clusters in a multi-cluster environment, using the instance management module to acquire distributed locks, split deployment instructions, and tuning resources between each container orchestration cluster, achieving cross-cluster cloud database deployment and High availability.

Benefits of technology

It realizes the deployment of high-availability cloud databases across cities and computer rooms, solves the limitations of cloud-native architectures when supporting distributed databases, and ensures the stability and availability of databases in multi-cluster environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271349A_ABST
    Figure CN119271349A_ABST
Patent Text Reader

Abstract

The invention relates to a deployment system, method and device of a cloud database. The system comprises a first container arrangement cluster and a second container arrangement cluster, the first container arrangement cluster comprises a first instance management module, and the second container arrangement cluster comprises a second instance management module; the first instance management module is used for receiving a deployment instruction of a cloud database issued by a user, obtaining a distributed lock according to the deployment instruction to enable a first container arrangement cluster to become a leader cluster, obtaining cluster information of a second container arrangement cluster, splitting the deployment instruction into a plurality of deployment sub-instructions according to the cluster information, and sending the deployment sub-instructions to the user; distributing the plurality of deployment sub-instructions to corresponding second container arrangement clusters; the first instance management module and the second instance management module are further used for performing resource tuning according to the deployment sub-instruction and deploying the cloud database; and the first instance management module is also used for feeding back a deployment completion instruction. According to the method and the device, the technical problem of limitation of the cloud native architecture in supporting the distributed database is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a cloud database deployment system, method, and device. Background Art

[0002] Since the concept of cloud native was proposed, with the continuous development of technology and the growth of enterprise needs, cloud native architecture has gradually become mainstream. Its main features include modularity, observability, deployability, testability, processability and replaceability. The latest definition of cloud native is 4 key points: DevOps, continuous delivery, microservices, and containers. These features and key points and their corresponding specifications have helped enterprises achieve technological innovation in security, efficiency and cost. However, stateful applications such as databases still face many challenges in the process of fully moving to the cloud. For distributed databases with high availability across cities and data centers, especially in the financial industry, the technical limitations of cloud platforms have become one of the key issues. Currently, many cloud platforms limit Kubernetes clusters to a single data center based on their network architecture, which conflicts with the high availability requirements of distributed databases. The financial industry usually requires databases to be deployed across cities to ensure that even if a data center fails, other data centers can continue to provide services. Therefore, although cloud native architecture has made great progress in stateless applications, further technological breakthroughs are needed to fully support complex stateful applications, especially scenarios that require high availability and disaster recovery across data centers. Summary of the invention

[0003] The present application provides a cloud database deployment system, method, and device to solve the technical problem of the limitations of cloud native architecture in supporting distributed databases.

[0004] In a first aspect, the present application provides a cloud database deployment system, comprising: a first container orchestration cluster and a second container orchestration cluster, the first container orchestration cluster comprising a first instance management module, the second container orchestration cluster comprising a second instance management module, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in a multi-cluster environment where the first container orchestration cluster is located; the first instance management module is used to receive a cloud database deployment instruction issued by a user, obtain a distributed lock according to the deployment instruction so that the first container orchestration cluster becomes a leader cluster, obtain cluster information of the second container orchestration cluster, split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster; the first instance management module and the second instance management module are also used to perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful; the first instance management module is also used to feedback a deployment completion instruction when it is determined that the deployment of the cloud database is completed.

[0005] As an optional example, the first instance management module includes: a shared memory module, used to obtain a distributed lock according to the deployment instruction so that the first container orchestration cluster becomes a leader cluster; the shared memory module is also used to obtain cluster information of the second container orchestration cluster, wherein the cluster information includes cluster location and instance distribution structure.

[0006] As an optional example, the above-mentioned first instance management module also includes: a request parsing and distribution module, which is used to compare the cluster location and topology structure of the above-mentioned second container orchestration cluster with the deployment topology requirements of the above-mentioned deployment instruction to obtain a first comparison result; the above-mentioned request parsing and distribution module is also used to split the above-mentioned deployment instruction into multiple deployment sub-instructions according to the above-mentioned first comparison result, and distribute them to the corresponding above-mentioned second container orchestration cluster.

[0007] As an optional example, the above-mentioned first instance management module also includes: a first resource tuning module, used to compare the deployment topology requirements of the above-mentioned deployment sub-instruction with the topology structure of the above-mentioned first container orchestration cluster to obtain a second comparison result; the above-mentioned first resource tuning module is also used to perform resource tuning according to the above-mentioned second comparison result, and deploy the above-mentioned cloud database after the tuning is successful.

[0008] As an optional example, the above-mentioned second instance management module includes: a second resource tuning module, which is used to compare the deployment topology requirements of the above-mentioned deployment sub-instruction with the topology structure of the above-mentioned second container orchestration cluster to obtain a third comparison result; the above-mentioned second resource tuning module is also used to perform resource tuning according to the above-mentioned third comparison result, and deploy the above-mentioned cloud database after the tuning is successful; the above-mentioned second resource tuning module is also used to return the deployment information to the above-mentioned first instance management module.

[0009] As an optional example, the system further includes a third container orchestration cluster, which is any one of the container orchestration clusters in the multi-cluster environment. The third container orchestration cluster includes a third instance management module, which includes: a third resource tuning module, which is used to issue an alarm instruction when it is detected that the host machine of the third container orchestration cluster is down; a first high availability algorithm module, which is used to calculate the cloud database resources of the target cloud database deployed on the third container orchestration cluster according to the alarm instruction; the third resource tuning module is also used to send an alarm instruction to the first instance management module when it is detected that the remaining machine resources of the third container orchestration cluster are less than the cloud database resources.

[0010] As an optional example, the above-mentioned first instance management module also includes: a second high-availability algorithm module, used to determine the target container orchestration cluster, wherein the above-mentioned target container orchestration cluster is any container orchestration cluster in the above-mentioned multi-cluster environment, and the remaining machine resources of the above-mentioned target container orchestration cluster are greater than or equal to the above-mentioned cloud database resources.

[0011] As an optional example, the target container orchestration cluster includes: a target instance management module, used to perform resource tuning according to the cloud database resources, and deploy the target cloud database after the tuning is successful; the target instance management module is also used to obtain backup data and synchronize the backup data to the target cloud database.

[0012] In a second aspect, the present application provides a cloud database deployment method, including: when a first container orchestration cluster receives a cloud database deployment instruction issued by a user, obtaining a distributed lock according to the above deployment instruction to make the above first container orchestration cluster a leading cluster, wherein the above second container orchestration cluster is any online container orchestration cluster other than the above first container orchestration cluster in a multi-cluster environment where the above first container orchestration cluster is located; obtaining cluster information of the above second container orchestration cluster; according to the above cluster information, splitting the above deployment instruction into multiple deployment sub-instructions, distributing the above multiple deployment sub-instructions to the corresponding above second container orchestration cluster, so that the above first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the above deployment sub-instructions, and deploying the above cloud database after the tuning is successful; when it is determined that the deployment of the above cloud database is completed, feeding back a deployment completion instruction.

[0013] In a third aspect, the present application provides a cloud database deployment device, comprising: a first acquisition module, for acquiring a distributed lock according to the deployment instruction for the cloud database issued by the user when the first container orchestration cluster receives the deployment instruction for the cloud database issued by the user, so that the first container orchestration cluster becomes the leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located; a second acquisition module, for acquiring cluster information of the second container orchestration cluster; a splitting module, for splitting the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distributing the multiple deployment sub-instructions to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful; a feedback module, for feeding back a deployment completion instruction when it is determined that the deployment of the cloud database is completed.

[0014] In a fourth aspect, the present application provides a storage medium storing a computer program, wherein the computer program executes the above-mentioned cloud database deployment method when executed by a processor.

[0015] In a fifth aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned cloud database deployment method through the computer program.

[0016] In an embodiment of the present application, a first container orchestration cluster and a second container orchestration cluster are used, the first container orchestration cluster includes a first instance management module, the second container orchestration cluster includes a second instance management module, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in a multi-cluster environment where the first container orchestration cluster is located; the first instance management module is used to receive a deployment instruction of a cloud database issued by a user, obtain a distributed lock according to the deployment instruction to make the first container orchestration cluster a leader cluster, obtain cluster information of the second container orchestration cluster, split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster; The first instance management module and the second instance management module are also used to tune resources according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful; the first instance management module is also used to feedback the deployment completion instruction system when it is determined that the deployment of the cloud database is completed. Since in the above system, a separate instance management module is deployed in each container orchestration cluster in a multi-cluster environment, when the first instance management module of the first container orchestration cluster receives the deployment instruction, it will seize the distributed lock and become the leader of this deployment. Then, the first instance management module parses the deployment instruction into multiple deployment sub-instructions, splits them according to cluster information, and the split deployment sub-instructions are synchronously sent to the instance management modules in other clusters, and each cluster independently deploys the cloud database instance according to the deployment sub-instructions. Through the collaborative work of each cluster, the purpose of cross-cluster high-availability cloud database deployment is achieved, thereby solving the technical problem of the limitations of cloud native architecture in supporting distributed databases. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0020] Figure 1is a schematic diagram of the structure of an optional cloud database deployment system according to an embodiment of the present application;

[0021] Figure 2 is a flowchart of an optional cloud database deployment method according to an embodiment of the present application;

[0022] Figure 3 is a schematic structural diagram of an optional cloud database deployment device according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0025] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0026] According to a first aspect of an embodiment of the present application, a cloud database deployment system is provided. Optionally, as Figure 1 As shown, the above system includes:

[0027] A first container orchestration cluster 102 and a second container orchestration cluster 104, wherein the first container orchestration cluster 102 includes a first instance management module 1022, and the second container orchestration cluster 104 includes a second instance management module 1042, wherein the second container orchestration cluster is any online container orchestration cluster except the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located;

[0028] The first instance management module 1022 is used to receive a deployment instruction of a cloud database issued by a user, obtain a distributed lock according to the deployment instruction to make the first container orchestration cluster a leading cluster, obtain cluster information of the second container orchestration cluster, split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster;

[0029] The first instance management module 1022 and the second instance management module 1042 are further used to perform resource tuning according to the deployment sub-instruction, and deploy the cloud database after the tuning is successful;

[0030] The first instance management module 1022 is further configured to feedback a deployment completion instruction when determining that the cloud database deployment is completed.

[0031] Optionally, in this embodiment, the container orchestration cluster can be a Kubernetes cluster (abbreviated as K8S), which is an open source container orchestration platform for automating the deployment, expansion and management of applications. A K8S cluster is a group of computing resources (usually physical or virtual servers) that work together to run containerized applications.

[0032] Optionally, in this embodiment, when the cloud platform is limited by technology or network architecture and the Kubernetes cluster can only be limited to a single computer room, the cloud database needs to achieve cross-cluster deployment and tuning through its own mechanism. First, it is necessary to establish internal and external traffic entrances and exits for each cluster based on the Service of Kubernetes combined with the network architecture of the cloud platform, such as using a load balancing component (LoadBa l ancer) to support memory exchange and communication between cross-cloud sub-modules. Secondly, a separate cloud database instance management system (hereinafter referred to as the instance management module) is deployed in each Kubernetes cluster, and the Service name of other clusters is configured for it to ensure that the instance management module can communicate with other clusters to form an overall system. When the user initiates a cross-cloud high-availability cloud database instance deployment instruction in the first container orchestration cluster, the first instance management module of the first container orchestration cluster will seize the distributed lock and become the leader. The leader parses the deployment instruction into multiple deployment sub-instructions, and splits them according to the database topology and the mapping relationship between clusters, and then synchronizes these deployment sub-instructions to the instance management modules of other clusters through the Service. The instance management module of each cluster independently deploys the database instance according to the deployment sub-instructions to achieve cross-cluster collaborative deployment and management.

[0033] Optionally, in this embodiment, the user chooses to log in to the host of any Kubernetes cluster and sends the deployment instruction of the cloud database through the command line. After receiving the deployment instruction, the instance management module of the cluster first seizes the distributed lock, obtains the leader identity, and obtains the information of other online instance management modules and the location of their Kubernetes clusters. The instance management module parses the deployment instruction, checks the information of all Kubernetes clusters and the deployment topology requirements, and then splits the deployment instruction into multiple deployment sub-instructions and distributes them to the specified instance management module. Each instance management module receives the deployment sub-instruction, compares the deployment sub-instruction target with the actual topology of the current cluster, identifies the difference and performs resource tuning. After the tuning is successful, the actual topology of the cluster will be reported to the leader instance management module. The leader instance management module summarizes the actual topology of all Kubernetes clusters and compares it with the target topology issued by the user. When the two are consistent, the feedback instruction is executed, indicating that the deployment is successful.

[0034] Optionally, in this embodiment, multiple clusters are coordinated through distributed locks, and the instance management module is used to ensure that each cluster meets the deployment requirements, thereby ensuring high-availability deployment of the cross-cluster cloud database.

[0035] As an optional example, the first instance management module includes:

[0036] A shared memory module, used to acquire a distributed lock according to the deployment instruction so that the first container orchestration cluster becomes a leading cluster;

[0037] The shared memory module is further used to obtain cluster information of the second container orchestration cluster, wherein the cluster information includes a cluster location and an instance distribution structure.

[0038] Optionally, in this embodiment, the instance management module of each cluster includes a shared memory module, which is used to realize memory sharing and message communication between multiple instance management modules. A leader is elected among multiple clusters based on a distributed lock and is given the identity of a leader. The leader has the authority to accept requests, disassemble deployment instructions, issue requests, and obtain instance topology and alarm conditions of all clusters.

[0039] As an optional example, the first instance management module further includes:

[0040] A request parsing and distribution module is used to compare the cluster location and topology structure of the second container orchestration cluster with the deployment topology requirement of the deployment instruction to obtain a first comparison result;

[0041] The request parsing and distribution module is further used to split the deployment instruction into multiple deployment sub-instructions according to the first comparison result, and distribute them to the corresponding second container orchestration cluster.

[0042] Optionally, in this embodiment, the instance management module of each cluster also includes a request parsing and distribution module. After becoming a leader, the request parsing and distribution module parses the deployment instructions issued by the user, and sends the corresponding deployment sub-instructions to the corresponding instance management module according to the topological mapping relationship between the K8S cluster and the issued deployment instructions.

[0043] As an optional example, the first instance management module further includes:

[0044] A first resource tuning module is used to compare the deployment topology requirement of the deployment sub-instruction with the topology structure of the first container orchestration cluster to obtain a second comparison result;

[0045] The first resource tuning module is further used to perform resource tuning according to the second comparison result, and deploy the cloud database after the tuning is successful.

[0046] As an optional example, the second instance management module includes:

[0047] A second resource tuning module is used to compare the deployment topology requirement of the deployment sub-instruction with the topology structure of the second container orchestration cluster to obtain a third comparison result;

[0048] The second resource tuning module is further used to perform resource tuning according to the third comparison result, and deploy the cloud database after the tuning is successful;

[0049] The second resource tuning module is further used to return the deployment information to the first instance management module.

[0050] Optionally, in this embodiment, the instance management module of each cluster also includes a resource tuning module, which is used to parse the deployment sub-instructions issued by the leader instance management module and call the K8S interface to complete the cloud database instance deployment and K8S resource scheduling.

[0051] As an optional example, the system further includes a third container orchestration cluster, where the third container orchestration cluster is any container orchestration cluster in a multi-cluster environment, and the third container orchestration cluster includes a third instance management module, and the third instance management module includes:

[0052] A third resource tuning module is used to issue an alarm instruction when a host machine of the third container orchestration cluster is detected to be down;

[0053] A first high-availability algorithm module is used to calculate cloud database resources of a target cloud database deployed on a third container orchestration cluster according to an alarm instruction;

[0054] The third resource tuning module is further configured to send an alarm instruction to the first instance management module when it is detected that the remaining machine resources of the third container orchestration cluster are less than the cloud database resources.

[0055] Optionally, in this embodiment, the instance management module of each cluster also includes a high availability algorithm module, which is used when the leader instance management module receives an abnormal topology alarm instruction. Based on the built-in rules, for example, in a high availability scenario, each database instance should contain at least 1 host, 3 backup machines, and 4 containers, and each container is not on a K8S host machine, and is evenly divided according to the K8S cluster. Based on the algorithm and the current topology, it is calculated on which host machine of which K8S cluster the container to be scheduled should be deployed.

[0056] As an optional example, the first instance management module further includes:

[0057] The second high availability algorithm module is used to determine a target container orchestration cluster, wherein the target container orchestration cluster is any container orchestration cluster in a multi-cluster environment, and the remaining machine resources of the target container orchestration cluster are greater than or equal to the cloud database resources.

[0058] As an optional example, the target container orchestration cluster includes:

[0059] The target instance management module is used to perform resource tuning according to the cloud database resources and deploy the target cloud database after the tuning is successful;

[0060] The target instance management module is also used to obtain backup data and synchronize the backup data to the target cloud database.

[0061] Optionally, in this embodiment, after the cloud database is successfully deployed, if a host in the third container orchestration cluster crashes, causing the two cloud database container instances deployed thereon to fail to start, the third resource tuning module of the third instance management module will monitor the container abnormality and issue an alarm instruction. The alarm instruction first triggers the first high-availability algorithm module of the third instance management module, and attempts to redeploy the two cloud database container instances in the third container orchestration cluster. However, since the third resource tuning module finds that the machine resources of the third container orchestration cluster are full and can no longer carry more containers, the third instance management module will send the alarm to the first instance management module with the leader identity through the shared memory module. The first instance management module calls the second high-availability algorithm module of the first instance management module, and after analysis, finds that the target container orchestration cluster and the third container orchestration cluster are located in adjacent computer rooms, and the target container orchestration cluster has remaining machine resources. Therefore, the first instance management module converts the alarm into an instruction to deploy a standby machine and sends it to the target instance management module of the target container orchestration cluster. After receiving the instruction, the target instance management module schedules the Kubernetes resources of the target container orchestration cluster to complete the deployment of the cloud database container and synchronizes the database configuration and data. The newly started container will synchronize the data of the primary database through the data leveling mechanism to form a stable primary-backup replication relationship. If successful, the topology of the target container orchestration cluster will be reported to the shared memory. The first instance management module acts as a leader, integrates the latest topologies of all clusters, and after confirming that the high availability strategy has been met, restores the alarm status, indicating that the cloud database cluster deployed across clusters has regained stability and can continue to provide services normally.

[0062] Optionally, in this embodiment, it is ensured that in the event of a downtime or insufficient resources, the cloud database cluster can achieve high availability and rapid recovery through cross-cluster container deployment and resource scheduling mechanisms.

[0063] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0064] According to a second aspect of the embodiment of the present application, a cloud database deployment method is also provided. Figure 2 As shown, including:

[0065] S202, when the first container orchestration cluster receives a deployment instruction of a cloud database sent by a user, acquires a distributed lock according to the deployment instruction to make the first container orchestration cluster a leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located;

[0066] S204, obtaining cluster information of the second container orchestration cluster;

[0067] S206: split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful;

[0068] S208: When it is determined that the cloud database deployment is completed, a deployment completion instruction is fed back.

[0069] Optionally, in this embodiment, the container orchestration cluster can be a Kubernetes cluster (abbreviated as K8S), which is an open source container orchestration platform for automating the deployment, expansion and management of applications. A K8S cluster is a group of computing resources (usually physical or virtual servers) that work together to run containerized applications.

[0070] Optionally, in this embodiment, when the cloud platform is limited by technology or network architecture and the Kubernetes cluster can only be limited to a single computer room, the cloud database needs to achieve cross-cluster deployment and tuning through its own mechanism. First, it is necessary to establish internal and external traffic entrances and exits for each cluster based on the Service of Kubernetes combined with the network architecture of the cloud platform, such as using a load balancing component (LoadBa l ancer) to support memory exchange and communication between cross-cloud sub-modules. Secondly, a separate cloud database instance management system (hereinafter referred to as the instance management module) is deployed in each Kubernetes cluster, and the Service name of other clusters is configured for it to ensure that the instance management module can communicate with other clusters to form an overall system. When the user initiates a cross-cloud high-availability cloud database instance deployment instruction in the first container orchestration cluster, the first instance management module of the first container orchestration cluster will seize the distributed lock and become the leader. The leader parses the deployment instruction into multiple deployment sub-instructions, and splits them according to the database topology and the mapping relationship between clusters, and then synchronizes these deployment sub-instructions to the instance management modules of other clusters through the Service. The instance management module of each cluster independently deploys the database instance according to the deployment sub-instructions to achieve cross-cluster collaborative deployment and management.

[0071] Optionally, in this embodiment, the user chooses to log in to the host of any Kubernetes cluster and sends the deployment instruction of the cloud database through the command line. After receiving the deployment instruction, the instance management module of the cluster first seizes the distributed lock, obtains the leader identity, and obtains the information of other online instance management modules and the location of their Kubernetes clusters. The instance management module parses the deployment instruction, checks the information of all Kubernetes clusters and the deployment topology requirements, and then splits the deployment instruction into multiple deployment sub-instructions and distributes them to the specified instance management module. Each instance management module receives the deployment sub-instruction, compares the deployment sub-instruction target with the actual topology of the current cluster, identifies the difference and performs resource tuning. After the tuning is successful, the actual topology of the cluster will be reported to the leader instance management module. The leader instance management module summarizes the actual topology of all Kubernetes clusters and compares it with the target topology issued by the user. When the two are consistent, the feedback instruction is executed, indicating that the deployment is successful.

[0072] Optionally, in this embodiment, multiple clusters are coordinated through distributed locks, and the instance management module is used to ensure that each cluster meets the deployment requirements, thereby ensuring high-availability deployment of the cross-cluster cloud database.

[0073] For other examples of this embodiment, please refer to the examples and will not be repeated here.

[0074] According to a third aspect of the embodiments of the present application, a cloud database deployment device is also provided. Figure 3 As shown, including:

[0075] The first acquisition module 302 is used to acquire a distributed lock according to the deployment instruction when the first container orchestration cluster receives the deployment instruction of the cloud database issued by the user, so as to make the first container orchestration cluster become the leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster except the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located;

[0076] A second acquisition module 304 is used to acquire cluster information of a second container orchestration cluster;

[0077] A splitting module 306 is used to split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful;

[0078] The feedback module 308 is used to feedback a deployment completion instruction when it is determined that the cloud database deployment is completed.

[0079] It should be noted that the first acquisition module 302 in this embodiment can be used to execute step S202 in the embodiment of the present application, the second acquisition module 304 in this embodiment can be used to execute step S204 in the embodiment of the present application, the splitting module 306 in this embodiment can be used to execute step S206 in the embodiment of the present application, and the feedback module 308 in this embodiment can be used to execute step S208 in the embodiment of the present application.

[0080] For other examples of this embodiment, please refer to the above examples and will not be repeated here.

[0081] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present application, such as Figure 4 As shown, it includes a processor 402, a communication interface 404, a memory 406 and a communication bus 408, wherein the processor 402, the communication interface 404 and the memory 406 communicate with each other through the communication bus 408, wherein,

[0082] Memory 406, used to store computer programs;

[0083] The processor 402 is used to implement the following steps when executing the computer program stored in the memory 406:

[0084] When the first container orchestration cluster receives a deployment instruction of the cloud database sent by the user, the distributed lock is acquired according to the deployment instruction to make the first container orchestration cluster a leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located;

[0085] Obtain cluster information of the second container orchestration cluster;

[0086] According to the cluster information, the deployment instruction is split into multiple deployment sub-instructions, and the multiple deployment sub-instructions are distributed to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful;

[0087] When it is determined that the cloud database deployment is completed, a deployment completion instruction is fed back.

[0088] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industrial Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The communication interface is used for communication between the above electronic device and other devices.

[0089] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0090] As an example, the memory 406 may include, but is not limited to, the first acquisition module 302, the second acquisition module 304, the splitting module 306, and the feedback module 308 in the cloud database deployment device. In addition, other module units in the cloud database deployment device may also be included but are not limited to, which will not be repeated in this example.

[0091] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0092] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0093] It can be understood by those skilled in the art that Figure 4The structure shown is for illustration only. The device for implementing the above-mentioned cloud database deployment method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 4 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations shown.

[0094] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0095] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program executes the steps in the above-mentioned cloud database deployment method when executed by a processor.

[0096] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0097] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0098] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0099] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0100] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only 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.

[0101] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0102] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically 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.

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

Claims

1. A cloud database deployment system, characterized in that: include: A first container orchestration cluster and a second container orchestration cluster, the first container orchestration cluster includes a first instance management module, the second container orchestration cluster includes a second instance management module, wherein the second container orchestration cluster is any online container orchestration cluster except the first container orchestration cluster in a multi-cluster environment where the first container orchestration cluster is located; The first instance management module is used to receive a deployment instruction of a cloud database issued by a user, obtain a distributed lock according to the deployment instruction to make the first container orchestration cluster a leader cluster, obtain cluster information of the second container orchestration cluster, split the deployment instruction into multiple deployment sub-instructions according to the cluster information, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster; The first instance management module and the second instance management module are further used to perform resource tuning according to the deployment sub-instruction, and deploy the cloud database after the tuning is successful; The first instance management module is further configured to feedback a deployment completion instruction when determining that the cloud database deployment is completed.

2. The system according to claim 1, characterized in that The first instance management module includes: A shared memory module, configured to acquire a distributed lock according to the deployment instruction, so that the first container orchestration cluster becomes a leading cluster; The shared memory module is further used to obtain cluster information of the second container orchestration cluster, wherein the cluster information includes a cluster location and an instance distribution structure.

3. The system according to claim 1, characterized in that The first instance management module further includes: A request parsing and distribution module is used to compare the cluster location and topology structure of the second container orchestration cluster with the deployment topology requirement of the deployment instruction to obtain a first comparison result; The request parsing and distribution module is further configured to split the deployment instruction into multiple deployment sub-instructions according to the first comparison result, and distribute the sub-instructions to the corresponding second container orchestration cluster.

4. The system according to claim 1, characterized in that The first instance management module further includes: A first resource tuning module, configured to compare the deployment topology requirement of the deployment sub-instruction with the topology structure of the first container orchestration cluster to obtain a second comparison result; The first resource tuning module is further configured to perform resource tuning according to the second comparison result, and deploy the cloud database after the tuning is successful.

5. The system according to claim 1, characterized in that The second instance management module includes: A second resource tuning module is used to compare the deployment topology requirement of the deployment sub-instruction with the topology structure of the second container orchestration cluster to obtain a third comparison result; The second resource tuning module is further used to perform resource tuning according to the third comparison result, and deploy the cloud database after the tuning is successful; The second resource tuning module is further used to return the deployment information to the first instance management module.

6. The system according to claim 1, characterized in that The system further includes a third container orchestration cluster, where the third container orchestration cluster is any container orchestration cluster in the multi-cluster environment, and the third container orchestration cluster includes a third instance management module, and the third instance management module includes: A third resource tuning module is used to issue an alarm instruction when a host machine of the third container orchestration cluster is detected to be down; A first high-availability algorithm module is used to calculate the cloud database resources of the target cloud database deployed on the third container orchestration cluster according to the alarm instruction; The third resource tuning module is further configured to send an alarm instruction to the first instance management module when detecting that the remaining machine resources of the third container orchestration cluster are less than the cloud database resources.

7. The system according to claim 6, characterized in that The first instance management module further includes: The second high-availability algorithm module is used to determine a target container orchestration cluster, wherein the target container orchestration cluster is any container orchestration cluster in the multi-cluster environment, and the remaining machine resources of the target container orchestration cluster are greater than or equal to the cloud database resources.

8. The system according to claim 7, characterized in that The target container orchestration cluster includes: A target instance management module, used to perform resource tuning according to the cloud database resources and deploy the target cloud database after the tuning is successful; The target instance management module is further used to obtain backup data and synchronize the backup data to the target cloud database.

9. A method for deploying a cloud database, characterized in that: include: When the first container orchestration cluster receives a deployment instruction of a cloud database sent by a user, the first container orchestration cluster acquires a distributed lock according to the deployment instruction, so that the first container orchestration cluster becomes a leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in the multi-cluster environment where the first container orchestration cluster is located; Obtain cluster information of the second container orchestration cluster; According to the cluster information, split the deployment instruction into multiple deployment sub-instructions, and distribute the multiple deployment sub-instructions to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful; When it is determined that the deployment of the cloud database is completed, a deployment completion instruction is fed back.

10. A cloud database deployment device, characterized in that: include: A first acquisition module is used to acquire a distributed lock according to a deployment instruction of a cloud database sent by a user when the first container orchestration cluster receives the deployment instruction of the cloud database sent by the user, so as to make the first container orchestration cluster become a leading cluster, wherein the second container orchestration cluster is any online container orchestration cluster other than the first container orchestration cluster in a multi-cluster environment where the first container orchestration cluster is located; A second acquisition module, used to acquire cluster information of the second container orchestration cluster; a splitting module, configured to split the deployment instruction into a plurality of deployment sub-instructions according to the cluster information, and distribute the plurality of deployment sub-instructions to the corresponding second container orchestration cluster, so that the first container orchestration cluster and the second container orchestration cluster perform resource tuning according to the deployment sub-instructions, and deploy the cloud database after the tuning is successful; The feedback module is used to feedback a deployment completion instruction when it is determined that the deployment of the cloud database is completed.