Scaling the OpenPages application server pod
You can scale the application server pod.
Before you begin
Review the minimum system requirements before you make changes. See System requirements.
About this task
For the OpenPages application server, you can:
- Change the size of the instance, for example from Extra Small to Small.
- If you're using the
autoScaleConfigfeature, set the minimum and maximum number of replicas to use. - Set the number of replicas to use.
- Increase or decrease the number of vCPUs.
- Increase or decrease the memory.
Tip: To check the current vCPUs and memory of the application server pod, run the
following
command:
oc describe sts/openpages-<instance_name>-stsNote: Run scaling operations when the cluster is quiet.
Procedure
-
Log in to your Red Hat®
OpenShift® cluster as a
instance administrator.
${CPDM_OC_LOGIN} - Back up your OpenPages
environment. For more information, see Backing up, restoring, and migrating OpenPages.
- Use one or more of the following options:
For these commands, use the
--tethered_instance_nsparameter if the OpenPages instance is installed in a tethered project.--cpd_instance_nsand --tethered_instance_nsare mutually exclusive, so you must specify either the--cpd_instance_nsparameter or--tethered_instance_nsparameter.- Change the size of the instance
-
You can use the
scaleConfigparameter to change the size of an instance. Valid values that you can pass in the parameter are the following:xsmallsmallsmall_mincpureqmediumlarge
For example, to change the size toxsmall, replace${size}withxsmallin the following command:cpd-cli manage update-cr --component=openpages_instance \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --patch="{\"scaleConfig\":\"small\"}" \ --extra-vars='{"cr_name":"${INSTANCE_NAME}"}' \ [--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}]The
scaleConfigparameter uses the values in Table 1, unless thecustomScaleConfigparameter is defined. - Set the minimum and maximum number of application replicas
- If you're using auto-scaling, you can set the minimum and maximum replicas to use:
cpd-cli manage update-cr --component=openpages_instance \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} --patch="{\"customScaleConfig\":{\"opapp\":{\"min_replicas\":1,\"max_replicas\":5}}}" \ --extra-vars='{"cr_name":"${INSTANCE_NAME}"}' \ [--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}]Use these parameters when you're using
autoScaleConfig: true. - Set the number of application replicas
- If you're using auto-scaling, the
replicasparameter sets the initial number of replicas. The number of replicas in use scales up or down within themin_replicasandmax_replicasrange.If you're not using auto-scaling, thereplicasparameter sets a fixed number of replicas to use:cpd-cli manage update-cr --component=openpages_instance \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --patch="{\"customScaleConfig\":{\"opapp\":{\"replicas\":2}}}" \ --extra-vars='{"cr_name":"${INSTANCE_NAME}"}' \ [--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}] - Change the resources for the application pod
- You can change the resources for limits and requests. Change the
cpuandmemoryparameters to set the resources:cpd-cli manage update-cr --component=openpages_instance \ --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \ --patch="{\"customScaleConfig\":{\"opapp\":{\"replicas\":2,\"resources\":{\"limits\":{\"cpu\":2,\"memory\":\"8Gi\",\"ephemeral-storage\":\"4Gi\"},\"requests\":{\"cpu\":\"5m\",\"memory\":\"8Gi\",\"ephemeral-storage\":\"4Gi\"}}}}}" \ --extra-vars='{"cr_name":"${INSTANCE_NAME}"}' \ [--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED}] - On a tethered namespace, you might receive the following error message:
Apply the following patch as a workaround:[ERROR] 2025-03-11T01:20:13.024803Z cmd.Run() failed with exit status 2 [ERROR] 2025-03-11T01:20:13.024950Z Command exception: The update-cr command failed (exit status 2). You may find output and logs in the /root/cpd_cli_linux/cpd-cli-workspace/olm-utils-workspace/work directory. [ERROR] 2025-03-11T01:20:13.026910Z RunPluginCommand:Execution error: exit status 1oc -n ${PROJECT_CPD_INSTANCE_TETHERED} patch OpenPagesInstance ${INSTANCE_NAME} \ --type=merge \ --patch '{ "spec": { "customScaleConfig": { "opapp": { "replicas": 1, "resources": { "limits": { "cpu": "4", "ephemeral-storage":"4Gi", "memory": "6Gi" }, "requests": { "cpu": "4", "ephemeral-storage":"4Gi", "memory": "6Gi" } } } } } }'
For more information, see Setting and enforcing quotas.
For example, if you're using auto-scaling:oc -n ${PROJECT_CPD_INSTANCE_TETHERED} patch OpenPagesInstance ${INSTANCE_NAME} \ --type=merge \ --patch '{ "spec": { "customScaleConfig": { "opapp": { "min_replicas": 1, "max_replicas": 5, "resources": { "limits": { "cpu": 4, "memory": "6Gi" }, "requests": { "cpu": 4, "memory": "6Gi" } } } } } }'Or if you're not using auto-scaling:oc -n ${PROJECT_CPD_INSTANCE_TETHERED} patch OpenPagesInstance ${INSTANCE_NAME} \ --type=merge \ --patch '{ "spec": { "customScaleConfig": { "opapp": { "replicas": 2, "resources": { "limits": { "cpu": 4, "memory": "6Gi" }, "requests": { "cpu": 4, "memory": "6Gi" } } } } } }'