Updated on 2023-11-27 GMT+08:00

Creating a GaussDB(DWS) 2.0 Cluster

To use Huawei Cloud GaussDB(DWS), create a data warehouse cluster first. When you create a data warehouse cluster, the yearly/monthly billing mode is used by default, which is more favorable than the pay-per-use billing mode. You can customize the computing resources and storage space of the cluster. If you select the pay-per-use mode, nodes will be billed by actual duration of use, with a billing cycle of one hour. This mode is flexible. You can enable or disable the service whenever you like.

This section describes how to create a data warehouse cluster on the GaussDB(DWS) management console.

  • To balance loads, achieve high availability, and avoid single-node faults, if no ELB is bound during cluster creation, you can bind an ELB on the cluster details page after the cluster is created. For details, see Associating and Disassociating ELB.
  • The GaussDB(DWS) clusters under the same account are physically isolated and cannot share data. You can import data from a remote GaussDB(DWS) cluster to a local one by using a foreign table. For details, see Tutorial: Importing Remote GaussDB(DWS) Data Sources.

Preparations Before Creating a Cluster

  • You have evaluated the flavor of cluster nodes.

    You can select the number of nodes by data volume, service load, and performance. More nodes bring you stronger storage and compute capabilities.

    When first using GaussDB(DWS), you can create a cluster with a smaller flavor. Then, you can adjust the cluster scale and node flavor based on the data volume and service load changes without interrupting services. For details, see Scaling Out a Cluster.

  • Ensure that the number of available nodes meets the following conditions. Otherwise, the cluster cannot be created.

    The number of nodes that can be used by a user depends on the product type you select.A hybrid data warehouse cluster (standalone mode) has only one node. For other types of clusters, the number of nodes can be greater than or equal to 3. You can view the number of available nodes on the Clusters page.

Creating a Cluster

  1. Go to the page for creating a data warehouse cluster.
  2. Select Region.

    Table 1 Region parameters

    Parameter

    Description

    Example Value

    Region

    Select the actual region where the cluster nodes run.

    For more information about regions, visit Regions and Endpoints.

    CN-Hong Kong

    AZ

    Select an AZ associated with the cluster region.

    For more information, see Regions and AZs.

    ap-southeast-1a

  3. Select a billing mode. For more information, see Pricing Details.

    • Yearly/Monthly: If you select Yearly/Monthly, you need to set the required duration in 12 before proceeding with the following steps.

      Only clusters of version 8.1.3.100 and later support the yearly/monthly billing mode.

    • Pay-per-use (hourly): If you select this billing mode, go to 2.

  4. Select an AZ. You can select Single AZ or Multi-AZ as required.

    • Multi-AZ clusters are supported only by clusters of version 8.2.0.100 or later.
    • The Multi-AZ option is displayed only if the number of AZs in the selected region is greater than or equal to 3. If this condition is not met, only a single-AZ cluster can be created.
    • For a multi-AZ cluster, only three AZs can be selected at a time so far. Server nodes are evenly distributed among the three AZs.
    • The multi-AZ cluster supports only GaussDB(DWS) 2.0 standard data warehouses.
    • The numbers of nodes in a multi-AZ cluster must be a multiple of 3.
    • In a multi-AZ cluster, the number of DNs must be less than or equal to 2.

  5. Configure Resource, CPU Architecture, and Node Flavor.

    • The number of nodes in a new cluster cannot exceed the quota that can be used by a user or 256. If the node quota is insufficient, click Increase quota to submit a service ticket and apply for higher node quota.
    • If you have yearly/monthly nodes that meet service requirements, you are advised to use these nodes first to save costs. You can select Yearly/Monthly for Billing Mode.
    • After a cluster is created, its type cannot be changed. For details about the differences between product types, see Data Warehouse Types.
    Figure 1 Configuring node parameters
    Table 2 Node configuration parameters

    Parameter

    Description

    Example Value

    Resource

    Product type. It can be:

    • Standard data warehouse: It can analyze hot and cold data and is highly cost-effective. Its storage and computing resources are not limited, and can be elastically scaled and billed per use. It is suitable for the converged analysis that requires integrated databases, warehouses, marts, and lakes. It is most suitable for OLAP workloads.
    • Stream data warehouse: It provides efficient time series computing and IoT analysis capabilities based on the standard data warehouse and supports correlation between real-time and historical data. The compression ratio can reach 40:1. It can be used for IoT real-time analysis.
    • Hybrid data warehouse: It provides high-concurrency, high-performance, and low-latency transaction processing capabilities at low costs based on large-scale data query and analysis capabilities. The data warehouse can be used to process HTAP hybrid loads, and can be deployed in standalone or cluster mode.
    NOTE:
    • A hybrid data warehouse can be deployed in cluster or standalone mode.
      • Cluster deployment: If the name of the selected node flavor contains h (for example, dwsx2.h.4xlarge.4.c6), the hybrid data warehouse can be deployed in cluster mode. You can deploy multiple nodes, scale nodes, and manage resource pools.
      • Standalone deployment: If the name of the selected node flavor contains h1 (for example, dwsx2.h1.xlarge.2.c6), the hybrid data warehouse only supports standalone deployment, which does not provide HA capabilities. The storage cost can be reduced by half. A standalone data warehouse can be restored by the automatic reconstruction of ECS, and its data reliability is ensured by the EVS multi-copy mechanism. It is less expensive than other specifications. It is a good choice for lightweight services.

    Standard

    Compute Resource

    It can be:

    • ESC: Scalable, reliable, and high-throughput virtual block storage is provided in a distributed architecture. This ensures that data can be quickly migrated and restored if any data replica is unavailable, preventing data from being lost because of a single hardware fault. Backup and restoration can be performed on ECSs and EVS disks. You can configure automatic backup policies for them.

    -

    Storage Type

    It can be:

    -

    CPU Architecture

    The CPU architecture includes:

    • x86
    • Kunpeng
    NOTE:

    The only difference between the x86 and Kunpeng architectures lies in the underlying architecture, of which the application layer is unaware. The same SQL syntax is used. If x86 servers are sold out when you create a cluster, select the Kunpeng architecture.

    -

    Node Flavor

    Select the desired node flavor based on service requirements. Each node flavor displays the vCPU, memory, and recommended application scenario.

    For more information about the node flavors supported by GaussDB(DWS) and their prices, see the GaussDB(DWS) pricing details.

    For details about the node flavors supported by GaussDB(DWS), see Data Warehouse Specifications.

    dws.dc.4xlarge

    Hot storage

    Available storage capacity of each node.

    NOTE:
    • The storage capacity you apply for has the necessary file system overhead, which includes index nodes and the space required for database running. The storage space must be an integer multiple of 100.
    • 200 GB per node is the actual storage capacity for service data. For example, if the number of nodes is set to 3, the total resource capacity is 600 GB.
    • By default, tablespaces are automatically created when you configure cold and hot data storage. You do not need to manually create tablespaces. This feature is supported only in clusters of 8.1.3 and later versions.

    -

    Cold storage

    You are advised to store cold data in OBS, which is billed on a pay-per-use basis.

    -

    Nodes

    Specify the number of nodes in the cluster.

    The number of nodes ranges from 3 to 256.

    3

    Total

    Displays the total capacity of a cluster.

    The storage capacity of each flavor is the actual database space used for storing data. The displayed storage capacity has deducted the disk space consumed by backups and RAIDs.

    -

  6. Click Next: Configure Network.
  7. Configure the network.

    Figure 2 Network parameters
    Table 3 Network parameters

    Parameter

    Description

    Example Value

    VPC

    Specify a virtual private network for nodes in a cluster to isolate networks of different services.

    If you create a data warehouse cluster for the first time and have not configured the VPC, click View VPC. On the VPC management console that is displayed, create a VPC that satisfies your needs.

    For details about how to create a VPC, see Creating a VPC in the Virtual Private Cloud User Guide.

    After selecting a VPC from the drop-down list, click View VPC to enter the VPC management console and view the detailed information about the VPC.

    You can click to refresh the options in the VPC drop-down list.

    vpc-dws

    Subnet

    Specify a VPC subnet.

    A subnet provides dedicated network resources that are isolated from other networks, improving network security.

    NOTE:

    After a cluster is created, the subnet cannot be modified. If you need to modify the subnet, you can restore the snapshot of the cluster to a new cluster. The data of the new cluster is the same as that of the old cluster, and the subnet can be modified when the new cluster is created.

    subnet-dws

    Security Group

    Specify a VPC security group.

    A security group restricts access rules to enhance security when GaussDB(DWS) and other services access each other.

    • Automatic creation

      If Automatic creation is selected, the system automatically creates a default security group. This option is selected by default.

      The rule of the default security group is as follows: The outbound allows all access requests, while the inbound is open only to the database port that you set to connect to the GaussDB(DWS) cluster.

      The format of the default security group name is dws-<Cluster_name>-<Cluster_database_port>, for example, dws-dws-demo-8000.

      NOTE:

      If the quotas of the security group and the security group rule are insufficient, an error message will be displayed after you submit the cluster creation application. Select an existing group and retry.

    • Manual creation

      You can also log in to the VPC management console to manually create a security group. Then, go back to the page for creating data warehouse clusters, click the button next to the Security Group drop-down list to refresh the page, and select the new security group.

      To enable the GaussDB(DWS) client to connect to the cluster, you need to add an inbound rule to the new security group to grant the access permission to the database port of the GaussDB(DWS) cluster. The following is an example of an inbound rule. For details, see Adding an Inbound Rule.

      • Protocol: TCP
      • Port: 8000. Use the database port number when you create the cluster for receiving GaussDB(DWS) client connections.
      • Source: Select IP address and use the host IP address of the client host, for example, 192.168.0.10/32.

      The security group of a cluster cannot be changed but can be modified. For details, see Modifying a Security Group.

    Automatic creation

    Public Network Access

    Specify whether users can use a client to connect to a cluster's database over the Internet. The following methods are supported:

    • Do not use: The EIP is not required. If GaussDB(DWS) is used in the production environment, bind GaussDB(DWS) to ELB first, and then bind GaussDB(DWS) to an EIP on the ELB page.
    • Buy now: Users specify the bandwidth of the EIP and the system automatically assigns an EIP that exclusively uses bandwidth to each cluster so that users can use the EIP to access the cluster over the Internet. The bandwidth name of an automatically assigned EIP starts with the cluster name.
    • Specify: A specified EIP is bound to the cluster. If no available EIPs are displayed in the drop-down list, click Create EIP to go to the Elastic IP page and create an EIP that satisfies your needs. You can set the bandwidth as needed.
    NOTE:
    • If you use the EIP binding function for the first time in each project of each region, the system prompts you to create the DWSAccessVPC agency to authorize GaussDB(DWS) to access VPC. After the authorization is successful, GaussDB(DWS) can switch to a healthy VM when the VM bound with the EIP becomes faulty.
    • By default, only Huawei Cloud accounts or users with Security Administrator permissions can query and create agencies. By default, the IAM users in those accounts cannot query or create agencies. When the users use the EIP, the system makes the binding function unavailable. Contact a user with the DWS Administrator permissions to authorize the agency on the current page.
    • Do not use indicates disabling access to the cluster over the public network. After a cluster is created, if you want to access it over the public network, bind an EIP to the cluster and create a public network domain name. For details, see Creating a Public Network Domain Name.
    • If GaussDB(DWS) is used for the production environment, the new GaussDB(DWS) cluster needs to be bound to ELB and then to EIP. Select Do not use here.

    Buy now

    ELB

    Specifies whether ELB is bound. With ELB health checks, CN requests of a cluster can be quickly forwarded to normal CNs. If a CN is faulty, the workload can be immediately shifted to a healthy node, minimizing cluster access faults. Currently, ELBs can be bound in the same VPC or across VPCs.

    • Do not use: The load balancer is not used. If GaussDB(DWS) is used in the production environment, bind GaussDB(DWS) to ELB first, and then bind GaussDB(DWS) to an EIP on the ELB page.
    • Specify: Specify an ELB to be bound to the cluster. If no available load balancers are displayed in the drop-down list, click Create ELB to go to the Elastic Load Balance page and create a load balancer as needed.

    Specify

    Bandwidth

    When EIP is set to Buy now, you need to specify the bandwidth of the EIP, which ranges from 1 Mbit/s to 100 Mbit/s.

    50Mbit/s

  8. Click Next: Configure Advanced Settings.
  9. Configure cluster parameters.

    Table 4 Cluster parameters

    Parameter

    Description

    Example Value

    Cluster Name

    Set the name of the data warehouse cluster.

    Enter 4 to 64 characters. Only case-insensitive letters, digits, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Letters are not case-sensitive.

    NOTE:

    After a cluster is created, its name cannot be changed.

    dws-demo

    Cluster Version

    Displays the version of the database instance installed in the cluster. The figure is for reference only.

    -

    Default Database

    The default database name of the cluster is gaussdb.

    NOTE:

    This name cannot be changed.

    gaussdb

    Administrator Account

    Set the database administrator name.

    The administrator username must:

    • Consist of lowercase letters, digits, or underscores.
    • Start with a lowercase letter or an underscore.
    • Contain 6 to 64 characters.
    • Cannot be a keyword of the GaussDB(DWS) database. For details about the keywords of the GaussDB(DWS) database, see Keyword in the Data Warehouse Service (DWS) Developer Guide.

    dbadmin

    Administrator Password

    Set the password of the database administrator account.

    The password complexity requirements are as follows:
    • Consists of 12 to 32 characters.
    • Cannot be the username or the username spelled backwards.
    • Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (~!`?,.:;-_'"(){}[]/<>@#%^&*+|\=)
    • Passes the weak password check.
    NOTE:

    Change the password regularly and keep it secure.

    -

    Confirm Password

    Enter the database administrator password again.

    -

    Database Port

    Specify the port used when the client or application connects to the database in the cluster.

    The port number ranges from 8000 to 30000.

    NOTE:

    The database port of a created cluster cannot be changed. You can specify the database port only when creating a cluster.

    8000

  10. Configure the enterprise project to which the cluster belongs. You can configure this parameter only when the Enterprise Project Management service is enabled. The default value is default.

    An enterprise project facilitates project-level management and grouping of cloud resources and users.

    You can select the default enterprise project (default) or other existing enterprise projects. To create an enterprise project, log in to the Enterprise Management console. For details, see the Enterprise Management User Guide.

  11. Configure advanced settings. Select Default to keep the default values of the advanced parameters. You can also select Custom to modify the values.

    Figure 3 Custom advanced parameters
    • CNs

      CNs receive access requests from the clients and return the execution results. In addition, a CN splits and distributes tasks to the DNs for parallel execution.

      The value ranges from 3 to the number of cluster nodes. The maximum value is 20 and the default value is 3. In a large-scale cluster, you are advised to deploy multiple CNs.

    • Tag

      A tag is a key-value pair used to identify a cluster. For details about the keys and values, see Table 5. By default, no tag is added to the cluster.

      For more information about tags, see Overview.

      Table 5 Tag parameters

      Parameter

      Description

      Example Value

      Key

      You can perform the following operations:

      • Select a predefined tag key or an existing resource tag key from the drop-down list of the text box.
        NOTE:

        To add a predefined tag, you need to create one on TMS and select it from the drop-down list of Tag key. You can click View predefined tags to enter the Predefined Tags page of TMS. Then, click Create Tag to create a predefined tag. For more information, see Creating Predefined Tags in the Tag Management Service User Guide

      • Enter a tag key in the text box. A tag key can contain a maximum of 36 characters. It cannot be an empty string or start or end with a space.
        The value cannot contain the following characters: =*<>\,|/
        NOTE:

        A key must be unique in a given cluster.

      key01

      Value

      You can perform the following operations:

      • Select a predefined tag value or resource tag value from the drop-down list of the text box.
      • Enter a tag value in the text box. A tag value can contain a maximum of 43 characters, which can be an empty string. It cannot start or end with a space.

        The value cannot contain the following characters: =*<>\,|/

      value01

    • Encrypt DataStore

      indicates that database encryption is disabled. This function is disabled by default.

      indicates that database encryption is enabled. After this function is enabled, Key Management Service (KMS) encrypts the cluster and the cluster's snapshot data.

      Only users with the Tenant Admin permission can view and toggle the Encrypt DataStore switch.

      When you enable database encryption for each project in each region for the first time, the system displays a Create Agency dialog box. Click Yes to create a DWSAccessKMS agency so that GaussDB(DWS) can access KMS. If you click No, the encryption function is not enabled. Select the created KMS key from the KMS Key Name drop-down list. If no key is available, you can log in to the DEW console to create one. For details, see the Data Encryption Workshop User Guide.

      By default, only Huawei Cloud accounts or users with Security Administrator permissions can query and create agencies. IAM users under an account do not have the permission to query or create agencies by default. Contact a user with that permission and complete the authorization on the current page.

      Figure 4 Encrypting DataStore
      • The database encryption function cannot be disabled once it is enabled.
      • After Encrypt DataStore is enabled, the key cannot be disabled, deleted, or frozen when being used. Otherwise, the cluster becomes abnormal and the database becomes unavailable.
      • Snapshots created after the database encryption function is enabled cannot be restored using open APIs.
    • Encryption Algorithms

      You can choose general cryptographic algorithms (incompatible with SM series cryptographic algorithms) or SM series cryptographic algorithms (compatible with general cryptographic algorithms).

  12. Select a billing mode. If you select the yearly/monthly mode, you also need to configure the service duration.

    Table 6 Duration

    Parameter

    Description

    Required Duration (Yearly/Monthly)

    Configure the required duration. You get a greater discount if you purchase a longer period. Price is displayed at the bottom of the page for your reference. You can click Pricing details to view the detailed price.

    Auto-renewal (Yearly/Monthly)

    • By default, this option is not selected.
    • Renewal rules:
      • If you select one month to nine months, your monthly package will be renewed for a month upon expiration.
      • If you select a yearly package, it will be renewed for one year upon expiration.

      Example: Customer A purchases a cluster in yearly/monthly mode and select enables auto-renewal. If the cluster is subscribed to for eight months, it will be automatically renewed each month. If the cluster is subscribed to for two years, it will be automatically renewed each year. For details about the renewal fee deduction, see Fee Deduction Rules.

  13. Click Next: Confirm.

    If the number of requested nodes, vCPU (cores), or memory (GB) exceed the user's remaining quota, a warning dialog box is displayed, indicating that the quota is insufficient and displaying the detailed remaining quota and the current quota application. You can click Increase quota in the warning dialog box to submit a service ticket and apply for higher node quota.

    For details about quotas, see What Is the User Quota?

  14. If the yearly/monthly billing mode, click Pay Now. The payment page is displayed.
  15. Click Pay Now.

    After the submission is successful, the creation starts. Click Back to Cluster List to go back to the Clusters page. The initial status of the cluster is Creating. Cluster creation takes some time. Clusters in the Available state are ready for use.

    • For load balancing and high availability purposes, and to prevent single CN failures, a cluster must be bound to ELB. For details, see Associating and Disassociating ELB.