Installing License Service on OpenShift Container Platform
Learn how to install the License Service on OpenShift Container Platform.
- Prerequisites
- Verifying the installation of License Service in OpenShift cluster
- Installing License Service
- Verification
Prerequisites
- A cluster with the supported OpenShift Container Platform version. License Service is supported on the supported OpenShift Container Platform versions that are in
full
,maintenance
, andextended support
life cycle phase. For more information, see Red Hat OpenShift Container Platform Life Cycle Policy in Red Hat OpenShift documentation. - Administrator permissions for the OpenShift cluster.
- Access to the OpenShift console.
Before installation, see Supported platforms and hardware requirements to check the installation requirements.
Verifying the installation of License Service in OpenShift cluster
For the OpenShift cluster, check whether the License Service is installed in cs-control
or ibm-common-services
namespace of the cluster to prevent the use of the multiple License Service copies to report the license
usage of multiple IBM Cloud Paks that are running on the same cluster.
You can verify the installation of License Service in cs-control
or ibm-common-services
namespace with one of the following methods:
-
To verify the installation of License Service with OpenShift console, complete the following steps:
-
Go to Operators > Installed Operators.
-
Select your project from the Project drop-down list.
-
Search for the IBM Licensing name in the
Installed Operators
page. TheInstalled Operators
displays the installed License Service. -
Check whether the
cs-control
oribm-common-services
namespace is displayed in theNamespace
section.Note: If the License Service is installed in
cs-control
oribm-common-services
namespace and multiple IBM Cloud Paks run on the same cluster, upgrade the License Service to the latest version. For more information, see Upgrading foundational services.If a single instance of IBM Cloud Pak runs on the cluster, you can install the License Service in the
ibm-licensing
namespace. -
If the
Installed Operators
page displaysNo Operators found
, install the License Service with one of the following methods:
-
-
To verify the installation of License Service with CLI, run the following command:
oc get csv -n ibm-common-services | grep ibm-licensing-operator oc get csv -n cs-control | grep ibm-licensing-operator
If the output is displayed, the License Service is installed in
cs-control
oribm-common-services
namespace.Note: If the License Service is installed in
cs-control
oribm-common-services
namespace and multiple IBM Cloud Paks run on the same cluster, upgrade the License Service to the latest version. For more information, see Upgrading foundational services.If a single instance of IBM Cloud Pak runs on the cluster, you can install the License Service in the
ibm-licensing
namespace.If the output is not displayed, install the License Service with one of the following methods:
Installing License Service
You can install License Service with OpenShift console or with CLI. Choose one of the following procedures to complete the installation with your preffered method.
Installing License Service with OpenShift console
-
Create the CatalogSource to get the operator bundles.
-
Log in to the OpenShift console.
-
Click the plus icon on the header.
-
Copy the following CatalogSource into the editor.
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-licensing-catalog namespace: openshift-marketplace spec: displayName: IBM License Service Catalog publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-licensing-catalog updateStrategy: registryPoll: interval: 45m
- Click Create.
-
-
Create the
ibm-licensing
namespace.Note: The
ibm-licensing
namespace is the default namespace of the License Service. If you need to install the License Service in a custom namespace for your cluster, replaceibm-licensing
with your custom namespace.-
Go to Operators > Operator Hub.
-
Expand the list of Projects.
-
Select Create Project.
-
Enter ibm-licensing as a name and click Create.
-
-
Install the IBM Licensing package in OperatorHub.
- Go to OperatorHub and search for the IBM Licensing operator.
Note: It might take a few minutes to display the operator in the OperatorHub. If the operator is not displayed in the OperatorHub, there is an issue with the CatalogSource.
-
Select IBM Licensing and click Install.
-
Set the Update Channel to the
v4.2
version. -
Set the Installation mode to A specific namespace on the cluster.
-
Set the Installed Namespace to Select a Namespace, and select the
ibm-licensing
namespace. -
Set Update approval to Automatic.
-
Click Install.
-
Verify that the installation is successful.
To check whether the installation is successful, wait for about 1 minute, and go to Installed operators. You can see
IBM Licensing
in the Succeeded status.The
IBM Licensing
operator is installed for the License Service. The operator is only responsible for watching over the configuration and managing resources of IBM Licensing. -
Configure the IBM Licensing instance if required. For more information, see Configuring License Service.
-
Check whether the pod is created and has
Running
status. It might take a few minutes.To view the logs, go to Workloads > Pods and, search for ibm-licensing-service-instance in the
ibm-licensing
project. For more information, clickibm-licensing-service-instance
and check its logs and events. -
Update the License Service instance that was created during installation to accept the license.
-
Go to Operators > Installed Operators.
-
From the Project drop-down list, select All Projects
-
Select IBM Licensing Operator.
-
Select the IBM License Service tab. The instance of License Service custom resource is listed.
-
From the overflow action menu, select Edit IBMLicensing.
-
Edit the YAML and add the following lines under
spec
section.spec: license: accept: true
-
Click Save.
-
The installation of License Service is completed and running in your cluster.
Installing License Service with CLI
-
Log in to the cluster by using the
oc login
command. -
Create the License Service catalog source:
-
Create a YAML file named
license-service-catalog.yaml
with the following definition:apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: ibm-licensing-catalog namespace: openshift-marketplace spec: displayName: IBM License Service Catalog publisher: IBM sourceType: grpc image: icr.io/cpopen/ibm-licensing-catalog updateStrategy: registryPoll: interval: 45m
-
Apply the YAML file to create the License Service catalog source.
oc apply -f license-service-catalog.yaml
-
Verify that the
CatalogSource
for your IBM License Service operator is created.oc get pods -n openshift-marketplace oc get catalogsource -n openshift-marketplace
-
-
Install the IBM License Service operator.
-
Create a namespace for License Service.
Note: The
ibm-licensing
namespace is the default namespace of the License Service. If you need to install License Service in a custom namespace for your cluster, replaceibm-licensing
with your custom namespace.export NAMESPACE=ibm-licensing
oc create namespace $NAMESPACE
-
Create the operator group to deploy the
OperatorGroup
resource.cat <<EOF | oc apply -f - apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: licensing-og namespace: ibm-licensing spec: targetNamespaces: - ibm-licensing EOF
-
Create the subscription for License Service.
export LS_CHANNEL=v4.2
cat <<EOF | oc apply -f - apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: ibm-licensing-operator-app namespace: ibm-licensing spec: channel: $LS_CHANNEL installPlanApproval: Automatic name: ibm-licensing-operator-app source: ibm-licensing-catalog sourceNamespace: openshift-marketplace EOF
-
-
Verify that your IBM License Service operator is installed:
oc get pod -n $NAMESPACE
It might take up to 15 minutes for all the pods to show the
Running
status. -
Update the License Service instance that was created during installation to accept the license.
-
Create the
accept-license.yaml
file with the following content:spec: license: accept: true
-
Run the following command:
oc patch IBMLicensing instance --type merge --patch-file accept-license.yaml
-
Verification
To check whether License Service components are properly installed and running, see Validating License Service deployments.