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 compatible 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 usersServer typeServer quantityMinimum functional configurationMinimum performance configuration20 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 in the preceding example.
ParameterDescription-v - Mounts the host's
/var/log/odcdirectory to the ODC container's/opt/odc/logdirectory. The/var/log/odcdirectory is on the host. If it does not exist, you need to create it. The command to create 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 on the host. You can customize it. If it does not exist, you need to create it. The command to create the directory ismkdir -p /var/data/odc.
--net Specifies the network configuration of the container. If you set this parameter to host, the container directly uses the host 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 in Docker. In this case, use the--net hostmethod to start Docker.
Default port number: 8989.--cpu-period --cpu-quota ---cpu-periodspecifies the time interval for redistributing CPU resources to the container. Unit: microseconds.---cpu-quotaspecifies the maximum amount of time that can be allocated to the container within the specified period. Unit: microseconds.
cpu-quota/cpu-periodindicates the number of CPU cores available to Docker. For example, 400000/100000=4 indicates that up to 4 cores can be used.--memory Specifies the maximum 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 db_user@tenant_name#cluster_nameformat.DATABASE_PASSWORD The password for connecting to the database. DATABASE_NAME The name of the metadata database. ODC_PROFILE_MODE The mode. Default value: alipay.ODC_ADMIN_INITIAL_PASSWORD The initial password of the ODC administrator account (admin). Notice
- In a shell environment, if a string contains special characters such as
!and$, you must enclose the variable value in single quotation marks. For example:DATABASE_PASSWORD='11111!'. - The
ODC_ADMIN_INITIAL_PASSWORDparameter specifies the initial password of the ODC administrator account (admin). The initial password must meet the following requirements:- Contain at least two digits.
- Contain at least two uppercase letters.
- Contain at least two lowercase letters.
- Contain at least two special characters, which can be ., _, +, @, #, $, or %.
- Not contain spaces or other special characters, and be 8 to 32 characters in length.
- Mounts 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.

