Updating
Updating a MicroShift cluster
Abstract
Chapter 1. Update options with Red Hat build of MicroShift and Red Hat Device Edge
Updates are supported on Red Hat build of MicroShift beginning with the General Availability version 4.14.
1.1. Red Hat Device Edge updates
You can update Red Hat Enterprise Linux for Edge (RHEL for Edge) images or Red Hat Enterprise Linux (RHEL) with or without updating the Red Hat build of MicroShift version if the version combination is supported. See the following table for details:
Red Hat Device Edge release compatibility matrix
Red Hat Enterprise Linux (RHEL) and MicroShift work together as a single solution for device-edge computing. You can update each component separately, but the product versions must be compatible. Supported configurations of Red Hat Device Edge use verified releases for each together as listed in the following table:
RHEL Version(s) | MicroShift Version | Supported MicroShift Version → Version Updates |
---|---|---|
9.4 | 4.17 | 4.17.1 → 4.17.z |
9.4 | 4.16 | 4.16.0 → 4.16.z, 4.16 → 4.17 |
9.2, 9.3 | 4.15 | 4.15.0 → 4.15.z, 4.15 → 4.16 on RHEL 9.4 |
9.2, 9.3 | 4.14 | 4.14.0 → 4.14.z, 4.14 → 4.15 or 4.14 → 4.16 on RHEL 9.4 |
1.2. Standalone MicroShift updates
Consider the following when planning to update MicroShift:
- You can potentially update MicroShift without reinstalling your applications and Operators.
- RHEL or RHEL for Edge updates are only required to update MicroShift if the existing operating system is not compatible with the new version of MicroShift that you want to use.
- MicroShift operates as an in-place update and does not require removal of the previous version. Data backups beyond those required for the usual functioning of your applications are also not required.
1.3. Checking the MicroShift version update path
Before updating MicroShift or RHEL, determine the compatibilities. Plan for the versions of each that you intend to use.
Red Hat build of MicroShift update paths
- MicroShift version 4.17
- Version 4.17 → 4.17.z on RHEL 9.4
- MicroShift version 4.16
- Version 4.16 → 4.17 on RHEL 9.4
- Version 4.16 → 4.16.z on RHEL 9.4
- MicroShift version 4.15
- Version 4.15 on RHEL 9.2 or 9.3 → 4.16 on RHEL 9.4
- Version 4.15 → 4.15.z on RHEL 9.2 or 9.3
- MicroShift version 4.14
- Version 4.14 on RHEL 9.2 or 9.3 → 4.16 on RHEL 9.4
- Version 4.14 → 4.15 on RHEL 9.2 or 9.3
- Version 4.14 → 4.14.z on RHEL 9.2 or 9.3
Only rpm-ostree
updates include automatic rollbacks.
1.3.1. RPM-OSTree updates
Using the RHEL for Edge rpm-ostree
update path allows for automated backup and system rollback in case any part of the update fails.
-
You can update MicroShift on an
rpm-ostree
system such as RHEL for Edge by building a new system image containing the new version of MicroShift. -
The
rpm-ostree
image can be the same version or an updated version, but the versions of RHEL for Edge and MicroShift must be compatible.
The following features are available in the RHEL for Edge update path:
- The system automatically rolls back to a previous healthy system state if the update fails.
- Applications do not need to be reinstalled.
- Operators do not need to be reinstalled.
- You can update an application without updating MicroShift using this update type.
- The image you build can contain other updates as needed.
To begin a MicroShift update by embedding in a RHEL for Edge image, use the procedures in the following documentation:
To understand more about Greenboot, see the following documentation:
1.3.2. Manual RPM updates
You can update MicroShift manually on a non-OSTree system such as Red Hat Enterprise Linux (RHEL) by updating the RPMs.
- To complete this update type, use the subscription manager to enable the repository that contains the new RPMs.
- Use manual processes to ensure system health and complete additional system backups.
- To begin a manual RPM update, use the procedures in the following documentation:
- About updating MicroShift RPMs manually
Keeping versions in a supported configuration of Red Hat Device Edge can require updating MicroShift and RHEL at the same time. Ensure that your version of RHEL is compatible with the version of MicroShift you are updating to, especially if you are updating MicroShift across two minor versions. Otherwise, you can create an unsupported configuration, break your cluster, or both.
1.4. Standalone RHEL for Edge updates
You can update RHEL for Edge or RHEL without updating MicroShift, on the condition that the two versions are compatible. Check compatibilities before beginning an update. Use the RHEL for Edge documentation specific to your update path.
Additional resources
1.5. Simultaneous MicroShift and operating system updates
You can update RHEL for Edge or RHEL and update MicroShift at the same time, on the condition that the versions are compatible. Use the following workflow:
- Check for compatibility before beginning an update.
- Use the RHEL for Edge and RHEL documentation specific to your update path to plan and update the operating system.
- Enable the correct MicroShift repository to ensure alignment between your RHEL and MicroShift versions.
- Use the MicroShift update type specific to your update path.
Chapter 2. Updating RPMs on an OSTree system
Updating MicroShift on an rpm-ostree
system such as Red Hat Enterprise Linux for Edge (RHEL for Edge) requires building a new RHEL for Edge image containing the new version of MicroShift and any associated optional RPMs. After you have the rpm-ostree
image with MicroShift embedded, direct your system to boot into that operating system image.
The procedures are the same for minor-version and patch updates. For example, use the same steps to upgrade from 4.16 to 4.17 or from 4.17.2 to 4.17.3.
Downgrades other than automatic rollbacks are not supported. The following procedure is for updates only.
2.1. Applying updates on an rpm-ostree system
To update MicroShift on an rpm-ostree
system such as Red Hat Enterprise Linux for Edge (RHEL for Edge), embed the new version of MicroShift on a new operating system image.
- Back up and system rollback are automatic with this update type.
- You can also use this workflow to update applications running in the MicroShift cluster. Ensure compatibility between the application and the adjacent versions of MicroShift and RHEL for Edge before starting an update.
The steps you use depends on how your existing deployment is set up. The following procedure outlines the general steps you can take, with links to the RHEL for Edge documentation. The RHEL for Edge documentation is your resource for specific details on building an updated operating system image.
Prerequisites
- The system requirements for installing MicroShift have been met.
- You have root user access to the host.
- The version of MicroShift you have is compatible with the RHEL for Edge image you are preparing to use.
You cannot downgrade MicroShift with this process. Downgrades other than automatic rollbacks are not supported.
Procedure
Create an image builder configuration file for adding the
rhocp-4.17
RPM repository source required to pull MicroShift RPMs by running the following command:$ cat > rhocp-4.17.toml <<EOF id = "rhocp-4.17" name = "Red Hat OpenShift Container Platform 4.17 for RHEL 9" type = "yum-baseurl" url = "https://cdn.redhat.com/content/dist/layered/rhel9/$(uname -m)/rhocp/4.17/os" check_gpg = true check_ssl = true system = false rhsm = true EOF
Add the update RPM source to the image builder by running the following command:
$ sudo composer-cli sources add rhocp-4.17.toml
Build a new image of RHEL for Edge that contains the new version of MicroShift. To determine the steps required, use the following documentation:
Update the host to use the new image of RHEL for Edge. To determine the steps required, use the following documentation:
Reboot the host to apply updates by running the following command:
$ sudo systemctl reboot
Chapter 3. About updating RPMs manually
Updating Red Hat build of MicroShift for non-OSTree systems such as Red Hat Enterprise Linux (RHEL) requires updating the RPMs. For patch releases, such as 4.17.1 to 4.17.2, simply update the RPMs. For minor-version release updates, add the step of enabling the update repository using your subscription manager.
You can back up application data as needed and move the data copy to a secure location when using any update type.
3.1. Applying patch updates using RPMs
Updating MicroShift on non rpm-ostree
systems such as Red Hat Enterprise Linux (RHEL) requires downloading then updating the RPMs. For example, use the following procedure to upgrade from 4.17.1 to 4.17.2.
Prerequisites
- The system requirements for installing MicroShift have been met.
- You have root user access to the host.
- The version of MicroShift you have is compatible to upgrade to the version you are preparing to use.
- You have verified that your host operating system is compatible with the version of MicroShift you are preparing to install.
- You have completed a system backup.
You cannot downgrade MicroShift with this process. Downgrades are not supported.
Procedure
Update the MicroShift RPMs by running the following command:
$ sudo dnf update microshift
Restart MicroShift by running the following command:
$ sudo systemctl restart microshift
The system health check runs on this update type, but does not perform any actions. If the update fails, an error message appears with the instruction to check the logs.
3.2. Applying minor-version updates with RPMs
Updating a MicroShift minor version on non rpm-ostree
systems such as Red Hat Enterprise Linux (RHEL) requires downloading then updating the RPMs. For example, use the following procedure to update from 4.16 to 4.17.
Prerequisites
- The system requirements for installing MicroShift have been met.
- You have root user access to the host.
- The version of MicroShift you have is compatible to upgrade to the version you are preparing to use.
- You have verified that your host operating system is compatible with the version of MicroShift you are preparing to install.
- You have completed a system backup.
You cannot downgrade MicroShift with this process. Downgrades are not supported.
Procedure
Enable the MicroShift repositories by running the following command:
$ sudo subscription-manager repos \ --enable rhocp-4.17-for-rhel-9-$(uname -m)-rpms \ --enable fast-datapath-for-rhel-9-$(uname -m)-rpms
Update the MicroShift RPMs by running the following command:
$ sudo dnf update microshift
Reboot the host to apply updates by running the following command:
$ sudo systemctl reboot
The system health check runs on this update type, but does not perform any actions. If the update fails, an error message appears with the instruction to check the logs.
Verification
Check if the health checks exited with a successful boot by running the following command:
$ sudo systemctl status greenboot-healthcheck
Check the health check logs by running the following command:
$ sudo journalctl -u greenboot-healthcheck
Additional resources
Chapter 4. Listing RPM update package contents
You can preview the contents of a MicroShift RPM package update before installing.
4.1. Listing the contents of the MicroShift RPM release package
To see the images included with a MicroShift release, you can list the contents of the microshift-release-info
RPM by downloading and unpacking the RPM.
Prerequisites
- You are using Red Hat Enterprise Linux (RHEL) or an operating system with an RPM package manager.
- Your MicroShift repositories are enabled.
Procedure
Optional: List which versions of the MicroShift RPM are available for download by running the following command:
$ sudo dnf repoquery microshift-release-info-0:4.17.* 1
- 1
- Replace the example value
4.17.*
with the major and minor release numbers you are interested in.
Example output
Updating Subscription Management repositories. microshift-release-info-0:4.17.1-202406281132.p0.g8babeb9.assembly.4.17.1.el9.noarch microshift-release-info-0:4.17.10-202408291007.p0.g6e4ee4d.assembly.4.17.10.el9.noarch microshift-release-info-0:4.17.2-202407040825.p0.g2e0407e.assembly.4.17.2.el9.noarch microshift-release-info-0:4.17.3-202407111123.p0.ge4206d3.assembly.4.17.3.el9.noarch microshift-release-info-0:4.17.4-202407191908.p0.g057a9af.assembly.4.17.4.el9.noarch microshift-release-info-0:4.17.5-202407250951.p0.g0afcb57.assembly.4.17.5.el9.noarch microshift-release-info-0:4.17.6-202408010822.p0.gc4ded66.assembly.4.17.6.el9.noarch microshift-release-info-0:4.17.7-202408081107.p0.g0597bb8.assembly.4.17.7.el9.noarch microshift-release-info-0:4.17.8-202408150851.p0.gc8a3bb1.assembly.4.17.8.el9.noarch microshift-release-info-0:4.17.9-202408220842.p0.gefa92a2.assembly.4.17.9.el9.noarch
Download the RPM package you want by running the following command:
$ sudo dnf download microshift-release-info-<release_version> 1
- 1
- Replace
<release_version>
with the numerical value of the release you are deploying, using the entire version number, for example,4.17.1
.
Example output
microshift-release-info-4.17.1.-202311101230.p0.g7dc6a00.assembly.4.17.1.el9.noarch.rpm 1
- 1
- Your output should contain the date and commit ID.
Unpack the RPM package without installing it by running the following command:
$ rpm2cpio <microshift_release_info> | cpio -idmv 1
- 1
- Replace
<microshift_release_info>
with the name of the RPM package from the previous step. For example,microshift-release-info-4.17.10-202408291007.p0.g6e4ee4d.assembly.4.17.10.el9.noarch.rpm
.
Example output
./usr/share/microshift ./usr/share/microshift/blueprint ./usr/share/microshift/blueprint/blueprint-aarch64.toml ./usr/share/microshift/blueprint/blueprint-x86_64.toml ./usr/share/microshift/release ./usr/share/microshift/release/release-aarch64.json ./usr/share/microshift/release/release-x86_64.json
List the contents by running the following command:
$ cat ./usr/share/microshift/release/release-x86_64.json
Example output
{ "release": { "base": "4.17.10" }, "images": { "cli": ".... # ...