PPA installation fails to load on to IBM Cloud Private repository

As you load the PPA installalation image in to the IBM Cloud Private repository, the Docker log in displays the unauthorized: authentication required error.

Symptoms

Your images stop loading into the IBM Cloud Private repository. The following error message is displayed:

  unauthorized: authentication required
    (Are you logged in to the docker registry?)

Causes

If your cluster has constrained resources or shared infrastructures between VMware and OpenStack, installation of the PPA fails.

Resolving the problem

  1. Log in to Docker. Run the following command:

    docker login cluster_CA_domain:8500 -u username -p password
    
  2. If logging in is successful, install the PPA images into the IBM Cloud Private repository. Run the following command:

    cloudctl catalog load-archive --archive ppa_file --registry
    cluster_CA_domain:8500/namespace
    
  3. If logging in fails again, your PPA images stop loading and you are logged out of Docker.

    Complete the following steps to successfully install your PPA images in to the IBM Cloud Private repository:

    1. Log in to Docker. Run the following command:

      docker login cluster_CA_domain:8500 -u username -p password
      
    2. Run the following command to extract the PPA installation image:

      tar -xzvf ppa_file
      
    3. Load all the Docker image archive files into the Docker engine. Run the following command to record the Docker image name and tag into the file:

      for i in `ls images/*`;
      do
      echo $i;
      echo docker load -i $i
      docker load -i $i | tee -a IMG_LOG.txt
      done
      
    4. If you logged out of Docker again, log in again. Record the Docker image name and tag the image cluster_CA_domain:8500/namespace/imagename:tag. Run the following command:

    for img in `awk -F ':' ' {print $2":"$3} ' IMG_LOG.txt`
    do
      echo docker tag $img cluster_CA_domain:8500/namespace/$img
      docker tag $img cluster_CA_domain:8500/namespace/$img
      echo docker push cluster_CA_domain:8500/namespace/$img
      docker push cluster_CA_domain:8500/namespace/$img
    done
    
    1. If you are logged out of your cluster, run the following command to log in to your cluster:

      cloudctl login -a https://cluster_CA_domain:8443 --skip-ssl-validation
      
    2. Load the Helm chart that is located in the charts directory into the IBM Cloud Private repository. Run the following command:

      cloudctl catalog load-chart --archive charts/ibm-cloud-appmgmt-prod-1.0.0.tgz
      

The PPA image installation is successful.

For more information about the IBM Cloud Private Catalog, see IBM Cloud Private Catalog commands.