This topic describes how to deploy OceanBase Cloud Platform (OCP) by using the obd graphical interface. It uses the creation of a new OceanBase Database as the MetaDB for OCP as an example.
Note
Currently, obd supports only OCP Community Edition V4.2.1 and later and OCP Enterprise Edition V4.3.5 and later.
Terms
OceanBase Database
A fully self-developed, enterprise-level native distributed database.
obd
OceanBase Deployer, an installation and deployment tool for OceanBase Database. For more information, see OceanBase Deployer documentation.
OBProxy
OceanBase Database Proxy, a dedicated proxy server for OceanBase Database. It is also known as ODP.
OCP
OceanBase Cloud Platform, a cloud platform for OceanBase Database.
MetaDB
A key component of OCP that provides underlying storage capabilities for managing metadata and monitoring data. OCP-Server calls MetaDB data to provide full lifecycle management services for OceanBase Database.
Load balancing management
Used for user access to OCP/OceanBase clusters. It is recommended to deploy multiple OCP/OBProxy nodes with VIP/DNS addresses. If not configured, the system will default to the first IP address for the connection string.
Prerequisites
Before you start, make sure that you have met the following conditions:
You have installed obd V2.4.0 or a later version. We recommend that you install the latest version. For more information, see Install obd.
If you deploy OceanBase Database as MetaDB, make sure that the server supports the AVX instruction set (this restriction applies only to servers with the x86 architecture). You can run the
lscpu | grep Flags | grep avxcommand to check whether the server supports the AVX instruction set.In an offline deployment scenario, if you deploy OceanBase Database as MetaDB and use a server with the ARM architecture, check whether the server supports the LSE instruction set. You can run the
lscpu | grep Flags | grep atomicscommand to check whether the server supports the LSE instruction set. If the server does not support the LSE instruction set, download an OceanBase Database installation package with thenonlseoption and use theobd mirror clonecommand to upload the installation package to the local mirror library of obd.Note
The OceanBase All in One package does not contain an OceanBase Database installation package with the
nonlseoption.The user and machine resources required for deploying OCP are available.
The clockdiff command is installed on the server where you want to deploy OCP.
The MetaDB version must be V4.2.1 BP8 or V4.3.5 BP3 when you deploy OCP. If you deploy OCP by using a new OceanBase Database, make sure that the obd image library contains the OceanBase Database software package of V4.2.1 BP8 or V4.3.5 BP3. We recommend that you use OceanBase Database V4.2.1 BP8 or V4.3.5 BP3 as MetaDB.
Procedure
Note
The following procedure is based on the CentOS Linux 7.9 image for the x86 architecture. The operation interface may vary depending on the environment and the version of obd. Please refer to the actual interface.
obd supports deploying both the Community Edition and the Enterprise Edition of OCP. This section describes how to deploy the Community Edition of OCP.
Step 1: Obtain the installation package
Download the installation package
Go to the OceanBase Download Center and search for OceanBase Cloud Platform. Download the required installation package based on your needs and upload it to any directory on the obd control machine.
If you cannot find the required version of the installation package on the download center, contact technical support for assistance.
Decompress the installation package
In the directory where the installation package is located, execute the following command to decompress it:
[admin@test001 ~]$ tar -xzf ocp-all-in-one-*.tar.gz(Optional) Uninstall the original obd
If the obd is installed using the All in One package, you can execute the following command to uninstall it.
[admin@test001 ~]$ cd ocp-all-in-one/bin && bash uninstall.shStart the installation program
In the
bindirectory of the ocp-all-in-one installation directory, execute theinstall.shscript to start the obd installation program.[admin@test001 bin]$ bash install.shThis script will install obd and copy all installation packages in the
rpmsdirectory of the installation directory to the local image library of obd, while closing the remote image library. After the execution is successful, the following output will be displayed. You can copy and execute thesource ~/.oceanbase-all-in-one/bin/env.shcommand in the output to apply the environment configuration.add auto set env logic to profile: /home/admin/.bash_profile ######################################################################################### Install Finished ========================================================================================= Setup Environment: source ~/.oceanbase-all-in-one/bin/env.sh Quick Start: obd demo Use Web Service to install: obd web Use Web Service to upgrade: obd web upgrade More Details: obd -h =========================================================================================
Step 2: Start the GUI
Execute the
obd webcommand to start the GUI. Click the displayed address to access the graphical operation interface of obd.[admin@test001 ~]$ obd web start OBD WEB in 0.0.0.0:8680 please open http://10.10.10.1:8680Note
The GUI uses port 8680 by default. You can use the
obd web -p <PORT>command to specify the port. The port value must be in the range [1025, 65535].In an Alibaba Cloud or other cloud environment, the program may fail to obtain the public IP address and output the internal IP address. In this case, you need to use the correct IP address to access the GUI.
The
obd webcommand is bound to 0.0.0.0. In a multi-network interface deployment, you can access the GUI using any accessible IP address.You can use the nohup or screen command to run the
obd webcommand in the background.
(Optional) Place the cursor on the Chinese character in the upper-right corner of the graphical operation interface and click it to switch between Chinese and English interfaces based on the displayed language.
Click Start Your Experience on the operation interface. In the Welcome to OceanBase Deployment Wizard interface, select the OceanBase Cloud Platform module. Place the cursor on the Install button and click it to select the corresponding installation method and enter the Welcome to OCP Deployment Wizard interface.
You can select the OCP installation method based on your needs. Here, we will use Use a New OceanBase Database as an example to introduce how to deploy OCP using obd.
Step 3: Deployment configuration
You can configure the deployment name and product version of OCP on the Deployment Configuration interface. The Deployment Configuration interface is as follows.
Parameter |
Description |
|---|---|
| Deployment Name | The unique name of the obd deployment product, which can be customized and must not be duplicated with existing deployment names. The cluster name must start with an English letter, end with an English letter or a digit, and can contain English letters, digits, and underscores. The length must be between 2 and 32 characters. You can use the obd cluster list command to view the clusters managed by obd. |
| Version Selection | OCP and OBProxy are set to the latest version in the image library by default. You can click the Version drop-down box in the corresponding row of the product to select the deployment version. The default version of OceanBase Database is V4.3.5.3, which can only be modified to V4.2.1.8. Click Learn More after the corresponding component to view the documentation of the component. |
After the configuration is completed, click Next to enter the MetaDB Configuration page.
Step 4: Configure MetaDB
You can configure the information of the MetaDB cluster, such as the IP address, port, directory, and password of the OBServer node, on the MetaDB Configuration page. This section will introduce each configuration item.
Deployment user configuration
The Deployment User Configuration module is used to configure the user information for deploying OCP. The interface is shown in the following figure.
Note
To avoid conflicts with the operating system user, we recommend that you configure independent operating system users for MetaDB and OCP.
ParameterDescriptionUsername The username of the operating system user for installing the software. You can customize the username. The username must be 20 characters or fewer and can contain only letters, digits, and periods. You must ensure that the username exists on all hosts and has the permission to execute sudo commands without a password. Password (optional) The password of the username. If the user has been configured with password-free access, you can skip this configuration. SSH Port The default value is 22. You can customize the port. Use Running User If you enable this option, the Running Username field will appear, allowing you to configure an independent operating system user for OCP services. Node configuration
You can configure the IP address of the host where OCP is deployed in OCP Node Configuration and the IP address of the OBServer node where MetaDB is deployed in Database Node Configuration. The interface is shown in the following figure.
ParameterDescriptionSelect Host Configure the IP address of the host where OCP is deployed. You can deploy OCP on multiple hosts. We recommend that you do not use 127.0.0.1as the IP address.Load Balancing Management Click the expand button to set up load balancing. This is mainly for user access to OCP. We recommend that you provide a VIP/DNS address when deploying multiple OCP nodes to avoid the need to change the OCP access address (ocp.site.url) later. If you do not configure this, the system will default to using the first IP address for the connection string. You can select whether to use VIP or DNS (domain name) access from the dropdown menu under Access Method: - If you choose VIP access, you need to configure the IP Address and Access Port of the VIP.
- If you choose DNS access, you need to configure the corresponding Domain Name.
Notice
obd does not provide load balancing deployment. If you need to set up load balancing, please deploy and configure it in advance.
Zone Name Configure the zone name in MetaDB. You can customize the zone name. The zone name must start with an English letter and end with an English letter or digit. It can contain English letters, digits, and underscores, and must be 2 to 32 characters in length. If you deploy an OceanBase cluster with multiple zones, one of the zones must be in the same region as the primary zone. You can click + Add Zone or the delete icon next to the corresponding zone to add or delete a zone. OBServer Node Configure the IP address of the OBServer node in MetaDB. After you enter an IP address, click Enter to configure multiple node IP addresses. Notice
If the OBServer node is configured as
127.0.0.1, this OceanBase cluster cannot be extended to a distributed cluster or configured with primary/standby tenants.RootServer Node You can select an IP address from the IP addresses configured in OBServer Node as the RootServer node for MetaDB. For an OceanBase cluster with multiple replicas, you must specify a RootServer node for each zone. Cluster configuration
You can configure the root@sys password, directory, and port of the MetaDB database in the Cluster Configuration module. The interface is shown in the following figure.
ParameterDescriptionroot@sys Password You can customize the password or click Randomly Generate to let obd generate a random string. The root@sys password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain at least three of the following four types of characters: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~!@#%^&*_-+=|(){}[]:;,.?/).
Software Installation Path The installation path of MetaDB. By default, the oceanbasedirectory is created in the home directory of the deployment user. You can customize the path. When you customize the path, it must be an absolute path starting with/and can contain only letters, digits, and special characters (-_:@/.). You must ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.Data Path The data storage path of MetaDB. By default, it is set to /data/1. You can customize the path. The path must be an absolute path starting with/and can contain only letters, digits, and special characters (-_:@/.). You must ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.Log Path The log storage path of MetaDB. By default, it is set to /data/log1. You can customize the path. The path must be an absolute path starting with/and can contain only letters, digits, and special characters (-_:@/.). You must ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.SQL Port The port number of the SQL service protocol. By default, it is 2881. You can customize the port number (only within the range of 1025 to 65535). You must ensure that the port is not occupied. RPC Port The port number of the remote access protocol. By default, it is 2882. You can customize the port number (only within the range of 1025 to 65535). You must ensure that the port is not occupied. obshell Port The port number of the OceanBase Database O&M tool. By default, it is 2886. You can customize the port number (only within the range of 1025 to 65535). You must ensure that the port is not occupied.More Configurations (Optional) You can click the expand button before More Settings to view and configure OceanBase Database parameters. You can use the automatically assigned values or customize each parameter. Notice
You must ensure that the disk space of the directories specified in Software Installation Path, Data Path, and Log Path is sufficient. Otherwise, the deployment will fail.
OBProxy configuration
The OBProxy Configuration module allows you to configure the nodes, ports, and paths of OBProxy. The interface is shown in the following figure.
ParameterDescriptionOBProxy node The IP address of the machine on which OBProxy is deployed. Only one IP address can be configured, which means that only a single OBProxy node can be installed. We recommend that you use an IP address other than 127.0.0.1.Load balancing management You can click the expand icon to configure load balancing. This is mainly used for OCP to access the MetaDB cluster. We recommend that you provide the VIP/DNS address when you deploy multiple OBProxy nodes to avoid the need to change the OBProxy access address later. If you do not configure load balancing, the system will automatically use the first IP address to set the connection string. You can select whether to use the VIP or the DNS (domain name) to access OBProxy from the drop-down list under Access Method: - If you select to use the VIP, you need to configure the IP address and access port of the VIP.
- If you select to use the DNS, you need to configure the corresponding domain name.
Notice
obd does not support load balancing. If you need to configure load balancing, you must deploy and configure the corresponding load balancer in advance.
SQL port The listening port of OBProxy. The default value is 2883. You can customize this port (1025 to 65535). Make sure that the port is not occupied. Prometheus port The listening port of OBProxy for Prometheus. The default value is 2884. You can customize this port (1025 to 65535). Make sure that the port is not occupied. Software path The installation path of OBProxy. By default, the obproxydirectory is created in the home directory of the deployed user. You can customize this path. When you customize the path, you must configure an absolute path starting with/. The path can contain only letters, numbers, and special characters (-_:@/.). Make sure that the directory is empty and that the configured user has access and read/write permissions for the directory.More configurations (Optional) You can click the expand icon before More Settings to view and configure the OBProxy parameters. You can use the automatically assigned values or customize each parameter.
After you complete all the configurations, click Next to go to the OCP Configuration page.
Step 5: Configure OCP
You can configure OCP service and tenant information on the OCP Configuration page. This section will introduce them separately.
Service configuration
You can configure the login password, path, URL, and port of OCP on the Service Configuration tab. The following figure shows the interface.
ParameterDescriptionAdmin Password The login password of the OCP administrator account. You can enter a custom password or click Randomly Generate to generate a random string by using obd. The password must meet the following complexity requirements: - Length: 8 to 32 characters
- At least three of the following four types of characters: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~^*{}[]_-+)
You can click Copy Password to copy the configured admin password.Note
The above password requirements are applicable only when the deployed OCP version is V4.2.2 or later. If the deployed OCP version is earlier than V4.2.2, the password complexity requirements are as follows:
- Length: 8 to 32 characters
- Supports letters, digits, and special characters, and contains at least two uppercase letters, two lowercase letters, two digits, and two special characters
- Supported special characters:
~^*{}[]_-+
Software Path The installation path of OCP. By default, the ocpdirectory is created in the home directory of the deployment user. You can customize this path. If you customize the path, it must be an absolute path starting with/and can only contain letters, digits, and special characters (-_:@/.). Ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.Log Path The log storage path of OCP. By default, the logsdirectory is created in the home directory of the deployment user. You can customize this path. If you customize the path, it must be an absolute path starting with/and can only contain letters, digits, and special characters (-_:@/.). Ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.Software Package Path The path for storing software packages (such as OBProxy and OBAgent) in OCP. By default, the softwaredirectory is created in the home directory of the deployment user. You can customize this path. If you customize the path, it must be an absolute path starting with/and can only contain letters, digits, and special characters (-_:@/.). Ensure that the directory is empty and that the configured user has access and read/write permissions for the directory.Note
If the local repository contains installation packages of OceanBase Database and OBProxy, obd will automatically identify and upload the latest versions of these installation packages to this directory during the OCP deployment process.
ocp.site.url The URL for accessing the OCP website. The URL must start with httporhttps, include the VIP address, domain name, or port, and end without a slash (/). For example,http://localhost:8080.
After you set the URL, you can click Validate next to the URL to verify whether the settings meet the requirements. If the settings meet the requirements, "Current validation succeeded. Please proceed to the next step." will be displayed below the URL text box. If the settings do not meet the requirements, modify the settings based on the prompt and re-validate.Service Port The listening port of OCP service. By default, it is 8080. You can customize this port.Resource planning
OCP service consumes computing and storage resources during operation. You can plan resources for OCP service, MetaDB, and MonitorDB on the Resource Planning tab based on the scale of the objects to be managed. The following figure shows the interface.
Note
Deploy OCP on a server that meets the installation requirements of OCP.
ModuleParameterDescriptionResource planning Estimated number of management hosts (units): The number of hosts to be managed by OCP. By default, it is set to 10. You can modify this value as needed. Resource configuration OCP application memory (GiB) The memory resources allocated to the OCP host. By default, it is set to 4 GiB. The memory resource configuration is related to the number of hosts to be managed by OCP. Meta tenant configuration Tenant name The name of the meta tenant. By default, it is ocp_meta. You can customize the name.Password The root user password of the meta tenant. You can customize the password or click Randomly Generate to generate a random string by using obd. The custom password must meet the following complexity requirements: - Length: 8 to 32 characters
- At least three of the following four types of characters: digits (0\~9), uppercase letters (A\~Z), lowercase letters (a\~z), and special characters (
~!@#%^&*_-+=\|(){}[]:;,.?/)
Click Copy Password to copy the root user password of the meta tenant.CPU (VCPUS) The CPU resources allocated to the meta tenant. By default, it is set to 2 VCPUS. You can modify this value as needed. Memory (GiB) The memory resources allocated to the meta tenant. By default, it is set to 4 GiB. You can modify this value as needed. Monitoring data tenant configuration Tenant name The name of the monitoring data tenant. By default, it is ocp_monitor. You can customize the name.Password The root user password of the monitoring data tenant. You can customize the password or click Randomly Generate to generate a random string by using obd. The custom password must meet the following complexity requirements: - Length: 8 to 32 characters
- At least three of the following four types of characters: digits (0\~9), uppercase letters (A\~Z), lowercase letters (a\~z), and special characters (
~!@#%^&*_-+=\|(){}[]:;,.?/)
Click Copy Password to copy the root user password of the monitoring data tenant.CPU (VCPUS) The CPU resources allocated to the monitoring data tenant. By default, it is set to 2 VCPUS. You can modify this value as needed. Memory (GiB) The memory resources allocated to the monitoring data tenant. By default, it is set to 8 GiB. You can modify this value as needed.
After you configure all parameters, click Next to go to the Configuration Confirmation page.
Step 6: Confirm the configuration
On the Confirm Configuration page, you can view all the configuration information. If you find any issues, click Previous to modify them. After confirming that everything is correct, click Next to proceed to the Precheck step. The system will verify whether your environment and configurations meet all the requirements for deploying OCP.
Step 7: Precheck
On the Precheck page, you can view the results of the system checks. If the precheck fails, you can choose Auto Repair (for check items that can be automatically repaired) or click View More Solutions to jump to the error code documentation and modify the configurations based on the documentation. After all errors are fixed, click Recheck to perform the precheck again.
After the precheck is successful, click Next to proceed to the Deploy page and start deploying OCP.
Step 8: Deploy
During the deployment, the Deployment page will display the deployment logs. You can view the detailed installation logs in the Deployment Logs section.
If the deployment fails, check the log information to identify the cause of the failure. Contact technical support for assistance. Once the issue is resolved, click Redeploy and then OK in the confirmation window. The system will clean up the failed OCP installation environment and restart the installation.
If the deployment is successful, click Copy Information to copy and save the access address, username, and password of OCP. Then, click Complete to exit the deployment program.
Note
After the deployment is successful, you can refer to the Post-Deployment Checks section in the Cloud Platform OCP documentation to verify whether the deployed OCP can be used normally.
References
You can use the obd commands to manage the OCP cluster. For more information, see Cluster commands.
For more information about how to upgrade OCP, see Upgrade OCP by using the graphical interface.
