Configuring an image content source policy for IBM Cloud Pak for Data software images

If you mirror images to a private container registry, you must tell your cluster where to find the software images by creating an image content source policy.

Installation phase
You are not here. Setting up a client workstation
You are not here. Setting up a cluster
You are not here. Collecting required information
You are here icon. Preparing to run installs from a private container registry
You are not here. Preparing the cluster for Cloud Pak for Data
You are not here. Preparing to install an instance of Cloud Pak for Data
You are not here. Installing an instance of Cloud Pak for Data
Who needs to complete this task?
Cluster administrator A cluster administrator must complete this task.
When do you need to complete this task?
One-time setup If you mirrored the Cloud Pak for Data software images to a private container registry, you must complete this task before you can install Cloud Pak for Data.

Before you begin

Best practice: You can run the commands in this task exactly as written if you set up environment variables. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

About this task

Important: This process will temporarily disable scheduling on each node in the cluster, so you might notice that resources are temporarily unavailable. However, this process happens on one node at a time. The cluster will temporarily disable scheduling on a node, apply the configuration change, and then re-enable scheduling before starting the process on the next node.

Use the cpd-cli manage apply-icsp command to create or update the image content source policy for the Cloud Pak for Data images.

Procedure

  1. Run the cpd-cli manage login-to-ocp command to log in to the cluster as a user with sufficient permissions to complete this task. For example:
    cpd-cli manage login-to-ocp \
    --username=${OCP_USERNAME} \
    --password=${OCP_PASSWORD} \
    --server=${OCP_URL}
    Tip: The login-to-ocp command takes the same input as the oc login command. Run oc login --help for details.
  2. Create or update the required image content source policy:
    cpd-cli manage apply-icsp \
    --registry=${PRIVATE_REGISTRY_LOCATION}
  3. Get the status of the nodes:
    oc get nodes

    Wait until all the nodes are Ready before you proceed to the next step. For example, if you see Ready,SchedulingDisabled, wait for the process to complete:

    NAME                           STATUS                     ROLES    AGE     VERSION
    master0                        Ready                      master   5h57m   v1.20.0
    master1                        Ready                      master   5h57m   v1.20.0
    master2                        Ready                      master   5h57m   v1.20.0
    worker0                        Ready,SchedulingDisabled   worker   5h48m   v1.20.0
    worker1                        Ready                      worker   5h48m   v1.20.0
    worker2                        Ready                      worker   5h48m   v1.20.0
    Tip: You can use the watch oc get nodes command to monitor the status of the nodes. The command provides an update every 2 seconds. When all of the nodes return Ready you can exit the command by pressing Ctrl+C.

    Alternatively, if you find that the oc get nodes command returns Ready prematurely, you can use the oc get mcp command to get the real-time status of the nodes.

Results

The cpd-cli manage apply-icsp command creates the required image content source policy on the cluster.
Important: Do not modify the image content source policy that is created by the cpd-cli manage apply-icsp command.

If you are installing Cloud Pak for Data on Red Hat® OpenShift® Service on AWS (ROSA), changing the image content source policy could result in Red Hat violations that could lead to limited support from Red Hat. For details, see Red Hat Online Services Product Appendix 4.

What to do next

Now that you've created the image content source policy, you are ready to complete Pulling the olm-utils-v2 image from the private container registry.