Configuring the connection to License Service Reporter by using the OpenShift console

You can configure the connection to License Service Reporter by using the OpenShift console. To configure the connection, perform the following steps.

Note: If IBM products are installed in multiple namespaces, you need to update the configuration CR in each namespace.

To configure the connection, perform the following steps:

  1. Create the ConfigMap.
  2. Create the secret.
  3. Update the configuration CR.

Creating the ConfigMap

To create a ConfigMap that is used to configure the connection to License Service Reporter, perform the following steps.

  1. Log in to the OpenShift console of the cluster where you deployed License Service Reporter.
  2. Obtain the URL of the License Service Reporter.
    1. Open the License Service Reporter namespace.
    2. Go to Networking > Routes.
    3. Copy the URL of the ibm-license-service-reporter route, and paste it to the YAML example that is provided in step 5d.
  3. Optional: Obtain the tls.crt of License Service Reporter.
    1. Go to Workloads > Secrets.
    2. Click ibm-license-service-reporter-cert.
    3. Copy the tls.crt, and paste it to the YAML example that is provided in step 5d.
  4. Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
  5. Create a ConfigMap.
    1. Open the namespace of the product.
    2. Go to Workloads > ConfigMaps.
    3. Click Create ConfigMap, and select YAML view.
    4. Paste the edited YAML example, and click Create.
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: <name>
      data:
        url: '<License Service Reporter URL>'
        tls.crt: |
          <License Service Reporter certificate>
      
      Where:
      • name is the name of your choice.
      • url is the URL to License Service Reporter. This parameter is obligatory.
      • tls.crt specifies the TLS certificate of License Service Reporter. This parameter is optional.

Creating the secret

To create the secret that is used to configure the connection to the License Service Reporter, perform the following steps.

  1. Log in to the OpenShift console of the cluster where you deployed License Service Reporter.
  2. Obtain the token of the License Service Reporter.
    1. Open the License Service Reporter namespace.
    2. Go to Workloads > Secrets, and select the ibm-ls-reporter namespace.
    3. Select ibm-license-service-reporter-token, copy the token, and paste it to the YAML example that is provided in step 4.d.
    4. Convert the token to the Base64 format. You can do this by using the following Bash command. The encoded token is printed in the console. You can also use a different method of your choice.
      export TOKEN = <token>
       printf %s "$TOKEN" | base64 | tr-d'\n'
  3. Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
  4. Create a secret.
    1. Open the namespace of the product.
    2. Go to Workloads > Secrets.
    3. Expand the Create menu, and select From YAML.
    4. Paste the edited YAML example, and click Create.
      kind: Secret
      apiVersion: v1
      metadata:
        name: <name>
      data:
        token: <License Service Reporter token>
      type: Opaque
      
      Where:
      • name is the name of your choice.
      • token is the token of License Service Reporter.

Updating the configuration CR

To create the configuration CR, perform the following steps.

  1. Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
  2. Open the namespace of the product.
  3. Go to Operators > Installed Operators.
  4. Click IBM Usage Metering Operator, and open the IBM Usage Metering tab.
  5. Click ibm-usage-metering-instance, and open the YAML tab.
  6. Add the following content to the spec section in the YAML and click Save.
    spec:
      sender:
        reporter:
          configMapName: <Name of the ConfigMap>
          secretName: <Name of the secret>
    
    Where: