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.

If you are replacing the VM images in a custom image entry with a customized version, you must first prepare the image by modifying an official Cloudera default image, which you can find under Shared Resources > Image Catalogs > cdp-default. Take note of the image reference, such as the AMI ID.
  1. 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:
    cdp imagecatalog find-default-image --provider <cloud provider> --image-type <image type> --runtime-version <Cloudera Runtime version>
    For example:
    cdp imagecatalog find-default-image --provider AWS --image-type runtime --runtime-version 7.2.12
  2. 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:
    cdp imagecatalog create-custom-catalog --catalog-name <unique catalog name> --description <catalog description>
    For example:
    cdp imagecatalog create-custom-catalog --catalog-name my custom catalog --description test catalog
  3. 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:
    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>
    For example:
    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
  4. 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.

    cdp imagecatalog set-runtime-image

    or

    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.