This topic describes how to deploy a three-replica OceanBase cluster by using OceanBase Cloud Platform (OCP).
Note
This topic uses OCP V4.2.2 as an example. The GUI may vary with the OCP version.
Prerequisites
- You have deployed OCP. For more information, see Deploy OCP.
- You have added the servers where the OceanBase cluster is to be deployed to the resource pool. For more information, see Add a server.
- You have logged on to the OCP console and have the
CREATE CLUSTERprivilege. For more information, see Role overview and Default OCP roles. - You have obtained the RPM package of OceanBase Database. For more information, see Prepare installation packages.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Clusters.
In the upper-right corner of the Clusters page, click Create Cluster.
In the upper-right corner of the Create Cluster page, select Distributed Cluster, which is the default option.
On the Create Cluster page, configure the basic information of the cluster.
The following table describes parameters in the Basic Settings section.
Parameter Description Cluster Type You can select Primary Cluster or Standby Cluster. In this example, Primary Cluster is selected. Cluster Name The name of the cluster to be created. The cluster name must be 2 to 48 characters in length and can contain uppercase and lowercase letters, digits, and underscores (_). The cluster name must start with letters. root@sys Password This password can be customized or randomly generated. The password must meet the following complexity requirements:
- Be 8 to 32 characters in length.
- Contain at least two digits, two uppercase letters, two lowercase letters, and two special characters.
Supported special characters are~ ! @ # % ^ & * _ - + = ` | ( ) { } [ ] : ; ’ , . ? /.
In addition, you can click Copy Password to copy a custom or randomly generated password to the clipboard.OceanBase Database Version You can select an OceanBase Database version from the drop-down list or click Add Version at the bottom of the list to upload the RPM package of a version. Associate OBProxy Cluster This option is used to associate existing ODP clusters. In this example, this option is disabled. On the Create Cluster page, configure the deployment mode of the cluster.
By default, three zones are added.
The following table describes the settings for each zone.
Parameter Description Zone Name Generally, a default name is provided. You can set a custom name as needed. The zone name must be 2 to 48 characters in length and can contain letters, digits, and underscores (_). It must start with a letter. IDC The IDC of the zone. Hosts in a zone can be deployed in only the same IDC. Host Type (Optional) If you select a host type, the host list displays only the hosts of the specified host type. CPU Architecture Choose Automatic or Manual. Host The IP address of the host. You can select multiple IP addresses. Root Server Select an IP address as the host for the RootService. You must specify a RootService for each zone in a multi-replica OceanBase cluster. Zone Priority Rankings Choose whether to specify priorities for the zones in which the leader and follower replicas of the sys tenant in the cluster are located. This parameter is optional. If you do not specify the priorities, the first zone takes the top priority. The zone with the highest priority is taken as the primary zone. Only one primary zone is allowed.
You can enable this option to customize the priorities of zones by using the following methods:- Select one or more zones from the left-side list. The left-side list shows all zones available in the cluster.
- Click the closing angle bracket (>) in the middle. The selected zones are moved to the Priority Rankings list. The zones that are selected at the same time have the same priority.
- Repeat steps a and b to add zones of lower priority.
- To adjust the priority, drag the target zone in the Priority Rankings list, and reorder it. The priorities in the list are sorted in descending order.
(Optional) On the Create Cluster page, configure the cluster parameters.
You can use the default parameter settings, or turn on Parameter Settings to modify cluster parameters.
- You can add and configure startup parameters one by one.
- You can also click Select Parameter Template and select a parameter template. The system automatically populates the parameters in this section by using the template. If no parameter template is created for the cluster, you can click Create Cluster Parameter Template to create a parameter template for the cluster.
(Optional) On the Create Cluster page, configure the paths and ports.
You can use the default path and port settings, or turn on Custom Settings to modify parameters in the Path Settings and Port Settings sections.
Configure the paths:
- In the Path Settings section, specify the Software Installation Path, Data Disk Path, and Log Disk Path as needed.
- Click Test to check whether the paths can be used. If a path cannot be used, you can perform troubleshooting based on the test results, or use another path.
Configure the ports:
- In the Port Settings section, specify SQL Port and RPC Port as needed.
- Click Test to check whether the ports are occupied. If a port is occupied, you must use another port.
Click Submit in the lower-right corner.
What to do next
After the cluster is created, you can create user tenants based on your business needs.
For more information about how to create a tenant by using OCP, see Create a primary tenant.
For more information about how to create a tenant by using the CLI, see Create a tenant.