Skip to content

Instantly share code, notes, and snippets.

@ralvares
Last active December 21, 2020 12:21
Show Gist options
  • Save ralvares/5d1ce0ad63814304b9736fbc471105b9 to your computer and use it in GitHub Desktop.
Save ralvares/5d1ce0ad63814304b9736fbc471105b9 to your computer and use it in GitHub Desktop.
OCP 4.6 and Custom Catalogs
# CentOS 8 - Install Latest Podman
sudo dnf -y module disable container-tools
sudo dnf -y install 'dnf-command(copr)'
sudo dnf -y copr enable rhcontainerbot/container-selinux
sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
sudo dnf -y install podman
RHEL8.x/CENTOS8.x
podman version 1.8+
opm requires GLIBC-2.28 not available on RHEL7/CENTOS7
podman login registry.redhat.io
podman login registry.example.local:5000
For oc client version 4.6 - it might show errors:
If you have similar problems with oc client 4.6: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0
Just "export GODEBUG=x509ignoreCN=0"
export GODEBUG=x509ignoreCN=0
oc image extract registry.redhat.io/openshift4/ose-operator-registry:v4.6 -a /root/bundle-pullsecret.txt --path /usr/bin/opm:. --confirm
chmod +x ./opm
sudo mv ./opm /usr/local/bin/
Generating Custom Catalog: advanced-cluster-management,quay-operator,local-storage-operator,codeready-workspaces,compliance-operator,elasticsearch-operator,cluster-logging
opm index prune -f registry.redhat.io/redhat/redhat-operator-index:v4.6 \
-p advanced-cluster-management,quay-operator,local-storage-operator,codeready-workspaces,compliance-operator,elasticsearch-operator,cluster-logging \
-t registry.example.local:5000/olm/redhat-operator-index:v4.6
podman push registry.example.local:5000/olm/redhat-operator-index:v4.6
oc adm catalog mirror \
registry.example.local:5000/olm/redhat-operator-index:v4.6 \
registry.example.local:5000 \
-a /root/bundle-pullsecret.txt \
--filter-by-os=/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment