Installing License Service on OpenShift Container Platform
Learn how to install License Service on OpenShift Container Platform.
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 if License Service is already installed on the cluster
Check if License Service is already installed on the cluster to prevent the use of multiple License Service copies to report the license usage of multiple IBM Cloud Paks that are running on the same cluster.
Important: If you install multiple instances of License Service on one cluster, License Service generates an incorrect license usage report.
To check if License Service is already installed on the cluster, use 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 All Projects from the Project drop-down list.
-
Search for IBM Licensing.
-
If the operator is found on the list of Installed Operators, License Service is already installed on the cluster. Upgrade to the latest version to benefit from all newest features and improvements. For more information, see Backing up and upgrading License Service.
-
If the operator is not found and you get the
No Operators found
message, License Service is not installed on the cluster. Proceed with the installation.
-
-
-
To verify the installation of License Service with CLI, run the following command:
oc get deployment --all-namespaces | grep ibm-licensing-operator
-
If you get a deployment in response, License Service is already installed on the cluster. Upgrade to the latest version to benefit from all newest features and improvements. For more information, see Backing up and upgrading License Service.
-
If you get no deployments in response, proceed with the installation of License Service.
-
Installing License Service
You can install License Service with OpenShift console or with the CLI. Choose one of the following procedures to complete the installation with your preferred 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 recommended namespace for License Service installation is
ibm-licensing
. The commands in the installation instructions contain this default namespace. However, you can install License Service in any other custom namespace. If you install License Service in a custom namespace, replaceibm-licensing
with the name of the 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 on 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 recommended namespace for License Service installation is
ibm-licensing
. The commands in the installation instructions contain this default namespace. However, you can install License Service in any other custom namespace. If you install License Service in a custom namespace, replaceibm-licensing
with the name of the 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 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
-
Verifying installation
To check whether License Service components are properly installed and running, see Validating License Service deployments.