Some IBM® Software
Hub services
support autoscaling by using the Red Hat®
OpenShift® Horizontal Pod Autoscaler (HPA).
The HPA changes the resource allocation of services by increasing or decreasing the number of
pods in response to CPU or memory consumption.
- Permissions that you need for this task
- You must be either:
- A cluster administrator
- An instance administrator
- When you need to complete this task
- When you want to dynamically scale resources for services based on usage.
Instead of using the manual, fixed approach to scaling resources for services, you can enable
autoscaling to dynamically scale resources up and down based on the user workloads.
Autoscaling helps ensure that clusters are not underutilized while workloads that require more
resources cannot use the available resources.
For most services, you can use cpd-cli
manage
apply-hpa-config
command to enable autoscaling. Some services support autoscaling, but you need to enable it
through a different method.
The following table shows the services that support autoscaling and whether you use the cpd-cli command to enable it. You can see instructions for enabling autoscaling
for each service in the procedure for automatically scaling resources for services.
Before you begin
Best practice: You can run the commands in
this task exactly as written if you set up environment variables. For instructions, see
Setting up
installation environment variables.
Ensure
that you source the environment variables before you run the commands in this task.
For the cpd-cli command, you can set autoscaling for the
services individually, or you can set autoscaling for several services by using the
--components option. Specify a comma-separated list of component names to
set all the components at the same time, for example:
--components=zen,dp,ws \
--enable_hpa=true
If you want to scale a service that does not use the default custom resource name, you must
use the
--param-file option to override the custom resource name.
- Create a .yml file that has the following content:
override_components_meta:
component-name:
cr_name: your-cr-name
- Add
--param-file=/tmp/work/filename.yml to the
cpd-cli command.
You can also set the --wait option to false to save time.
When --wait=false the custom resource is patched, but the cpd-cli returns you to a command prompt without waiting for the cpd-cli to get to a
Completed state.
Procedure
- Log the
cpd-cli in to the
Red Hat
OpenShift Container Platform cluster:
- If you want to check whether the HPA is currently enabled for a service, use the
manage
get-hpa-config
command.
For
example, to check whether the HPA is currently enabled for the
common core services, use this
command:
cpd-cli manage get-hpa-config \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--components=ccs
- Enable or disable autoscaling for services as needed:
IBM Software
Hub
control plane
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=zen \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=zen \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Canvas
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=canvasbase \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=canvasbase \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Canvas is a dependency for the
following services:
- SPSS
Modeler. If you want to
scale SPSS
Modeler, you must
scale Canvas as
well.
- Synthetic Data Generator. If you want to
scale Synthetic Data Generator, you must
scale Canvas.
Common core services
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ccs \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ccs \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM Cloud Pak foundational services
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=cpfs \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=cpfs \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Inference foundation models
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watsonx_ai_ifm \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watsonx_ai_ifm \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
AI Factsheets
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=factsheet \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=factsheet \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Analytics Engine powered by Apache Spark
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=analyticsengine \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=analyticsengine \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Cognos
Analytics
The
autoScaleConfig setting is applied to the dynamic CR. To
find the name of the CR, run the following command:
cr_name = $(oc -n ${PROJECT_CPD_INST_OPERANDS} get caserviceinstance --no-headers -o custom-columns=NAME:.metadata.name)
-
Run the following command to enable horizontal
autoscaling for the service:
oc patch caserviceinstance ${cr_name}
--type merge
-p "{\"spec\":{\"autoScaleConfig\":\"true\"}}"
-n ${PROJECT_CPD_INST_OPERANDS}
-
Run the following command to disable horizontal
autoscaling for the service:
oc patch caserviceinstance ${cr_name}
--type merge
-p "{\"spec\":{\"autoScaleConfig\":\"false\"}}"
-n ${PROJECT_CPD_INST_OPERANDS}
Note: If Cognos
Analytics is installed in
a tethered project, use -n ${PROJECT_CPD_INSTANCE_TETHERED} in the
command.
Cognos Dashboards
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dashboard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dashboard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Data Privacy
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Data Product Hub
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dataproduct \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dataproduct \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Data Refinery
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datarefinery \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datarefinery \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
DataStage
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datastage_ent \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datastage_ent \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Data Virtualization
You can enable autoscaling for Data Virtualization. However, it does not use
the autoScaleConfig setting. For more information about scaling
Data Virtualization, see Scaling Data Virtualization.
Db2
Data Management Console
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dmc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dmc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Decision Optimization
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dods \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=dods \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM Knowledge
Catalog
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wkc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wkc \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM Knowledge Catalog Standard
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ikc_standard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ikc_standard \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM Knowledge Catalog Premium
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ikc_premium \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ikc_premium \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM Manta Data
Lineage
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datalineage \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=datalineage \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
IBM
Master Data Management
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=match360 \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=match360 \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
OpenPages
When HPA is enabled for an OpenPages service instance, the
application server is scaled automatically. But if you want to scale a database
server, you must scale it manually. For more information, see Scaling OpenPages.
- Create a <filename>.yml file under
the cpd-cli workspace. Configure and add the following contents to
override the default custom resource name:
override_components_meta:
openpages_instance:
cr_name: <your-custom-resource-name>
-
-
Run the following command to enable horizontal autoscaling for an OpenPages service
instance:
cpd-cli manage apply-hpa-config \
--components=openpages_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true \
--param-file=/tmp/work/<filename>.yml
-
Run the following command to disable horizontal autoscaling for an OpenPages service
instance:
cpd-cli manage apply-hpa-config \
--components=openpages_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false \
--param-file=/tmp/work/<filename>.yml
Note: If the
OpenPages
service instance is installed in a tethered project, add the following parameter to
these commands.
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}
Orchestration Pipelines
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ws_pipelines \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ws_pipelines \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Planning Analytics
-
Run the following command to enable horizontal autoscaling for a Planning Analytics service instance:
oc patch PAServiceInstance <instance_name> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"autoScaleConfig":true}}' \
--type=merge
-
Run the following command to disable horizontal autoscaling for a Planning Analytics service instance:
oc patch PAServiceInstance <instance_name> \
--namespace ${PROJECT_CPD_INST_OPERANDS} \
--patch '{"spec":{"autoScaleConfig":false}}' \
--type=merge
Product Master
-
Run the following command to enable horizontal autoscaling for an Product Master service
instance:
cpd-cli manage apply-hpa-config \
--components=productmaster_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal autoscaling for an Product Master service
instance:
cpd-cli manage apply-hpa-config \
--components=productmaster_instance \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
SPSS
Modeler
Tip: If you scale
SPSS
Modeler, you must also scale the
Canvas component.
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=spss \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=spss \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Unstructured Data Integration
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=udp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=udp \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Watson
Machine Learning
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wml \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wml \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Watson
OpenScale
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=openscale \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=openscale \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
Watson Speech services
You cannot enable autoscaling for Watson Speech services. However, you can
enable autoscaling for Watson Gateway, which is one of the
dependencies of Watson Speech services. For more information about enabling autoscaling for Watson Gateway, see Advanced
configuration for the Watson Speech services.
Watson Studio
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ws \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=ws \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx.ai
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watsonx_ai_ifm \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watsonx_ai \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Assistant
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watson_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=watson_assistant \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Code
Assistant
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Code Assistant for Red Hat
Ansible Lightspeed
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_ansible \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_ansible \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Code Assistant for Z
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Code Assistant for Z Code Explanation
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z_ce \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z_ce \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx Code Assistant for Z Code Generation
-
Run the following command to enable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z_cg \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
-
Run the following command to disable horizontal
autoscaling for the service:
cpd-cli manage apply-hpa-config \
--components=wca_z_cg \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
watsonx.data
-
-
Run the following command to enable horizontal autoscaling in the addon
components UI, API, and Nodeclient:
cpd-cli manage apply-hpa-config \
--components=watsonx_data \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=true
- Complete the following steps for both
wxd and
wxdengine to enable horizontal pod autoscaling of Presto workers:
- Run the following command to get the Presto engine
name:
oc get wxdengine
The
following example shows a returned engine name for
wxdengine:
NAME AGE
lakehouse-presto-01 75m
- Run the following command to enable horizontal pod autoscaling in the
pods. Horizontal pod autoscaling only works with multinode deployments
because the command scales worker
nodes.
oc patch wxdengine/lakehouse-presto-01 \
--type=merge \
-n ${PROJECT_CPD_INST_OPERANDS} \
-p '{ "spec": { "autoScaleConfig": "true", "lakehouseDeploymentType": "multinode" } }'
-
-
Run the following command to disable horizontal autoscaling in the addon
components UI, API, and Nodeclient:
cpd-cli manage apply-hpa-config \
--components=watsonx_data \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--enable_hpa=false
- Run the following command to disable horizontal pod autoscaling in the
pods:
oc patch wxdengine/lakehouse-presto-01 \
--type=merge \
-n ${PROJECT_CPD_INST_OPERANDS} \
-p '{ "spec": { "autoScaleConfig": false } }'