service-instance upgrade

Upgrade Cloud Pak for Data service instances.

Important: Do not use this command unless you are explicitly instructed to do so as part of your service instance upgrade instructions.

To perform a service instance upgrade, you must be the service instance owner or have Admin privileges to the service instance.

Syntax

cpd-cli service-instance upgrade <cpd-service-instance-name> \
--profile=<cpd-profile-name> \
[--all] \
[--cpdconfig=<cpd-configuration-location>] \
[--force-version-upgrade=true|false] \
[--helm-force-upgrade] \
[--helm-no-hooks] \
[--instance-name=<service-instance-name>] \
[--merge-override=true|false] \
[--override=<override-file-path.yaml>] \
[--service-type=<cpd-service-type>] \
[--verbose] \
[--version=<cpd-service-upgrade-version>] \
[--watch]

Arguments

Table 1: Command arguments
Argument Description
<cpd-service-instance-name> The Cloud Pak for Data service instance name to upgrade.

Options

Table 1: Command options
Option Description

--all

-a

Upgrade all Cloud Pak for Data service instances that belong to the service type.
Status
Optional.
Syntax
--all
Default value
No default.
Valid values
Not applicable.
--cpdconfig The IBM Software Hub
 configuration location. For example, $HOME/.cpd-cli/config.
Status
Optional.
Syntax
--cpdconfig=<cpd-configuration-location>
Default value
$HOME/.cpd-cli/config
Valid values
A valid IBM® Software Hub configuration location.
--force-version-upgrade

Patch just the version field in the CR during an upgrade. If the override YAML file is specified, it will be ignored when this flag is set.

Status
Optional.
Syntax
--force-version-upgrade=true|false
Default value
false
Valid values
true|false
--helm-force-upgrade Make a helm run upgrade with the --force option. The upgrade deletes all old objects and recreates new objects. This option should be used with caution. Deleting old objects might succeed but recreating the new objects can fail.
Status
Optional.
Syntax
--helm-force-upgrade
Default value
Not applicable.
Valid values
Not applicable.
--helm-no-hooks Make a helm run upgrade without using any hooks from chart files.
Status
Optional.
Syntax
--helm-no-hooks
Default value
Not applicable.
Valid values
Not applicable.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--instance-name Specify the Cloud Pak for Data service instance name.
Status
Optional.
Syntax
--instance-name=<service-instance-name>
Default value
No default.
Valid values
A Cloud Pak for Data service instance name.
--merge-override Merges updated values from the override file into an existing custom resource.
Status
Optional.
Syntax
--merge-override=true|false
Input
Boolean
Default value
false
Valid values
true|false
--override The override file path and file name (*.yaml) for the upgrade.
Status
Optional.
Syntax
--override=<override-file-path.yaml>
Default value
No default.
Valid values
Any valid path and override *.yaml file name.
--profile The name of the profile that you created to store information about an instance of Cloud Pak for Data and your credentials for the instance.
Status
Required.
Syntax
--profile=<cpd-profile-name>
Default value
No default.
Valid values

The name of the profile that you created.

--service-type

-t

The Cloud Pak for Data service type to upgrade.
Status
Optional.
Syntax
--service-type=<cpd-service-type>
Default value
No default.
Valid values
Any valid Cloud Pak for Data service type. For example, 'dv'. Use the 'cpd-cli service-instance list' command to find the service type.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.
--version The version number that the Cloud Pak for Data service will be upgraded to. For more information about the latest version of a service, see Operator and operand versions.
Status
Optional.
Syntax
--version=<cpd-service-upgrade-version>
Default value
No default.
Valid values
A valid service version number.
--watch Wait for the service instance upgrade to complete.
Status
Optional.
Syntax
--watch
Default value
Not applicable.
Valid values
Not applicable.

Examples

Note: The following examples use 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 more information, see Setting up installation environment variables.

Upgrade a specific service instance in a Cloud Pak for Data instance.
cpd-cli service-instance upgrade --instance-name <cpd-instance-name> \
--service-type=<cpd-service-type> \
--profile=${CPD_PROFILE_NAME}
Upgrade all service instances of the same service type.
cpd-cli service-instance upgrade \
--all \
--service-type=<cpd-service-type> \
--profile=${CPD_PROFILE_NAME}
Upgrade a service instance without replacing the entire CR during an upgrade.
cpd-cli service-instance \
  --instance-name=<service-instance-name> \
  --service-type=<cpd-service-type> \
  --profile=${CPD_PROFILE_NAME} \
  --version=5.1 \
  --force-version-upgrade=true