Upgrade
All components in SUSE® Rancher Prime OS Manager are managed using Kubernetes. Below is how to use Kubernetes approaches to upgrade the components.
SUSE® Rancher Prime OS Manager node upgrade
SUSE® Rancher Prime OS Manager nodes are upgraded with the SUSE® Rancher Prime OS Manager Operator. Refer to the SUSE® Rancher Prime OS Manager Operator documentation for complete information.
Upgrade can be achieve either with CLI or UI:
Upgrade via command line interface
There are two ways of selecting nodes for upgrading. Via a cluster target, which will match ALL nodes in a cluster that matches our selector or via node selector, which will match nodes based on the node labels. Node selector allows us to be more targeted with the upgrade while cluster selector just selects all the nodes in a matched cluster.
Updating an existing ManagedOSImage
will trigger a new upgrade cycle, to reconcile the configured image (or image version) to all targeted nodes.
-
With 'clusterTarget'
-
With nodeSelector
-
With FORCE flag
-
With UPGRADE_RECOVERY flag
You can target nodes for an upgrade via a clusterTarget
by setting it to the cluster name that you want to upgrade. All nodes in a cluster that matches that name will match and be upgraded.
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade
namespace: fleet-default
spec:
# Set to the new SUSE® Rancher Prime OS Manager version you would like to upgrade to or track the latest tag
osImage: "registry.suse.com/suse/sle-micro/5.5:latest"
clusterTargets:
- clusterName: my-cluster
You can target nodes for an upgrade via a nodeSelector
by setting it to the label and value that you want to match. Any nodes containing that key with the value will match and be upgraded.
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade
namespace: fleet-default
spec:
# Set to the new SUSE® Rancher Prime OS Manager version you would like to upgrade to
osImage: "registry.suse.com/suse/sle-micro/5.5:latest"
clusterTargets:
- clusterName: my-cluster
nodeSelector:
matchLabels:
kubernetes.io/hostname: my-machine
When upgrading to an older version or the same version that is already running the upgrade-procedure will be skipped. It is possible to force upgrades to older versions by setting the FORCE environment variable as shown below.
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade
namespace: fleet-default
spec:
# Set to the new SUSE® Rancher Prime OS Manager version you would like to upgrade to
osImage: "registry.suse.com/suse/sle-micro/5.5:latest"
clusterTargets:
- clusterName: my-cluster
upgradeContainer:
envs:
- name: FORCE
value: "true"
You can decide upgrade the Recovery partition when upgrading the system, or alternatively to upgrade the Recovery partition only.
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade-recovery
namespace: fleet-default
spec:
# Set to the new SUSE® Rancher Prime OS Manager version you would like to upgrade to
osImage: "registry.suse.com/suse/sle-micro/5.5:latest"
clusterTargets:
- clusterName: my-cluster
upgradeContainer:
envs:
# Use UPGRADE_RECOVERY_ONLY to upgrade the recovery partition only. (This has the same effect as FORCE="true")
- name: UPGRADE_RECOVERY_ONLY
value: "false"
# Use UPGRADE_RECOVERY to upgrade both system and recovery partitions.
- name: UPGRADE_RECOVERY
value: "true"
Selecting source for upgrade
-
Via 'osImage'
-
Tab Via 'ManagedOSVersion'
Just specify an OCI image on the osImage
field
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade
namespace: fleet-default
spec:
# Set to the new SUSE® Rancher Prime OS Manager version you would like to upgrade to or track the latest tag
osImage: "registry.suse.com/suse/sle-micro/5.5:latest"
clusterTargets:
- clusterName: my-cluster
In this case we use the auto populated ManagedOSVersion
resources to set the wanted managedOSVersionName
field. See section [Managing available versions](#managing-available-versions) to understand how the ManagedOSVersion
are managed.
apiVersion: elemental.cattle.io/v1beta1
kind: ManagedOSImage
metadata:
name: my-upgrade
namespace: fleet-default
spec:
# Set to the new ManagedOSVersion you would like to upgrade to
managedOSVersionName: v0.1.0-alpha22-amd64
clusterTargets:
- clusterName: my-cluster
If both |
Managing available versions
It is possible to create ManagedOSVersions directly, or to subscribe to ManagedOSVersionChannels to automatically sync ManagedOSVersions
from them.
For more details and a list of available channels, or to even make your own, please read the documentation.
Upgrade via user interface
To upgrade via the UI, you have to go in the SUSE® Rancher Prime OS Manager Advanced menu, then click on Update Groups
.
Choose a name, select clusters to target and choose between the two upgrade ways:
-
Via Managed OS Version
-
Tab Via Image from registry
In this case, a OS Version Channels
is used to auto populated OS Versions
resources.
The channel bellow is provide by us but you can bring your own channel as well.
See section Managing available versions to understand how the ManagedOSVersion
are managed.
After a short syncing time, you will see your OS Versions
appears in the OS Versions
menu.
Finally, you can select the OS Versions
when you create your Upgrade Group
according to the following screenshot:
Just specify an OCI image on the Image path
field to upgrade to:
Click on the Create
button to start the upgrade process, if you have multiple nodes, the upgrade will be done sequentially node by node.