Add support for fedora (25+) AFS mirrors

Now that fedora-25 is online, we can start using the new AFS mirror for
fedora. Keep in mind, we didn't mirror fedora-24, since fedora-25 will
be replacing it.

Once fedora-24 has been removed from nodepool.yaml, we can remove our
conditional check.

Change-Id: I1bd510c6a568b71b604c27d6cae16d2654063d0c
Depends-On: I762e55fb7fe0c5ebfb7810545ddb4d5ccfedf2ff
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-01-13 15:52:40 -05:00
parent b5fc544b21
commit 25968cc69a

View File

@ -58,6 +58,7 @@ NODEPOOL_UBUNTU_MIRROR=${NODEPOOL_UBUNTU_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ub
NODEPOOL_CENTOS_MIRROR=${NODEPOOL_CENTOS_MIRROR:-http://$NODEPOOL_MIRROR_HOST/centos} NODEPOOL_CENTOS_MIRROR=${NODEPOOL_CENTOS_MIRROR:-http://$NODEPOOL_MIRROR_HOST/centos}
NODEPOOL_DEBIAN_OPENSTACK_MIRROR=${NODEPOOL_DEBIAN_OPENSTACK_MIRROR:-http://$NODEPOOL_MIRROR_HOST/debian-openstack} NODEPOOL_DEBIAN_OPENSTACK_MIRROR=${NODEPOOL_DEBIAN_OPENSTACK_MIRROR:-http://$NODEPOOL_MIRROR_HOST/debian-openstack}
NODEPOOL_EPEL_MIRROR=${NODEPOOL_EPEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/epel} NODEPOOL_EPEL_MIRROR=${NODEPOOL_EPEL_MIRROR:-http://$NODEPOOL_MIRROR_HOST/epel}
NODEPOOL_FEDORA_MIRROR=${NODEPOOL_FEDORA_MIRROR:-http://$NODEPOOL_MIRROR_HOST/fedora}
NODEPOOL_CEPH_MIRROR=${NODEPOOL_CEPH_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ceph-deb-hammer} NODEPOOL_CEPH_MIRROR=${NODEPOOL_CEPH_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ceph-deb-hammer}
NODEPOOL_UCA_MIRROR=${NODEPOOL_UCA_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu-cloud-archive} NODEPOOL_UCA_MIRROR=${NODEPOOL_UCA_MIRROR:-http://$NODEPOOL_MIRROR_HOST/ubuntu-cloud-archive}
NODEPOOL_NPM_MIRROR=${NODEPOOL_NPM_MIRROR:-http://$NODEPOOL_MIRROR_HOST/npm/} NODEPOOL_NPM_MIRROR=${NODEPOOL_NPM_MIRROR:-http://$NODEPOOL_MIRROR_HOST/npm/}
@ -116,6 +117,28 @@ DEBIAN_OPENSTACK_NEWTON_SOURCES_LIST="\
deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton main deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton main
deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton-backports main" deb $NODEPOOL_DEBIAN_OPENSTACK_MIRROR $LSBDISTCODENAME-newton-backports main"
YUM_REPOS_FEDORA="\
[fedora]
name=Fedora \$releasever - \$basearch
failovermethod=priority
baseurl=$NODEPOOL_FEDORA_MIRROR/releases/\$releasever/Everything/\$basearch/os/
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-\$releasever-\$basearch
skip_if_unavailable=False"
YUM_REPOS_FEDORA_UPDATES="\
[updates]
name=Fedora \$releasever - \$basearch - Updates
failovermethod=priority
baseurl=$NODEPOOL_FEDORA_MIRROR/updates/\$releasever/\$basearch/
enabled=1
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-\$releasever-\$basearch
skip_if_unavailable=False"
YUM_REPOS_CENTOS_BASE="\ YUM_REPOS_CENTOS_BASE="\
[base] [base]
name=CentOS-\$releasever - Base name=CentOS-\$releasever - Base
@ -235,4 +258,13 @@ elif [ "$LSBDISTID" == "CentOS" ]; then
sudo chown root:root /etc/yum.repos.d/* sudo chown root:root /etc/yum.repos.d/*
sudo chmod 0644 /etc/yum.repos.d/* sudo chmod 0644 /etc/yum.repos.d/*
# TODO(pabelanger): Remove 'TwentyFour' check when fedora-24 is removed from
# nodepool.yaml.
elif [ "$LSBDISTID" == "Fedora" ] && [ "$LSBDISTCODENAME" != 'TwentyFour' ]; then
echo "$YUM_REPOS_FEDORA" >/tmp/fedora.repo
sudo mv /tmp/fedora.repo /etc/yum.repos.d/
echo "$YUM_REPOS_FEDORA_UPDATES" >/tmp/fedora-updates.repo
sudo mv /tmp/fedora-updates.repo /etc/yum.repos.d/
sudo chown root:root /etc/yum.repos.d/*
sudo chmod 0644 /etc/yum.repos.d/*
fi fi