Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
use official centos repos for nfs-ganesha packages
Browse files Browse the repository at this point in the history
Do not use buildlogs.centos.org as a repo. Those locations are not
guaranteed to be permanent storehouses for RPM builds, and they are
generally assumed to also have non-release versions as well.

Instead, use official Centos mirrors for nfs-ganesha packages starting
with ganesha v4. This commit also codifies the NFS repo for stream9,
which changes its URL structure significantly from stream8. Though
stream9 is not used yet, it will be coming soon, and it is important to
record the change in NFS repo that happens in stream9 alongside these
changes to make the upcoming transition easier.

To handle the additional complexity that now exists with ganesha repos
differing between stream8 and stream9, and also differing between Ceph
versions, this commit changes the old if,elsif,elsif,else approach to
setting the ganesha repo in the Dockerfile to one where __GANESHA_REPO__
is defined and can be overridden in Ceph version directories.

All builds using stream8 or stream9 begin with a base __GANESHA_REPO__
that allows the ceph version directory to specify __GANESHA_VER__. This
base __GANESHA_REPO__ should be suitable for main builds for the
forseeable future. It is also suitable for Ceph reef (which uses
__GANESHA_VER__ = 5) and Ceph quincy (which uses __GANESHA_VER__ = 4).
Ceph main builds obviously use the latest __GANESHA_VER__ = 5 value.

The above applies to the Ceph main, Reef, and Quincy builds which were
previously using buildlogs repos.

Ceph releases for Pacific and earlier include NFS-Ganesha packages that
are built alongside the Ceph RPMs which have specific API compatibility
options set. Therefore, __GANESHA_REPO__ is overridden for pacific and
lower builds and is set to the same content that was previously selected
via the if,elsif,elsif,else behavior.

Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Nov 9, 2023
1 parent c97b9ee commit c7b1def
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 51 deletions.
5 changes: 5 additions & 0 deletions ceph-releases/ALL/centos-arm64/8/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=http://mirror.centos.org/centos/8-stream/storage/\$basearch/nfsganesha-__GANESHA_VER__/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=0" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
5 changes: 5 additions & 0 deletions ceph-releases/ALL/centos/8/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=http://mirror.centos.org/centos/8-stream/storage/\$basearch/nfsganesha-__GANESHA_VER__/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=0" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
5 changes: 5 additions & 0 deletions ceph-releases/ALL/centos/9/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://mirror.stream.centos.org/SIGs/9-stream/storage/\$basearch/nfsganesha-__GANESHA_VER__/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=0" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
51 changes: 1 addition & 50 deletions ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,7 @@ yum install -y epel-release && \
yum install -y jq && \
bash -c ' \
if [ -n "__GANESHA_PACKAGES__" ]; then \
if [[ "${CEPH_VERSION}" == master || "${CEPH_VERSION}" == main ]]; then \
ARCH=$(arch); if [[ "${ARCH}" == "aarch64" ]]; then ARCH="arm64"; fi ; \
curl -s -L "https://shaman.ceph.com/api/repos/nfs-ganesha/V5.7/latest/centos/__ENV_[DISTRO_VERSION]__/flavors/ceph_main/repo?arch=${ARCH}" -o /etc/yum.repos.d/ganesha.repo ; \
elif [[ "${CEPH_VERSION}" == reef ]]; then \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://buildlogs.centos.org/centos/\$releasever-stream/storage/\$basearch/nfsganesha-5/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=0" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
elif [[ "${CEPH_VERSION}" == quincy ]]; then \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://buildlogs.centos.org/centos/\$releasever/storage/\$basearch/nfsganesha-4/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=0" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
elif [[ "${CEPH_VERSION}" == pacific ]]; then \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "[ganesha-noarch]" >> /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha-noarch" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/noarch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
elif [[ "${CEPH_VERSION}" == octopus ]]; then \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "[ganesha-noarch]" >> /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha-noarch" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/noarch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
elif [[ "${CEPH_VERSION}" == nautilus ]]; then \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V2.8-stable/$CEPH_VERSION/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
else \
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V2.7-stable/$CEPH_VERSION/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
fi ; \
__GANESHA_REPO__
fi ; \
if [ -n "__ISCSI_PACKAGES__" ]; then \
curl -s -L https://shaman.ceph.com/api/repos/tcmu-runner/main/latest/centos/__ENV_[DISTRO_VERSION]__/repo?arch=$(arch) -o /etc/yum.repos.d/tcmu-runner.repo ; \
Expand Down
5 changes: 5 additions & 0 deletions ceph-releases/luminous/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V2.7-stable/$CEPH_VERSION/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
1 change: 1 addition & 0 deletions ceph-releases/main/__GANESHA_VER__
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
5 changes: 5 additions & 0 deletions ceph-releases/mimic/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V2.7-stable/$CEPH_VERSION/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
5 changes: 5 additions & 0 deletions ceph-releases/nautilus/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V2.8-stable/$CEPH_VERSION/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
10 changes: 10 additions & 0 deletions ceph-releases/octopus/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "[ganesha-noarch]" >> /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha-noarch" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/noarch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
10 changes: 10 additions & 0 deletions ceph-releases/pacific/__GANESHA_REPO__
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/\$basearch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "[ganesha-noarch]" >> /etc/yum.repos.d/ganesha.repo ; \
echo "name=ganesha-noarch" >> /etc/yum.repos.d/ganesha.repo ; \
echo "baseurl=https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/noarch/" >> /etc/yum.repos.d/ganesha.repo ; \
echo "gpgcheck=1" >> /etc/yum.repos.d/ganesha.repo ; \
echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \
1 change: 1 addition & 0 deletions ceph-releases/quincy/__GANESHA_VER__
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
1 change: 1 addition & 0 deletions ceph-releases/reef/__GANESHA_VER__
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
2 changes: 1 addition & 1 deletion ceph-releases/reef/centos-arm64/__GANESHA_PACKAGES__

0 comments on commit c7b1def

Please sign in to comment.