From 8130458095a2acfa5d952783b7eb7c94c67414c0 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Mon, 6 Mar 2023 17:15:17 -0700 Subject: [PATCH 1/2] update main and quincy to include NFS on ARM Update main and quincy build configs to include now-existing packages for NFS on ARM architectures. Signed-off-by: Blaine Gardner --- .github/workflows/container.yml | 14 +++++++++++++- .../ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ | 2 +- .../main/centos-arm64/__GANESHA_PACKAGES__ | 1 + .../quincy/centos-arm64/__GANESHA_PACKAGES__ | 1 + 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 ceph-releases/main/centos-arm64/__GANESHA_PACKAGES__ create mode 100644 ceph-releases/quincy/centos-arm64/__GANESHA_PACKAGES__ diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 19ed16959..8ab0f0652 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -39,4 +39,16 @@ jobs: run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: build the ceph container arm64 image - run: make BASEOS_REGISTRY=quay.io BASEOS_TAG=stream8 RELEASE="demo" BASEOS_REPO=centos/arm64v8 DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" DEMO_TAG="demo:demo-centos-stream8-aarch64" DAEMON_TAG="daemon:demo-centos-stream8-aarch64" FLAVORS="main,centos-arm64,8" build + run: make BASEOS_REGISTRY=quay.io/centos BASEOS_TAG=stream8 RELEASE="demo" BASEOS_REPO=centos DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" DEMO_TAG="demo:demo-centos-stream8-aarch64" DAEMON_TAG="daemon:demo-centos-stream8-aarch64" FLAVORS="main,centos-arm64,8" build + + arm64-quincy: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: setup qemu-static-user + run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + + - name: build the ceph container arm64 image + run: make BASEOS_REGISTRY=quay.io/centos BASEOS_TAG=stream8 RELEASE="demo" BASEOS_REPO=centos DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" IMAGES_TO_BUILD="daemon-base" FLAVORS="main,centos-arm64,8" build diff --git a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ index b54aa2347..5dccbae5a 100644 --- a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ +++ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ @@ -13,7 +13,7 @@ bash -c ' \ 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 "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}" == pacific ]]; then \ diff --git a/ceph-releases/main/centos-arm64/__GANESHA_PACKAGES__ b/ceph-releases/main/centos-arm64/__GANESHA_PACKAGES__ new file mode 100644 index 000000000..d6c28e9b3 --- /dev/null +++ b/ceph-releases/main/centos-arm64/__GANESHA_PACKAGES__ @@ -0,0 +1 @@ +nfs-ganesha nfs-ganesha-ceph nfs-ganesha-rgw nfs-ganesha-rados-grace nfs-ganesha-rados-urls sssd-client diff --git a/ceph-releases/quincy/centos-arm64/__GANESHA_PACKAGES__ b/ceph-releases/quincy/centos-arm64/__GANESHA_PACKAGES__ new file mode 100644 index 000000000..d6c28e9b3 --- /dev/null +++ b/ceph-releases/quincy/centos-arm64/__GANESHA_PACKAGES__ @@ -0,0 +1 @@ +nfs-ganesha nfs-ganesha-ceph nfs-ganesha-rgw nfs-ganesha-rados-grace nfs-ganesha-rados-urls sssd-client From 9b969a0ab08696a03076b40f9ec53db10c53fbaa Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 31 May 2023 13:01:21 -0600 Subject: [PATCH 2/2] change how centos selects NFS repos Change to a case-statement-based method of choosing the NFS ganesha repo. This should keep bloat down while allowing reliable arm builds from shaman for ceph main. Signed-off-by: Blaine Gardner --- .../centos/daemon-base/__DOCKERFILE_INSTALL__ | 91 +++++++++---------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ index 5dccbae5a..3d815bf04 100644 --- a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ +++ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ @@ -1,54 +1,53 @@ yum install -y epel-release && \ yum install -y jq && \ -bash -c ' \ +bash -x -c ' \ if [ -n "__GANESHA_PACKAGES__" ]; then \ - if [[ "${CEPH_VERSION}" == master || "${CEPH_VERSION}" == main ]]; then \ - curl -s -L "https://shaman.ceph.com/api/repos/nfs-ganesha/next/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-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}" == 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 ; \ + arch_baseurl="" ; \ + noarch_baseurl="" ; \ + gpgcheck=1 ; \ + case "${CEPH_VERSION}" in \ + master | main ) \ + ARCH=$(arch); \ + if [[ "${ARCH}" == "aarch64" ]]; then \ + ARCH="arm64"; \ + fi ; \ + base="$(curl -s -L "https://shaman.ceph.com/api/search/?project=nfs-ganesha&ref=next&sha1=latest&flavor=ceph_main&distros=centos/__ENV_[DISTRO_VERSION]__/${ARCH}" | jq -e -r ".[0].url")" ; \ + arch_baseurl="$base/\$basearch/" ; \ + noarch_baseurl="$base/noarch/" ; \ + gpgcheck=0 ; \ + ;; \ + quincy | reef ) \ + arch_baseurl="https://buildlogs.centos.org/centos/\$releasever-stream/storage/\$basearch/nfsganesha-5/" ; \ + noarch_baseurl="" ; \ + ;; \ + pacific ) \ + arch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/\$basearch/" ; \ + noarch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V3.5-stable/$CEPH_VERSION/el\$releasever/noarch/" ; \ + ;; \ + octopus ) \ + arch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/\$basearch/" ; \ + noarch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V3.3-stable/$CEPH_VERSION/el\$releasever/noarch/" ; \ + ;; \ + nautilus ) \ + arch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V2.8-stable/$CEPH_VERSION/el\$releasever/\$basearch/" ; \ + noarch_baseurl="" ; \ + ;; \ + * ) \ + arch_baseurl="https://download.ceph.com/nfs-ganesha/rpm-V2.7-stable/$CEPH_VERSION/el\$releasever/\$basearch/" ; \ + noarch_baseurl="" ; \ + ;; \ + esac ; \ + echo "[ganesha]" > /etc/yum.repos.d/ganesha.repo ; \ + echo "name=ganesha" >> /etc/yum.repos.d/ganesha.repo ; \ + echo "baseurl=$arch_baseurl" >> /etc/yum.repos.d/ganesha.repo ; \ + echo "gpgcheck=$gpgcheck" >> /etc/yum.repos.d/ganesha.repo ; \ + echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \ + if [[ -n "$noarch_baseurl" ]]; then \ + echo "" >> /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 "baseurl=$noarch_baseurl" >> /etc/yum.repos.d/ganesha.repo ; \ + echo "gpgcheck=$gpgcheck" >> /etc/yum.repos.d/ganesha.repo ; \ echo "enabled=1" >> /etc/yum.repos.d/ganesha.repo ; \ fi ; \ fi ; \