This topic describes how to deploy OceanBase Cloud Platform (OCP) Community Edition on the GUI of OceanBase Deployer (OBD).
As an essential part of OCP, MetaDB stores metadata and monitoring data that is managed by OCP. OCP-Server manages an OceanBase cluster throughout its entire lifecycle by calling the data stored in MetaDB. You can use either of the following methods to deploy OCP:
(Recommended) Create an OceanBase cluster as the MetaDB of OCP.
Use an existing OceanBase cluster as the MetaDB of OCP.
Prerequisites
You can deploy only OCP Community Edition V4.0.3 or later.
You have installed and configured a Java environment by using JDK 1.8, and the build version is at least 161.
You have renamed or deleted the directory where the OCP software package of the earlier version is decompressed on the OCP host. This is to avoid confusion with the decompression directory of the new version.
You have obtained and uploaded the
ocp-all-in-one-4.3.5-YYYYMMDDhhmmss.el7.x86_64.tar.gzsoftware package to a directory on the OCP host, and decompressed the package by running the following command. For more information, see Prepare for the installation.tar zxf ocp-all-in-one-4.3.5-YYYYMMDDhhmmss.el7.x86_64.tar.gz
(Recommended) Create an OceanBase cluster as the MetaDB of OCP
Step 1: Start OBD
Log on to the OCP host.
Run the following command to go to the
bindirectory of the decompressed software package, and start the installer:cd ocp-all-in-one/bin && bash install.shRun the following command to make the environment variables take effect:
source ~/.oceanbase-all-in-one/bin/env.shRun the
obd web installcommand, and copy the IP address of the deployment wizard page in the response.
Step 2: Go to the OCP deployment wizard page
Open a browser, visit the IP address copied in
Step 1 , and click Try Now on the page that appears.Select OCP and click
OK .Select Create a new OceanBase database MetaDB as OCP and click
OK .
Step 3: Specify the deployment information
Specify the name of the OceanBase cluster to be managed.
The cluster name must be unique. It must start with a letter and end with a letter or digit, and must be 2 to 32 characters in length.
Select the versions of services to be deployed.
The supported version of OBProxy depends on that of OceanBase Database. For example, if you deploy OceanBase Database V4.1.0 or later, you can deploy only OBProxy V4.1.0 or later.
Step 4: Configure MetaDB
After you create a local MetaDB, OCP-Server uses it to achieve higher service reliability.
Set parameters of the deployment user.
Note
To avoid conflicts between OS users, we recommend that you create dedicated OS users for MetaDB and OCP.
Parameter Description Username The username of the OS user of the host, who has permissions to run sudo commands. The installer requires this username to automatically complete the settings. Password The password of the user. If you have enabled password-free logon for the host, skip this parameter. SSH Port The SSH port number of the host. Default value: 22. You can specify a custom port number.Use the running user If you select this parameter, you can specify a dedicated OS user for OCP. This parameter is optional. Set parameters of the OCP node.
Select the host where you want to deploy OCP. You can select multiple hosts.
Notice
The IP address of the host cannot be 127.0.0.1.
Set parameters of database nodes.
Parameter Description Zone Name You can retain the default name or define a custom name. The zone name must start with a letter and end with a letter or digit, and must be 2 to 32 characters in length. In an OceanBase cluster that consists of multiple zones, the cluster must have a zone that shares the same region as that of the primary zone. OBServer Node Select the OBServer node where you want to deploy MetaDB. You can select multiple OBServer nodes. RootServer Node You can select an IP address as the host for RootService. In an OceanBase cluster that has multiple replicas, you must specify a RootServer node for each zone. By default, only one zone is added. You can click
Add to add more zones. To delete a zone, click theDelete icon after the zone to be deleted.Set cluster parameters.
Parameter Description root@sys Password This password can be customized or randomly generated. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? /. Software Path The installation path of MetaDB. Default value: /deployment user/oceanbase. You can change the value. You must have the read and write permissions on the specified directory.Data Path The data storage path of MetaDB. Default value: /data/1. You can change the value. You must have the read and write permissions on the specified directory and make sure that the directory is empty.Log Path The log storage path of MetaDB. Default value: /data/log1. You can change the value. You must have the read and write permissions on the specified directory and make sure that the directory is empty.SQL Port The SQL port number of MetaDB. Default value: 2881. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.RPC Port The RPC port number of MetaDB. Default value: 2882. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.More Configurations Optional. You can click this button to view and set parameters of the OceanBase cluster. You can use the automatically assigned values or specify custom parameter values. For more information about the parameters of an OceanBase cluster, see View parameters. Notice
Make sure that the disk space is sufficient for the specified software path, data path, and log path. Otherwise, the deployment fails.
Set OBProxy parameters.
Parameter Description OBProxy Node The IP address of the server where you want to deploy OBProxy. You can specify only one IP address. In other words, you can deploy only one OBProxy node. SQL Port The SQL port number of OBProxy. Default value: 2883. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.Exporter Port Number The Prometheus listening port of OBProxy. Default value: 2884. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.Software Path The installation path of OBProxy. Default value: /deployment user/obproxy. You can change the value. You must have the read and write permissions on the specified directory.More Configurations Optional. You can click this button to set more OBProxy parameters. For more information, see OBProxy parameters description.
Step 5: Configure OCP
You specify the OCP and tenant information in this step.
Set parameters of the OCP service.
Parameter Description Admin Password The password for the administrator account of OCP. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ^ * { } [ ] _ - +.
Software Path The installation path of OCP. Default value: /deployment user/ocp. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.Log Path The log storage path of OCP. Default value: /home/deployment user/logs. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.Package Path The installation path of OCP Agent. Default value: /home/deployment user/software. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.ocp.site.url The URL for accessing the OCP console. The URL must start with HTTPorHTTPS, contain the virtual IP (VIP) address, domain name, and port number, and not end with a forward slash (/). Example value:http://localhost:8080.
After you enter the URL, clickVerify to test the connectivity. If the verification fails, modify the URL as prompted.Service Port The listening port of OCP. Default value: 8080. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.Allocate resources.
OCP consumes large amounts of computing and storage resources to provide services. You can allocate resources based on the number of hosts to be managed. In addition, you must set parameters in the MetaDB Tenant and MonitorDB Tenant sections. This way, the system automatically creates a MetaDB tenant and a MonitorDB tenant to manage the OceanBase cluster throughout its entire lifecycle.
Specify the number of hosts to be managed.
The default value is 10. You can change the value as needed.
Specify the memory size.
By default, 16 GiB of memory is allocated. You must allocate memory resources based on the number of hosts managed by OCP. For more information, see Host planning.
Set parameters of the MetaDB tenant.
Parameter Description Tenant Name The name of the MetaDB tenant. Default value: ocp_ meta. You can specify a custom tenant name.Password The password of the MetaDB tenant. You can enter a custom password or generate a random password. The custom password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? /. CPU The number of CPU cores allocated to the MetaDB tenant. Default value: 1 vCPU. You can adjust the value as needed.Memory The size of memory allocated to the MetaDB tenant. Default value: 2 GiB. You can adjust the value as needed.Set parameters of the MonitorDB tenant.
Parameter Description Tenant Name The name of the MonitorDB tenant. Default value: ocp_monitor. You can specify a custom tenant name.Password The password of the MonitorDB tenant. You can enter a custom password or generate a random password. The custom password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? /. CPU The number of CPU cores allocated to the MonitorDB tenant. Default value: 2 vCPUs. You can adjust the value as needed.Memory The size of memory allocated to the MonitorDB tenant. Default value: 4 GiB. You can adjust the value as needed.
Step 6: Run an environment precheck
Before you start the precheck, you must verify the configuration information.
If you find an error, click
Previous to fix it.After you verify the information, click Pre-check. Then, the system checks whether your environment meets all the requirements for MetaDB and OCP installation and configuration.
If the precheck reports an error, you can fix the error based on the solution provided by OCP. If the error can be automatically fixed, you can click Auto repair to fix it.
After all errors are fixed, click
Re-check to perform a precheck again.If the precheck is passed, click
Next .
Step 7: Deploy OCP
You can view detailed installation logs in the Deployment Logs section during the OCP deployment process.
If the deployment fails, check the logs to identify the causes, and contact OceanBase Technical Support. After you identify the causes and fix the issue, click Redeploy. Then, the system clears the failed OCP installation environment and re-executes the installer.
If the deployment succeeds, click
Complete to exit. Before you exit the installer, you can copy the URL, account username, and account password for logging on to the OCP console.
Use an existing OceanBase cluster as the MetaDB of OCP
If you have deployed an OceanBase cluster, you can perform the following steps to use it as MetaDB of OCP.
Step 1: Start OBD
Log on to the OCP host.
Run the following command to go to the
bindirectory of the decompressed software package, and start the installer:cd ocp-all-in-one/bin && sh install.shRun the following command to make the environment variables take effect:
source ~/.oceanbase-all-in-one/bin/env.shRun the
obd web installcommand, and copy the IP address of the deployment wizard page in the response.
Step 2: Go to the OCP deployment wizard page
Open a browser, visit the IP address copied in
Step 1 , and click Try Now on the page that appears.Select OCP and click
OK .Select Use an existing OceanBase database MetaDB as OCP and click
OK .
Step 3: Specify the deployment information
Enter a name for the MetaDB cluster to be managed.
The cluster name must be unique. It must be 2 to 48 characters in length and can contain uppercase and lowercase letters, digits, and underscores (_). It must start with a letter.
Select the OCP version that you want to deploy.
Step 4: Connect to the OceanBase cluster
OCP executes the installer based on the specified information of MetaDB.
Specify the connection information of the OceanBase cluster.
OCP uses the OceanBase cluster with the specified connection information as MetaDB to store metadata and monitoring data.
Parameter Description Host IP Address The IP address of the host where the OceanBase cluster is deployed. OCP uses the IP address to connect to the OceanBase cluster that works as MetaDB. You can specify only one host IP address. Access Port Number The port number used to access the OceanBase cluster. Access Account The account username used to access the OceanBase cluster. You can use only an account of the sys tenant. Default value: root@sys. You can specify a custom account.Access Password The password of the specified account. Make sure that the information is correct and click
Next to check whether MetaDB can be connected.
Step 5: Configure OCP
Set parameters of the deployment user.
Note
To avoid conflicts between OS users, we recommend that you create dedicated OS users for MetaDB and OCP.
Parameter Description Username The username of the OS user of the host, who has permissions to run sudo commands. The installer requires this username to automatically complete the settings. Password The password of the user. If you have enabled password-free logon for the host, skip this parameter. SSH Port The SSH port number of the host. Default value: 22.Use the running user If you select this parameter, you can specify a dedicated OS user for OCP. This parameter is optional. Set parameters of the OCP node.
Select the host where you want to deploy OCP. You can select multiple hosts.
Notice
The IP address of the host cannot be 127.0.0.1.
Set parameters of the OCP service.
Parameter Description Admin Password The password for the administrator account of OCP. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? / $ ` ' " < > </code>. Software Path The installation path of OCP. Default value: /home/deployment user/ocp. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.Log Path The log storage path of OCP. Default value: /home/deployment user/logs. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.Package Path The installation path of OCP Agent. Default value: /home/deployment user/software. You can change the value. You must have the read and write permissions on the specified directory, and make sure that the disk space is sufficient for the specified directory.ocp.site.url The URL for accessing the OCP console. The URL must start with HTTPorHTTPS, contain the virtual IP (VIP) address, domain name, and port number, and not end with a forward slash (/). Example value:http://localhost:8080.
After you enter the URL, clickVerify to test the connectivity. If the verification fails, modify the URL as prompted.Service Port The service port of OCP. Default value: 8080. You can specify a custom port number ranging from 1024 to 65535. Make sure that the specified port is not occupied.Allocate resources.
OCP consumes large amounts of computing and storage resources to provide services. You can allocate resources based on the number of hosts to be managed. In addition, you must set parameters in the MetaDB Tenant and MonitorDB Tenant sections. This way, the system automatically creates a MetaDB tenant and a MonitorDB tenant to manage the OceanBase cluster throughout its entire lifecycle.
Specify the number of hosts to be managed.
The default value is 10. You can change the value as needed.
Specify the memory size.
By default, 16 GiB of memory is allocated. You must allocate memory resources based on the number of hosts managed by OCP. For more information, see Host planning.
Set parameters of the MetaDB tenant.
Parameter Description Tenant Name The name of the MetaDB tenant. Default value: ocp_ meta. You can specify a custom tenant name.Password The password of the MetaDB tenant. You can enter a custom password or generate a random password. The custom password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? /. CPU The number of CPU cores allocated to the MetaDB tenant. Default value: 1 vCPU. You can adjust the value as needed.Memory The size of memory allocated to the MetaDB tenant. Default value: 2 GiB. You can adjust the value as needed.Set parameters of the MonitorDB tenant.
Parameter Description Tenant Name The name of the MonitorDB tenant. Default value: ocp_monitor. You can specify a custom tenant name.Password The password of the MonitorDB tenant. You can enter a custom password or generate a random password. The custom password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are
~ ! @ # % ^ & * _ - + =
( ) { } [ ] : ; , . ? /. CPU The number of CPU cores allocated to the MonitorDB tenant. Default value: 2 vCPUs. You can adjust the value as needed.Memory The size of memory allocated to the MonitorDB tenant. Default value: 4 GiB. You can adjust the value as needed.
Step 6: Run an environment precheck
Before you start the precheck, you must verify the configuration information.
If you find an error, click
Previous to fix it.After you verify the information, click Pre-check. Then, the system checks whether your environment meets all the requirements for MetaDB and OCP installation and configuration.
If the precheck reports an error, you can fix the error based on the solution provided by OCP. If the error can be automatically fixed, you can click Auto repair to fix it.
After all errors are fixed, click
Re-check to perform a precheck again.If the precheck is passed, click
Next .
Step 7: Deploy OCP
You can view detailed logs in the Deployment Logs section during the OCP deployment process.
If the deployment fails, check the logs to identify the causes, and contact OceanBase Technical Support. After you identify the causes and fix the issue, click Redeploy. Then, the system clears the failed OCP installation environment and re-executes the installer.
If the deployment succeeds, click
Complete to exit. Before you exit the installer, you can copy the URL, account username, and account password for logging on to the OCP console.