1) sudo dnf install -y podman
2) create new directory called mirror and go inside the folder
https://console.redhat.com/openshift/downloads#tool-mirror-registry – here you can download the mirror registry package or go to the next step to download directly.
download directly on the ssytem: wget https://mirror.openshift.com/pub/cgw/mirror-registry/latest/mirror-registry-amd64.tar.gz
3) date
pwd
ls -lrt
4) tar -xvzf mirror-registry-amd64.tar.gz
5) Before executing the next step, make sure the below are performed:
vi /etc/ssh/sshd_config
Look for PermitRootLogin yes – > change from no to yes
sudo systemctl restart sshd
6) Next one, change the system hostname from default to external domain:
login to root ID
type nmtui
select Change Hostname
add the external hostname – ex. subdomain.domain.com
Add A record for that domain subdomain.domain.com should resolve with this IP
Allow port number 8444 in firewall rule – All the above steps are important.
7) Now next step is to install Quay.
./mirror-registry install –quayHostname localhost –quayRoot /opt/quay/config
8) openssl s_client -connect localhost:8443 -showcerts
9) cd /etc/pki/ca-trust/source/anchors
10) pwd
11) vi quay.crt
12) sudo update-ca-trust
step to download linux
13) tar xvf openshift-client-linux.tar.gz
14) date
15) pwd
15) tar xvf openshift-client-linux.tar.gz
16) echo $PATH
17) cp oc /usr/local/bin
18) cp kubectl /usr/local/bin
19) kubectl version
20) Login to https://console.redhat.com/openshift/downloads and download the pull secret file.
21) OCP_RELEASE=4.14.42
export LOCAL_REGISTRY=’localhost:8443’
export LOCAL_REPOSITORY=’ocp4/openshift4test’
export PRODUCT_REPO=’openshift-release-dev’
export LOCAL_SECRET_JSON=’/opt/pull-secret.json’
export RELEASE_NAME=”ocp-release”
export ARCHITECTURE=x86_64
export REMOVABLE_MEDIA_PATH=/opt/images
22) podman login -u –authfile –tls-verify=false :
Command:
podman login -u init –authfile /opt/pull-secret.json –tls-verify=false localhost:8443
23) oc adm release mirror -a ${LOCAL_SECRET_JSON} –from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} –to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} –to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE} –insecure-skip-tls-verify