Optimizing resource usage with IBM Turbonomic

IBM Turbonomic can be used to optimize the usage of resources by your Business Automation Insights deployment. Turbonomic is an AI-powered solution that continuously analyzes workload demand and automates CPU and memory adjustments to keep applications performant and cost-efficient.

Before you begin

Turbonomic connects to your Red Hat OpenShift cluster through Kubeturbo, an agent that collects real-time resource metrics and reports them to Turbonomic for optimization analysis. To use Turbonomic, install and configure the IBM Turbonomic Platform operator and connect your OpenShift cluster as a target. For more information, see the IBM Turbonomic documentation External link opens a new window or tab. The following procedure assumes Turbonomic is installed and Kubeturbo is reporting cluster data.

About this task

Business Automation Insights deployment is managed by the Business Automation Insights operator through custom resources (CRs). If resource values are changed directly on a deployment, the operator reverts them during its next reconciliation. For this reason, Turbonomic does not modify Business Automation Insights deployment directly. Instead, it uses Operator Resource Mappings (ORMs) to write recommended resource values into the corresponding CR, and the Business Automation Insights operator then reconciles the values to the pods.

Two prerequisites are specific to Business Automation Insights and are not covered by the Turbonomic documentation:

  • Business Automation Insights deployment custom resources do not include a resources parameter by default. Because Turbonomic can update only the fields that exist, you must add an empty resources: {} block to each component section you want optimized before you apply any ORM.

  • Turbonomic must be granted access to write to your Business Automation Insights deployment CRs. Grant access by adding the relevant API groups and resource kinds to the ormOwners section of the Kubeturbo CR.

Procedure

  1. Add an empty resources: {} block to each Business Automation Insights component section in your Business Automation Insights deployment CR that you want Turbonomic to manage.
    spec:
      bai_configuration:
        management:
          resources: {} 
        business_performance_center:
          resources: {}
  2. Grant Turbonomic access to the Business Automation Insights custom resources. Update the ormOwners in the Kubeturbo CR with the Business Automation Insights API groups and resource kinds.

    The following example shows the Business Automation Insights API group (bai.ibm.com and the resource kind insightsengines in the Kubeturbo CR.

    spec:
      ormOwners:
        apiGroup:
        - bai.ibm.com
        resources:
        - insightsengines
  3. Apply the ORM definitions for the Business Automation Insights components.

    The ORM files are available from the cert-kubernetes repository under the Turbonomic folder. Run the ORM script, and set the -n parameter to your Business Automation Insights deployment namespace.

    ./apply-orm.sh -n <namespace>
  4. In the Turbonomic user interface, click Settings > Target Configuration, select the Kubeturbo target, and click Rediscover so that Kubeturbo discovers the newly applied ORMs.
  5. Verify that each ORM is recognized and its mapped resources are found in the cluster by running the following command.
    kubectl get orm -n <namespace> <orm-name> -o yaml

    The status section reports whether the capabilities defined in the ORM are matched in the cluster.

Results

Turbonomic analyzes usage and writes resize recommendations into the Business Automation Insights CRs rather than to the Deployments themselves. The Business Automation Insights operators reconcile the values and apply them to the running pods.

What to do next

If you no longer want Turbonomic to manage Business Automation Insights resources through Operator Resource Mappings (ORM), you can remove the ORM from the cluster.

Run the ORM script with the uninstall option (-U), and set the -n parameter to your Business Automation Insights deployment namespace.

./apply-orm.sh -n <namespace> -U

The script removes all the Business Automation Insights ORM resources that you previously installed.