A database deployment method and device for multiple platforms

Through the automated multi-platform database deployment method, the problem of cumbersome and inefficient manual deployment in the existing technology is solved, and efficient deployment, upgrade and expansion of multi-platform databases are achieved.

CN119127240BActive Publication Date: 2025-03-07JIANGSU HUAKU DATA TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411604272.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-07
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

Existing database deployment methods require manual deployment and configuration, resulting in inefficiency, high error rates, and difficulty in supporting the deployment of multiple heterogeneous platforms.

Method used

Provides a multi-platform database deployment method, which automates database deployment, upgrades and expansion by configuring installation package files, parsing database installation requests, copying and creating new installation directories, and executing installation scripts, and supports the deployment of multiple heterogeneous platforms.

Benefits of technology

It realizes automation of multi-platform database deployment, improves deployment efficiency, reduces error rates, and supports the construction of mixed clusters of heterogeneous platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127240B_ABST
    Figure CN119127240B_ABST
Patent Text Reader

Abstract

The present invention provides a database deployment method and device for multiple platforms, and relates to the technical field of virtual cluster deployment. The method comprises: configuring an installation package file according to the installation paths of different virtual platforms; receiving a user's database installation request, parsing the installation package file according to the database installation request, and obtaining installation information corresponding to the database installation request; copying the installation package data file of the platform corresponding to the database installation request and creating a new installation directory according to the installation information; executing the installation script to complete and take effect the set environment variables, and starting the cluster to complete the database deployment. The present invention realizes unified operation during the installation, deployment, upgrade and expansion of virtual clusters under multiple platforms, and at the same time, the consistency check of the operating systems of different virtual clusters can be ignored during the installation process, and the configuration process is simple, which can improve efficiency and reduce error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual cluster deployment, and in particular to a database deployment method and device for multiple platforms. Background Art

[0002] The current database needs to adapt to an increasingly wider range of platform architectures. In customer business scenarios, for example, GBase8a, as a large-scale cluster, needs to support the deployment of 64 management nodes and a single computing storage cluster needs to support the deployment of more than 300 data nodes. The existing GBase8a version deploys multiple vc subclusters on a physical cluster. Multiple vcs need to be on the same platform, and the installation package can be deployed using the installation package of the platform. In general, with the complexity of the business and the diversity of platforms, database clusters have generated a need to support the construction of mixed clusters of different platforms.

[0003] That is, multiple vc subclusters need to support heterogeneous platform deployment to solve some resource isolation problems. At the same time, these resources can be implemented on different platforms. However, currently, manual deployment is required for each platform, and the configuration steps are cumbersome, inefficient and error-prone. Summary of the invention

[0004] The present invention aims to solve at least one of the technical problems existing in the related art. To this end, the present invention provides a database deployment method and device for multiple platforms.

[0005] The present invention provides a database deployment method for multiple platforms, comprising:

[0006] S1: Configure the installation package file according to the installation path of different virtual platforms;

[0007] S2: receiving a database installation request from a user, parsing the installation package file according to the database installation request, and obtaining installation information corresponding to the database installation request;

[0008] S3: According to the installation information, copy the installation package data file of the platform corresponding to the database installation request and create a new installation directory;

[0009] S4: The installation script is executed and the set environment variables take effect. The cluster is started to complete the database deployment.

[0010] According to a database deployment method for multiple platforms provided by the present invention, the installation package file in step S1 is in XML format.

[0011] According to a database deployment method for multiple platforms provided by the present invention, the installation package file in step S1 includes a designated installation directory, installation package directories of different platforms and node information of different platforms.

[0012] According to a database deployment method for multiple platforms provided by the present invention, the installation information in step S2 includes:

[0013] Installation package directory;

[0014] Node information, including container nodes and coordination nodes;

[0015] A list array, wherein the list array includes virtual cluster names and data nodes of different platforms.

[0016] According to a database deployment method for multiple platforms provided by the present invention, step S4 also includes:

[0017] S411: when the deployed database is upgraded, the installation script is added with upgrade parameters to obtain an upgrade package file;

[0018] S412: Using the upgrade package file as an upgrade script to perform an upgrade operation;

[0019] S413: Read the data node and installation package path information of the upgraded version to overwrite the data, execute the upgrade script to complete and take effect the set environment variables, and start the cluster to complete the database upgrade.

[0020] According to a database deployment method for multiple platforms provided by the present invention, step S4 also includes:

[0021] S421: When the deployed database is expanded, the node information to be expanded is read;

[0022] S422: Check whether the operating system corresponding to the node information to be expanded is consistent with the operating system corresponding to the installation directory of the different platform. If they are inconsistent, the expansion fails. If they are consistent, temporarily copy the database file corresponding to the installation directory of the different platform.

[0023] S423: Based on the temporarily copied database file, the configuration file of the current database is updated according to the information of the node to be expanded, and the node to be expanded joins the specified virtual cluster to complete the expansion.

[0024] The present invention also provides a database deployment device for multiple platforms, which is used to execute a database deployment method for multiple platforms as described in any one of the above items, comprising:

[0025] Configuration module: used to configure the installation package file according to the installation path of different virtual platforms;

[0026] Parsing module: used to receive a database installation request from a user, parse the installation package file according to the database installation request, and obtain installation information corresponding to the database installation request;

[0027] Copy and create module: used to copy the installation package data file and create the installation directory of the corresponding platform of the database installation request according to the installation information;

[0028] Installation startup module: used to execute the installation script to complete and take effect the set environment variables, start the cluster, and complete the database deployment.

[0029] The present invention provides a database deployment method and device for multiple platforms, which can realize unified operation during virtual cluster installation, deployment, upgrade and expansion by centrally aggregating the installation paths of multiple platforms. At the same time, the consistency check of the operating systems of different virtual clusters can be ignored during the installation process. The configuration process is simple, which can improve efficiency and reduce error rate. After the deployment is completed, if different businesses are involved, each virtual cluster vc is independent of each other. When a virtual cluster vc is upgraded or expanded, or even when a node is damaged and needs to be replaced, other virtual cluster vcs can continue to execute business without being affected.

[0030] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0032] Figure 1 The present invention is a flowchart of a method for deploying a database on multiple platforms provided by an embodiment of the present invention.

[0033] Figure 2 It is a schematic diagram of the structure of a database deployment device for multiple platforms provided by an embodiment of the present invention.

[0034] Reference numerals:

[0035] 100. Configure the module; 200. Analyze the module; 300. Copy the newly created module; 400. Install the startup module. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.

[0037] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0038] Combine the following Figure 1 to Figure 2 Embodiments of the present invention are described.

[0039] The present invention provides a database deployment method for multiple platforms, comprising:

[0040] S1: Configure the installation package file according to the installation path of different virtual platforms;

[0041] In this stage, we first use XML files to specify the installation paths of virtual clusters of different CPUs and operating systems. For a new installation, it includes three parts: gcware cluster container cluster, coordinator cluster coordination cluster and data node data node. It supports coordinator cluster and data node to share one physical node, and each coordinator cluster node serves as the cluster entrance, including the cluster's gclusterd service, monitoring gcmonitor service and high availability service gcrecovery.

[0042] Wherein, the installation package file in step S1 is in XML format.

[0043] In this stage, the installation configuration file uses an XML file, which is easier to read and write.

[0044] The installation package file in step S1 includes a designated installation directory, installation package directories of different platforms, and node information of different platforms.

[0045] The following is a detailed description of the installation package file by listing the XML file examples used for installation.

[0046] <cluster>

[0047] <installprefix>< / installPrefix>

[0048] <dbauser>< / dbauser>

[0049] <clusterplatform>

[0050] <packagepath>< / packagepath>

[0051] <vc>

[0052] <vcname>< / vcname>

[0053] <datahost>< / datahost>

[0054] < / vc>

[0055] < / clusterPlatform>

[0056] <clusterplatform>

[0057] <packagepath>< / packagepath>

[0058] <vc>

[0059] <vcname>< / vcname>

[0060] <datahost>< / datahost>

[0061] < / vc>

[0062] < / clusterPlatform>

[0063] < / clusterplatform> < / clusterplatform> < / dbauser> < / installprefix> < / cluster> .

[0064] In the above xml file used for installation, the added parameters include: installPrefix: specifies the installation directory; packagePath: the installation package directory of different platforms; vc: virtual cluster, including dataHost node. A virtual cluster vc needs to ensure the consistency of CPU and operating system. Multiple vcs can be different.

[0065] S2: receiving a database installation request from a user, parsing the installation package file according to the database installation request, and obtaining installation information corresponding to the database installation request;

[0066] Specifically, the installation package paths of different virtual clusters are specified in the xml file set in step S1, and the installation program will find the installation package according to the installation path and create virtual clusters of different platforms.

[0067] Wherein, the installation information in step S2 includes:

[0068] Installation package directory;

[0069] Node information, including container nodes and coordination nodes;

[0070] A list array, wherein the list array includes virtual cluster names and data nodes of different platforms.

[0071] Furthermore, after the installation operation is performed, the gcwarecluster and coordinator cluster node information is first parsed according to the installation configuration XML file, and the multi-platform list array is read at the same time, including information such as the name of the virtual cluster, the data node datahost, and the installation package directory information.

[0072] S3: According to the installation information, copy the installation package data file of the platform corresponding to the database installation request and create a new installation directory;

[0073] It should be noted that after the node platform and packagePath installation package type are consistent, after the consistency is verified, the data files of the installation package are copied and the installation directory is created.

[0074] S4: The installation script is executed and the set environment variables take effect. The cluster is started to complete the database deployment.

[0075] After the data files on different platforms are copied successfully, the execution script and the export of environment variables take effect, then the cluster node service is started, and the installed datahost node is added to the specified virtual cluster to take effect. At this point, the database is successfully installed.

[0076] In addition, when the virtual cluster configured in step S4 needs to be upgraded, an XML file needs to be configured to specify the upgrade version and virtual cluster information, including three scenarios: upgrading virtual cluster vc (multiple vcs) separately; upgrading coordinatorcluster, gcware and virtual cluster vc; and upgrading all nodes of the database.

[0077] The specific example of the XML file used for the upgrade is as follows:

[0078] <cluster>

[0079] <installprefix>< / installPrefix>

[0080] <dbauser>< / dbauser>

[0081] <clusterplatform>

[0082] <packagepath>< / packagepath>

[0083] <vc>< / vc>

[0084] < / clusterPlatform>

[0085] <clusterplatform>

[0086] <packagepath>< / packagepath>

[0087] <vc>< / vc> -

[0088] < / clusterPlatform>

[0089] < / clusterplatform> < / clusterplatform> < / dbauser> < / installprefix> < / cluster> .

[0090] The specific upgrade steps are as follows:

[0091] Wherein, step S4 also includes:

[0092] S411: when the deployed database is upgraded, the installation script is added with upgrade parameters to obtain an upgrade package file;

[0093] S412: Using the upgrade package file as an upgrade script to perform an upgrade operation;

[0094] S413: Read the data node and installation package path information of the upgraded version to overwrite the data, execute the upgrade script to complete and take effect the set environment variables, and start the cluster to complete the database upgrade.

[0095] Generally speaking, first we use the installation script, set the -U upgrade parameter, and perform the upgrade; after confirming the upgrade operation, we need to check the database status and save the snapshot information; read the virtual vc node and installation package path information of the upgraded version, overwrite the data, and then execute the script and export the environment variables to take effect. The cluster service is started successfully, and the database is successfully upgraded to the specified version.

[0096] In addition, when the virtual cluster successfully configured in step S4 needs to expand database resources, XML information also needs to be configured, including three scenarios: virtual cluster vc expansion; coordinator cluster expansion alone; coordinator cluster and virtual cluster vc expansion.

[0097] The following is an example of the XML file used for capacity expansion:

[0098] <cluster>

[0099] <installprefix>< / installPrefix>

[0100] <dbauser>< / dbauser>

[0101] <clusterplatform>

[0102] <packagepath>< / packagepath>

[0103] <vc>

[0104] <vcname>< / vcname>

[0105] <datahost>< / datahost>

[0106] < / vc>

[0107] < / clusterPlatform>

[0108] <clusterplatform>

[0109] <packagepath>< / packagepath>

[0110] <vc>

[0111] <vcname>< / vcname>

[0112] <datahost>< / datahost>

[0113] < / vc>

[0114] < / clusterPlatform>

[0115] < / clusterplatform> < / clusterplatform> < / dbauser> < / installprefix> < / cluster> .

[0116] The specific expansion steps are as follows:

[0117] Wherein, step S4 also includes:

[0118] S421: When the deployed database is expanded, the node information to be expanded is read;

[0119] S422: Check whether the operating system corresponding to the node information to be expanded is consistent with the operating system corresponding to the installation directory of the different platform. If they are inconsistent, the expansion fails. If they are consistent, temporarily copy the database file corresponding to the installation directory of the different platform.

[0120] S423: Based on the temporarily copied database file, the configuration file of the current database is updated according to the information of the node to be expanded, and the node to be expanded is added to the specified virtual cluster to complete the expansion.

[0121] After using the installation script, read the data node information to be expanded and the information of other existing nodes; check whether the operating system of the expanded node and the installation package of packagePath are consistent. If they are consistent, the expansion can be executed; send the database file under the specified packagePath path to a temporary directory for copying; refresh the snapshot information of the original database cluster, update and synchronize the configuration files; after the expanded node service is started, join the specified virtual cluster vc, and the expansion is successful.

[0122] The present invention also provides a database deployment device for multiple platforms, which is used to execute a database deployment method for multiple platforms as described in any one of the above items, comprising:

[0123] Configuration module 100: configured to configure installation package files according to installation paths of different virtual platforms;

[0124] Parsing module 200: used to receive a database installation request from a user, parse the installation package file according to the database installation request, and obtain installation information corresponding to the database installation request;

[0125] Copy and create module 300: used to copy the installation package data file of the platform corresponding to the database installation request and create an installation directory according to the installation information;

[0126] Installation startup module 400: used to execute the installation script to complete and take into effect the set environment variables, and start the cluster to complete the database deployment.

[0127] The present invention provides a database deployment method and device for multiple platforms, which can enable multiple vc subclusters to support heterogeneous platform deployment and solve the problem of partial resource isolation. At the same time, these resources can be implemented on different platforms. For example, virtual cluster vc1 uses x86+centos7, and virtual cluster vc2 uses arm+kylin10. After the deployment is completed, if different businesses are involved, each virtual cluster vc is independent of each other. When a virtual cluster vc is upgraded or expanded, or even when a node is damaged and needs to be replaced, other virtual cluster vcs that do not need to be operated can continue to execute business without being affected. During the deployment process, due to the automated deployment operation, the error rate of manual deployment can be reduced, and the efficiency of deployment operation is improved.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A database deployment method for multiple platforms, characterized in that: include: S1: Configure the installation package file according to the installation path of different virtual platforms; The installation package file is in XML format; The installation package file includes the specified installation directory, installation package directories for different platforms, and node information for different platforms; S2: receiving a database installation request from a user, parsing the installation package file according to the database installation request, and obtaining installation information corresponding to the database installation request; The installation information includes: Installation package directory; Node information, including container nodes and coordination nodes; A list array, wherein the list array includes virtual cluster names and data nodes of different platforms; S3: According to the installation information, copy the installation package data file of the platform corresponding to the database installation request and create a new installation directory; S4: The installation script is executed and the set environment variables take effect. The cluster is started to complete the database deployment.

2. A database deployment method for multiple platforms according to claim 1, characterized in that: Step S4 also includes: S411: when the deployed database is upgraded, the installation script is added with upgrade parameters to obtain an upgrade package file; S412: Using the upgrade package file as an upgrade script to perform an upgrade operation; S413: Read the data node and installation package path information of the upgraded version to overwrite the data, execute the upgrade script to complete and take effect the set environment variables, and start the cluster to complete the database upgrade.

3. A database deployment method for multiple platforms according to claim 1, characterized in that: Step S4 also includes: S421: When the deployed database is expanded, the node information to be expanded is read; S422: Check whether the operating system corresponding to the node information to be expanded is consistent with the operating system corresponding to the installation directory of the different platform. If they are inconsistent, the expansion fails. If they are consistent, temporarily copy the database file corresponding to the installation directory of the different platform. S423: Based on the temporarily copied database file, the configuration file of the current database is updated according to the information of the node to be expanded, and the node to be expanded is added to the specified virtual cluster to complete the expansion.

4. A database deployment device for multiple platforms, used to execute a database deployment method for multiple platforms as claimed in any one of claims 1 to 3, characterized in that: include: Configuration module: used to configure the installation package file according to the installation path of different virtual platforms; The installation package file is in XML format; The installation package file includes the specified installation directory, installation package directories for different platforms, and node information for different platforms; Parsing module: used to receive a database installation request from a user, parse the installation package file according to the database installation request, and obtain installation information corresponding to the database installation request; The installation information includes: Installation package directory; Node information, including container nodes and coordination nodes; A list array, wherein the list array includes virtual cluster names and data nodes of different platforms; Copy and create module: used to copy the installation package data file and create the installation directory of the corresponding platform of the database installation request according to the installation information; Installation startup module: used to execute the installation script to complete and take effect the set environment variables, start the cluster, and complete the database deployment.

Citation Information

Patent Citations

  • Method and device for cross-platform database management, compute device and storage medium

    CN108932309A

  • Method for integrating OpenGauss in big data platform supporting multi-core multi-OS combined environment

    CN117762433A