This topic describes how to deploy and log in to Web ODC.
Note
For information about the environment requirements, see Limitations.
Deploy Web ODC on a single node
Apply for a tenant in MySQL mode of OceanBase Database. The specification of the tenant is 2C8G. You can set the tenant name as you like. For example, the tenant is named
odc_tenant, and the cluster instance where the tenant reside is namedodc_cluster.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. In this topic, the database name is
odc_metadb, and the database username and password are bothobodc.Note down the MetaDB name, username, password, tenant name, and cluster name, which will be passed as parameters during the deployment of ODC.
The following table lists the resource specifications for the deployment environment of single-node Web ODC, which are empirical values provided based on the number of ODC users.
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 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.
Notice
- Images of ODC V4.2.0 and later have been released in Docker Hub. If the server where ODC runs can access Docker Hub, you do not need to download an image and can directly start ODC Docker. For more information, see Step 7.
- If the server where ODC runs cannot access Docker Hub, you need to download and load the image file.
After you load the image file to the host, run the following command in the command-line tool to load the image:
The syntax is as follows:
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:4.2.2
The following table describes the parameters.
| Parameter | Description |
|---|---|
| -v |
|
| --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 host in the command to start the Docker container. |
| --cpu-period --cpu-quota | ---cpu-period parameter specifies the interval at which the CPU cores of the Docker container are reallocated. Unit: μs.---cpu-quota parameter specifies the maximum time for running the current Docker container in this interval. Unit: μs.cpu-quota by cpu-period. In the preceding sample statement, the values of cpu-quota and cpu-period are respectively 400000 and 100000. Therefore, the resulting value is 4, 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 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 that contains 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 administrator account of ODC. 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.
Log on to Web ODC
Open a browser, enter the access URL of Web ODC, and press Enter.
Enter the username 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 navigation pane. You can click Exit in the menu to return to the ODC logon page and log on to ODC with another account.
