Installing the IBM Metrics Operator for telemetry data collection

To report license usage for IBM Cloud Pak for Data to IBM Software Central, you must install the IBM Metrics Operator on the cluster.

Who needs to complete this task?

Cluster administrator A cluster administrator must complete this task.

When do you need to complete this task?

The IBM Metrics Operator is installed once per cluster and is shared by all instance of IBM Cloud Pak for Data on the cluster.

Repeat as needed Repeat this task for each cluster that you want to connect to IBM Software Central.

Before you begin

Before you install the operators, ensure that the following tasks are complete:

  1. Complete Configuring the monitoring stack in the Red Hat® OpenShift® Container Platform documentation:
  2. Complete Enabling monitoring for user-defined projects in the Red Hat OpenShift Container Platform documentation:
  3. Configure a default storage class:
    1. Check whether there is a default storage class configured on the cluster:
      oc get storageclass

      The default storage class is indicated by (default).

    2. If no default storage class is configured, run the following command to configure a default storage class:
      oc patch storageclass ${STG_CLASS_FILE} \
      --patch='{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
    3. Confirm that the STG_CLASS_FILE storage class is now the default storage class:
      oc get storageclass

About this task

The IBM License Service tracks license usage for IBM products that are deployed on a Red Hat OpenShift Container Platform cluster. The License Service tracks Virtual Processor Core (VPC) and Processor Value Unit (PVU) metrics.

When you install the IBM Metrics Operator on the cluster, the License Service uses the IBM Metrics Operator to send license usage data to IBM Software Central.

Install the IBM Metrics Operator in the ibm-software-central project.

Procedure

To install the IBM Metrics Operator:

  1. Log in to Red Hat OpenShift Container Platform as a user with sufficient permissions to complete the task.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  2. Create the ibm-software-central project:
    oc new-project ibm-software-central
  3. Install the IBM Metrics Operator:

    You can either:

    • Install the IBM Metrics Operator from the Certified Operators catalog on the OperatorHub.
    • Install the IBM Metrics Operator by running the following command to create the operator subscription:
      oc apply -f "https://swc.saas.ibm.com/provisioning/v1/rhm-operator/rhm-operator-subscription?metrics=true&approvalStrategy=Automatic"
  4. Create a pull secret named redhat-marketplace-pull-secret in the ibm-software-central project:
    1. Set the PULL_SECRET environment variable to your IBM Software Central pull secret:
      export PULL_SECRET=<your-pull-secret>
    2. Run the following command to create the secret:
      oc create secret generic redhat-marketplace-pull-secret \
      --namespace=ibm-software-central \
      --from-literal=PULL_SECRET=${PULL_SECRET}
  5. Accept the license.
    oc patch marketplaceconfig marketplaceconfig \
    --namespace=ibm-software-central \
    --type='merge' \
    --patch='{"spec": {"license": {"accept": true}}}'​

What to do next

Now that you've installed the IBM Metrics Operator, you're ready to complete Installing the IBM Data Reporter Operator for telemetry data collection.