https://quay.io/user/pkomarov/ docker login #pkomarov qo20! make repo quay public! install runc, open vpn scripts/customize_staged_images.sh VERSION=${1:-"1.3.1-3"} REPO=${2:-"quay.io/pkomarov"} INDEX_IMG="$REPO/osp-director-operator-index:$VERSION" NEW_BUNDLE_IMG="$REPO/osp-director-operator-bundle:$VERSION" # example: docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel8-osp-director-operator-bundle:1.3.0-4 BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator:1.3.1-3 BUNDLE_IMG=${BUNDLE_IMG:?"Please set the BUNDLE_IMG"} #currently failing with : [r@r osp-director-operator]$ scripts/customize_staged_images.sh ++ VERSION=1.3.1-3 ++ REPO=quay.io/pkomarov ++ INDEX_IMG=quay.io/pkomarov/osp-director-operator-index:1.3.1-3 ++ NEW_BUNDLE_IMG=quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 ++ BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator:1.3.1-3 ++ BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator:1.3.1-3 ++ REPLACE_URL=registry.redhat.io/rhosp-rhel8 ++ WITH_URL=registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9 +++ mktemp -d ++ WORK_DIR=/tmp/tmp.2sQOuTwumW ++ cat +++ podman build -q /tmp/tmp.2sQOuTwumW ERRO[0000] OCI Runtime runc is in use by a container, but is not available (not in configuration file or not installed) ERRO[0000] Refreshing container 1d18ca1a8a3253901f8c8edade3e072bd6dbd41f7cd867a17a3a0e4945dfd90c: failed to get attach socket path for container 1d18ca1a8a3253901f8c8edade3e072bd6dbd41f7cd867a17a3a0e4945dfd90c: runtime runc is missing: OCI runtime attempted to invoke a command that was not found ERRO[0000] Refreshing container 6eae9f357e0051d1f87f5d4eec8f933d2967b19698bde25809130bff6e70cb6e: failed to get attach socket path for container 6eae9f357e0051d1f87f5d4eec8f933d2967b19698bde25809130bff6e70cb6e: runtime runc is missing: OCI runtime attempted to invoke a command that was not found Error: creating build container: initializing source docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator:1.3.1-3: pinging container registry registry-proxy.engineering.redhat.com: Get "https://registry-proxy.engineering.redhat.com/v2/": dial tcp: lookup registry-proxy.engineering.redhat.com: no such host ++ UPDATED_BUNDLE_IMG= # Script to modify the image references in the staged image bundle so they can be # installed easily tested from the registry-proxy.engineering.redhat.com staging repo internally. set -xe VERSION=${1:-"1.3.1-3"} REPO=${2:-"quay.io/pkomarov"} INDEX_IMG="$REPO/osp-director-operator-index:$VERSION" NEW_BUNDLE_IMG="$REPO/osp-director-operator-bundle:$VERSION" # example: docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel8-osp-director-operator-bundle:1.3.0-4 BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator-bundle:1.3.1-3 BUNDLE_IMG=${BUNDLE_IMG:?"Please set the BUNDLE_IMG"} REPLACE_URL=${REPLACE_URL:-"registry.redhat.io/rhosp-rhel8"} WITH_URL=${WITH_URL:-"registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9"} WORK_DIR=$(mktemp -d) # build a new "staged" bundle image. THIS ONE IS FOR INTERNAL STAGED TESTING ONLY. cat > $WORK_DIR/Dockerfile << EOF_CAT FROM $BUNDLE_IMG as bundle FROM golang:1.19 AS editor COPY --from=bundle /manifests/osp-director-operator.clusterserviceversion.yaml /osp-director-operator.clusterserviceversion.yaml RUN sed -e "s|$REPLACE_URL/osp-director-downloader|${WITH_URL}-osp-director-downloader|" -i /osp-director-operator.clusterserviceversion.yaml RUN sed -e "s|$REPLACE_URL/osp-director-agent|${WITH_URL}-osp-director-agent|" -i /osp-director-operator.clusterserviceversion.yaml RUN sed -e "s|$REPLACE_URL/osp-director-operator|${WITH_URL}-osp-director-operator|" -i /osp-director-operator.clusterserviceversion.yaml FROM $BUNDLE_IMG COPY --from=editor /osp-director-operator.clusterserviceversion.yaml /manifests/osp-director-operator.clusterserviceversion.yaml EOF_CAT UPDATED_BUNDLE_IMG=$(podman build -q $WORK_DIR) podman tag $UPDATED_BUNDLE_IMG $NEW_BUNDLE_IMG podman push $NEW_BUNDLE_IMG # Create a new index for testing the "staged" bundle image built above opm index add --bundles ${NEW_BUNDLE_IMG} --tag ${INDEX_IMG} -u podman --pull-tool podman podman push ${INDEX_IMG} [r@r osp-director-operator]$ scripts/customize_staged_images.sh ++ VERSION=1.3.1-3 ++ REPO=quay.io/pkomarov ++ INDEX_IMG=quay.io/pkomarov/osp-director-operator-index:1.3.1-3 ++ NEW_BUNDLE_IMG=quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 ++ BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator-bundle:1.3.1-3 ++ BUNDLE_IMG=docker://registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9-osp-director-operator-bundle:1.3.1-3 ++ REPLACE_URL=registry.redhat.io/rhosp-rhel8 ++ WITH_URL=registry-proxy.engineering.redhat.com/rh-osbs/rhosp-rhel9 +++ mktemp -d ++ WORK_DIR=/tmp/tmp.W3VafCurHR ++ cat +++ podman build -q /tmp/tmp.W3VafCurHR ++ UPDATED_BUNDLE_IMG=e15a5513418c44d04ada2bf4d331d35cf86a60ac48b73200309487ccc91810ab ++ podman tag e15a5513418c44d04ada2bf4d331d35cf86a60ac48b73200309487ccc91810ab quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 ++ podman push quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 Getting image source signatures Copying blob db743f860f74 skipped: already exists Copying blob 614284c98472 skipped: already exists Copying config e15a551341 done Writing manifest to image destination Storing signatures ++ opm index add --bundles quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 --tag quay.io/pkomarov/osp-director-operator-index:1.3.1-3 -u podman --pull-tool podman WARN[0000] DEPRECATION NOTICE: Sqlite-based catalogs and their related subcommands are deprecated. Support for them will be removed in a future release. Please migrate your catalog workflows to the new file-based catalog format. INFO[0000] building the index bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0000] running /usr/bin/podman pull quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3 bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] running podman create bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] running podman cp bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] running podman rm bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] Could not find optional dependencies file file=bundle_tmp1721020852/metadata load=annotations with=./bundle_tmp1721020852 INFO[0002] Could not find optional properties file file=bundle_tmp1721020852/metadata load=annotations with=./bundle_tmp1721020852 INFO[0002] Could not find optional dependencies file file=bundle_tmp1721020852/metadata load=annotations with=./bundle_tmp1721020852 INFO[0002] Could not find optional properties file file=bundle_tmp1721020852/metadata load=annotations with=./bundle_tmp1721020852 INFO[0002] Generating dockerfile bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] writing dockerfile: ./index.Dockerfile1283330945 bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] running podman build bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" INFO[0002] [podman build --format docker -f ./index.Dockerfile1283330945 -t quay.io/pkomarov/osp-director-operator-index:1.3.1-3 .] bundles="[quay.io/pkomarov/osp-director-operator-bundle:1.3.1-3]" ++ podman push quay.io/pkomarov/osp-director-operator-index:1.3.1-3 Getting image source signatures Copying blob 02cd68c0cbf6 skipped: already exists Copying blob d3c894b5b2b0 skipped: already exists Copying blob 960043b8858c skipped: already exists Copying blob dd5ad9c9c29f skipped: already exists Copying blob b4ca4c215f48 skipped: already exists Copying blob eebb06941f3e skipped: already exists Copying blob b40161cd83fc skipped: already exists Copying blob 4fa131a1b726 skipped: already exists Copying blob 4a2d7bc46f58 skipped: already exists Copying blob 46ba3f23f1d3 skipped: already exists Copying blob c941f3a46653 skipped: already exists Copying blob a61d8a732392 skipped: already exists Copying blob 191dd7e8d196 done Copying blob 78bee30427ca skipped: already exists Copying config f5b6c4ba6f done Writing manifest to image destination Storing signatures [r@r osp-director-operator]$ scripts/customize_staged_images.sh https://github.com/openstack-k8s-operators/osp-director-dev-tools/blob/master/ansible/templates/osp-director-operator/catalogsource.yaml.j2#L8 #osp 17.1 beta testing: csv_version: 1.3.1-3 director_operator_image: quay.io/pkomarov/osp-director-operator echo >> local-defaults.yaml director_operator_image: quay.io/pkomarov/osp-director-operator csv_version: 1.3.1-3