This topic describes how to upgrade OMS by using the graphical interface of obd.
Note
Currently, obd supports only the upgrade of OMS Community Edition.
Prerequisites
Before you start the upgrade, make sure that the following conditions are met:
OMS is deployed by using obd.
You have installed obd V4.0.0 or later. We recommend that you install the latest version. For more information, see Install obd.
Procedure
Step 1: Obtain the installation package required for the upgrade
Note
If the OMS to be upgraded is a multi-node OMS, you must perform the following steps on each node.
Download the installation package.
Go to the OceanBase Download Center, search for OceanBase Migration Service, and download the required installation package. Then, upload the installation package to any directory on the obd control node.
Load the downloaded OMS installation package to the local image repository of the Docker container.
[admin@test001 ~]$ sudo docker load -i oms_4.2.11-ce.tar.gzVerify whether the loading is successful.
[admin@test001 ~]$ sudo docker imagesThe expected output is as follows:
REPOSITORY TAG IMAGE ID CREATED SIZE reg.docker.alibaba-inc.com/oceanbase/oms-ce feature_4.2.11_ce 26f5f1554fc5 2 months ago 12.5GB reg.docker.alibaba-inc.com/oceanbase/oms-ce feature_4.2.12_ce 28fddcdaf8a0 2 days ago 12.5GB
Step 2: Upgrade OMS
Disable HA.
HA stands for High Available, which ensures the stability and continuity of data transmission links. Before you upgrade OMS, you must disable HA. If HA is enabled, perform the following steps to disable HA:
Log in to the OMS Community Edition console.
In the left-side navigation pane, choose System Management > System Parameters.
On the System Parameters page, find
ha.config.Click the edit icon in the Actions column of the
ha.configrow.In the Modify Value dialog box, set
enabletofalseto disable HA.
Run the upgrade command.
Run the following command to upgrade OMS.
obd cluster upgrade myoms -c oms-ce --tag=feature_4.2.12_ce --image-name=reg.docker.alibaba-inc.com/oceanbase/oms-ce --oms-backup-path=/data/oms/meta_backup_dataDuring the execution of the command, you are prompted to confirm some information. The following describes the information.
Confirm the version to be used.
The command displays the OMS image package to be used during the upgrade. You can enter
yto continue the upgrade ornto exit the upgrade.+---------------------------------------------------+ | Packages Will Be Used | +--------+-------------------+--------------+-------+ | name | tag | hash | mark | +--------+-------------------+--------------+-------+ | oms-ce | feature_4.2.11_ce | 26f5f1554fc5 | start | | oms-ce | feature_4.2.12_ce | 28fddcdaf8a0 | dest | +--------+-------------------+--------------+-------+ If you use a non-official release, we cannot guarantee a successful upgrade or technical support when you fail. Make sure that you want to use the above package to upgrade. [y/n]: yConfirm the upgrade method.
Currently, two OMS upgrade methods are supported: offline upgrade and online upgrade. In the
Enter the number of the oceanbase type you want to use:prompt, enter the number preceding the upgrade method to select the corresponding method.- Offline upgrade: The new image container is deployed to replace the old container. During the upgrade, the running link will be briefly interrupted.
- Online upgrade: The component package is directly replaced in the original container to achieve the upgrade. This ensures that the running link is not interrupted.
Backup OMS meta databases using mysqldump ok Two types of OMS upgrade methods. Please choose one: 1) Offline upgrade: Start a new container with the new image to replace the container with the old version image. The running migration tasks will be interrupted during the upgrade process. 2) Online upgrade: Replace the component packages in the original container with those from the new image. The running migration tasks will not be affected. Enter the number of the oceanbase type you want to use: 2Specify the path to store the upgrade files.
If you choose online upgrade, you must specify the path to store the upgrade files. If the OMS to be upgraded has multiple nodes, you must specify the path for each node.
10.10.10.1:Please specify a local directory(minimum 20GB) for exporting files from the OMS image. (Default: /data/oms/upgrade_docker_files):
After you confirm the above information, obd starts to upgrade OMS.
Step 3: Verify
Check the status of the nodes.
After the upgrade is complete, log in to the OMS Community Edition console. In the left-side navigation pane, choose O&M Monitoring > Nodes. On the Nodes page, check whether the nodes are displayed properly. Also, make sure that the status of all nodes is Online.
Check the OMS version.
Log in to the OMS Community Edition console. Hover the pointer over Help Center in the upper-right corner and click About OMS. In the dialog box that appears, check whether the OMS version is the target version.
References
- After the upgrade is complete, we recommend that you enable HA. You can enable HA by setting the
enableparameter ofha.configtotruein the OMS console.
