Upgrading a Cloudera Data Hub cluster with the CDP CLI
You can initiate a Cloudera Data Hub cluster upgrade (either OS, Runtime, or both) with the CDP CLI. Using the same CLI command, you can also search for and validate available images to upgrade to, and generate JSON templates for specific upgrade scenarios.
Obtain image ID
Once you have identified the ID, you can provide it in the upgrade CLI command by using the --image-id flag.
Upgrade steps
The cdp datahub upgrade-cluster
command includes the following options:
cdp datahub upgrade-cluster
--cluster-name <value>
[--image-id <value>]
[--runtime <value>]
[--lock-components | --no-lock-components]
[--dry-run | --no-dry-run]
[--show-available-images | --no-show-available-images]
[--show-available-image-per-runtime | --no-show-available-image-per-runtime]
[--cli-input-json <value>]
[--generate-cli-skeleton]
In order to use this command for upgrading from CentOS to RHEL, ensure to provide an image ID of a RHEL 8 image.
Option | Description |
---|---|
--cluster-name (string) | Required. The name or CRN of the Cloudera Data Hub cluster to upgrade. |
--image-id (string) | The ID of an image to upgrade to. If upgrading from CentOS to RHEL, ensure to provide a RHEL 8 image ID. |
–runtime (string) | The Runtime version to upgrade to. When you specify the Cloudera Runtime version, the upgrade uses the latest image ID of the given Cloudera Runtime version from the same image catalog used for Cloudera Data Hub cluster creation. |
--lock-components | --no-lock-components (boolean) | Use --lock components to perform an OS upgrade only. |
--dry-run | --no-dry-run (boolean) | Checks the eligibility of an image to upgrade. Can be used in conjunction with any other parameter, returning the available image (with respect to image Id, Runtime or lock-components set) without performing any actions. |
--show-available-images | --no-show-available-images (boolean) | Returns the list of images that are eligible to upgrade to. |
--show-latest-available-image-per-runtime | --no-show-latest-available-image-per-runtime (boolean) | Returns the latest image that is eligible to upgrade to, for each Runtime version with at least one available upgrade candidate. |
When you run the cdp datahub upgrade-cluster command to initiate an upgrade, you have one of three options:
- Specify one of either
--image-id
,--runtime
, or--lockComponents
, which makes an explicit choice of the exact image, Cloudera Runtime (latest OS), or latest OS (same Runtime) for upgrade. - Specify both
--image-id
and--lockComponents
,which specifies an image and ensures the image represents an OS only upgrade. - Specify none of the
--image-id
,--runtime
, or--lockComponents
parameters, which initiates a Cloudera Runtime/Cloudera Manager upgrade to the latest compatible version and OS image.
Outside of upgrade, you can use the following options:
--show-available-images/--no-show-available-images
--show-available-images-per-runtime/--no-show-available-images-per-runtime
--dry-run