IBM Turbonomic can be used to optimize
the usage of resources by your IBM® Business Automation
Workflow deployments. 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
. The following procedure assumes Turbonomic is installed and Kubeturbo
is reporting cluster data.
About this task
Business Automation Workflow
deployments are managed by the CP4BA operators 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 the Business Automation Workflow deployment directly.
Instead, it uses Operator Resource Mappings (ORMs) to write recommended resource values into the
corresponding CR, and the CP4BA operator then reconciles the values to the pods.
Turbonomic must be granted
access to write to your Business Automation Workflow deployment CRs.
Grant access by adding the relevant API groups and resource kinds to the ormOwners
section of the Kubeturbo CR.
Procedure
- Grant Turbonomic
access to the Business Automation Workflow custom resources. Update the
ormOwners in the Kubeturbo CR with the Business Automation Workflow API groups and
resource kinds.
The following example shows the Business Automation Workflow API groups
(icp4a.ibm.com and bai.ibm.com) and the resource kinds
(icp4aclusters, contents, and insightsengines) in
the Kubeturbo CR.
spec:
ormOwners:
apiGroup:
- icp4a.ibm.com
- bai.ibm.com
resources:
- icp4aclusters
- contents
- wfpsruntimes
- processfederationservers
- businessautomationmachinelearnings
exclusionDetectors:
operatorControlledWorkloadsPatterns:
- bawdeploy-mls-wfi
- bawdeploy-mls-itp
- bawdeploy-bastudio-deployment
- bawdeploy-workflow-server-agent
- pfsdeploy-pfs
- workflow-runtime-mcp-server-deploy-ins1
- bawdeploy-bawins1-baw-server
- bawdeploy-bawins2-baw-server
- Generate and apply the ORM definitions for the Business Automation Workflow components by using the
turbo-orm-generator.sh script.
The turbo-orm-generator.sh script generates Turbonomic Operator Resource Mapping
(ORM) definitions for Business Automation Workflow components that are
deployed in a specified namespace. You can also use the script to apply the generated ORM resources
to the cluster. The script is in the Turbonomic directory of the
cert-kubernetes-baw repository.
Important: Before you run the script, ensure that the jq and yq utilities are installed.
- To start the script in interactive mode, run the following command:
./turbo-orm-generator.sh
The script detects the available command-line interface and prompts you for the namespace and operation mode.
- Alternatively, you can specify command-line options:
ORM definitions are generated based on the Business Automation Workflow workloads that are currently deployed in the specified namespace. The script uses template files in the ORMs/ directory as the basis for generating ORM mappings. Generated ORM files are written to the generated-orms/ directory.
Tip: Review and modify the generated ORM files as needed before you apply them to the cluster.
- In the Turbonomic
user interface, click , select the Kubeturbo target, and click
Rediscover so that Kubeturbo discovers the newly applied ORMs.
- Verify that each ORM is recognized and its mapped resources are found in the cluster by
running the following command.
oc 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 Workflow CRs rather than to
the Deployments themselves. The CP4BA operators reconcile the values and
apply them to the running pods.