From 3433ed143c315c9e091fecc8a1f769e9dca1ce8b Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 31 May 2024 13:36:40 -0700 Subject: [PATCH] Remove custom c9 __DOCKERFILE_INSTALL__; use generic version The c9 version didn't get the prerelease changes for ceph-release, so something was necessary to add them; besides that, the only differences were the old method of selecting ganesha for later releases and the enablement of crb instead of powertools in the last line. Since we already had code to test centos8 in daemon-base/__DOCKERFILE_INSTALL__, one more small conditional won't hurt. Also add the projectname (ceph) to the prerelease path (since ceph-build's sync-push tool now adds it). This affects the __DOCKERFILE_INSTALL_ as well as contrib/ceph-build-config.sh Signed-off-by: Dan Mick --- .../9/daemon-base/__DOCKERFILE_INSTALL__ | 95 ------------------- .../centos/daemon-base/__DOCKERFILE_INSTALL__ | 16 ++-- contrib/ceph-build-config.sh | 3 +- 3 files changed, 10 insertions(+), 104 deletions(-) delete mode 100644 ceph-releases/ALL/centos/9/daemon-base/__DOCKERFILE_INSTALL__ diff --git a/ceph-releases/ALL/centos/9/daemon-base/__DOCKERFILE_INSTALL__ b/ceph-releases/ALL/centos/9/daemon-base/__DOCKERFILE_INSTALL__ deleted file mode 100644 index 15d3b70a8..000000000 --- a/ceph-releases/ALL/centos/9/daemon-base/__DOCKERFILE_INSTALL__ +++ /dev/null @@ -1,95 +0,0 @@ -yum install -y epel-release && \ -yum install -y jq && \ -bash -c ' \ - if [ -n "__GANESHA_PACKAGES__" ]; then \ - if [[ "${CEPH_VERSION}" =~ master|main|reef|squid ]]; 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 ; \ - 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 ; \ - if [[ "${CEPH_VERSION}" =~ master || "${CEPH_VERSION}" == main ]]; then \ - curl -s -L https://shaman.ceph.com/api/repos/ceph-iscsi/main/latest/centos/__ENV_[DISTRO_VERSION]__/repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ - elif [[ "${CEPH_VERSION}" =~ nautilus|octopus|pacific|quincy|reef|squid ]]; then \ - curl -s -L https://download.ceph.com/ceph-iscsi/3/rpm/el__ENV_[DISTRO_VERSION]__/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ - else \ - curl -s -L https://download.ceph.com/ceph-iscsi/2/rpm/el__ENV_[DISTRO_VERSION]__/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ - fi ; \ - fi' && \ -yum update -y --setopt=install_weak_deps=False && \ -rpm --import 'https://download.ceph.com/keys/release.asc' && \ -if [[ "${CEPH_VERSION}" == nautilus ]]; then \ - CEPH_MGR_K8SEVENTS="ceph-mgr-k8sevents__ENV_[CEPH_POINT_RELEASE]__"; \ - if [[ -n "__ENV_[CEPH_POINT_RELEASE]__" ]]; then \ - CPR=__ENV_[CEPH_POINT_RELEASE]__ ; \ - if [[ ${CPR:1:2} -eq 14 ]] && [[ ${CPR:4:1} -eq 2 ]] && [[ ${CPR:6} -lt 5 ]]; then \ - CEPH_MGR_K8SEVENTS="" ; \ - fi ; \ - fi ; \ -fi && \ -bash -c ' \ - if [[ "${CEPH_VERSION}" =~ master || "${CEPH_VERSION}" == main ]] || ${CEPH_DEVEL}; then \ - ARCH=$(arch); \ - if [[ "${ARCH}" == "aarch64" ]]; then \ - ARCH="arm64"; \ - fi ; \ - REPO_URL=$(curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/__ENV_[DISTRO_VERSION]__/${ARCH}&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -r .[0].url); \ - RELEASE_VER=0 ;\ - if [[ "${OSD_FLAVOR}" == "crimson" ]]; then \ - CRIMSON_PACKAGES="ceph-crimson-osd__ENV_[CEPH_POINT_RELEASE]__";\ - fi ;\ - else \ - RELEASE_VER=1 ;\ - REPO_URL="http://download.ceph.com/rpm-${CEPH_VERSION}/el__ENV_[DISTRO_VERSION]__/"; \ - fi && \ - rpm -Uvh "$REPO_URL/noarch/ceph-release-1-${RELEASE_VER}.el__ENV_[DISTRO_VERSION]__.noarch.rpm" && \ - if [[ __ENV_[DISTRO_VERSION]__ -eq 8 ]]; then \ - yum install -y dnf-plugins-core ; \ - yum copr enable -y tchaikov/python-scikit-learn ; \ - yum copr enable -y tchaikov/python3-asyncssh ; \ - fi ' && \ -yum install -y --setopt=install_weak_deps=False --enablerepo=crb __CEPH_BASE_PACKAGES__ diff --git a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ index 15734d139..20ddeba34 100644 --- a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ +++ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ @@ -2,10 +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}" == squid ]]; then \ + if [[ "${CEPH_VERSION}" =~ master|main|reef|squid ]]; 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 ; \ @@ -94,7 +91,7 @@ bash -c ' \ else \ RELEASE_VER=1 ;\ if [[ __ENV_[PRERELEASE]__ = true ]] ; then \ - REPO_URL="https://__ENV_[PRERELEASE_USERNAME]__:__ENV_[PRERELEASE_PASSWORD]__@download.ceph.com/prerelease/rpm-${CEPH_VERSION}/el__ENV_[DISTRO_VERSION]__/"; \ + REPO_URL="https://__ENV_[PRERELEASE_USERNAME]__:__ENV_[PRERELEASE_PASSWORD]__@download.ceph.com/prerelease/ceph/rpm-${CEPH_VERSION}/el__ENV_[DISTRO_VERSION]__/"; \ else \ REPO_URL="http://download.ceph.com/rpm-${CEPH_VERSION}/el__ENV_[DISTRO_VERSION]__/"; \ fi \ @@ -105,7 +102,7 @@ bash -c ' \ # ago in the ceph build # if [[ __ENV_[PRERELEASE]__ = true ]] ; then \ - sed -i "s;http://download.ceph.com/;https://__ENV_[PRERELEASE_USERNAME]__:__ENV_[PRERELEASE_PASSWORD]__@download.ceph.com/prerelease/;" /etc/yum.repos.d/ceph.repo ; \ + sed -i "s;http://download.ceph.com/;https://__ENV_[PRERELEASE_USERNAME]__:__ENV_[PRERELEASE_PASSWORD]__@download.ceph.com/prerelease/ceph/;" /etc/yum.repos.d/ceph.repo ; \ dnf clean expire-cache ; \ fi && \ if [[ __ENV_[DISTRO_VERSION]__ -eq 8 ]]; then \ @@ -113,5 +110,8 @@ bash -c ' \ yum copr enable -y tchaikov/python-scikit-learn ; \ yum copr enable -y tchaikov/python3-asyncssh ; \ yum copr enable -y ceph/grpc ; \ - fi ' && \ -yum install -y --setopt=install_weak_deps=False --enablerepo=powertools __CEPH_BASE_PACKAGES__ + TOOLS_REPO=powertools ; \ + yum install -y --setopt=install_weak_deps=False --enablerepo=powertools __CEPH_BASE_PACKAGES__ ; \ + else \ + yum install -y --setopt=install_weak_deps=False --enablerepo=crb __CEPH_BASE_PACKAGES__ ; \ + fi' diff --git a/contrib/ceph-build-config.sh b/contrib/ceph-build-config.sh index d32a3761a..687aa1a55 100644 --- a/contrib/ceph-build-config.sh +++ b/contrib/ceph-build-config.sh @@ -227,7 +227,7 @@ function get_ceph_download_url () { error "get_ceph_download_url - unknown distro '${distro}''" esac if [ "$PRERELEASE" = true ] ; then - echo "https://$PRERELEASE_USERNAME:$PRERELEASE_PASSWORD@download.ceph.com/prerelease/${flavor_path}/${arch}/" + echo "https://$PRERELEASE_USERNAME:$PRERELEASE_PASSWORD@download.ceph.com/prerelease/ceph/${flavor_path}/${arch}/" else echo "https://download.ceph.com/${flavor_path}/${arch}/" fi @@ -376,6 +376,7 @@ function get_latest_full_semver_tag () { # For searching full versions, always use 'v..-' including the dash so that a # search for 'v1.1.1' doesn't return 'v1.1.11' for example if [ -n "${TEST_RUN:-}" ]; then + # date %Y%m%d local build_num ; build_num="$(generate_new_build_number)" build_num=$((build_num - 1)) if [[ $repository =~ .*amd64.* ]]; then