okdv3/provision/fix-openshift-repos.sh

46 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Comprehensive fix for OpenShift Origin repository issues
echo "Fixing OpenShift Origin repository URLs..."
# Fix the main CentOS-OpenShift-Origin311.repo file to use vault.centos.org
cat > /etc/yum.repos.d/CentOS-OpenShift-Origin311.repo << 'REPO_EOF'
[centos-openshift-origin311]
name=CentOS OpenShift Origin
baseurl=http://vault.centos.org/centos/7/paas/x86_64/openshift-origin311/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS
[centos-openshift-origin311-testing]
name=CentOS OpenShift Origin Testing
baseurl=http://vault.centos.org/centos/7/paas/x86_64/openshift-origin311/
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS
[centos-openshift-origin311-debuginfo]
name=CentOS OpenShift Origin DebugInfo
baseurl=http://vault.centos.org/centos/7/paas/x86_64/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS
[centos-openshift-origin311-source]
name=CentOS OpenShift Origin Source
baseurl=http://vault.centos.org/centos/7/paas/Source/openshift-origin311/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS
REPO_EOF
# Also handle any other variants
if [ -f /etc/yum.repos.d/centos-openshift-origin311.repo ]; then
rm -f /etc/yum.repos.d/centos-openshift-origin311.repo
fi
# Clean yum cache to remove any cached broken repo data
yum clean all
echo "OpenShift Origin repository URLs fixed to use vault.centos.org"