Database deployment method, device, electronic device and computer readable medium

By generating and executing storage group and computing group deployment task flows, the problem of low automation of distributed database deployment is solved, unified automated database deployment is achieved, and deployment efficiency and success rate are improved.

CN114490588BActive Publication Date: 2024-10-18XIAN TONGXING HENGYAO INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210127836.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-10-18
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

Distributed database deployment has a low degree of automation and low coupling with traditional automated deployment solutions, making it impossible to achieve unified automated database deployment.

Method used

By receiving the cluster information of the database deployment request, the storage group and computing group deployment task flow is generated, and the corresponding deployment tasks are performed, including environment initialization, database installation, master-slave relationship establishment, load balancing configuration, etc., to ensure that the number of computing nodes is greater than 0 Automatic deployment is performed when the deployment fails, and retry processing is performed when the deployment fails.

Benefits of technology

It improves the automation level of database deployment, realizes unified automated database deployment, adapts to the diverse needs of distributed databases, and improves deployment efficiency and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490588B_ABST
    Figure CN114490588B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a database deployment method, device, electronic device and computer-readable medium. A specific implementation of the method includes: receiving cluster information corresponding to a database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes; generating a storage group deployment task flow according to the storage group information; in response to the number of computing nodes being greater than 0, performing the following steps: generating a computing group deployment task flow according to the computing group information; executing each storage group deployment task corresponding to the storage group deployment task flow; executing each computing group deployment task corresponding to the computing group deployment task flow. This implementation improves the degree of automation of database deployment and can achieve unified automated database deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a database deployment method, device, electronic device, and computer-readable medium. Background Art

[0002] With the increase in the business volume of various application systems and the continuous growth of data volume, distributed databases have become an important direction for the development of databases. When deploying distributed databases, the method usually adopted is: independently increase the deployment of distributed programs based on traditional automated deployment solutions.

[0003] However, when using the above method to deploy distributed databases, the following technical problems often occur: distributed databases are relatively diverse, the degree of automation in database deployment is low, and the coupling with traditional automated deployment solutions is low, and unified automated database deployment cannot be achieved. Summary of the invention

[0004] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0005] Some embodiments of the present disclosure propose a database deployment method, apparatus, electronic device, and computer-readable medium to solve the technical problems mentioned in the above background technology section.

[0006] In a first aspect, some embodiments of the present disclosure provide a database deployment method, the method comprising: receiving cluster information corresponding to a database deployment request, wherein the cluster information comprises storage group information and computing group information, and the computing group information comprises the number of computing nodes; generating a storage group deployment task flow according to the storage group information; in response to the number of computing nodes being greater than 0, performing the following steps: generating a computing group deployment task flow according to the computing group information; executing each storage group deployment task corresponding to the storage group deployment task flow; executing each computing group deployment task corresponding to the computing group deployment task flow.

[0007] Optionally, the method further includes: in response to the number of computing nodes being equal to 0, executing each storage group deployment task corresponding to the storage group deployment task flow.

[0008] Optionally, the storage group information includes storage resource type, basic instance operation parameters, database version information and at least one high availability group information; and the storage group deployment task flow is generated based on the storage group information, including: in response to the storage resource type being a physical machine class or a virtual machine class, the following steps are performed: based on the basic instance operation parameters and the database version information, an environment initialization task is created, wherein the environment initialization task includes a server parameter configuration subtask and a database installation file acquisition subtask; a database installation task is created; based on each high availability group information in the at least one high availability group information, a master-slave relationship establishment task, an instance mounting task, a switching test task and a backup strategy generation task are created in sequence; the server parameter configuration subtask, the database installation file acquisition subtask, the database installation task, the master-slave relationship establishment task corresponding to each high availability group information in the at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task are combined in sequence into a storage group deployment task flow.

[0009] Optionally, the computing group information also includes a computing resource type; and the computing group deployment task flow is generated based on the computing group information, including: in response to the computing resource type being a physical machine class or a virtual machine class, executing the following steps: creating a computing node environment initialization task; creating a computing program installation startup task; creating a metadata initialization task and a load balancing configuration task; and combining the computing node environment initialization task, the computing program installation startup task, the metadata initialization task and the load balancing configuration task in sequence into a computing group deployment task flow.

[0010] Optionally, the above-mentioned execution of each storage group deployment task corresponding to the above-mentioned storage group deployment task flow includes: in response to the execution status of the storage group deployment task in the above-mentioned each storage group deployment task being execution failure, retrying the storage group deployment task with the execution status being execution failure; in response to the execution status of the storage group deployment task with the execution status being execution success, executing the storage group deployment task arranged after the above-mentioned storage group deployment task with the execution status being execution failure.

[0011] Optionally, the above-mentioned execution of each computing group deployment task corresponding to the above-mentioned computing group deployment task flow includes: in response to the execution status of the computing group deployment task in the above-mentioned each computing group deployment task being execution failure, retrying the execution of the computing group deployment task with the execution status of execution failure; in response to the execution status of the computing group deployment task with the execution status of execution failure being execution success, executing the computing group deployment task arranged after the computing group deployment task with the execution status of execution failure.

[0012] Optionally, before generating the storage group deployment task flow according to the storage group information, the method further includes: storing the storage group information.

[0013] Optionally, the cluster information also includes a cluster name; and after receiving the cluster information corresponding to the database deployment request, the method further includes: in response to the cluster name not existing locally, determining that the database deployment status corresponding to the database deployment request is deployment failure.

[0014] Optionally, before generating the computing group deployment task flow according to the computing group information, the method further includes: storing the computing group information.

[0015] In a second aspect, some embodiments of the present disclosure provide a database deployment device, comprising: a receiving unit, configured to receive cluster information corresponding to a database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes; a generating unit, configured to generate a storage group deployment task flow according to the storage group information; an executing unit, configured to perform the following steps in response to the number of computing nodes being greater than 0: generate a computing group deployment task flow according to the computing group information; execute each storage group deployment task corresponding to the storage group deployment task flow; execute each computing group deployment task corresponding to the computing group deployment task flow.

[0016] Optionally, the device further comprises: a storage group deployment task execution unit configured to execute each storage group deployment task corresponding to the storage group deployment task flow in response to the number of computing nodes being equal to 0.

[0017] Optionally, the storage group information includes storage resource type, instance operation basic parameters, database version information and at least one high availability group information.

[0018] Optionally, the generation unit is further configured to: in response to the storage resource type being a physical machine class or a virtual machine class, perform the following steps: create an environment initialization task based on the basic running parameters of the instance and the database version information, wherein the environment initialization task includes a server parameter configuration subtask and a database installation file acquisition subtask; create a database installation task; based on each high availability group information in the at least one high availability group information, create a master-slave relationship establishment task, an instance mounting task, a switching test task and a backup strategy generation task in sequence; combine the server parameter configuration subtask, the database installation file acquisition subtask, the database installation task, the master-slave relationship establishment tasks corresponding to each high availability group information in the at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task in sequence into a storage group deployment task flow.

[0019] Optionally, the computing group information also includes computing resource types.

[0020] Optionally, the execution unit includes: a step execution unit, a task creation unit and a task combination unit. The step execution unit is configured to execute the following steps in response to the computing resource type being a physical machine class or a virtual machine class: create a computing node environment initialization task; create a computing program installation startup task. The task creation unit is configured to create a metadata initialization task and a load balancing configuration task. The task combination unit is configured to sequentially combine the computing node environment initialization task, the computing program installation startup task, the metadata initialization task and the load balancing configuration task into a computing group deployment task flow.

[0021] Optionally, the execution unit includes: a first retry unit and a first task execution unit. The first retry unit is configured to, in response to the execution status of the storage group deployment task in each of the above storage group deployment tasks being execution failure, retry the execution of the storage group deployment task with the execution status of execution failure. The first task execution unit is configured to, in response to the execution status of the storage group deployment task with the execution status of execution failure being execution success, execute the storage group deployment task arranged after the storage group deployment task with the execution status of execution failure.

[0022] Optionally, the execution unit includes: a second retry unit and a second task execution unit. The second retry unit is configured to, in response to the execution status of the computing group deployment task in each of the computing group deployment tasks being execution failure, retry the execution of the computing group deployment task with the execution status of execution failure. The second task execution unit is configured to, in response to the execution status of the computing group deployment task with the execution status of execution failure being execution success, execute the computing group deployment task arranged after the computing group deployment task with the execution status of execution failure.

[0023] Optionally, before the generating unit, the device further includes: a first storage unit configured to store the above storage group information.

[0024] Optionally, the above cluster information also includes a cluster name.

[0025] Optionally, after the receiving unit, the apparatus further includes: a determining unit configured to, in response to the cluster name not existing locally, determine that the database deployment state corresponding to the database deployment request is deployment failure.

[0026] Optionally, the device further includes: a second storage unit configured to store the above-mentioned computing group information.

[0027] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0028] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0029] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the database deployment method of some embodiments of the present disclosure, the degree of automation of database deployment is improved, and unified automatic database deployment can be achieved. Specifically, the reason for the low degree of automation of database deployment and the inability to achieve unified automatic database deployment is that the distributed database is relatively diverse, the degree of automation of database deployment is low, and the coupling with the traditional automatic deployment scheme is low, and unified automatic database deployment cannot be achieved. Based on this, the database deployment method of some embodiments of the present disclosure first receives cluster information corresponding to the database deployment request. Among them, the above-mentioned cluster information includes storage group information and computing group information. The above-mentioned computing group information includes the number of computing nodes. Therefore, the storage group information and computing group information included in the received cluster information can be used to automatically deploy the database corresponding to the database deployment request. Then, according to the above-mentioned storage group information, a storage group deployment task flow is generated. Therefore, according to the storage group information, a task of deploying a database for storing data can be pre-generated. Afterwards, in response to the above-mentioned number of computing nodes being greater than 0, the following steps are performed: according to the above-mentioned computing group information, a computing group deployment task flow is generated; each storage group deployment task corresponding to the above-mentioned storage group deployment task flow is executed; each computing group deployment task corresponding to the above-mentioned computing group deployment task flow is executed. Therefore, when the number of computing nodes is greater than 0, the task of configuring the server for computing can be pre-generated according to the storage group information. Therefore, after the computing group deployment task flow is generated, the task of deploying the database for storing data and the task of configuring the server for computing can be executed. Also, because when the number of computing nodes is greater than 0, it can be indicated that a distributed database needs to be deployed, the distributed database can be automatically deployed through the pre-generated task of configuring the server for computing. And because it can be determined by the number of computing nodes whether a distributed database needs to be deployed to generate a computing group deployment task flow, it can be combined with the native database automatic deployment process. As a result, the degree of automation of database deployment is improved, and unified automatic database deployment can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0031] Figure 1 is a schematic diagram of an application scenario of a database deployment method according to some embodiments of the present disclosure;

[0032] Figure 2 is a flowchart of some embodiments of the database deployment method according to the present disclosure;

[0033] Figure 3 are flowcharts of other embodiments of the database deployment method according to the present disclosure;

[0034] Figure 4 are flowcharts of some further embodiments of the database deployment method according to the present disclosure;

[0035] Figure 5 is a schematic diagram of the structure of some embodiments of the database deployment device according to the present disclosure;

[0036] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0038] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0039] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0042] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0043] Figure 1 It is a schematic diagram of an application scenario of the database deployment method according to some embodiments of the present disclosure.

[0044] exist Figure 1In the application scenario, first, the computing device 101 can receive the cluster information 102 corresponding to the database deployment request. Among them, the above-mentioned cluster information 102 includes storage group information 103 and computing group information 104. The above-mentioned computing group information 104 includes the number of computing nodes 1041. Then, the computing device 101 can generate a storage group deployment task flow 105 according to the above-mentioned storage group information 103. Afterwards, in response to the above-mentioned number of computing nodes 1041 being greater than 0, the computing device 101 can perform the following steps: generate a computing group deployment task flow 106 according to the above-mentioned computing group information 104; execute each storage group deployment task 107 corresponding to the above-mentioned storage group deployment task flow 105; execute each computing group deployment task 108 corresponding to the above-mentioned computing group deployment task flow 106.

[0045] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.

[0046] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.

[0047] Continue to refer Figure 2 , shows a process 200 of some embodiments of the database deployment method according to the present disclosure. The database deployment method comprises the following steps:

[0048] Step 201: Receive cluster information corresponding to a database deployment request.

[0049] In some embodiments, the execution body of the database deployment method (for example Figure 1The computing device 101 shown can receive cluster information corresponding to the database deployment request from the terminal through which the user sends the database deployment request via a wired connection or a wireless connection. Among them, the above-mentioned database deployment request can be an instruction sent by the above-mentioned terminal requesting the above-mentioned execution subject to deploy the database according to the above-mentioned cluster information. The above-mentioned cluster information can be the parameter-related information for deploying the database configured by the user corresponding to the above-mentioned database deployment request. The above-mentioned cluster information may include storage group information and computing group information. The above-mentioned storage group information may be configuration-related information of a database deployed for storing data. The above-mentioned storage group information may include but is not limited to: a storage resource type tag, an instance deployment tag, and at least one high-availability storage node information group. The above-mentioned storage resource type tag can indicate whether the resource type of the database deployed for storing data is a kubernetes environment resource. The above-mentioned instance deployment tag can indicate whether multiple database instances are deployed on the same server. The above-mentioned high-availability storage node information group can be the relevant information of the storage node group to be deployed. The high-availability storage node information in the above-mentioned high-availability storage node information group may include but is not limited to: storage node identification, server IP address information of the storage node (including IP (Internet Protocol) address, VIP (Virtual Internet Protocol) address) and port number, and master library mark. The above-mentioned high-availability storage node information group corresponds to a storage node group. The storage node in the storage node group may be a database instance deployed on a server for storing data. The above-mentioned storage node identification may be an identification that uniquely represents a database instance deployed on a server for storing data. The above-mentioned master library mark may indicate whether the database instance corresponding to the storage node identification is used to deploy the master library. If the above-mentioned master library mark indicates that the database instance corresponding to the storage node identification is not used to deploy the master library, then the storage node is used to deploy the slave library. The above-mentioned computing group information may be configuration-related information of a server deployed for computing. The above-mentioned computing group information may include but is not limited to: the number of computing nodes, computing resource type mark, and computing node operation basic parameter information group. The above-mentioned number of computing nodes may be the number of nodes used for computing. The above-mentioned computing resource type mark may indicate whether the resource type of the computing node to be deployed is a kubernetes environment resource. The computing node may be a node deployed on a server for computing. Each computing node operation basic parameter information in the computing node operation basic parameter information group may correspond to a computing node, and may include but is not limited to: the number of CPU cores, memory space, and disk storage space required by the computing node. The computing node operation basic parameter information group corresponds to a computing node group.It should be noted that the wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods currently known or to be developed in the future. Therefore, the storage group information and computing group information included in the received cluster information can be used to automatically deploy the database corresponding to the database deployment request.

[0050] It is understandable that the above database may be a MYSQL database.

[0051] Optionally, the execution subject may store the storage group information. In practice, the execution subject may write the storage group information into a local disk.

[0052] Optionally, the cluster information may further include a cluster name. The execution subject may determine that the database deployment state corresponding to the database deployment request is deployment failure in response to the cluster name not existing locally. Thus, subsequent database deployment operations may be performed only when the cluster name included in the cluster information exists locally.

[0053] Step 202: Generate a storage group deployment task flow based on the storage group information.

[0054] In some embodiments, the execution subject may generate a storage group deployment task flow according to the storage group information. In practice, the execution subject may generate a storage group deployment task flow by following the steps below:

[0055] The first step is to respond to the above storage resource type tag characterizing that the resource type of the database deployed for storing data is a kubernetes environment resource, and create a master-slave relationship establishment task, an instance mounting task, a switching test task and a backup strategy generation task according to the storage node group corresponding to each high-availability storage node information group included in the above storage group information. Among them, the above master-slave relationship establishment task can be a task for configuring the master-slave relationship of the database. The above instance mounting task can be a task for mounting the VIP address for the database instance. The above switching test task can be a task for performing a switching test in the above storage node group. The above backup strategy generation task can be a task for selecting a storage node as a slave library in the storage node group to back up data. For example, the above backup strategy generation task can be a task for selecting a storage node with the shortest synchronization delay between the master library and the slave library from the storage node of the slave library in the alien computer room for backup. The above alien computer room is a computer room different from the computer room of the master library.

[0056] In the second step, the created master-slave relationship establishment task, instance mounting task, switching test task and backup strategy generation task are sequentially combined into a storage group deployment task flow. As an example, if the above storage group information includes two high-availability storage node information groups, the first high-availability storage node information group corresponds to the created master-slave relationship establishment task "01", instance mounting task "02", switching test task "03" and backup strategy generation task "04". The second high-availability storage node information group corresponds to the created master-slave relationship establishment task "05", instance mounting task "06", switching test task "07" and backup strategy generation task "08". Among them, "01" to "08" are the task identifiers of the storage group deployment tasks respectively. Then the combined storage group deployment task flow is: master-slave relationship establishment task "01" - instance mounting task "02" - switching test task "03" - backup strategy generation task "04" - master-slave relationship establishment task "05" - instance mounting task "06" - switching test task "07" - backup strategy generation task "08".

[0057] Thus, a task of deploying a database for storing data can be generated in advance according to the storage group information.

[0058] Step 203, in response to the number of computing nodes being greater than 0, execute the following steps:

[0059] Step 2031: Generate a computing group deployment task flow based on the computing group information.

[0060] In some embodiments, the execution subject may generate a computing group deployment task flow based on the computing group information. The number of computing nodes being greater than 0 may indicate that a distributed database needs to be deployed. In practice, the execution subject may generate a computing group deployment task flow by following the steps below:

[0061] The first step is to create a metadata initialization task and a load balancing configuration task in response to the resource type of the above-mentioned computing resource type tag characterization that the resource type of the database used as the computing node to be deployed is a kubernetes environment resource. Before step 2031, the above-mentioned execution subject can respond to the resource type of the above-mentioned computing resource type tag characterization that the resource type of the database used as the computing node to be deployed is a kubernetes environment resource, and pre-allocate deployment resources for the computing node group according to the above-mentioned computing node operation basic parameter information group. For example, first, the number of computing nodes is determined as the number of pod copies. Then, the IP address, port number and VIP address of the server that meets the number of CPU cores, memory space and disk storage space required by the computing node can be determined according to the number of CPU cores, memory space and disk storage space required by each computing node in the above-mentioned computing node operation basic parameter information group. The above-mentioned metadata initialization task can be a task for writing metadata information required by the computing node group. The above-mentioned load balancing configuration task can be a task for configuring load balancing for the computing node group. The above metadata information may include, but is not limited to: the cluster identifier, the number of pod copies, the version and name of the computing software, the task flow identifier, the above cluster information, the task creation time, and the VIP type of each computing node. The above cluster identifier can uniquely identify the cluster. The above computing software can be software used for computing. For example, the computing software can be a "proxy". The above task flow identifier can be the identifier of the computing group deployment task flow to be generated currently. For example, the task flow identifier can be a task flow ID. The above task creation time can be the time to start creating the computing group deployment task in the computing group deployment task flow, for example, the time to create the metadata initialization task. The above VIP type can characterize whether the corresponding computing node is a load balancing device.

[0062] In the second step, the metadata initialization task and the load balancing configuration task are sequentially combined into a computing group deployment task flow. As an example, the metadata initialization task can be a metadata initialization task "01". The load balancing configuration task can be a load balancing configuration task "02". The combined computing group deployment task flow can be: metadata initialization task "01" - load balancing configuration task "02". Among them, "01" and "02" are the task identifiers of the computing group deployment tasks respectively.

[0063] The third step is to register the above computing group deployment task flow to the distributed scheduling service component.

[0064] Optionally, before step 2031, the execution entity may store the computing group information. In practice, the execution entity may write the computing group information to a local disk.

[0065] Step 2032, executing each storage group deployment task corresponding to the storage group deployment task flow.

[0066] In some embodiments, the execution subject may execute each storage group deployment task corresponding to the storage group deployment task flow. In practice, the execution subject may register the storage group deployment task flow to a distributed scheduling service component, and execute the storage group deployment task corresponding to the storage group deployment task execution information by receiving the storage group deployment task execution information sent by the distributed scheduling service component. The distributed scheduling service component may be a component that can arrange tasks to form a complete task flow and send task execution information in the order of the task flow. The storage group deployment task execution information may be information that characterizes the storage group deployment task corresponding to the storage group deployment task execution information that needs to be executed.

[0067] In some optional implementations of some embodiments, first, the execution subject may, in response to the execution status of the storage group deployment task in each of the storage group deployment tasks being execution failure, retry the execution of the storage group deployment task with the execution status of execution failure. The execution status of the storage group deployment task may indicate whether the storage group deployment task is successfully executed. Then, in response to the execution status of the storage group deployment task with the execution status of execution failure being execution success, the storage group deployment task arranged after the storage group deployment task with the execution status of execution failure in each of the storage group deployment tasks may be executed. Thus, after the execution of the current storage group deployment task fails, the current storage group deployment task may be retried, and after the execution of the current storage group deployment task is successful, the storage group deployment tasks after the current storage group deployment task may be executed in sequence.

[0068] Step 2033, executing each computing group deployment task corresponding to the computing group deployment task flow.

[0069] In some embodiments, the execution subject may execute each computing group deployment task corresponding to the computing group deployment task flow. In practice, the execution subject may register the computing group deployment task flow to a distributed scheduling service component, and execute the computing group deployment task corresponding to the computing group deployment task execution information by receiving the computing group deployment task execution information sent by the distributed scheduling service component. The computing group deployment task execution information may be information indicating that the computing group deployment task corresponding to the computing group deployment task execution information needs to be executed.

[0070] In some optional implementations of some embodiments, first, the execution subject may, in response to the execution status of the computing group deployment task in each of the computing group deployment tasks being execution failure, retry the execution of the computing group deployment task with the execution status of execution failure. The execution status of the computing group deployment task may characterize whether the computing group deployment task is successfully executed. Then, in response to the execution status of the computing group deployment task with the execution status of execution failure being execution success, the computing group deployment task arranged after the computing group deployment task with the execution status of execution failure in each of the storage group deployment tasks may be executed. Thus, after the execution of the current computing group deployment task fails, the current computing group deployment task may be retried, and after the execution of the current computing group deployment task succeeds, the computing group deployment tasks after the current computing group deployment task may be executed in sequence.

[0071] Thus, when the number of computing nodes is greater than 0, the task of configuring a server for computing can be pre-generated according to the storage group information. Thus, after the computing group deployment task flow is generated, the task of deploying a database for storing data and the task of configuring a server for computing can be executed.

[0072] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the database deployment method of some embodiments of the present disclosure, the degree of automation of database deployment is improved, and unified automatic database deployment can be achieved. Specifically, the reason for the low degree of automation of database deployment and the inability to achieve unified automatic database deployment is that the distributed database is relatively diverse, the degree of automation of database deployment is low, and the coupling with the traditional automatic deployment scheme is low, and unified automatic database deployment cannot be achieved. Based on this, the database deployment method of some embodiments of the present disclosure first receives cluster information corresponding to the database deployment request. Among them, the above-mentioned cluster information includes storage group information and computing group information. The above-mentioned computing group information includes the number of computing nodes. Therefore, the storage group information and computing group information included in the received cluster information can be used to automatically deploy the database corresponding to the database deployment request. Then, according to the above-mentioned storage group information, a storage group deployment task flow is generated. Therefore, according to the storage group information, a task of deploying a database for storing data can be pre-generated. Afterwards, in response to the above-mentioned number of computing nodes being greater than 0, the following steps are performed: according to the above-mentioned computing group information, a computing group deployment task flow is generated; each storage group deployment task corresponding to the above-mentioned storage group deployment task flow is executed; each computing group deployment task corresponding to the above-mentioned computing group deployment task flow is executed. Therefore, when the number of computing nodes is greater than 0, the task of configuring the server for computing can be pre-generated according to the storage group information. Therefore, after the computing group deployment task flow is generated, the task of deploying the database for storing data and the task of configuring the server for computing can be executed. Also, because when the number of computing nodes is greater than 0, it can be indicated that a distributed database needs to be deployed, the distributed database can be automatically deployed through the pre-generated task of configuring the server for computing. And because it can be determined by the number of computing nodes whether a distributed database needs to be deployed to generate a computing group deployment task flow, it can be combined with the native database automatic deployment process. As a result, the degree of automation of database deployment is improved, and unified automatic database deployment can be achieved.

[0073] Further references Figure 3 , which shows a process 300 of another embodiment of a database deployment method. The process 300 of the database deployment method includes the following steps:

[0074] Step 301: Receive cluster information corresponding to a database deployment request.

[0075] Step 302: Generate a storage group deployment task flow based on the storage group information.

[0076] Step 303: In response to the number of computing nodes being greater than 0, perform the following steps:

[0077] Step 3031, generating a computing group deployment task flow according to the computing group information.

[0078] Step 3032, executing each storage group deployment task corresponding to the storage group deployment task flow.

[0079] Step 3033, executing each computing group deployment task corresponding to the computing group deployment task flow.

[0080] In some embodiments, the specific implementation of steps 301-303 and the technical effects brought about can be referred to Figure 2 The corresponding steps 201-203 in the embodiments are not described in detail here.

[0081] Step 304 , in response to the number of computing nodes being equal to 0, executing each storage group deployment task corresponding to the storage group deployment task flow.

[0082] In some embodiments, the execution body of the database deployment method (for example Figure 1 The computing device 101 shown can execute each storage group deployment task corresponding to the storage group deployment task flow in response to the number of computing nodes being equal to 0. Wherein, when the number of computing nodes is 0, it indicates that the native database needs to be deployed. Therefore, when the number of computing nodes is 0, the native database can be directly deployed.

[0083] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 The process 300 of the database deployment method in some corresponding embodiments reflects the steps expanded when the number of computing nodes is equal to 0. Therefore, the solutions described in these embodiments can directly deploy the native database when the number of computing nodes is 0.

[0084] Further references Figure 4 , which shows a process 400 of some other embodiments of the database deployment method. The process 400 of the database deployment method includes the following steps:

[0085] Step 401: Receive cluster information corresponding to a database deployment request.

[0086] In some embodiments, the execution body of the database deployment method (for example Figure 1The computing device 101 shown in the figure can receive cluster information corresponding to the database deployment request from the terminal through which the user sends the database deployment request by wired connection or wireless connection. Among them, the above-mentioned cluster information may include storage group information and computing group information. The above-mentioned storage group information may include but is not limited to: storage resource type, instance operation basic parameters, database version information and at least one high availability group information. Among them, the above-mentioned storage resource type may be the type of resource of the database to be deployed for storing data. The above-mentioned storage resource type may include but is not limited to one of the following: physical machine class, virtual machine class, kubernetes class. The above-mentioned instance operation basic parameters may be the basic parameters for the database instance to run on the server, which may include but is not limited to: the number of central processing unit cores, memory space, and disk storage space. The above-mentioned database version information may be version-related information of the database to be deployed, and may include the version number of the database. The above-mentioned high availability group information may be relevant information of the storage node group to be deployed, which may include but is not limited to: storage node identification group, address information group and port number group corresponding to the above-mentioned storage node identification group, master library storage node identification group, and slave library storage node identification group. The address information in the above-mentioned address information group and the port number in the above-mentioned port number group correspond one-to-one to the storage node identifier in the above-mentioned storage node identifier group. The above-mentioned address information may include the IP address and VIP address of the server on which the storage node corresponding to the above-mentioned storage node identifier is deployed. The above-mentioned port number may be the port number of the server on which the storage node corresponding to the above-mentioned storage node identifier is deployed. The master library storage node identifier in the above-mentioned master library storage node identifier group may be the identifier of the storage node used to deploy the master library. The slave library storage node identifier in the above-mentioned slave library storage node identifier group may be the identifier of the storage node used to deploy the slave library. The above-mentioned computing group information may include but is not limited to: the number of computing nodes, the type of computing resources. The above-mentioned computing resource type may be the type of resources of the computing node to be deployed. The above-mentioned computing resource type may include but is not limited to one of the following: physical machine class, virtual machine class, kubernetes class.

[0087] Step 402, in response to the storage resource type being a physical machine type or a virtual machine type, execute the following steps:

[0088] Step 4021, create an environment initialization task according to the instance running basic parameters and database version information.

[0089] In some embodiments, the execution subject may create an environment initialization task based on the basic parameters of the above-mentioned instance operation and the above-mentioned database version information. Among them, the above-mentioned environment initialization task may be a task for configuring the initial environment of the server for deploying the database for storing data, which may include but is not limited to: server parameter configuration subtask and database installation file acquisition subtask. The above-mentioned server parameter configuration subtask may be a task for configuring the parameters of the server for deploying the database for storing data according to the basic parameters of the above-mentioned instance operation. The parameters of the above-mentioned server may include but are not limited to: buffer pool size, number of read and write threads, maximum limit of open files, number of parallel copy threads, and maximum number of connections (users). For example, when the memory space is less than or equal to 8G, the buffer pool size may be 0.25 times the memory space. When the memory space is greater than 8G and less than or equal to 64G, the buffer pool size may be 0.5 times the memory space. When the memory space is greater than 64G, the buffer pool size may be 0.65 times the memory space. When the number of CPU cores is less than or equal to 8, the number of read and write threads is 2. When the number of CPU cores is greater than 8 and less than or equal to 16, the number of read and write threads is 4. When the number of CPU cores is greater than 16, the number of read and write threads is 8. When the memory space is less than or equal to 8G, the maximum limit of open files can be 3000. When the memory space is greater than 8G and less than or equal to 16G, the maximum limit of open files can be 6000. When the memory space is greater than 16G, the maximum limit of open files can be 64000. When the number of CPU cores is less than or equal to 8, the number of parallel copy threads can be 8. When the number of CPU cores is greater than 8, the number of parallel copy threads can be 16. The maximum number of connections (users) can be 80 by default. The above-mentioned database installation file acquisition subtask can be a task of acquiring the installation file of the database used to deploy storage data according to the above-mentioned database version information.

[0090] As an example, the server parameter configuration subtask may be a server parameter configuration subtask “C01”. The database installation file acquisition subtask may be a database installation file acquisition subtask “C02”. “C01” and “C02” are task identifiers of storage group deployment tasks, respectively.

[0091] Step 4022, create a database installation task.

[0092] In some embodiments, the execution subject may create a database installation task, wherein the database installation task may be a task for installing the acquired database installation file and starting the instance.

[0093] Step 403: Create a master-slave relationship establishment task, an instance mounting task, a switching test task, and a backup strategy generation task in sequence according to each high availability group information in the at least one high availability group information.

[0094] In some embodiments, the above-mentioned execution subject can create a master-slave relationship establishment task, an instance mounting task, a switching test task and a backup strategy generation task based on the above-mentioned high availability group information. Among them, the above-mentioned master-slave relationship establishment task can be a task of configuring the master-slave relationship of the database. The above-mentioned instance mounting task can be a task of mounting a VIP address for a database instance. The above-mentioned switching test task can be a task of performing a switching test in the above-mentioned storage node group. The above-mentioned backup strategy generation task can be a task of selecting a storage node as a slave library in the storage node group as a backup database node for backup. For example, the above-mentioned backup strategy generation task can be a task of selecting a storage node with the shortest synchronization delay time between the master library and the slave library from the storage node of the slave library in a different computer room to back up data. The above-mentioned different computer room is a computer room different from the computer room of the main library.

[0095] As an example, if the above storage group information includes two high availability group information, the first high availability group information corresponds to the created master-slave relationship establishment task "C03", instance mounting task "C04", switching test task "C05" and backup strategy generation task "C06". The second high availability group information corresponds to the created master-slave relationship establishment task "C07", instance mounting task "C08", switching test task "C09" and backup strategy generation task "C10". Among them, "C03" to "C10" are the task identifiers of the storage group deployment tasks respectively.

[0096] Step 404, the server parameter configuration subtask, the database installation file acquisition subtask, the database installation task, the master-slave relationship establishment task corresponding to each high availability group information in at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task are sequentially combined into a storage group deployment task flow.

[0097] In some embodiments, the above-mentioned execution entity can combine the above-mentioned server parameter configuration subtask, the above-mentioned database installation file acquisition subtask, the master-slave relationship establishment task corresponding to each high availability group information in the above-mentioned at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task in sequence into a storage group deployment task flow.

[0098] As an example, the combined storage group deployment task flow can be: server parameter configuration subtask "C01" - database installation file acquisition subtask "C02" - master-slave relationship establishment task "C03" - instance mounting task "C04" - switching test task "C05" - backup strategy generation task "C06" - master-slave relationship establishment task "C07" - instance mounting task "C08" - switching test task "C09" - backup strategy generation task "C10".

[0099] Step 405, in response to the number of computing nodes being greater than 0, execute the following steps:

[0100] Step 4051, in response to the computing resource type being a physical machine type or a virtual machine type, execute the following steps:

[0101] Step 40511, create a computing node environment initialization task.

[0102] In some embodiments, the execution subject may create a computing node environment initialization task based on the computing node operation basic parameter information group. The computing node environment initialization task may be a task for configuring the environment variables for the operation of each computing node in the computing node group. For example, the computing node environment initialization task may include a task for detecting whether each computing node in the computing node group has a Java environment and a Java version, and if not, installing a JDK (Java Development Kit).

[0103] Step 40512, create a computing program installation startup task.

[0104] In some embodiments, the execution subject may create a computing program installation startup task. The computing program installation startup task may be a task for installing computing programs of various computing nodes and for starting the computing programs. For example, the computing program may be a "proxy".

[0105] Step 4052, create metadata initialization tasks and load balancing configuration tasks.

[0106] In some embodiments, the specific implementation of step 4052 and the technical effects brought about can be referred to Figure 2 The corresponding step 2031 in the embodiments will not be repeated here.

[0107] Step 4053, combines the computing node environment initialization task, computing program installation and startup task, metadata initialization task and load balancing configuration task in sequence into a computing group deployment task flow.

[0108] In some embodiments, the execution entity may sequentially combine the computing node environment initialization task, the computing program installation startup task, the metadata initialization task, and the load balancing configuration task into a computing group deployment task flow.

[0109] As an example, the computing node environment initialization task mentioned above may be a computing node environment initialization task “J01”. The computing program installation startup task mentioned above may be a computing program installation startup task “J02”. The metadata initialization task mentioned above may be a metadata initialization task “J03”. The load balancing configuration task mentioned above may be a load balancing configuration task “J04”. The combined computing group deployment task flow may be: computing node environment initialization task “J01” - computing program installation startup task “J02” - metadata initialization task “J03” - load balancing configuration task “J04”. Among them, “J01” to “J04” are the task identifiers of computing group deployment tasks respectively.

[0110] Step 4054, executing each storage group deployment task corresponding to the storage group deployment task flow.

[0111] Step 4055, execute each computing group deployment task corresponding to the computing group deployment task flow.

[0112] In some embodiments, the specific implementation of steps 4054-4055 and the technical effects brought about can be referred to Figure 2 The corresponding steps 2032-2033 in the embodiments are not repeated here.

[0113] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the database deployment method in some corresponding embodiments embodies the steps of expanding the database deployment of the resource type of the physical machine class or the virtual machine class. Therefore, the scheme described in these embodiments can make the database deployment compatible with multiple resource forms, such as physical machines, virtual machines and Kubernetes environments.

[0114] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a database deployment device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0115] like Figure 5As shown, the database deployment apparatus 500 of some embodiments includes: a receiving unit 501, a generating unit 502 and an executing unit 503. The receiving unit 501 is configured to receive cluster information corresponding to the database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes; the generating unit 502 is configured to generate a storage group deployment task flow according to the storage group information; the executing unit 503 is configured to perform the following steps in response to the number of computing nodes being greater than 0: generating a computing group deployment task flow according to the computing group information; executing each storage group deployment task corresponding to the storage group deployment task flow; executing each computing group deployment task corresponding to the computing group deployment task flow.

[0116] Optionally, the database deployment device 500 may further include: a storage group deployment task execution unit (not shown in the figure), configured to execute each storage group deployment task corresponding to the storage group deployment task flow in response to the number of computing nodes being equal to 0.

[0117] Optionally, the storage group information includes storage resource type, instance operation basic parameters, database version information and at least one high availability group information.

[0118] Optionally, the generation unit 502 can be further configured to: in response to the above-mentioned storage resource type being a physical machine class or a virtual machine class, perform the following steps: create an environment initialization task based on the above-mentioned instance running basic parameters and the above-mentioned database version information, wherein the above-mentioned environment initialization task includes a server parameter configuration subtask and a database installation file acquisition subtask; create a database installation task; based on each high availability group information in the above-mentioned at least one high availability group information, create a master-slave relationship establishment task, an instance mounting task, a switching test task and a backup strategy generation task in sequence; combine the above-mentioned server parameter configuration subtask, the above-mentioned database installation file acquisition subtask, the above-mentioned database installation task, the master-slave relationship establishment task corresponding to each high availability group information in the above-mentioned at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task in sequence into a storage group deployment task flow.

[0119] Optionally, the computing group information also includes computing resource types.

[0120] Optionally, the execution unit 503 may include: a step execution unit, a task creation unit, and a task combination unit (not shown in the figure). The step execution unit is configured to execute the following steps in response to the computing resource type being a physical machine class or a virtual machine class: create a computing node environment initialization task; create a computing program installation startup task. The task creation unit is configured to create a metadata initialization task and a load balancing configuration task. The task combination unit is configured to sequentially combine the computing node environment initialization task, the computing program installation startup task, the metadata initialization task, and the load balancing configuration task into a computing group deployment task flow.

[0121] Optionally, the execution unit 503 may include: a first retry unit and a first task execution unit (not shown in the figure). The first retry unit is configured to, in response to the execution status of the storage group deployment task in each of the above storage group deployment tasks being execution failure, retry the execution of the storage group deployment task whose execution status is execution failure. The first task execution unit is configured to, in response to the execution status of the storage group deployment task whose execution status is execution failure being execution success, execute the storage group deployment task arranged after the storage group deployment task whose execution status is execution failure.

[0122] Optionally, the execution unit 503 may include: a second retry unit and a second task execution unit (not shown in the figure). The second retry unit is configured to, in response to the execution status of the computing group deployment task in each of the computing group deployment tasks being execution failure, retry the execution of the computing group deployment task with the execution status being execution failure. The second task execution unit is configured to, in response to the execution status of the computing group deployment task with the execution status being execution success, execute the computing group deployment task arranged after the computing group deployment task with the execution status being execution failure.

[0123] Optionally, before the generating unit 502, the database deployment device 500 may further include: a first storage unit (not shown in the figure), configured to store the above storage group information.

[0124] Optionally, the above cluster information also includes a cluster name.

[0125] Optionally, after the receiving unit 501, the database deployment apparatus 500 may further include: a determination unit (not shown in the figure), configured to determine that the database deployment status corresponding to the database deployment request is deployment failure in response to the cluster name not existing locally.

[0126] Optionally, the database deployment device 500 may further include: a second storage unit (not shown in the figure), configured to store the above-mentioned computing group information.

[0127] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.

[0128] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the computing device 101)600. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0129] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0130] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0131] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0132] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0133] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0134] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives cluster information corresponding to the database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes; generates a storage group deployment task flow according to the storage group information; in response to the number of computing nodes being greater than 0, performs the following steps: generates a computing group deployment task flow according to the computing group information; executes each storage group deployment task corresponding to the storage group deployment task flow; executes each computing group deployment task corresponding to the computing group deployment task flow.

[0135] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0137] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a generating unit, and an executing unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the receiving unit may also be described as "a unit for receiving cluster information corresponding to a database deployment request".

[0138] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0139] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A database deployment method, comprising: Receive cluster information corresponding to the database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes and computing resource types; Generate a storage group deployment task flow according to the storage group information; In response to the number of computing nodes being greater than 0, the following steps are performed: Generate a computing group deployment task flow according to the computing group information, wherein generating a computing group deployment task flow according to the computing group information includes: In response to the computing resource type being a physical machine type or a virtual machine type, the following steps are performed: Create a computing node environment initialization task; Create a startup task to install the calculation program; Create metadata initialization tasks and load balancing configuration tasks; Combining the computing node environment initialization task, the computing program installation and startup task, the metadata initialization task and the load balancing configuration task in sequence into a computing group deployment task flow; Execute each storage group deployment task corresponding to the storage group deployment task flow; Execute each computing group deployment task corresponding to the computing group deployment task flow.

2. The method according to claim 1, wherein: The method further comprises: In response to the number of computing nodes being equal to 0, each storage group deployment task corresponding to the storage group deployment task flow is executed.

3. The method according to claim 1, wherein: The storage group information includes storage resource type, instance operation basic parameters, database version information and at least one high availability group information; as well as The step of generating a storage group deployment task flow according to the storage group information includes: In response to the storage resource type being a physical machine type or a virtual machine type, the following steps are performed: Creating an environment initialization task according to the instance running basic parameters and the database version information, wherein the environment initialization task includes a server parameter configuration subtask and a database installation file acquisition subtask; Create a database installation task; According to each high availability group information in the at least one high availability group information, a master-slave relationship establishment task, an instance mounting task, a switching test task, and a backup strategy generation task are sequentially created; The server parameter configuration subtask, the database installation file acquisition subtask, the database installation task, the master-slave relationship establishment task corresponding to each high availability group information in the at least one high availability group information, the instance mounting task, the switching test task and the backup strategy generation task are sequentially combined into a storage group deployment task flow.

4. The method according to claim 1 or 2, wherein: The executing each storage group deployment task corresponding to the storage group deployment task flow includes: In response to the execution status of the storage group deployment task in each storage group deployment task being execution failure, retrying the storage group deployment task whose execution status is execution failure; In response to the execution status of the storage group deployment task whose execution status is execution failure being changed to execution success, the storage group deployment task arranged after the storage group deployment task whose execution status is execution failure is executed.

5. The method according to claim 1, wherein: The executing each computing group deployment task corresponding to the computing group deployment task flow includes: In response to the execution status of the computing group deployment tasks in the various computing group deployment tasks being execution failure, retrying the computing group deployment tasks whose execution status is execution failure; In response to the execution status of the computing group deployment task whose execution status is execution failure being changed to execution success, executing the computing group deployment task arranged after the computing group deployment task whose execution status is execution failure.

6. The method according to claim 1 or 3, wherein: Before generating the storage group deployment task flow according to the storage group information, the method further includes: The storage group information is stored.

7. The method according to claim 1, wherein: The cluster information also includes a cluster name; as well as After receiving the cluster information corresponding to the database deployment request, the method further includes: In response to the cluster name not existing locally, it is determined that the database deployment status corresponding to the database deployment request is deployment failure.

8. The method according to claim 1, wherein: Before generating a computing group deployment task flow according to the computing group information, the method further includes: The computing group information is stored.

9. A database deployment device, comprising: A receiving unit is configured to receive cluster information corresponding to the database deployment request, wherein the cluster information includes storage group information and computing group information, and the computing group information includes the number of computing nodes and computing resource types; A generating unit, configured to generate a storage group deployment task flow according to the storage group information; The execution unit is configured to perform the following steps in response to the number of computing nodes being greater than 0: generating a computing group deployment task flow based on the computing group information, wherein the generating the computing group deployment task flow based on the computing group information includes: in response to the computing resource type being a physical machine class or a virtual machine class, performing the following steps: creating a computing node environment initialization task; creating a computing program installation startup task; creating a metadata initialization task and a load balancing configuration task; combining the computing node environment initialization task, the computing program installation startup task, the metadata initialization task and the load balancing configuration task in sequence into a computing group deployment task flow; executing each storage group deployment task corresponding to the storage group deployment task flow; executing each computing group deployment task corresponding to the computing group deployment task flow.

10. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.

11. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Task flow control method and device based on database deployment

    CN113986514A