# Deploy latest ODF dev build Look for latest version here: https://quay.io/repository/rhceph-dev/ocs-registry?tab=tags&tag=latest ## Mirror the odf container images to the lab registry On your local machine, create a `imageset-config.yaml` file in a temporary directory (the local mirror can take up to 14G): ```yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: local: path: ./metadata mirror: operators: - catalog: quay.io/rhceph-dev/ocs-registry:4.16.0-130 # update that tag packages: - name: mcg-operator channels: - name: stable-4.16 - name: ocs-client-operator channels: - name: stable-4.16 - name: ocs-operator channels: - name: stable-4.16 - name: odf-csi-addons-operator channels: - name: stable-4.16 - name: odf-operator channels: - name: stable-4.16 - name: odf-prometheus-operator channels: - name: stable-4.16 - name: recipe channels: - name: stable-4.16 - name: rook-ceph-operator channels: - name: stable-4.16 ``` Install `oc-mirror` from https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/oc-mirror.tar.gz and extract the binary in your $PATH (like `~/bin`). Then run the following commands: ``` # This command will fail, that's expected as the images are not public. The output is then used to generate the pull command from the internal registry. oc mirror -c imageset-config.yaml file://registry --dry-run # Generate sync commands (from brew to local) grep "unable to" .oc-mirror.log | sed 's|^.*\(registry.redhat.io\)/\(.*\) manifest \(sha256:\w*\):.*$|skopeo copy --all --preserve-digests docker://\1/\2@\3 docker://localhost:5000/\2 --dest-tls-verify=false|' | sed 's|registry.redhat.io/openshift4/|registry-proxy.engineering.redhat.com/rh-osbs/openshift-|' | sed 's|registry.redhat.io/odf4/|registry-proxy.engineering.redhat.com/rh-osbs/odf4-|' | sed 's|registry.redhat.io/rhceph/rhceph-7-rhel9|registry-proxy.engineering.redhat.com/rh-osbs/rhceph|' > pullimages.sh # Generate sync commands (from local registry) grep "unable to" .oc-mirror.log | sed 's|^.*\(registry.redhat.io\)/\(.*\) manifest \(sha256:\w*\):.*$|skopeo copy --all --preserve-digests docker://localhost:5000/\2 docker://registry.ocp4.example.com:8443/\2 --src-tls-verify=false --dest-tls-verify=false|' > pushimages.sh # Start a local registry podman run --rm -d -p 5000:5000 -v ./v2:/var/lib/registry/docker/registry/v2/:Z registry:2 # Run the sync script (requires VPN access) sh pullimages.sh # Copy the v2 registry to utility rsync -aP v2/ utility:~/v2 --delete-before # On utility, start a registry with the v2 content podman run --rm -d -p 5000:5000 -v ./v2:/var/lib/registry/docker/registry/v2/:Z registry:2 # Login to the lab registry (developer user) podman login registry.ocp4.example.com:8443 --tls-verify=false # push images sh pushimages.sh # ?? # profit ``` Once the images are pushed in your lab registry, create a catalog source with the following content: ```yaml --- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: redhat-operators-odf namespace: openshift-marketplace labels: ocs-operator-internal: "true" spec: displayName: Openshift Container Storage icon: base64data: "" mediatype: "" image: quay.io/rhceph-dev/ocs-registry:4.16.0-130 # update that tag publisher: Red Hat sourceType: grpc priority: 100 # If the registry image still have the same tag (latest-stable-4.6, or for stage testing) # we need to have this updateStrategy, otherwise we will not see new pushed content. updateStrategy: registryPoll: interval: 15m ``` Make sure a valid pull-secret is configured on your cluster to access the quay repo.