You can take over a cluster that was created by using the CLI or another OCP console to the current OCP console. After the takeover, you can continue to manage and maintain the cluster in the current OCP console.
Prerequisites
The current login user is the ADMIN or ORG_ADMIN role.
All OBServer nodes of the target OceanBase cluster are running normally.
When taking over the OceanBase cluster, follow the primary cluster first principle:
In a single OCP scenario, take over the primary OceanBase cluster first, and then the standby OceanBase cluster.
In a multi-OCP scenario, take over the primary OceanBase cluster first in one OCP, and then take over the standby OceanBase cluster in any OCP.
The service names of tenants and the service names of systems in the OceanBase cluster to be taken over must be unique. Otherwise, the service name status of tenants with conflicting service names will be set to Invalid after the takeover. For more information about service names, see Manage service names.
If the target cluster is deployed by using obd, check whether the cluster meets the takeover conditions by referring to Take over a cluster deployed by using obd before the takeover.
Considerations
Each OceanBase cluster can be managed by only one OCP. After the takeover, the cluster cannot be properly maintained and monitored in the original OCP. Therefore, assess the takeover plan carefully before the takeover. We recommend that you migrate the cluster before the takeover. For more information, see Migrate a cluster.
If the OceanBase cluster to be migrated is shared with the OBProxy cluster on the same host, follow the sequence of operations below before the takeover. For more information, see OCP IDC migration.
- Migrate the OBProxy cluster.
- Migrate the OceanBase cluster.
- Take over the OceanBase cluster.
- Take over the OBProxy cluster.
If the OceanBase cluster to be taken over has been configured with a load type, you need to reconfigure the load type for the cluster on the Overview page of the cluster.
When taking over the OceanBase cluster, OCP will also take over the OBServer nodes of the cluster.
- If the credentials of the OBServer nodes are the same, you can take over the nodes in the Precheck step.
- If the credentials of the OBServer nodes are different, you need to add the nodes to OCP before you take over the cluster. For more information, see Add a host.
After the cluster is taken over, you need to reconfigure the backup strategy based on the original backup strategy of the cluster or the tenant.
Procedure
Log in to the OCP console.
In the left-side navigation pane, click Clusters. The Clusters page automatically appears.
On the Clusters page, click Take over Cluster in the upper-right corner.
Connect to the cluster by using Direct Connection or OBProxy.
Direct Connection: Enter the Access Address and Port of the cluster, and Root@sys Password, and optionally enter the password of the proxyro account. Then, click Next.
Note
The password of the proxyro account is used by OBProxy to access the OceanBase cluster. You can enter the password here to ensure the consistency of the proxyro password. For more information about the proxyro account, see Manage proxyro accounts.
OBProxy: Enter the Access Address and Port of the cluster, Cluster Name, Cluster ID (Optional), and Root@sys Password, and optionally enter the password of the proxyro account. Then, click Next.
Note
- If the standby cluster is to be taken over, the cluster ID is a required field. If both the primary and standby clusters are to be taken over, take over the primary cluster first, and then take over the standby cluster.
- The password of the proxyro account is used by OBProxy to access the OceanBase cluster. You can enter the password here to ensure the consistency of the proxyro password. For more information about the proxyro account, see Manage proxyro accounts.
After the cluster is connected, the precheck page appears.
If the precheck passes, and some OBServer hosts are not managed by OCP, enter the relevant information to take over the hosts.
If the precheck fails, modify the OBServer node configuration as prompted and click Recheck after the modification.
Click Submit.
After the task is submitted, you can view the task progress on the submission result page or return to the cluster overview page.
Note
For OCP to connect to the database, a credential string must be managed in the credential management system. After the cluster is taken over, you can import the cluster credential file obtained by using the Export Cluster feature into this OCP instance. This way, you can batch upload the credentials of the cluster. For more information, see Import Credentials.