Some IBM Cloud Pak® for Data
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 administrator of the project where the software is installed, for example
cpd-instance
- 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 up and down based. The scaling is based on
the user workloads to ensure that clusters are not underutilized while available resources cannot be
used by workloads that require more
resources.
The following table shows the services that support autoscaling.
You can see detailed instructions or 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.
Procedure
- Run the
cpd-cli
manage
login-to-ocp
command to log in to the cluster as a user with
sufficient permissions to complete this task. For example:
cpd-cli manage login-to-ocp \
--username=${OCP_USERNAME} \
--password=${OCP_PASSWORD} \
--server=${OCP_URL}
- Enable or disable autoscaling for services as needed:
Cloud Pak for Data control
plane
-
Run the following command to enable horizontal autoscaling for the
service:
oc patch ZenService lite-cr \
--namespace ${PROJECT_CPD_INSTANCE} \
--type=merge \
--patch '{"spec": {"autoScaleConfig": true}}'
-
Run the following command to disable horizontal autoscaling for
the service:
oc patch ZenService lite-cr
--namespace ${PROJECT_CPD_INSTANCE}
--type=merge
--patch '{"spec": {"autoScaleConfig": false}}'
Cognos
Dashboards
-
Run the following command to enable horizontal autoscaling for the
service:
cpd-cli manage update-cr \
--component=cde \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"true\"}'
-
Run the following command to disable horizontal autoscaling for
the service:
cpd-cli manage update-cr \
--component=cde \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"false\"}'
DataStage
-
Run the following command to enable horizontal autoscaling for the
service:
cpd-cli manage update-cr \
--component=datastage_ent \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"true\"}'
-
Run the following command to disable horizontal autoscaling for
the service:
cpd-cli manage update-cr \
--component=datastage_ent \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"false\"}'
Db2 Data Management
Console
-
Run the following command to enable horizontal autoscaling for a Db2 Data Management
Console service instance:
oc patch Dmcaddon <instance_name> \
--namespace ${PROJECT_CPD_INSTANCE} \
--patch '{"spec":{"autoScaleConfig":true}}' \
--type=merge
-
Run the following command to disable horizontal autoscaling for a Db2 Data Management
Console service instance:
oc patch Dmcaddon <instance_name> \
--namespace ${PROJECT_CPD_INSTANCE} \
--patch '{"spec":{"autoScaleConfig":false}}' \
--type=merge
IBM Match 360 with
Watson
-
Run the following command to enable horizontal autoscaling for the
service:
oc patch mdm mdm-cr \
--namespace ${PROJECT_CPD_INSTANCE} \
--patch '{"spec":{"autoScaleConfig":true}}' \
--type=merge
-
Run the following command to disable horizontal autoscaling for
the service:
oc patch mdm mdm-cr \
--namespace ${PROJECT_CPD_INSTANCE} \
--patch '{"spec":{"autoScaleConfig":false}}' \
--type=merge
OpenPages
-
Run the following command to enable horizontal autoscaling for an OpenPages service instance:
cpd-cli manage update-cr \
--component=openpages_instance \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":true}' \
--extra-vars=cr_name=<instance_name>
-
Run the following command to disable horizontal autoscaling for an OpenPages service instance:
cpd-cli manage update-cr \
--component=openpages_instance \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":false}' \
--extra-vars=cr_name=<instance_name>
Planning Analytics
-
Run the following command to enable horizontal autoscaling for a Planning Analytics service instance:
oc patch PAServiceInstance <instance_name> \
--namespace ${PROJECT_CPD_INSTANCE} \
--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_INSTANCE} \
--patch '{"spec":{"autoScaleConfig":false}}' \
--type=merge
Product Master
-
Run the following command to enable horizontal autoscaling for the
service:
cpd-cli manage update-cr \
--component=productmaster \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"true\"}'
-
Run the following command to disable horizontal autoscaling for
the service:
cpd-cli manage update-cr \
--component=productmaster \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"false\"}'
SPSS
Modeler
-
Run the following command to enable horizontal autoscaling for the
service:
cpd-cli manage update-cr \
--component=spss \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"true\"}'
-
Run the following command to disable horizontal autoscaling for
the service:
cpd-cli manage update-cr \
--component=spss \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--patch='{\"autoScaleConfig\":\"false\"}'
Watson
Assistant