This topic describes how to deploy and log in to Web ODC.
Note
For more information about the environment requirements, see Limitations.
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. Example: The cluster name of the tenant is
odc_clusterand the tenant name isodc_tenant.Create a database and a user under the tenant as the ODC metabase. You can set the username, password, and metabase name as you like. Example: The metabase name is
odc_metadband both the database username and password areobodc.Record the name, username, password, tenant name, and cluster name of the metabase, which are required when you deploy ODC.
Configure the deployment environment for the single-node Web ODC node based on the number of ODC users.
Number of ODC users Server type Server quantity Minimum functional configuration Minimum performance configuration 20 ODC Docker 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 Use bind mounts.
Download the ODC image as needed to obtain the desired image architecture in the Maintenance Tools of the OceanBase Download Center.
Notice
- The images of ODC V4.2.0 and later versions have been published to Docker Hub. If your local device running ODC can access Docker Hub, you can directly start ODC Docker without downloading the image. For details, see Step 7 to load the image.
- If Docker Hub cannot be accessed directly, you still need to download and load the image file.
After obtaining the image file on the host, run the following statement in the command line tool to load the image:
Syntax:
gunzip -c obodc-{$version}.tar.gz | docker loadExample:
#!/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.2The following table describes the parameters.
Parameter Description -v - Maps the host's
/var/log/odcdirectory to the ODC container's/opt/odc/logdirectory. If the/var/log/odcdirectory does not exist, you need to create it first. The reference command for creating the directory ismkdir -p /var/log/odc. - Mounts the host's
/var/data/odcdirectory to the ODC container's/opt/odc/datadirectory. The/var/data/odcdirectory is a custom directory on the host. If it does not exist, you need to create it first. The reference command for creating the directory ismkdir -p /var/data/odc.
--net Specifies the network configuration for the container. If you set this parameter to host, the container directly uses the host's network. You can also use the--publish(-p) parameter to configure port mapping. However, in some environments, the container may fail to start due to DNS resolution errors within Docker. In such cases, use the--net hostmethod to start Docker.
Default port number: 8989.--cpu-period --cpu-quota --cpu-periodspecifies the time interval for redistributing CPU resources for the container. Unit: microseconds.--cpu-quotaspecifies the maximum amount of time that can be allocated to the current container within the specified period. Unit: microseconds.
cpu-quotadivided bycpu-periodindicates the number of CPU cores available to Docker. For example, 400000/100000=4 indicates that up to 4 CPU cores can be used.--memory Specifies the maximum amount of memory available to the container. --name Specifies the container name. DATABASE_HOST The IP address of the metadata database. DATABASE_PORT The port number of the metadata database.
Default port number: 8989.DATABASE_USERNAME The username of the metadata database. The username of OceanBase Database is in the format db_user@tenant_name#cluster_name.DATABASE_PASSWORD The password for connecting to the database. DATABASE_NAME The name of the metadata database. ODC_PROFILE_MODE Specifies the mode. Default value: alipay.ODC_ADMIN_INITIAL_PASSWORD Specifies the initial password for the ODC administrator account (admin). Notice
- In a shell environment, if the string contains special characters such as
!or$, the variable value must be enclosed in single quotes. For example:DATABASE_PASSWORD='11111!'. - The
ODC_ADMIN_INITIAL_PASSWORDparameter specifies the initial password for the ODC administrator account (admin). The initial password must meet the following conditions:- Contain at least 2 digits.
- Contain at least 2 uppercase letters.
- Contain at least 2 lowercase letters.
- Contain at least 2 special characters, which must be from the set ._+@#$%.
- Not contain spaces or other special characters, and have a length of 8 to 32 characters.
- Maps the host's
Log in to Web ODC
Open the browser, enter the endpoint of Web ODC, and press Enter.
Enter the account and password to log in to Web ODC.
Note
You can also use SSO integration to automatically maintain account information. For more information, see Configure SSO.

Select the target workspace.
Log in to ODC and go to the connection management page. Click My in the lower-left corner of the navigation bar. The account name is displayed. Click Exit in the drop-down menu to return to the ODC logon page. You can log in to ODC with another account.
