This topic describes how to add a host. Adding a host means to add an on-premises device to the OCP console.
Prerequisites
You are logged in to the OCP console as a user with the ADMIN or ORG_ADMIN role.
Procedure
Log in to the OCP console.
In the left-side navigation pane, click Hosts.
On the Hosts tab, click Add Host in the upper-right corner of the page.
Specify the IP Address and SSH Port fields. Enter the IPv4 or IPv6 address of the host. You can enter multiple IP addresses separated by commas. The default SSH port number is 22.
Notice
When the host IP address is an IPv6 address, the following limitations apply:
- For OceanBase Database, OBClient, and OBProxy:
- OceanBase Database must be of the [V4.2.5 BP3 Hotfix3, V4.3.0) or [V4.3.5 BP2 Hotfix1, +∞) version.
- OBClient must be of the [V2.2.9, +∞) version.
- OBProxy must be of the [V4.3.4, +∞) version.
- Binlog service does not support IPv6 deployment.
- For OceanBase Database, OBClient, and OBProxy:
Select a host type. If no host type is available, click Create Host Specifications to create a host type in OCP.
For more information, see Manage host types.
Select an IDC. If no IDC is available, click Create IDC to create an IDC in OCP.
For more information, see Manage IDCs and Manage regions.
Select a host type, and set a host alias for the host. You can also set a connection credential for the host.
Parameter Description Host Type The type of the host. Valid values: Physical Machine and ECS. Credentials Select a credential from the password box. If no credential is available, click Add Credential to create a connection credential for the host.
- 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: Valid values: Username/Password, SSH Private Key, and Password-Free.
- User Type: the type of the user used to connect to the server. Valid values: Root User and General User.
- Root User: an SSH user with root privileges.
- General User: a regular user with root privileges. This user must be configured to execute sudo commands without a password. OCP currently supports configuring password-free execution of all commands via sudo. In other words, you can add
username ALL=(ALL) NOPASSWD:ALLto the/etc/sudoersfile.
- Username: required when the user type is General User. Enter the user used to connect to the server.
- Password: required when the authorization type is Username/Password. Enter the password used to connect to the server.
- Private Key: required when the authorization type is SSH Private Key. Enter the SSH private key for the server.
- OCP Host Private Key File Path: required when the authorization type is Password-Free. Enter the path where the host private key file is stored. The default path is
/home/admin/.ssh/id_rsa. If OCP is deployed using Docker, use the file path inside the Docker container. - Note: additional information about the credential.
Host Alias The alias of the host. This field is optional. (Optional) Enter a description for the host.
Click OK.
Note
If you want to customize the port number of the agent, contact OCP Technical Support.