This topic describes how to deploy a three-replica OceanBase cluster by using OceanBase Cloud Platform (OCP).
Note
This topic uses OCP V4.1.0 as an example. The GUI varies 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 to the resource pool.
- 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.
On the Clusters page, click Create Cluster in the upper-right corner.
On the Create Cluster page, use the default value Distributed Cluster.
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 existing OceanBase Database version from the list or click Add Version to upload the RPM package of a required OceanBase Database 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 server. 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, specify 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 will automatically populate the parameters and values in 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 path and port settings in the Custom Settings module.
You can use the default path and port settings or open the Custom Settings module and configure the path and port settings 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 user tenant in OCP, see Create a tenant.
For more information about how to create a user tenant by using the CLI, see Create a tenant.