This topic describes how to add a host to OceanBase Cloud Platform (OCP) to add your offline resources to the OCP console.
Prerequisites
You have logged on with an account that has host management permissions.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Hosts.
In the upper-right corner of the page, click Add Host.

Enter the IP address and SSH port number. You can enter one or more IPv4 addresses separated with commas (,). By default, the SSH port number is 22.
Select the host type. If the list does not include the corresponding host type, click Create Host Type to create one on OCP.
A host type is a label assigned by the user for hosts of the same configurations. We recommend that you use a meaningful name for easier management of your hosts.

Select the IDC. If the list does not include the corresponding IDC, you can click Create IDC to create one on OCP.
The region means the geographical region where the host is located. One physical region can have one or more physical IDCs.
The region and IDC are referenced in OceanBase load balancing and SQL statement routing strategies. Specify the actual region and IDC.
Note
OCP supports the multi-zone mode since V3.1.1. When you add an IDC, the IDC is created in the zone where the current OCP is deployed.

Select the host category, and set the connection credentials and alias for the host.
Parameter Description Host Category The type of the host to be added. Valid values: Physical Machine, Container, and ECS. Port Mapping Indicates the mapping relationship between OCP-Agent and the host and between OCP-Exporter and the host in the following format: <host port>:<OCP-Agent port in docker>, and <host port>:<OCP-Exporter port 1 in docker>. This parameter is required when the host type is set to Container.Credentials Select the credential in the password box. If no credential is available, click Add Credential in the drop-down list to create a connection credential for the host.
- Credential Name: The credential name must start with a letter and end with a letter or a digit. It can contain letters, digits, and underscores (_). It must be 2 to 32 characters in length.
- Authorization Type: The authorization type of the credential. Valid values: Username/Password and SSH Private Key.
- User Type: The user type of the credential. SSH users with root permissions are supported. A regular user with root permissions must first be granted the permission to run sudo commands without a password. OCP allows you to grant the permission to run all sudo commands without a password by adding
username ALL=(ALL) NOPASSWD:ALLto thesudoersfile in the/etc/directory.
Host Alias The alias of the host. This parameter is optional. 
(Optional) Enter the description of the host.
Click OK.
Note
If you want to use a custom port number for OCP Agent, contact OCP Technical Support for assistance.