User Guide GaussDB(for openGauss) - HUAWEI TECHNOLOGIES CO., LTD - Issue Date - Huawei Cloud

Page created by Ross Ford
 
CONTINUE READING
GaussDB(for openGauss)

User Guide

Issue           01
Date            2021-07-30

HUAWEI TECHNOLOGIES CO., LTD.
Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior
written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

      and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.

Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.

Issue 01 (2021-07-30)          Copyright © Huawei Technologies Co., Ltd.                                  i
GaussDB(for openGauss)
User Guide                                                                                                                                                              Contents

                                                                                                                                                   Contents

1 What Is GaussDB(for openGauss)?..................................................................................... 1
2 Basic Concepts.......................................................................................................................... 2
3 Advantages............................................................................................................................... 4
4 DB Instance Description......................................................................................................... 5
4.1 DB Instance Statuses.............................................................................................................................................................. 5
4.2 DB Instance Specifications................................................................................................................................................... 7
4.3 DB Instance Storage Types................................................................................................................................................... 8
4.4 DB Instance Versions.............................................................................................................................................................. 8

5 Permissions Management..................................................................................................... 9
6 Constraints.............................................................................................................................. 14
7 Billing....................................................................................................................................... 16
8 Related Services.....................................................................................................................18

Issue 01 (2021-07-30)                                  Copyright © Huawei Technologies Co., Ltd.                                                                                      ii
GaussDB(for openGauss)
User Guide                                                         1 What Is GaussDB(for openGauss)?

              1          What Is GaussDB(for openGauss)?

                 GaussDB(for openGauss) is an enterprise-grade distributed relational database
                 from Huawei. GaussDB(for openGauss) features Hybrid Transactional/Analytical
                 Processing (HTAP) workloads and intra-city across-AZ deployment with zero data
                 loss. With a distributed architecture, GaussDB(for openGauss) supports petabytes
                 of storage and contains more than 1,000 nodes per DB instance. It is highly
                 available, secure, and scalable and provides service capabilities including quick
                 deployment, backup, restoration, monitoring, and alarm reporting for enterprises.
                 openGauss community provides open-source standalone and primary/standby
                 instances for partners and developers to build an open and prosperous database
                 ecosystem.
                 The overall architecture of a distributed DB instance is as follows:

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                               1
GaussDB(for openGauss)
User Guide                                                                          2 Basic Concepts

                                                         2         Basic Concepts

DB Instances
                 The smallest management unit of GaussDB(for openGauss) is the DB instance. A
                 DB instance is an isolated database environment on the cloud. You can create and
                 manage DB instances on the management console. For details about DB instance
                 statuses, DB instance specifications, storage types, and versions, see DB Instance
                 Description.

Instance Versions
                 Currently, only GaussDB(for openGauss) 1.4 is supported.

DB Instance Types
                 GaussDB(for openGauss) supports distributed and primary/standby DB instances.
                 You can add nodes for distributed DB instances as needed to handle large volumes
                 of concurrent requests. The primary/standby DB instances are suitable for
                 scenarios with small and stable volumes of data, where data reliability and service
                 availability are extremely important.

Instance Specifications
                 The instance specifications determine the computation (vCPUs) and memory
                 capacity of a DB instance. For details, see DB Instance Specifications.

Coordinator Node
                 Coordinator nodes (CNs) store database metadata, distribute and execute query
                 tasks, and then return the query results from DNs to applications.

Data Nodes
                 Data nodes (DNs) store and query table data.

Automated Backups
                 When you create a DB instance, automated backup is enabled by default. After
                 the DB instance is created, you can modify the backup policy. GaussDB(for

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                            2
GaussDB(for openGauss)
User Guide                                                                                2 Basic Concepts

                 openGauss) will automatically create backups for DB instances based on your
                 settings.

Manual Backups
                 Manual backups are user-initiated full backups of DB instances. They are retained
                 until you delete them manually.

Regions and AZs
                 A region and availability zone (AZ) identify the location of a data center. You can
                 create resources in a specific region and AZ.

                 ●      Regions are defined by a combination of geographical location and network
                        latency. Public services, such as Elastic Cloud Server (ECS), Elastic Volume
                        Service (EVS), Object Storage Service (OBS), Virtual Private Cloud (VPC),
                        Elastic IP, and Image Management Service (IMS), are shared within the same
                        region. Regions can be universal or dedicated. A universal region provides all
                        sorts of cloud services for all users. A dedicated region provides only services
                        of a given type or only for specific users
                 ●      An AZ contains one or more physical data centers. Each AZ has independent
                        cooling, fire extinguishing, moisture-proofing, and electricity facilities. Within
                        an AZ, compute, network, storage, and other resources are logically divided
                        into multiple clusters. AZs within a region are interconnected using high-
                        speed optical fibers to allow you to build highly available systems across AZs.

                 Figure 2-1 shows the relationship between regions and AZs.

                 Figure 2-1 Regions and AZs

                 HUAWEI CLOUD provides services in many regions around the world. You can
                 select a region and AZ as needed. For more information, see Global Products and
                 Services.

Projects
                 Projects are used to group and isolate OpenStack resources (compute, storage,
                 and network resources). A project can be a department or a project team. Multiple
                 projects can be created for one account.

Issue 01 (2021-07-30)           Copyright © Huawei Technologies Co., Ltd.                                    3
GaussDB(for openGauss)
User Guide                                                                              3 Advantages

                                                                  3        Advantages

                 ●      High Security
                        GaussDB(for openGauss) provides a wide range of features to let you enjoy
                        the security of top-level commercial databases at a low cost: dynamic data
                        masking, transparent data encryption (TDE), row-level access control, and
                        always encrypted.
                 ●      Comprehensive Tools and Service-oriented Capabilities
                        GaussDB(for openGauss) can be deployed in the HUAWEI CLOUD and
                        HUAWEI CLOUD stack for commercial use and can work with ecosystem tools
                        such as Data Admin Service (DAS), and Data Replication Service (DRS) to
                        make development, O&M, tuning, monitoring, and migration easy.
                 ●      In-House, Full-Stack Development
                        Based on the Kunpeng ecosystem, GaussDB(for openGauss) performance is
                        always improved to meet ever-increasing demands in different scenarios.
                 ●      Open-Source Ecosystem
                        GaussDB(for openGauss) is an open-source database and the primary/standby
                        version is available for you to download from the openGauss community.

Issue 01 (2021-07-30)          Copyright © Huawei Technologies Co., Ltd.                             4
GaussDB(for openGauss)
User Guide                                                                   4 DB Instance Description

                                     4          DB Instance Description

                 DB Instance Statuses
                 DB Instance Specifications
                 DB Instance Storage Types
                 DB Instance Versions

4.1 DB Instance Statuses
DB Instance Statuses
                 The status of a DB instance reflects the health of the instance. You can use the
                 management console to view the status of a DB instance.

                 Table 4-1 DB instance statuses

                  Status     Description

                  Normal     The DB instance is available.

                  Abnorm     The DB instance is unavailable.
                  al

                  Creatin    The DB instance is being created.
                  g

                  Creatio    The DB instance failed to be created.
                  n failed

                  Rebooti    The DB instance is being rebooted because of a user request or a
                  ng         modification that requires a reboot for the modification to take effect.

                  Scaling    The storage space of the DB instance is being scaled up.
                  up

                  Adding     The nodes are being added to the DB instance.
                  nodes

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                                  5
GaussDB(for openGauss)
User Guide                                                                  4 DB Instance Description

                  Status     Description

                  Backing    The backup is being created.
                  up

                  Restorin   The DB instance is being restored from a backup.
                  g

                  Restore    The DB instance failed to be restored.
                  failed

                  Frozen     The DB instance is frozen because of an unpaid account balance.
                             Frozen DB instances are unfrozen only after your account is recharged
                             and the overdue payments are cleared.

                  Storage    The storage space of the DB instance is full. No more data cannot be
                  full       written to the databases on this instance. You need to scale up the
                             storage space to restore the DB instance to be available.

                  Deleted    The DB instance has been deleted. Deleted DB instances will not be
                             displayed in the instance list.

                  Upgradi    The DB engine version is being upgraded.
                  ng

                  Parame     A modification to a database parameter is waiting for a DB instance
                  ters       reboot before it can take effect.
                  change.
                  Pending
                  reboot

Backup Statuses

                 Table 4-2 Backup statuses
                  Status             Description

                  Completed          The backup was successfully created.

                  Failed             The backup failed to be created.

                  Creating           The backup is being created.

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                              6
GaussDB(for openGauss)
User Guide                                                                    4 DB Instance Description

4.2 DB Instance Specifications
                 Table 4-3 Instance specifications
                  Specification Type              vCPUs      Memory (GB)           Maximum
                                                                                   Connections
                                                                                   (Single CN)

                  General-enhanced II             4          32                    100
                  NOTE                                       NOTE
                   General-enhanced II is based               This specification
                   on the x86 architecture.                   is not available
                                                              for production
                                                              environments,
                                                              but you can
                                                              submit a service
                                                              ticket to request
                                                              it at Service
                                                              Tickets > Create
                                                              Service Ticket in
                                                              the upper right
                                                              corner of the
                                                              management
                                                              console.

                                                  8          64                    2,000
                                                             NOTE
                                                              This specification
                                                              is not available
                                                              for production
                                                              environments.

                                                  16         128                   4,000

                                                  32         256                   9,000

                                                  64         512                   18,000

                  Kunpeng general-                4          32                    100
                  enhanced                                   NOTE
                  NOTE                                        This specification
                   Kunpeng general-enhanced                   is not available
                   is based on the Arm                        for production
                   architecture.                              environments,
                                                              but you can
                                                              submit a service
                                                              ticket to request
                                                              it at Service
                                                              Tickets > Create
                                                              Service Ticket in
                                                              the upper right
                                                              corner of the
                                                              management
                                                              console.

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                              7
GaussDB(for openGauss)
User Guide                                                                   4 DB Instance Description

                  Specification Type          vCPUs         Memory (GB)           Maximum
                                                                                  Connections
                                                                                  (Single CN)

                                              8             64                    2,000
                                                            NOTE
                                                             This specification
                                                             is not available
                                                             for production
                                                             environments.

                                              16            128                   4,000

                                              32            256                   9,000

                                              60            480                   18,000

4.3 DB Instance Storage Types
                 GaussDB(for openGauss) provides ultra-high I/O storage with up to 350 MB/s of
                 throughput.

4.4 DB Instance Versions
                 Currently, only GaussDB(for openGauss) 1.4 is supported.

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                              8
GaussDB(for openGauss)
User Guide                                                                    5 Permissions Management

                                   5          Permissions Management

                 If you need to assign different permissions to employees in your enterprise to
                 access your GaussDB(for openGauss) resources, IAM is a good choice for fine-
                 grained permissions management. IAM provides identity authentication,
                 permissions management, and access control, helping you securely manage access
                 to your resources.
                 With IAM, you can use your account to create IAM users for your employees, and
                 assign specific permissions to different users to control their access to specific
                 resource types. For example, you can grant software developers in your enterprise
                 permissions to use GaussDB(for openGauss) resources but not the permissions
                 needed to delete them or perform any high-risk operations.
                 If your account does not need individual IAM users for permissions management,
                 you can skip this section.
                 IAM can be used for free. You pay only for the resources in your account. For more
                 information about IAM, see IAM Service Overview.

GaussDB(for openGauss) Permissions
                 By default, new IAM users do not have any permissions assigned. You need to add
                 a user to one or more groups, and attach permission policies or roles to these
                 groups. Users inherit permissions from the groups to which they are added and
                 can perform specified operations on cloud services.
                 GaussDB(for openGauss) is a project-level service deployed in specific physical
                 regions. To assign GaussDB(for openGauss) permissions to a user group, specify
                 the scope as region-specific projects and select projects for the permissions to take
                 effect. If All projects is selected, the permissions will be granted to the user group
                 in all region-specific projects. When accessing GaussDB(for openGauss), the users
                 need to switch to a region where they have been authorized to use this service.
                 You can use roles and policies to manage user permissions.
                 ●      Roles: A coarse-grained way of granting permissions related to users
                        responsibilities. Only a limited number of service-level roles for authorization
                        are available. When using roles to grant permissions, you may need to assign
                        additional roles because of the different dependencies involved with role-
                        based permissions. Roles are not ideal for fine-grained authorization and
                        secure access control.

Issue 01 (2021-07-30)           Copyright © Huawei Technologies Co., Ltd.                                  9
GaussDB(for openGauss)
User Guide                                                                    5 Permissions Management

                 ●      Policies: A more fine-grained system. Policies let you define permissions
                        required to perform operations on specific cloud resources under certain
                        conditions. They allow for more flexible permissions management and meet
                        secure access control requirements. For example, you can grant IAM users
                        only the permissions needed to manage a certain type of GaussDB(for
                        openGauss) resource. Most policies define permissions based on APIs.
                 Table 5-1 lists all the system-defined policies supported by GaussDB(for
                 openGauss).

                 Table 5-1 System policy summary
                  Policy Name                Description                   Category

                  GaussDB FullAccess         Full permissions for          System-defined policy
                                             GaussDB

                  GaussDB                    Read-only permissions         System-defined policy
                  ReadOnlyAccess             for GaussDB

                 Table 5-2 lists the common operations supported by each system policy of
                 GaussDB(for openGauss). Choose appropriate system policies based on this table.

                 Table 5-2 Common operations supported by the GaussDB(for openGauss) system
                 policies
                  Operation              GaussDB FullAccess           GaussDB ReadOnlyAccess

                  Creating a             √                            x
                  GaussDB(for
                  openGauss) DB
                  instance

                  Deleting a             √                            x
                  GaussDB(for
                  openGauss) DB
                  instance

                  Querying a             √                            √
                  GaussDB(for
                  openGauss)
                  instance list

Issue 01 (2021-07-30)          Copyright © Huawei Technologies Co., Ltd.                            10
GaussDB(for openGauss)
User Guide                                                                5 Permissions Management

                 Table 5-3 Common operations and supported actions
                  Operation               Action                           Remarks

                  Creating a DB           gaussdb:instance:create          To select a VPC,
                  instance                gaussdb:param:list               subnet, and security
                                                                           group, you need to
                                                                           configure the following
                                                                           actions:
                                                                           vpc:vpcs:list
                                                                           vpc:vpcs:get
                                                                           vpc:subnets:get
                                                                           vpc:securityGroups:get
                                                                           To create a yearly/
                                                                           monthly DB instance,
                                                                           you need to configure
                                                                           the following actions:
                                                                           bss:order:update
                                                                           bss:order:view
                                                                           bss:balance:view
                                                                           To create an encrypted
                                                                           DB instance, you need
                                                                           to configure the
                                                                           following actions for
                                                                           the project:
                                                                           kms:cmk:get
                                                                           kms:cmk:list

                  Changing DB             gaussdb:instance:modifySpec      N/A
                  instance
                  specifications

                  Reboot a DB             gaussdb:instance:restart         N/A
                  instance

                  Delete a DB instance    gaussdb:instance:delete          N/A

                  Querying a DB           gaussdb:instance:list            N/A
                  instance list

                  Querying DB             gaussdb:instance:list            If the VPC, subnet, and
                  instance details                                         security group are
                                                                           displayed in the DB
                                                                           instance list, you need
                                                                           to configure vpc:*:get
                                                                           and vpc:*:list.

                  Changing a DB           gaussdb:instance:modify          N/A
                  instance password

                  Changing a database     gaussdb:instance:modify          N/A
                  port

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                             11
GaussDB(for openGauss)
User Guide                                                                5 Permissions Management

                  Operation               Action                           Remarks

                  Changing a DB           gaussdb:instance:modify          N/A
                  instance name

                  Binding or unbinding    gaussdb:instance:modify          To display EIP
                  an EIP                                                   addresses on the
                                                                           console, configure the
                                                                           following actions:
                                                                           vpc:publicIps:get
                                                                           vpc:publicIps:list

                  Creating a parameter    gaussdb:param:create             N/A
                  template

                  Modifying a             gaussdb:param:modify             N/A
                  parameter template

                  Obtaining a             gaussdb:param:list               N/A
                  parameter template
                  list

                  Applying a              gaussdb:param:apply              N/A
                  parameter template

                  Deleting a parameter    gaussdb:param:delete             N/A
                  template

                  Creating a manual       gaussdb:backup:create            N/A
                  backup

                  Deleting a manual       gaussdb:backup:delete            N/A
                  backup

                  Obtaining a backup      gaussdb:backup:list              N/A
                  list

                  Modifying a backup      gaussdb:instance:modifyBacku     N/A
                  policy                  pPolicy

                  Deleting a manual       gaussdb:backup:delete            N/A
                  backup

                  Restoring data to a     gaussdb:instance:create          To select a VPC,
                  new DB instance                                          subnet, and security
                                                                           group, configure the
                                                                           following actions:
                                                                           vpc:vpcs:list
                                                                           vpc:vpcs:get
                                                                           vpc:subnets:get
                                                                           vpc:securityGroups:get

                  Querying project        gaussdb:tag:list                 N/A
                  tags

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                             12
GaussDB(for openGauss)
User Guide                                                                5 Permissions Management

                  Operation               Action                           Remarks

                  Adding or deleting      gaussdb:instance:dealTag         N/A
                  project tags in
                  batches

                  Modifying quotas        gaussdb:quota:modify             N/A

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                        13
GaussDB(for openGauss)
User Guide                                                                                     6 Constraints

                                                                    6           Constraints

                 To ensure the stability and security of GaussDB(for openGauss), certain constraints
                 are put in place for access or permissions control. Table 6-1 describes such
                 constraints.

                 Table 6-1 Function constraints
                  Function Item           Constraints

                  Database access         ● If remote access is not enabled, GaussDB(for
                                            openGauss) DB instances must be in the same VPC
                                            subnet as the ECSs associated with these instances.
                                          ● Security group rules must be added to allow the ECSs
                                            to access GaussDB(for openGauss) DB instances.
                                            By default, a GaussDB(for openGauss) DB instance
                                            cannot be accessed by an ECS in a different security
                                            group. To allow it, you must add an inbound rule to
                                            the GaussDB(for openGauss) security group.
                                          ● The default port is 8000. You can only change it
                                            when creating a DB instance.

                  Deployment              ECSs where DB instances are deployed are not directly
                                          visible to users. You can only access the DB instances
                                          through an IP address and a port.

                  Database root           The instance creation page provides only the root user
                  permissions             permissions.
                                          NOTE
                                           The root user has the following permissions: createrole,
                                           createdb and monadmin.
                                            The root user has fewer permissions than the administrator.
                                            When some SQL syntax or functions, such as create tablespace,
                                            are executed, an error message is displayed, indicating that the
                                            permissions are insufficient.

                  DB instance reboot      GaussDB(for openGauss) DB instances cannot be
                                          rebooted through commands. They must be rebooted
                                          on the management console.

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                                     14
GaussDB(for openGauss)
User Guide                                                                           6 Constraints

                  Function Item           Constraints

                  Backup files            GaussDB(for openGauss) backup files are stored in OBS
                                          buckets and are not visible to users.

Issue 01 (2021-07-30)        Copyright © Huawei Technologies Co., Ltd.                         15
GaussDB(for openGauss)
User Guide                                                                                     7 Billing

                                                                              7          Billing

                 Currently, GaussDB(for openGauss) supports pay-per-use and yearly/monthly
                 billing.

Billing Items
                 You are billed for GaussDB(for openGauss) DB instances, database storage, and
                 backup storage (optional).

                 Table 7-1 Billing items
                  Item                  Billing Method

                  DB instance           Pay-per-use

                  Database              Pay-per-use
                  storage

                  Backup storage        GaussDB(for openGauss) provides backup storage up to
                  (optional)            100% of your provisioned database storage at no additional
                                        charge. If more backup storage is required, tiered pricing
                                        starts.

                  Public network        GaussDB(for openGauss) DB instances are accessible from
                  traffic               both private and public networks. Only the traffic from
                                        public networks is billed.

                 For pricing details, see Product Pricing Details. You can use the price calculator to
                 estimate the cost for your GaussDB(for openGauss) usage.

Billing Modes
                 GaussDB(for openGauss) provides the following two billing modes:
                 ●      Yearly/Monthly: Provides a larger discount than pay-per-use billing and is
                        recommended for long-term use.
                 ●      Pay-per-use (hourly): Allows you to pay for only the resources you have used.
                        Less than one hour will be calculated as one hour.

Issue 01 (2021-07-30)          Copyright © Huawei Technologies Co., Ltd.                             16
GaussDB(for openGauss)
User Guide                                                                                     7 Billing

Specification Changes
                 Scaling up storage space: You can change the storage space as required. After
                 scaling the storage space, you are charged based on the new storage space.
                 Storage space can only be scaled up. The storage space must be a multiple of
                 (Number of shards x 40 GB).

Renewing a DB Instance
                 Currently, GaussDB(for openGauss) supports pay-per-use and yearly/monthly
                 billing. The DB instance specifications depend on your processing power and
                 memory requirements.
                 ●      Pay-per-use: You are charged based on the actual usage, by the hour. Less
                        than one hour will be counted as a full hour. If your account balance is not
                        paid in a timely manner, your account will be in arrears.
                 ●      Yearly/monthly: An upfront payment is required when you purchase the
                        service. No additional fees are incurred as you use the service.

Issue 01 (2021-07-30)           Copyright © Huawei Technologies Co., Ltd.                              17
GaussDB(for openGauss)
User Guide                                                                          8 Related Services

                                                      8          Related Services

                 Table 8-1 shows the relationship between GaussDB(for openGauss) and other
                 services.

                 Table 8-1 Related services
                  Service Name         Description

                  Elastic Cloud        Enables you to access DB instances through an ECS to
                  Service (ECS)        reduce application response time.

                  Virtual Private      Isolates your network and controls access to your DB
                  Cloud (VPC)          instances.

                  Object Storage       Stores automated and manual backups of your DB
                  Service (OBS)        instances.

                  Cloud Eye            Acts as an open monitoring platform that monitors
                                       resources in real time. It reports alarms and issues warnings
                                       promptly to ensure you are notified immediately if your
                                       services are not running properly.

                  Cloud Trace          Provides records of operations on cloud service resources,
                  Service (CTS)        enabling you to query, audit, and backtrack operations.

                  Data Admin           Provides a visualized GUI interface for you to connect and
                  Service (DAS)        manage cloud databases.

Issue 01 (2021-07-30)         Copyright © Huawei Technologies Co., Ltd.                             18
You can also read