This topic describes how to install, upgrade, modify, and uninstall OB Sharding in the OceanBase Admin Toolkit (OAT) console.
Prerequisites
Before you install OB Sharding, make sure the following:
- You have installed and logged on to OAT. For more information, see Install OAT.
- You have added a server where OB Sharding is to be installed. For more information, see Add a server.
- The server meets the requirements for installing OB Sharding.
- You have created the MetaDB component for OB Sharding. For more information, see Create and uninstall MetaDB.
Install OB Sharding
To install OB Sharding, perform the following steps:
In the left-side navigation pane, choose Products > Product Management.
On the Product Management page, click Install Product in the upper-right corner, and choose Install OB Sharding.
On the Install OB Sharding page, set the related parameters.
The following table describes the basic parameters for OB Sharding.
Parameter Description OB Sharding Console Image The Docker image of the OB Sharding Console component. Product Name The name of the product, which must be unique. Server The IP address of the server where OB Sharding is to be installed. CPU The number of CPU cores on the server available for OB Sharding. Default value: 4.Memory The size of memory on the server available for OB Sharding. Default value: 8 GB.HTTP Port The HTTP port number for OB Sharding. Default value: 8080.Log Directory The log storage path for OB Sharding. Default value: /home/admin/logs/sharding_console.The following table describes the parameters for OB Sharding Server.
Parameter Description OB Sharding Server Image The Docker image of the OB Sharding Server component. Server The IP address of the server where the OB Sharding Server is to be installed. CPU The number of CPU cores available for OB Sharding Server. Default value: 8.Memory The size of memory available for OB Sharding Server. Default value: 16 GB.Log Directory The log storage path for OB Sharding Server. Default value: /home/admin/logs/sharding_server.The following table describes the MetaDB parameters for OB Sharding.
Parameter Description MetaDB Type Select the type of MetaDB. Tenant Name The name of the tenant. Tenant Password The password of the tenant. Tenant CPU The number of CPU cores on the server available for the tenant. Default value: 2.Tenant Memory The size of memory on the server available for the tenant. Default value: 5 GB.The following table describes the load balancing parameters, which are optional.
Parameter Description Load Balancing Mode Select the load balancing mode. MetaDB TCP Proxy IP The proxy IP address or domain name used for the OB Sharding Console to connect to MetaDB. MetaDB TCP Proxy Port The proxy port used for the OB Sharding Console to connect to MetaDB. Default value: 3306.OB Sharding Console HTTP Proxy IP The IP address for accessing the OB Sharding Console. OB Sharding Console HTTP Proxy Port The port for accessing the OB Sharding Console. Default value: 80.After you set the parameters, click Submit.
You can also click Reset to restore the default configuration.
Note
If you install OB Sharding version 3.2.7 or later, OAT will prompt you to set an initial password for OB Sharding. If you install OB Sharding version earlier than 3.2.7, OAT will not prompt you.
Upgrade OB Sharding
To upgrade OB Sharding, perform the following steps:
In the left-side navigation pane, choose Products > Product Management.
Find the target OB Sharding product and click the product name in the Name column to go to the details page.
If there are too many products, you can search by product name at the top of the page.
In the upper-right corner of the details page, click Upgrade.
In the Upgrade dialog box, enter the required information.
The following table describes the related fields.
Field Description Upgrade Mode The current version of OAT supports Upgrade with Services Stopped and Grayscale Upgrade. Upgrade with Services Stopped applies to products that do not require business continuity. During the upgrade, OAT disables the old version of OB Sharding, which cannot provide services externally. Image File for Upgrade The image file of the target version. Click OK.
Modify OB Sharding
You can replace the OB Sharding container or migrate the OB Sharding container from one server to another.
To modify OB Sharding, perform the following steps:
In the left-side navigation pane, choose Products > Product Management.
Find the target OB Sharding product and click the product name in the Name column to go to the details page.
If there are too many products, you can search by product name at the top of the page.
In the upper-right corner of the details page, click Resource Changes.
In the Resource Changes dialog box, enter the required information.
The following table describes the related fields.
Field Description Server The IP address of the OB Sharding Server. Port The port number of the OB Sharding Server. Click OK.
Uninstall OB Sharding
To uninstall OB Sharding, perform the following steps:
In the left-side navigation pane, choose Products > Product Management.
Find the target OB Sharding product and click the product name in the Name column to go to the details page.
If there are too many products, you can search by product name at the top of the page.
In the upper-right corner of the details page, click Uninstall.
In the confirmation dialog box that appears, click Uninstall. OAT will prompt that the OB Sharding product is being uninstalled. At the same time, OAT will create an uninstall task, and you can click on the task ID in the confirmation dialog box to view the execution progress of the current uninstall task.
What to do next
After you install OB Sharding, you can use the OB Sharding proxy service. For more information, see the OB Sharding documentation.