This topic describes how to deploy a three-replica OceanBase cluster by using OceanBase Cloud Platform (OCP).
Note
This topic uses OCP V4.2.1 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 in 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 in 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 the parameters in Basic Settings.
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 a letter. 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.
The following special characters are supported:~!@#%^&*_-+=`|(){}[]:;',.?/.
In addition, you can click Copy Password to copy the 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 required 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. Model (Optional) If you select a model, the host list is filtered based on the model. CPU Architecture Select Automatic or Manual. Host The IP address of the host. You can select multiple IP addresses. RootServer 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 systenant 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 the preceding two steps to add zones of lower priorities.
- To adjust the priority of a zone, drag and drop the zone in the Priority Rankings list. The priorities of zones in the list are 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 will automatically populate the parameters and values from the template. If no cluster parameter template is available, you can click Create Cluster Template to create one.
(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 Software Installation Path, Data Disk Path, and Log Disk Path as needed.
- Click Test to check whether the paths can be used. If the 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 user tenant by using the CLI, see Create a tenant.