Prometurbo images and repository

The node to which Prometurbo deploys must have internet access to pull the Prometurbo images from IBM Container Registry (icr.io).

Prometurbo container images

The following list describes the different Prometurbo images.

  • prometurbo

    This is the main image and is pulled from icr.io/cpopen/turbonomic/prometurbo:8.18.4.

  • prometurbo-operator

    This image is pulled for icr.io/cpopen/prometurbo-operator:8.18.4.

  • turbodif

    This image is pulled from icr.io/cpopen/turbonomic/turbodif:8.18.4.

Importing Prometurbo container images to a private repository

You can import the Prometurbo container images to your private repository if you do not want to pull them from IBM Container Registry (icr.io).

Note:

This documentation assumes that the private repository images are reachable and can be pulled without the need for an image pull secret.

Importing a multi-architecture container image to a private repository

IBM Container Registry provides multi-architecture container images. Your private repository needs to support loading these images. For example, multi-architecture container images are supported in Artifactory version 7.2+, but not in Artifactory version 6. Optionally, pull only the architecture version that you need. Specify the --platform parameter with docker pull and use docker inspect to confirm the architecture.

The following example script shows how you can import the prometurbo image to your private repository. Replace <private_repository_prefix> with the prefix for your private repository.

PRIVATE_REPO="<private_repository_prefix>"
SRC_IMAGE="icr.io/cpopen/turbonomic/prometurbo:8.18.4"

# Import a single image to private repo
BASE_REPO="icr.io/cpopen"
DST_IMAGE=$(echo "${SRC_IMAGE}" | sed 's|'"${BASE_REPO}"/'|'"${PRIVATE_REPO}"'/|g')

# Pull image for a specific platform
docker pull --platform linux/arm64 "${SRC_IMAGE}"

# Check if correct architecture has been pulled (optional)
docker inspect "${SRC_IMAGE}" | grep architecture
                "architecture": "aarch64",

# Tag the image and push it to the private repo 
docker tag "${SRC_IMAGE}" "${DST_IMAGE}"
docker push "${DST_IMAGE}"

You can use this script for prometurbo-operator and turbodif. Be sure to update the SRC_IMAGE parameter with the default image paths and names as described in the first section of this topic.

Importing multiple images to a private repository

The following example script explains the logic for importing images to your private repository.

#!/bin/sh

# Create a temporary file
TEMP_FILE=$(mktemp /tmp/process_images.XXXXXX) || {
    echo "Error: Failed to create temporary file"
    exit 1
}

# Define private registry prefix and target images (EDIT below section)
private_registry_base="<private_repository_prefix>"
cat << EOF > "${TEMP_FILE}"
icr.io/cpopen/turbonomic/prometurbo:8.18.4
icr.io/cpopen/prometurbo-operator:8.18.4
icr.io/cpopen/turbonomic/turbodif:8.18.4
EOF

ICR_IMAGE_BASE="icr.io/cpopen"
for image in $(cat "${TEMP_FILE}"); do
    # Standarlize input image
    image=$(echo "${image}" | sed 's|.*'"${ICR_IMAGE_BASE}"'/||g')

    SOURCE_IMAGE="${ICR_IMAGE_BASE}/${image}"
    TARGET_IMAGE="${private_registry_base}/${image}"

    echo "Mirroing: ${SOURCE_IMAGE} -> ${TARGET_IMAGE}"    
    if docker manifest inspect "${SOURCE_IMAGE}" | jq '.manifests[].platform' >/dev/null; then
        # Create and use a buildx builder
        docker buildx rm multiarch
        docker buildx create --name multiarch --driver docker-container --use

        # Mirror multiarch image to private repo
        docker buildx imagetools create --tag "${TARGET_IMAGE}" "${SOURCE_IMAGE}"
    else
        # Mirror single buiild image to private repo
        docker pull "${SOURCE_IMAGE}"
        docker tag  "${SOURCE_IMAGE}" "${TARGET_IMAGE}"
        docker push "${TARGET_IMAGE}"

        # Clean up local images
        docker image rm $SOURCE_IMAGE $TARGET_IMAGE 2>/dev/null
    fi
done

# Clean up the temporary file
rm -f "${TEMP_FILE}" || {
    echo "Warning: Failed to delete temporary file ${TEMP_FILE}"
}

echo "Processing complete, temporary file deleted"

In the preceding script, replace <private_repository_prefix> with your private repository prefix.

Note:

If you are updating from a previous version to 8.18.4, update the version at the end of each image path to be 8.18.4.