Note
For more information about the environment requirements, see Limits.
Deploy single-node Web ODC
Apply for a tenant in MySQL mode of OceanBase Database. Allocate 2 CPU cores and 8 GB of memory to the tenant. You can name the tenant as you like. For example, the cluster name of the tenant is
odc_clusterand the tenant name isodc_tenant.Create a database in the tenant as the MetaDB, and then create a user to access this MetaDB. You can set the MetaDB name, username, and password as you like. For example, the database name is
odc_metadb, and both the database username and password areobodc.Note down the name of the MetaDB, the username, the password, the tenant name, and the cluster name, which will be passed as parameters during the deployment of ODC.
The server on which single-node Web ODC is deployed must be configured based on the number of ODC users. The following table lists the recommended configurations.
Number of ODC users Server type Server quantity Minimum functional configuration Minimum performance configuration 20 ODC Docker deployment server 1 2 CPU cores and 4 GB of memory 4 CPU cores and 16 GB of memory For more information about how to install and run the Docker container, see Bind mounts.
Download the ODC image as needed to obtain the desired image architecture in the Maintenance Tools of the OceanBase Download Center.
After you download the image file to the host, run the following command in the CLI to load the image:
gunzip -c obodc-{$version}.tar.gz | docker loadHere is an example:
#!/usr/bin/env bash docker run -v /var/log/odc:/opt/odc/log -v /var/data/odc:/opt/odc/data \ -d -i --net host --cpu-period 100000 --cpu-quota 400000 --memory 8G --name "obodc" \ -e "DATABASE_HOST=xxx.xx.xx.xx" \ -e "DATABASE_PORT=60805" \ -e "DATABASE_USERNAME=[username]@[tenant name]#[cluster name]" \ -e "DATABASE_PASSWORD=******" \ -e "DATABASE_NAME=odc_metadb" \ -e "ODC_ADMIN_INITIAL_PASSWORD=******" \ oceanbase/odc-server:4.2.1-20231009The following table describes the parameters.
Parameter Description -v - Maps the
/var/log/odcdirectory of the host to the/opt/odc/logdirectory in the ODC container. If the/var/log/odcdirectory does not exist on the host, run themkdir -p /var/log/odccommand to create one. - Maps the
/var/data/odcdirectory of the host to the/opt/odc/datadirectory in the ODC container. If the/var/data/odcdirectory does not exist on the host, run themkdir -p /var/data/odccommand to create one.
--net The network configuration of the Docker container. If you set this parameter to host, the host network is directly used. You can also use the--publish(-p) parameter to configure port mapping. However, the Docker container may fail to start in some environments due to internal DNS resolution errors. In this case, specify--net hostin the command to start the Docker container.--cpu-period --cpu-quota - The
---cpu-periodparameter specifies the interval at which the CPU cores of the Docker container are reallocated, in μs. - The
---cpu-quotaparameter specifies the maximum time for running the current Docker container in this interval, in μs.
cpu-quotabycpu-period. In the preceding sample command, the values ofcpu-quotaandcpu-periodare respectively400000and100000. Therefore, the resulting value is4, indicating that the Docker container can use at most four CPU cores.--memory The maximum memory size for the Docker container. --name The name of the container. DATABASE_HOST The IP address of the MetaDB. DATABASE_PORT The port number of the MetaDB. DATABASE_USERNAME The username of the MetaDB. In OceanBase Database, the username is given in the format of db_user@tenant_name#cluster_name.DATABASE_PASSWORD The password used to connect to the database. DATABASE_NAME The name of the MetaDB. ODC_PROFILE_MODE The mode. Default value: alipay.ODC_ADMIN_INITIAL_PASSWORD The initial password of the administrator account of ODC. Notice
- In the Shell environment, you must enclose a string containing special characters such as
!and$with single quotation marks ('), for example,DATABASE_PASSWORD='11111!'. - The
ODC_ADMIN_INITIAL_PASSWORDparameter specifies the initial password of the ODC administrator account. The initial password must meet the following requirements:- Contains at least two digits.
- Contains at least two uppercase letters.
- Contains at least two lowercase letters.
- Contains at least two special characters, which can be . _ + @ # $ %.
- Contains 8 to 32 characters without spaces or other special characters.
- Maps the
Log on to Web ODC
Open a browser, enter the access address of Web ODC, and press Enter.
Enter the account and password to log on to Web ODC.
Note
You can also use SSO integration to automatically maintain account information. For more information, see SSO Integration.

Select the target workspace.
After you log on to ODC and go to the homepage, the account name is displayed in the menu that appears after you click Me in the lower-left corner of the left-side navigation pane. You can click Exit in the menu to return to the ODC logon page and log on to ODC with another account.
