manage apply-scale-config

Change the scaling configuration for one or more components associated with an instance of IBM Software Hub.

Required role
Instance administrator An instance administrator can run this command.

Before you begin

Before you change the scaling configuration of a component, run the cpd-cli manage get-scale-config command to check the current configuration.

Extended description

You can scale IBM® Software Hub components to one of the following levels:

  • level_1
  • level_2
  • level_3
  • level_4
  • level_5

For more information about the resources that are required for each level, see Downloading the component scaling PDF from the IBM Entitled Registry.

You have several methods for changing the scaling configuration of IBM Software Hub components:

Scaling a single component
You can scale a single component by specifying the following options:
  • --cpd_instance_ns
  • --components
  • --scale
Scaling multiple components to the same level
You can scale multiple components to the same level by specifying the following options:
  • --cpd_instance_ns
  • --components
  • --scale
Scaling multiple components to different levels
You can scale multiple components to different levels by specifying the following options:
  • --cpd_instance_ns
  • --config

When you specify the --config option, you must specify the scaling configuration as a JSON dictionary string.

Syntax

cpd-cli manage apply-scale-config \
--cpd_instance_ns=<project-name> \
[--tethered_instance_ns=<project-name>] \
[--config=<JSON-dictionary-string>] \
[--components=<comma-separated-list-of-component-names>] \
[--scale=<scaling-configuration-level>] \
[--wait=true|false] \
[--param-file=tmp/work/<file-name>.yml]

Arguments

The apply-scale-config command has no arguments.

Options

Table 1: Command options
Option Description
--components The component or components that you want to scale.
Status
Optional.
  • If you specify this option, you must also specify the --scale option.
  • If you don't specify this option, you must specify the --config option.
Syntax
--components=<comma-separated-list-of-component-names>
Default value
There is no default value. The list depends on which components you want to scale.
Valid values
For the list of components, see Component IDs.

You can specify individual components or a comma-separated list of components.

--config The scaling configuration, specified as a JSON dictionary string.
Status
Optional.

If you don't specify this option, you must specify the --components option.

Syntax
--config=<JSON-dictionary-string>
Default value
No default. User defined.
Valid values
A JSON dictionary string with the following format:
'{"component_ID_1":"level_1","component_ID_2":"level_2"}'

The dictionary string must meet the following requirements:

  • The string must start and end with single quotation marks (').
  • Each key-value pair must be separated by a comma without a space.
  • Each key and each value must be surrounded by double quotation marks (").

For a list of valid component IDs, see Component IDs.

You can specify one of the following scaling levels:
  • level_1
  • level_2
  • level_3
  • level_4
  • level_5
--cpd_instance_ns The project (namespace) where the components that you want to scale are installed.
Status
Required.
Syntax
--cpd_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
The name of an existing project on the Red Hat® OpenShift® Container Platform cluster.
--scale The scaling configuration to apply to the specified component or components.
Status
Optional.
  • If you specify this option, you must also specify the --components option.
  • If you don't specify this option, you must specify the --config option.
Syntax
--scale=<scaling-configuration-level>
Default value
No default.
Valid values
  • level_1
  • level_2
  • level_3
  • level_4
  • level_5
--param-file The name of a YAML file that includes additional parameters.

The file must be in the work directory on the client workstation.

Status
Optional.
Syntax
--param-file=tmp/work/<file-name>.yml
Default value
No default. User-defined.
Valid values
The name of a YAML file that includes additional parameters.
--tethered_instance_ns

The tethered project where you want to change the scaling configuration of the specified component.

This option applies only to the following components:
  • openpages_instance
Important: If you specify this option, you must also specify the --param-file option. The file must include the following content:
override_components_meta:
    component-name:
        cr_name: <custom-resource-name>

Replace <custom-resource-name> with the name of the OpenPages service instance custom resource.

To get the name of the custom resource, run:
oc get openpagesinstance \
-n=${PROJECT_CPD_INSTANCE_TETHERED} \
-o jsonpath='{.items[*].metadata.name}'
Status
Optional.
Syntax
--tethered_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
A project (namespace) that is tethered to the project where IBM Software Hub is installed.
--wait Specify whether to wait for the custom resource to be ready.
Status
Optional.
Syntax
--wait=true|false
Default value
true

If you omit this option, the default value is used.

Valid values
false
Return to the command prompt without waiting for the custom resource to be ready.
true
Wait for the custom resource to be ready.

Examples

Note: The following example uses the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For details, see Setting up installation environment variables.

Scale the IBM Knowledge Catalog service to level_4
cpd-cli manage apply-scale-config \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--components=wkc \
--scale=level_3
Scale multiple components to level_3
cpd-cli manage apply-scale-config \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--components=${COMPONENTS} \
--scale=level_3
Scale multiple components to different scaling configurations
cpd-cli manage apply-scale-config \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--config='{"wkc":"level_4","ws":"level_3","wml":"level_2"}'