Backup and upgrading License Service
Learn how to back up and upgrade License Service.
Backup License Service
License Service collects the license usage data and stores in the persistent cluster memory and is not affected when you kill or restart a pod.
It is recommended to generate an audit snapshot periodically for backup purposes and store it in a safe location. You do not need to perform any other backup.
Note: Before decommissioning a cluster, generate an audit snapshot to record the license usage of the products until the day of decommissioning.
Upgrading License Service
Environment | Current version | Upgrading to the latest version |
---|---|---|
Online | 4.2.x or later | License Service is automatically upgraded with the latest operator release. |
Online | 4.0.x or 4.1.x | Upgrading License Service from version 4.0 or 4.1 to 4.2 or later |
Online | 1.x | Upgrading License Service from version 1.x to 4.x |
Installation without OLM or Offline | Any | Uninstall License Service from the cluster and deploy it again. |
Note: The license usage data is stored in the persistent cluster memory and must not be affected by reinstallation of License Service. It is recommended to create an audit snapshot before reinstalling a License Service as a precaution measure.
Checking your current version
To check your current version of License Service, run the following command:
kubectl get clusterserviceversion -n ibm-licensing
Note: The ibm-licensing
namespace is the default namespace of the License Service. If you installed the License Service in a custom namespace for your cluster, replace ibm-licensing
with your custom namespace.
This method is applicable only for online installations.
Upgrading License Service from version 4.0 or 4.1 to 4.2 or later
-
Log in to the cluster.
-
Update the
ibm-licensing-catalog
CatalogSource with the latest release version.apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-licensing-catalog namespace: openshift-marketplace spec: displayName: ibm-licensing publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-licensing-catalog updateStrategy: registryPoll: interval: 45m
-
Update the CatalogSource for the subscription of the operator.
licensingNamespace=ibm-licensing subName=ibm-licensing-operator-app kubectl patch subscription ${subName} -n ${licensingNamespace} --type=merge -p '{"spec": {"source":"ibm-licensing-catalog"}}'
-
Update the subscription channel.
kubectl patch subscription ${subName} -n ${licensingNamespace} --type=merge -p '{"spec": {"channel":"v4.2"}}'
Upgrading License Service from version 1.x to 4.x
From License Service version 4.x, ibm-licensing
namespace is the recommended namespace to deploy the License Service.
To upgrade from License Service version 1.x to 4.x, complete the following steps:
-
Log in to the cluster.
-
Copy the applicable
ConfigMaps
from the namespace where the License Service version 1.x is installed to theibm-licensing
namespace.You can copy the following ConfigMaps if available in the namespace where the License Service version 1.x is installed:
ibm-licensing-config ibm-licensing-annotations ibm-licensing-products ibm-licensing-products-vpc-hour ibm-licensing-cloudpaks ibm-licensing-products-groups ibm-licensing-cloudpaks-groups ibm-licensing-cloudpaks-metrics ibm-licensing-products-metrics ibm-licensing-products-metrics-groups ibm-licensing-cloudpaks-metrics-groups ibm-licensing-services
-
Uninstall the IBM Licensing operator version 1.x only.
Note: It is not necessary to delete the
IBMLicensing
instance of IBM Licensing operator version 1.x. The installation of the IBM Licensing operator version 4.x detects the existingIBMLicensing instance
automatically and manages the instance. -
Apply the
ibm-licensing-catalog
CatalogSource with the latest release version.apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-licensing-catalog namespace: openshift-marketplace spec: displayName: ibm-licensing publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-licensing-catalog updateStrategy: registryPoll: interval: 45m
-
Install IBM Licensing operator version 4.x. For more information, see Installing License Service.
-
Delete the
ibm-licensing-service-instance
deployment from the namespace of License Service version 1.x.