Maximo Application Suite
Customer-managed

Configuring the global image pull secret

Configure the global image pull secret so that you can pull image sources from the IBM Entitled Registry.

Procedure

  1. Configure the pull secret to pull images from the IBM Entitled Registry, the global image pull secret must contain your IBM entitlement API key.
    
    export IBM_ENTITLEMENT_SERVER=cp.icr.io
    export IBM_ENTITLEMENT_USER=cp
    export IBM_ENTITLEMENT_KEY=xxxxx
    
  2. Create an environment variable that points to a temporary directory on your workstation. For example:
    
    export WORK_ROOT=$HOME/temp/work
    
    Note: If the temporary directory you choose does not exist, you must create it before proceeding with the next step.
  3. Perform the oc login command.

    You can access your Red Hat® OpenShift® cluster by using oc command directly from a Terminal in the client machine oc was installed to.

    To do so:

    1. Go to the Red Hat OpenShift web console.
    2. Click your login name and select the option: Copy login command.
    3. Click View token.
    4. Copy the entire command line under the Log in section with this token.
    5. Paste it in the Terminal of the client machine where oc was installed to and run the command. You should see a message saying that you can access a number of projects and a default project selected.
    From now on, next time you run oc commands in this opened Terminal in the client machine, it will be running the oc commands in your OpenShift cluster.
  4. Download the pull secret to the temporary directory:
    
    oc get secret/pull-secret \
      -n openshift-config \
      --template='{{index .data ".dockerconfigjson" | base64decode}}' > ${WORK_ROOT}/global_pull_secret.cfg
    
  5. Add the new pull secret to the local copy of the global_pull_secret.cfg file:
    
    oc registry login \
      --registry="${IBM_ENTITLEMENT_SERVER}" \
      --auth-basic="${IBM_ENTITLEMENT_USER}:${IBM_ENTITLEMENT_KEY}" \
      --to=${WORK_ROOT}/global_pull_secret.cfg
    
  6. Update the global pull secret on your cluster:
    
    oc set data secret/pull-secret \
    -n openshift-config \
    --from-file=.dockerconfigjson=${WORK_ROOT}/global_pull_secret.cfg