manage apply-cr

Install or upgrade the specified components. The command creates or updates the custom resource objects with the appropriate settings.

Required role
Instance administrator You must be an administrator of the projects that are associated with an instance to run this command.

Before you begin

You must run the cpd-cli manage setup-instance command to install or upgrade IBM® Software Hub before you run this command.

Extended description

Run the apply-cr to install or upgrade the appropriate components for your business needs. You can install the components in a batch by specifying a comma-separated list of components, or you can install components individually.

Syntax

cpd-cli manage apply-cr \
--components=<comma-separated-list-of-component-names> \
--release=<version> \
--license_acceptance=true|false \
--cpd_instance_ns=<project-name> \
[--upgrade=true|false] \
[--tethered_instance_ns=<project-name>] \
[--param-file=<file-name>] \
[--storage_vendor=portworx] \
[--file_storage_class=<RWX-storage-class>] \
[--block_storage_class=<RWO-storage-class>] \
[--parallel_num=<integer>] \
[--preview=true|false] \
[-vv][-vv][-vvv]

Arguments

The apply-cr command has no arguments.

Options

Table 1: Command options
Option Description
--block_storage_class If the service requires block storage, specify the name of an existing storage class that supports ReadWriteOnce (RWO) access.
Status
For service-specific guidance, see the installation documentation for the specified components.

Required if the component requires RWO storage.

Important: If you are using the default Portworx storage classes, use the --storage_vendor option instead.
Syntax
--block_storage_class=<RWO-storage-class>
Default value
No default.
Valid values
The name of a storage class that supports RWO access.
--components A comma-separated list of the components that you want to install or upgrade.
Status
Required.
Syntax
--components=<comma-separated-list-of-component-names>
Default value
There is no default value. The list depends on which components you want to install or upgrade.
Valid values
For the list of components, see Component IDs.

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

--cpd_instance_ns The project (namespace) where IBM Software Hub is 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.
--file_storage_class If the service requires file storage, specify the name of an existing storage class that supports ReadWriteMany (RWX) access.
Status
Refer to the installation documentation for the specified components for guidance.

Required if the component requires RWX storage.

Important: If you are using the default Portworx storage classes, use the --storage_vendor option instead.
Syntax
--file_storage_class=<RWX-storage-class>
Default value
No default.
Valid values
The name of a storage class that supports RWX access.
--license_acceptance Specify whether you accept the license terms. You must set this option to true to install the software.
Status
Required.
Syntax
--license_acceptance=true
Default value
false

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

Valid values
false
This value indicates that you do not accept the license terms.

If you specify --license_acceptance=false, the specified components will not be installed.

true
This value indicates that you accept the license terms.

You must specify --license_acceptance=true to install the specified components.

--parallel_num The number of custom resources that are created or updated at the same time.

By default, up to 4 components are created or updated at the same time. Adjust the number based on the resources available on your cluster. For example, if you have a cluster with minimal resources, decrease the number of components that are updated in parallel to reduce resource consumption.

Status
Optional.
Syntax
--parallel_num=<integer>
Default value
4

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

Valid values
An integer greater than 0.
--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.

Refer to the installation documentation for the specified components for guidance.

Syntax
--param-file=tmp/work/<file-name>
Default value
No default. User-defined.
Valid values
The name of a YAML file that includes additional parameters.
--preview Preview the commands that run when you issue this CLI command.

The command issues a series of oc commands. You can see the list of oc commands that are associated with the command.

The oc commands are saved to the preview.sh file in the work directory.

Status
Optional.
Syntax
--preview=true|false
Default value
false

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

Valid values
false
Run the commands to apply the changes to your cluster.
true
Preview the commands without running them.

You can copy the oc commands from the output and run them yourself. However, this method is not recommended. When you run the commands manually, you do not have access to the additional helper scripts that are included in the underlying Ansible® playbook.

--release The release of IBM Software Hub that is installed.
Status
Required.
Syntax
--release=<version>
Default value
No default. You must specify the release.
Valid values
  • 5.4.0
--storage_vendor The type of storage that you are using. This setting uses the recommended storage class when provisioning storage during installation.
Status
Required if you use Portworx storage with the recommended storage class names.
Remember: Using custom storage class names is not recommended if you use Portworx storage.
Syntax
--storage_vendor=portworx
Default value
No default.
Valid values
portworx
Specify portworx if you use the recommended storage class names for Portworx.

Refer to the installation documentation for the specified components for guidance.

--tethered_instance_ns A project (namespace) that is tethered to the project where IBM Software Hub is installed.
Important: You must run the setup-tethered-ns command before you run the apply-cr command with this option.
Status
Optional. Specify this option if you want to create a service instance in the tethered project.
Restriction: Not all services that support service instances in tethered projects can use the apply-cr command to create service instances.

Refer to the service documentation to determine whether you can use the apply-cr command to create service instances.

Syntax
--tethered_instance_ns=<project-name>
Default value
No default. User-defined.
Valid values
The name of the project that is tethered to the project where IBM Software Hub is installed.
--upgrade Specify whether you are upgrading an existing installation. You must set this option to true to upgrade the software.
Status
Required when you run an upgrade.
Syntax
--upgrade=true|false
Default value
false

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

Valid values
false
Do not upgrade the specified components.
true
Upgrade the specified components.
-v
-vv
-vvv
Display verbose output.

Options are listed from least verbose to the most verbose.

Status
Optional.
Syntax
Verbose output
-v
Very verbose output
-vv
Most verbose output
-vvv
Default value
Not applicable.
Valid values
Not applicable.

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.

Install the specified components
cpd-cli manage apply-cr \
--components=${COMPONENTS} \
--release=${VERSION} \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--file_storage_class=${FILE_STORAGE} \
--block_storage_class=${FILE_BLOCK} \
--license_acceptance=true
Preview the oc commands to install the specified components on a cluster that uses Portworx storage
cpd-cli manage apply-cr \
--components=${COMPONENTS} \
--release=${VERSION} \
--cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--storage_vendor=portworx \
--license_acceptance=true \
--preview=true