Installing License Service on the OpenShift Container Platform version 4.10 or later

Learn how to install the License Service on OpenShift Container Platform.

Prerequisites

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:

Installing the License Service with OpenShift console

To install the License Service with console, do the following steps:

  1. Create the CatalogSource to get the operator bundles.

    1. Log in to the OpenShift console.

    2. Click the plus icon on the header.

    3. 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
      
    4. Click Create.

  2. 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, replace ibm-licensing with your custom namespace.

    1. Go to Operators > Operator Hub.

    2. Expand the list of Projects.

    3. Select Create Project.

      The image shows how to create a Project in the OpenShift console.

    4. Enter ibm-licensing as a name and click Create.

      The image shows how to create the ibm-licensing namespace.

  3. Install the IBM Licensing package in OperatorHub.

    1. 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.

    2. Select IBM Licensing and click Install.

      The image shows the IBM Licensing installation window.

    3. Set the Update Channel to the v4.2 version.

    4. Set the Installation mode to A specific namespace on the cluster.

    5. Set the Installed Namespace to Select a Namespace, and select the ibm-licensing namespace.

    6. Set Update approval to Automatic.

    7. Click Install.

  4. 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 image shows the status of correctly installed IBM Licensing operator

    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.

  5. Configure the IBM Licensing instance if required. For more information, see Configuring License Service.

  6. 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, click ibm-licensing-service-instance and check its logs and events.

The installation of License Service is completed and running in your cluster.

Installing the License Service with CLI

Note: 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.

If you install the License Service in cs-control or ibm-common-services namespace and multiple IBM Cloud Paks run on the same cluster, upgrade the License Service to the latest version.

If a single instance of IBM Cloud Pak runs on the cluster, you can install the License Service in the ibm-licensing namespace.

To install the License Service with console, do the following steps:

  1. Log in to the cluster by using the oc login command.

  2. Create the License Service catalog source:

    1. 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
      
    2. Apply the YAML file to create the License Service catalog source.

      oc apply -f license-service-catalog.yaml
      
    3. Verify that the CatalogSource for your IBM License Service operator is created.

      oc get pods -n openshift-marketplace
      oc get catalogsource -n openshift-marketplace
      
  3. Install the IBM License Service operator.

    1. Create a namespace for the License Service.

      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, replace ibm-licensing with your custom namespace.

      export NAMESPACE=ibm-licensing
      
      oc create namespace $NAMESPACE
      
    2. 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
      
    3. 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
      
  4. 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.

Verification

To check whether License Service components are properly installed and running, see Validating License Service deployments.