Metering and tracking usage for execution Java API
Before you use the execution Java™ API, you must enable metering to track usage. Metering annotations allow you to track usage based on the limits that are defined on your Kubernetes container. You configure your Kubernetes containers that use the execution Java API by adding specific annotations that License Service uses to track usage.
Before you begin
License Service must be installed on your Kubernetes cluster where the containers that use the execution Java API are deployed. For information about the supported environment and installation instructions, see the ibm-licensing-operator section on GitHub.
For more information about License Service for IBM Cloud Paks, see License Service.
Adding annotations for tracking usage
License Service processes pod annotations to track licenses. Specific metering annotations in the
spec.template.metadata.annotations
section of your Kubernetes pod template are used
for the containers that use the execution Java API.
- Production deployment
- Non production deployment
spec:
template:
metadata:
annotations:
cloudpakId: "94a9c8c358bb43ba8fbdea62e7e166a5"
cloudpakName: "IBM Cloud Pak for Business Automation"
cloudpakVersion: "23.0.1"
productMetric: "VIRTUAL_PROCESSOR_CORE"
productVersion: "23.0.1"
productID: "3f1d7caa69374823813c79d48dce6a1f"
productName: "Automation Decision Services - CP4BA"
productCloudpakRatio: "1:4"
productChargedContainers: <containername>
spec:
template:
metadata:
annotations:
cloudpakId: "94a9c8c358bb43ba8fbdea62e7e166a5"
cloudpakName: "IBM Cloud Pak for Business Automation"
cloudpakVersion: "23.0.1"
productMetric: "VIRTUAL_PROCESSOR_CORE"
productVersion: "23.0.1"
productID: "867ac1b08acd40b691d68cc5c3e47d66"
productName: "Automation Decision Services - CP4BA - Non Prod"
productCloudpakRatio: "1:2"
productChargedContainers: <containername>
The name of the container must be set to <containername> as it is set in the spec.template.spec.containers.name parameter in your pod template.