Uploaded image for project: 'OpenShift Request For Enhancement'
  1. OpenShift Request For Enhancement
  2. RFE-3393

[RFE] oc-mirror: Include the possibility to copy OCP release images from a local registry

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • None
    • openshift-4.11.z
    • oc
    • False
    • None
    • False
    • Not Selected

      oc-mirror is being used under the hood to obtain all the dependencies necessary to precache all container images during an OCP installation and day-2 operations, which are basically installing & configure specific operators,  in telco environments. 

      Motivation:

       

      The point is that telco RAN (radio access network) environments usually we have limited bandwidth so it might be desirable to avoid the use of the network for downloading all the artifacts required for bootstrapping and installing OCP.  Remember that the bandwidth to remote DU SNO sites is limited resulting in long deployment times with the existing ZTP solution. 
      In order to address the bandwidth limitations, a factory pre-staging solution is required to eliminate the download of artifacts at the remote site.The factory-precaching-cli tool facilitates the pre-staging of servers before they are shipped to the site for later ZTP provisioning. 
      
      The factory-precaching-tool will pull to the server that is going to be installed all the container images required to install & configure a SNO. They will be extracted in the local container-storage folder of the SNO before actually starting the installation. The objective is avoid pulling down images even from a local registry and use as much as possible the ones that were loaded local.
      

       

      In telco environments, most of the installations are disconnected and we do not have access to the Internet. So we are using oc-mirror (currently in a connected server) to run a list of all container images that are required to be downloaded to the server that is going to be installed. This information is stored in a file called mapping.txt.

       

      oc-mirror", "-c", path.Join(folder, "imageset.yaml"), "file://"+tmpDir+"/mirror", "--ignore-history", "--dry-run") 
       
      

       [1]https://github.com/openshift-kni/telco-ran-tools/blob/main/cmd/download.go#L73

      We are looking for a way to obtain that mapping.txt from a local/disconnected registry instead of the official Red Hat registries. Currently, we can set the catalogsources to point to our disconnected registry, but there is no way to tell oc-mirror to connect to our disconnected registry and create the list of images that needs to be pulled from OCP release X.

      The problem is that if we obtain the list of OCP required release images from an official RH registry, the mapping can be different from the images that are actually in the disconnected registry (maybe because the disconnected registry was not mirrored for a couple of days -  and remember that installation is going to be disconnected). That could cause the image preached not to be used since the one loaded locally does not match the one actually needed. Therefore the installation process could either stop or end up downloading the image from the network.

       

      If you're interested here you have a video of the precaching-cli-tool prototype: https://videos.learning.redhat.com/media/Pre-staging+prototype+for+Telco+GitopsA+Integration+with+ZTP/1_fflf4o9j/253048913

       

              heheffne@redhat.com Heather Heffner
              alosadag@redhat.com Alberto Losada
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: