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:
Creating the ConfigMap
To create a ConfigMap that is used to configure the connection to License Service Reporter, perform the following steps.
- Log in to the OpenShift console of the cluster where you deployed License Service Reporter.
- Obtain the URL of the License Service Reporter.
- Open the License Service Reporter namespace.
- Go to Networking > Routes.
- Copy the URL of the
ibm-license-service-reporterroute, and paste it to the YAML example that is provided in step 5d.
- Optional: Obtain the
tls.crtof License Service Reporter.- Go to Workloads > Secrets.
- Click ibm-license-service-reporter-cert.
- Copy the
tls.crt, and paste it to the YAML example that is provided in step 5d.
- Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
- Create a ConfigMap.
- Open the namespace of the product.
- Go to Workloads > ConfigMaps.
- Click Create ConfigMap, and select YAML view.
- 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:-
nameis the name of your choice. -
urlis the URL to License Service Reporter. This parameter is obligatory. -
tls.crtspecifies 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.
- Log in to the OpenShift console of the cluster where you deployed License Service Reporter.
- Obtain the token of the License Service Reporter.
- Open the License Service Reporter namespace.
- Go to Workloads > Secrets, and select the ibm-ls-reporter namespace.
- Select ibm-license-service-reporter-token, copy the token, and paste it to the YAML example that is provided in step 4.d.
- 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'
- Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
- Create a secret.
- Open the namespace of the product.
- Go to Workloads > Secrets.
- Expand the Create menu, and select From YAML.
- Paste the edited YAML example, and click Create.
kind: Secret apiVersion: v1 metadata: name: <name> data: token: <License Service Reporter token> type: OpaqueWhere:nameis the name of your choice.tokenis the token of License Service Reporter.
Updating the configuration CR
To create the configuration CR, perform the following steps.
- Log in to the OpenShift console of the cluster where the product for which you want to display the data is deployed.
- Open the namespace of the product.
- Go to Operators > Installed Operators.
- Click IBM Usage Metering Operator, and open the IBM Usage Metering tab.
- Click ibm-usage-metering-instance, and open the YAML tab.
- Add the following content to the
specsection in the YAML and click Save.spec: sender: reporter: configMapName: <Name of the ConfigMap> secretName: <Name of the secret>Where:-
configMapNameis the name of the ConfigMap that you created in Creating the ConfigMap. -
secretNameis the name of the secret that you created in Creating the secret.
-
Results
Connection is set up. By default, usage data is sent every 24 hours at 12:05 AM UTC. For more information about the default behavior and possible customizations, see Configuring the frequency and scope of sending the data.