This topic describes how to upgrade OceanBase Cloud Platform (OCP) Community Edition to the latest version by using OceanBase Deployer (OBD).
Prerequisites
You are using OCP V3.3.0 or a later version. Only these versions can be upgraded by using this method. To upgrade OCP of other versions, contact OceanBase Technical Support.
You have installed and configured a Java environment by using JDK 1.8.
You have obtained the
ocp-all-in-one-4.3.3-YYYYMMDDhhmmss.el7.x86_64.tar.gzsoftware package and uploaded the package to a directory on the OCP host and run the following command to decompress the package. For more information, see Prepare for the installation.tar zxf ocp-all-in-one-4.3.3-YYYYMMDDhhmmss.el7.x86_64.tar.gz
Procedure
Step 1: Start OBD
Log on to the OCP host.
Run the following command to go to the
bindirectory of the decompressed software package, and start the installer:cd ocp-all-in-one/bin && sh install.shRun the following command to make the environment variables take effect:
source ~/.oceanbase-all-in-one/bin/env.shRun the
obd web upgradecommand and obtain the IP address of the upgrade wizard page in the response.
Step 2: Go to the OCP upgrade wizard page
Open a browser, go to the upgrade wizard page by using the IP address obtained in Step 1, and click Start Upgrade.
Step 3: Specify the deployment information
Specify the name of the OceanBase cluster to be managed.
The system automatically obtains the names of all clusters managed by OBD. You can select a cluster from the Cluster Name drop-down list. If the cluster to be upgraded is not managed by OBD, such as a cluster deployed by using docker, you can enter the cluster name. After the cluster upgrade is completed, OBD automatically takes over the cluster.
Select the OCP version to which you want to upgrade.
Step 4: Verify the connectivity of MetaDB
Make sure that the connection information of MetaDB is correct and click Verify to check whether MetaDB is connected.
The installer automatically obtains the configuration information of MetaDB based on the current OCP host. You must check whether the information in the form is consistent with the expected upgrade environment. OCP will execute the upgrade procedure based on the information.
Enter the information of the OS user and click Verify to test the connectivity.
Parameter Description Username The username of the user of the host OS, who has permissions to run sudo commands. The installer requires this username to automatically configure settings. Password The password of the user. If you have enabled password-free logon for the host, skip this parameter. Click Next.
Step 5: Run an environment precheck
The precheck verifies whether your environment meets the requirements for the OCP upgrade.
The system obtains the configuration information of OCP based on that of MetaDB. To ensure management consistency, OCP Server and OCP Agent are also upgraded.
Verify that the information in the Installation configuration and Upgrade configuration information section meets the requirements. Then, click Pre-check.
View the precheck result.
- If the precheck is passed, click Next.
- If the precheck fails, you can fix or ignore the failed precheck items. After you fix the failed precheck items, click Re-check to run a precheck again. You can also click Ignore All Failed Items. This action changes the status of all failed precheck items to Ignored. Then, click Next.
Notice
If you ignore all failed precheck items, the upgrade may fail. We recommend that you fix the failed precheck items before proceeding to the next step.
Step 6: Upgrade OCP
You can view detailed upgrade logs in the Upgrade logs section during the upgrade process.
After OCP is upgraded, you can view the information required to log on to OCP, such as the URL of the OCP console, username, and password, in the Upgrade logs section.
If the OCP upgrade fails, check the logs for the causes and contact OceanBase Database Technical Support. After you identify the causes and fix the issue, click Upgrade Again to re-execute the failed upgrade steps.
Note
The OCP upgrade may take a while to complete.
(Optional) Step 7: Use OBD to take over the original MetaDB cluster
To manage the original MetaDB cluster of OCP after upgrading OCP by using OBD, you can copy the information of the original MetaDB cluster to the OBD directory /.obd/cluster/ by running the following command:
cp -rf ~/.ocp-installer/cluster/<metadb_cluster_name> ~/.obd/cluster/
Note that metadb_cluster_name specifies the name of the original MetaDB cluster. You must replace it with the actual name of your original MetaDB cluster.