To install the interim fix on the Engineering Lifecycle Management instance, you need to
upgrade the Engineering Lifecycle Management operator to the version that supports the required interim
fix by using the CLI method.
Before you begin
- Ensure that the existing Engineering Lifecycle
Management setup is functional without any errors and all
Engineering Lifecycle Management applications are accessible.
- Check for the appropriate permissions to upgrade the Engineering Lifecycle Management operator.
For more information about user roles, see User roles mapping in Engineering Lifecycle Management on Hybrid Cloud
- Subscription Approval strategy
Identify installPlanApproval strategy for the installed
subscription by using following
command
oc get subscriptions <subscription-name> -o jsonpath="{.spec.installPlanApproval}'" -n <namespace-name>
Replace
the placeholders for
subscription-name and
namespace-name. For
example
oc get subscriptions ibm-elm-operator -o jsonpath="{.spec.installPlanApproval}'" -n example
Procedure
- Log in to your cluster by using the command supported by the container platform.
oc login --username=<cluster admin user> --password=<cluster admin password>
- Set the default project (namespace) as the one that contains the operator to be upgraded
by using the following command:
- Get a list of all the subscriptions in this project/namespace by using the following
command:
This step returns the lists of subscriptions in the namespace
| Name |
Package |
Source |
Channel |
ibm-elm-operator |
ibm-elm-operator |
ibm-elm-manifests |
release-elm7.1 |
From the information list received, identify the subscription name for the operator that needs to
be upgraded (from the Name column) and the corresponding package name (from the Package column)
- Confirm that the channel to which you want to upgrade is available. To get the available
operator channel versions for this release, replace package-name in the following
command, by using the information returned in the previous step
oc get packagemanifests --selector=catalog=<catalog-source-name> -o jsonpath='Avaiable Channels : {"\n\n"}{range .items[*].status.channels[*]}{.name}{"\n"}{end}' -n <catalog-source-namespace>
Replace the placeholders for
catalog-source-name and
catalog-source-namespace. For
example
oc get packagemanifests --selector=catalog=ibm-elm-manifests -o jsonpath='Avaiable Channels : {"\n\n"}{range .items[*].status.channels[*]}{.name}{"\n"}{end}' -n example
The command returns a list of channels, so you need to confirm that the channel to be
upgraded is available.
- Cluster administrator or a user with the necessary permissions needs to patch the
subscription to move to the available operator version.
oc patch subscription <subscription-name> --patch '{"spec":{"startingCSV":"<available-operator-version>"}}' --type=merge -n <namespace-name>
Replace the placeholders for subscription-name,
available-operator-version and namespace-name. For example
oc patch subscription ibm-elm-operator --patch '{"spec":{"startingCSV":"ibm-elm-operator.v1.1.0"}}' --type=merge -n example
Verify whether the channel is updated for the subscription by using following
command.
oc get subscription <subscription-name> -o jsonpath='Update channel : {.spec.channel}' -n <namespae-name
Replace the placeholders for
subscription-name and
namespace-name. For
example
oc get subscription ibm-elm-operator -o jsonpath='Update channel : {.spec.channel}' -n example
- Identify Subscription Approval strategy
Identify installPlanApproval strategy for the subscription by using following command
oc get subscriptions <subscription-name> -o jsonpath="{.spec.installPlanApproval}'" -n <namespace-name>
Replace the placeholders for subscription-name and
namespace-name. For example
oc get subscriptions ibm-elm-operator -o jsonpath="{.spec.installPlanApproval}'" -n example
- Subscription with an Automatic approval strategy
An automatic approval strategy for operator deployments means that new version of an operator is
automatically upgraded to the latest version available in the selected channel. The upgrade happens
without manual intervention and approval from a cluster administrator or user with the necessary
permissions.
Validate that the installed operator version is the latest available version in channel by using
the following command
oc get subscription <subscription-name> -o=jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n <namespace-name>
Replace the placeholders for
subscription-name and
namespace-name. For
example
oc get subscription ibm-elm-operator -o=jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n example
- Subscription with a Manual approval strategy
Manual approval strategy for operator deployments means that new version of an operator doesn't
get upgraded to the latest version available in the selected channel. It requires manual
intervention and approval from a cluster administrator or user with the necessary permissions.
Cluster administrator or user with the necessary permissions needs to patch the subscription to move
to the available operator version.
List the available operator version in the current channel by using the following command
oc get subscription <subscription-name> -o=jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n <namespace-name>
Replace the placeholders for
subscription-name and
namespace-name. For
example
oc get subscription ibm-elm-operator -o=jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n <namespace-name>
Patch the available operator version in current
channel.
oc patch subscription <subscription-name> --patch '{"spec":{"startingCSV":"<available-operator-version>"}}' --type=merge -n <namespace-name>
Replace the placeholders for
subscription-name and
namespace-name. For
example
oc patch subscription ibm-elm-operator --patch '{"spec":{"startingCSV":"ibm-elm-operator.v1.1.0"}}' --type=merge -n example
- Approve InstallPlan
The InstallPlan needs to be manually approved by a cluster administrator or a user with the
necessary permissions. When approved, the resources get created to satisfy the requirements for the
components specified in the plan.
- Get InstallPlan
oc patch installplan <installplan-name> --patch '{"spec":{"approved":true}}' --type=merge -n <namespace-name>
Replace the placeholders for subscription-name and
namespace-name. For example
oc patch installplan install-4hm69 --patch '{"spec":{"approved":true}}' --type=merge -n example
- Approve InstallPlan
oc patch installplan <installplan-name> --patch '{"spec":{"approved":true}}' --type=merge -n <namespace-name>
Replace the placeholders for installplan_name and
namespace-name. For example
oc patch installplan install-4hm69 --patch '{"spec":{"approved":true}}' --type=merge -n example
- Verify the operator upgrade
On the successful upgrade, if you find that the installed and available operator versions are the
same. You need to re-run the command to verify the upgrade and check the installed operator version
by using the following
command.
oc get subscription <subscription-name> -o jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n <namespace-name>
Replace the placeholders for
subscription-name and
namespace-name. For
example
oc get subscription ibm-elm-operator -o jsonpath='Installed Operator Version : {.status.installedCSV} {"\n"}Available Operator Version : {.status.currentCSV}' -n example