Upgrade a two-node Olares cluster from 1.12.5 to 1.12.6
This guide walks you through manually upgrading a two-node Olares cluster from version 1.12.5 to 1.12.6.
The procedure involves downloading upgrade packages on both nodes, upgrading the Olares CLI and daemon, and upgrading the master and worker nodes separately.
Prerequisites
Cluster
- You have a two-node Olares cluster with one master node and one worker node.
- Both nodes are powered on and connected to the same local area network.
- You know the local IP addresses of both nodes.
Access
- You can access both nodes via SSH as a user with
sudoprivileges.
Step 1: Connect to both nodes
Open two separate terminal windows or tabs on your computer. Use SSH to connect to each node in its own window.
In the first window, connect to the master node via SSH using its local IP address:
bashssh olares@<master-node-ip-address>In the second window, connect to the worker node via SSH using its local IP address:
bashssh olares@<worker-node-ip-address>Keep both SSH connection windows open throughout this process. Some steps must be run on both nodes, and some steps must be run while both nodes are accessible.
Step 2: Download upgrade packages on both nodes
Download the upgrade files without installing them. Run the following commands in both your master and worker SSH windows.
Switch to the root user:
bashsudo suLoad the Olares environment variables:
bashsource /etc/olares/releaseCreate the upgrade target file to trigger the download:
bashecho '{"version":"1.12.6", "downloadOnly": true}' > $OLARES_BASE_DIR/upgrade.targetCheck the download progress:
bashcurl localhost:18088/system/status | jq | grep -i downloadWait until the
upgradingDownloadStatevalue changes tocompleted.
Wait for downloads to complete
Before proceeding to Step 3, ensure that upgradingDownloadState shows completed on both nodes.
Step 3: Upgrade Olares CLI and daemon on both nodes
After the downloads finish, import the new images and update the core management tools, including the Olares CLI and the olaresd daemon. Run the following commands in both your master and worker SSH windows.
Ensure that you are still logged in as root:
bashsudo suEnsure the environment variables are loaded:
bashsource /etc/olares/releaseUpdate the Olares CLI to the new version:
bashcp -f $OLARES_BASE_DIR/pkg/components/olares-cli-v1.12.6 /usr/local/bin/olares-cliImport the new container images:
basholares-cli prepare imagesUpgrade the
olaresddaemon:basholares-cli prepare olaresd
Step 4: Upgrade the master node
With both nodes prepared, upgrade the master node first.
In the master node SSH window, start the upgrade:
bashsudo olares-cli upgradeThe master node reboots when the upgrade finishes, and your SSH session will disconnect.
After the reboot, reconnect to the master node via SSH:
bashssh olares@<master-node-ip-address>Verify that all system services have successfully restarted and are in the
Runningstatus:bashkubectl get pod -o wide -ATemporarily set the cluster version back to
1.12.5so the worker node can be upgraded:bashkubectl patch terminus terminus --type=merge -p '{"spec":{"version":"1.12.5"}}'
Step 5: Upgrade the worker node
Now that the master node is upgraded and patched, you can upgrade the worker node.
In the worker node SSH window, start the upgrade:
bashsudo olares-cli upgradeThe worker node reboots when the upgrade finishes. Wait for the reboot to finish.
Step 6: Restore the cluster version on the master node
After the worker node finishes upgrading, restore the version on the master node to 1.12.6 to complete the process.
If your SSH session to the master node times out, reconnect before proceeding.
In the master node SSH window, run the following command:
bashkubectl patch terminus terminus --type=merge -p '{"spec":{"version":"1.12.6"}}'The two-node cluster is now running Olares 1.12.6.
To verify the final status of both nodes in the cluster, run the following command:
bashkubectl get nodes
Resources
- Connect two Olares One: Learn how to set up a two-node Olares cluster.