Creating a custom image and image catalog with the CDP CLI
You can create a custom Runtime or FreeIPA image and image catalog through the CDP CLI.
-
To find a source image from the cdp-default catalog that you want to use as the source
of your custom image entry, run the following
command:
For example:cdp imagecatalog find-default-image --provider <cloud-provider> --image-type <image-type> --runtime-version <Cloudera-Runtime-version>
cdp imagecatalog find-default-image --provider AWS --image-type runtime --runtime-version 7.2.12
- A custom image requires a custom catalog. If you haven’t yet created a custom
catalog, or if you want to create a new one for a new custom image, run the
following
command:
For example:cdp imagecatalog create-custom-catalog --catalog-name <unique-catalog-name> --description <catalog-description>
cdp imagecatalog create-custom-catalog --catalog-name my-custom-catalog --description test-catalog
- Within the custom image catalog that you created (or an older custom catalog that
you want to use), create a custom image entry with the selected source image marked as its
source. Providing your own VM images is optional. Run the following command:
For example:cdp imagecatalog set-<image-type>-image --catalog-name <name-of-the-custom-catalog> --vm-images region=<region-of-customized-image>,imageReference=<cloud-provider-specific-ID-of-a-customized-image> --source-image-id <cdp-image-ID-of-source-image>
cdp imagecatalog set-runtime-image --catalog-name my-custom-catalog --vm-images region=eu-central-1,imageReference=ami-7torotmhqi6q7438y --source-image-id 8t4y9853-12b6-3n6z-75dh-tx775k4c793w
- You can then apply the necessary changes to the custom image entry, like overriding
AMI IDs with new, customized ones, or adding a new parcel base URL.
Command Description cdp imagecatalog find-default-image
Finds the default images in the cdp-default image catalog for a specified version of Runtime.
Parameters:
-
--provider
-
--image-type
-
--runtime-version
You can provide any combination of these parameters.
cdp imagecatalog create-custom-catalog
Creates a custom catalog.
Parameters:
-
--catalog-name
-
--description
–catalog-name is required.
orcdp imagecatalog set-runtime-image
cdp imagecatalog set-freeipa-image
Creates a custom image entry (either Runtime [Data Hub/Data Lake] or FreeIPA) within the specified catalog.
Parameters:
-
--catalog-name
-
--vm-images [region,imageReference]
-
--source-image-id
-
--image-id
-
--base-parcel-url
--catalog-name and --source-image-id are required.
-