manage apply-cluster-components

Install or upgrade the cluster-wide components.

Required role
Cluster administrator You must be a cluster administrator to run this command.

Extended description

The apply-cluster-components command creates or updates the following cluster-wide components:
  • License Service (ibm-licensing-operator)
  • IBM Certificate manager (ibm-cert-manager-operator)
    Important: The IBM Certificate manager is deprecated.
    • If you are upgrading to IBM® Software Hub Version 5.1 from an older version of IBM Cloud Pak® for Data, you can continue to use the IBM Certificate manager.
    • If you are installing IBM Software Hub for the first time, ensure that you install the Red Hat® OpenShift® Container Platform cert-manager Operator. For more information, see Installing the cert-manager Operator for Red Hat OpenShift in the Red Hat OpenShift Container Platform documentation:

      If the command detects the Red Hat OpenShift Container Platform cert-manager Operator on the cluster, it will not install the ibm-cert-manager-operator.

These components can be installed exactly once per cluster.
  • If the components are found at the specified version, they will be skipped.
  • If the components are found at an older version, they will be updated.

Syntax

cpd-cli manage apply-cluster-components \
--release=<version> \
--license_acceptance=true|false \
[--cert_manager_ns=<project-name>] \
[--licensing_ns]=<project-name> \
[--case_download=true|false] \
[--from_oci=true|false] \
[--oci_location=<registry-URL>] \
[--preview=true|false] \
[-v][-vv][-vvv]

Arguments

The apply-cluster-components command has no arguments.

Options

Table 1: Command options
Option Description
--case_download Specify whether to download the CASE packages for the specified components if they are not detected in the work directory.
Important: The command will fail if the CASE packages are not in the work directory.
Default location
  • If you made the cpd-cli executable from any directory, the path to the directory is:

    <current-directory>/cpd-cli-workspace/olm-utils-workspace/work

  • If you did not make the cpd-cli executable from any directory, the path to the directory is:

    <cli-install-directory>/cpd-cli-workspace/olm-utils-workspace/work

Custom location
If you set the CPD_CLI_MANAGE_WORKSPACE environment variable, path to the directory is:

${CPD_CLI_MANAGE_WORKSPACE}/work

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

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

Valid values
false
Specify false if you are running the commands in a restricted network where the download will fail.

If you specify false and the CASE packages are not in the work directory, the command will fail.

true
Specify true to download the CASE packages.

If you are not allowed to download the CASE packages from GitHub, ensure that you set --from_oci=true.

--cert_manager_ns The project for the IBM Certificate manager operator.
  • For install, specify the project where you want to install the operator.
  • For upgrade, specify the project where the operator is installed.
Remember: This operator will not be installed if the Red Hat OpenShift Container Platform cert-manager Operator is found on the cluster.

For new installations, the Red Hat OpenShift Container Platform cert-manager Operator is recommended over the IBM Certificate manager.

Status
Optional.
Syntax
--cert_manager_ns=<project-name>
Default value
ibm-cert-manager

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

Valid values
  • For install, the project where you want to install the operator.
  • For upgrade, the project where the operator is installed.
--from_oci Download CASE packages from the IBM Cloud Pak Open Container Initiative (OCI) registry rather than from GitHub.

This option is recommended for environments that are not allowed to access GitHub (github.com).

Restriction: This setting applies only if you set --case_download=true.
Status
Optional.
Syntax
--from_oci=true|false
Default value
false

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

Valid values
false
Download the CASE packages from GitHub.
true
Download the CASE packages from the IBM Cloud Pak Open Container Initiative.
--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.

--oci_location The URL of the Open Container Initiative (OCI) registry from which you want to download CASE packages. For example, specify this option if you want to download the CASE packages from a private OCI registry.
Restriction: This setting applies only if you set --from_oci=true.
Status
Optional.
Syntax
--oci_location=<registry-URL>
Default value
cp.icr.io/cpopen

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

Valid values
The URL of the Open Container Initiative (OCI) registry from which you want to download CASE packages.
--licensing_ns The project for the Licensing Service operator.
  • For install, specify the project where you want to install the operator.
  • For upgrade, specify the project where the operator is installed.
Status
Optional.
Syntax
--licensing_ns=<project-name>
Default value
ibm-licensing

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

Valid values
  • For install, the project where you want to install the operator.
  • For upgrade, the project where the operator is installed.
--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 that you want to install or upgrade to.

If you have multiple versions of IBM Software Hub installed on the cluster, it is recommended that you install the cluster-wide components at the same version as the latest version of IBM Software Hub on the cluster.

Status
Required.
Syntax
--release=<version>
Default value
No default. You must specify the release.
Valid values
  • 5.1.0
  • 5.1.1
  • 5.1.2
  • 5.1.3
-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 Certificate manager and the License Service in the default projects
cpd-cli manage apply-cluster-components \
--release=${VERSION} \
--license_acceptance=true
Install the Certificate manager and the License Service in the default projects without downloading the CASE package
cpd-cli manage apply-cluster-components \
--release=${VERSION} \
--license_acceptance=true \
--case_download=false
Install the Certificate manager and the License Service in custom projects
cpd-cli manage apply-cluster-components \
--release=${VERSION} \
--license_acceptance=true \
--cert_manager_ns=${PROJECT_CERT_MANAGER} \
--licensing_ns=${PROJECT_LICENSE_SERVICE}
Preview the oc commands to install the Certificate manager and the License Service in the default projects
cpd-cli manage apply-cluster-components \
--release=${VERSION} \
--license_acceptance=true \
--preview=true