From 1ebc9381130de21e0cb5bb42dab55a6aa54a9a94 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 31 Jan 2022 16:54:29 +0100 Subject: [PATCH] distro/centos: move to stream 8 CentOS 8 is EOL as of Dec-2021. Let's move to stream 8. Signed-off-by: Guillaume Abrioux (cherry picked from commit 78614e722547bfc9e16f58901022dc9ba73a1019) --- .github/workflows/container.yml | 10 +++++----- .../centos/daemon-base/__DOCKERFILE_INSTALL__ | 16 ++++++++-------- .../debian/daemon-base/__DOCKERFILE_INSTALL__ | 4 ++-- tests/tox.sh | 7 ++++--- tox.ini | 2 +- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 5c2cef669..d40b7881f 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -8,17 +8,17 @@ jobs: uses: actions/checkout@v2 - name: build the ceph container image - run: make RELEASE="demo" FLAVORS="pacific,centos,8" build + run: make BASEOS_REGISTRY=quay.io/centos BASEOS_TAG=stream8 RELEASE="demo" FLAVORS="pacific,centos,8" build - name: run the ceph demo container - run: docker run -d --privileged --name ceph-demo -v /mnt/ceph:/var/lib/ceph -e RGW_FRONTEND_TYPE=beast -e DEBUG=verbose -e RGW_FRONTEND_PORT=8000 -e MON_IP=127.0.0.1 -e CEPH_PUBLIC_NETWORK=0.0.0.0/0 -e CLUSTER=ceph -e CEPH_DEMO_UID=demo -e CEPH_DEMO_ACCESS_KEY=G1EZ5R4K6IJ7XUQKMAED -e CEPH_DEMO_SECRET_KEY=cNmUrqpBKjCMzcfqG8fg4Qk07Xkoyau52OmvnSsz -e CEPH_DEMO_BUCKET=foobar -e SREE_PORT=5001 -e DATA_TO_SYNC=/etc/modprobe.d -e DATA_TO_SYNC_BUCKET=github -e OSD_COUNT=2 ceph/daemon:demo-pacific-centos-8-x86_64 demo + run: docker run -d --privileged --name ceph-demo -v /mnt/ceph:/var/lib/ceph -e RGW_FRONTEND_TYPE=beast -e DEBUG=verbose -e RGW_FRONTEND_PORT=8000 -e MON_IP=127.0.0.1 -e CEPH_PUBLIC_NETWORK=0.0.0.0/0 -e CLUSTER=ceph -e CEPH_DEMO_UID=demo -e CEPH_DEMO_ACCESS_KEY=G1EZ5R4K6IJ7XUQKMAED -e CEPH_DEMO_SECRET_KEY=cNmUrqpBKjCMzcfqG8fg4Qk07Xkoyau52OmvnSsz -e CEPH_DEMO_BUCKET=foobar -e SREE_PORT=5001 -e DATA_TO_SYNC=/etc/modprobe.d -e DATA_TO_SYNC_BUCKET=github -e OSD_COUNT=2 ceph/daemon:demo-pacific-centos-stream8-x86_64 demo - name: run the demo validation run: | sleep 10 sudo ./travis-builds/validate_demo_cluster.sh - docker exec ceph-demo ps fauwwwx - docker exec ceph-demo ss -ntlp + docker top ceph-demo + ss -ntlp docker exec ceph-demo cat /etc/ceph/ceph.conf - name: debug on failure @@ -39,4 +39,4 @@ jobs: run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - name: build the ceph container arm64 image - run: make RELEASE="demo" BASEOS_REPO=arm64v8/centos DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" DAEMON_TAG="daemon:demo-centos-8-aarch64" FLAVORS="pacific,centos-arm64,8" build + run: make BASEOS_REGISTRY=quay.io BASEOS_TAG=stream8 RELEASE="demo" BASEOS_REPO=centos/arm64v8 DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" DAEMON_TAG="daemon:demo-centos-stream8-aarch64" FLAVORS="pacific,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 bd903da39..facd5e9dc 100644 --- a/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ +++ b/ceph-releases/ALL/centos/daemon-base/__DOCKERFILE_INSTALL__ @@ -37,13 +37,13 @@ bash -c ' \ fi ; \ fi ; \ if [ -n "__ISCSI_PACKAGES__" ]; then \ - curl -s -L https://shaman.ceph.com/api/repos/tcmu-runner/master/latest/centos/__ENV_[BASEOS_TAG]__/repo?arch=$(arch) -o /etc/yum.repos.d/tcmu-runner.repo ; \ + curl -s -L https://shaman.ceph.com/api/repos/tcmu-runner/master/latest/centos/__ENV_[DISTRO_VERSION]__/repo?arch=$(arch) -o /etc/yum.repos.d/tcmu-runner.repo ; \ if [[ "${CEPH_VERSION}" =~ master ]]; then \ - curl -s -L https://shaman.ceph.com/api/repos/ceph-iscsi/master/latest/centos/__ENV_[BASEOS_TAG]__/repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ + curl -s -L https://shaman.ceph.com/api/repos/ceph-iscsi/master/latest/centos/__ENV_[DISTRO_VERSION]__/repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ elif [[ "${CEPH_VERSION}" =~ nautilus|octopus|pacific ]]; then \ - curl -s -L https://download.ceph.com/ceph-iscsi/3/rpm/el__ENV_[BASEOS_TAG]__/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ + 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_[BASEOS_TAG]__/ceph-iscsi.repo -o /etc/yum.repos.d/ceph-iscsi.repo ; \ + 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 && \ @@ -63,17 +63,17 @@ bash -c ' \ if [[ "${ARCH}" == "aarch64" ]]; then \ ARCH="arm64"; \ fi ; \ - REPO_URL=$(curl -s "https://shaman.ceph.com/api/search/?project=ceph&distros=centos/__ENV_[BASEOS_TAG]__/${ARCH}&flavor=${OSD_FLAVOR}&ref=${CEPH_REF}&sha1=latest" | jq -r .[0].url); \ + 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_[BASEOS_TAG]__/"; \ + 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_[BASEOS_TAG]__.noarch.rpm" && \ - if [[ __ENV_[BASEOS_TAG]__ -eq 8 ]]; then \ + 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 ; \ fi ' && \ diff --git a/ceph-releases/ALL/debian/daemon-base/__DOCKERFILE_INSTALL__ b/ceph-releases/ALL/debian/daemon-base/__DOCKERFILE_INSTALL__ index 45c39ddd0..420ba7a40 100644 --- a/ceph-releases/ALL/debian/daemon-base/__DOCKERFILE_INSTALL__ +++ b/ceph-releases/ALL/debian/daemon-base/__DOCKERFILE_INSTALL__ @@ -1,11 +1,11 @@ # add the necessary repos - echo "deb http://obs.linaro.org/ERP:/ceph-ansible:/${CEPH_VERSION}/Debian___ENV_[BASEOS_TAG]__ ./" \ + echo "deb http://obs.linaro.org/ERP:/ceph-ansible:/${CEPH_VERSION}/Debian___ENV_[DISTRO_VERSION]__ ./" \ >> /etc/apt/sources.list.d/erp.list && \ echo "deb http://deb.debian.org/debian/ __OS_CODENAME__-backports main" \ >> /etc/apt/sources.list.d/erp.list && \ echo "deb http://download.ceph.com/debian-${CEPH_VERSION} __OS_CODENAME__ main" \ >> /etc/apt/sources.list.d/ceph.list && \ - curl http://obs.linaro.org/ERP:/ceph-ansible:/${CEPH_VERSION}/Debian___ENV_[BASEOS_TAG]__/Release.key | apt-key add - && \ + curl http://obs.linaro.org/ERP:/ceph-ansible:/${CEPH_VERSION}/Debian___ENV_[DISTRO_VERSION]__/Release.key | apt-key add - && \ curl https://download.ceph.com/keys/release.asc | apt-key add - && \ DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -yy --force-yes --no-install-recommends \ diff --git a/tests/tox.sh b/tests/tox.sh index 789079a24..48e9624d6 100644 --- a/tests/tox.sh +++ b/tests/tox.sh @@ -83,11 +83,11 @@ if [[ "$NIGHTLY" != 'TRUE' ]]; then fi echo "Building flavor $FLAVOR" -make_output=$(make FLAVORS="$FLAVOR" stage) # Run staging to get DAEMON_IMAGE name +make_output=$(make FLAVORS="$FLAVOR" BASEOS_TAG="stream8" BASEOS_REGISTRY="${REGISTRY}/centos" BASEOS_REPO="centos" stage) # Run staging to get DAEMON_IMAGE name daemon_image=$(echo "${make_output}" | grep " DAEMON_IMAGE ") # Find DAEMON_IMAGE line daemon_image="${daemon_image#*DAEMON_IMAGE*: }" # Remove DAEMON_IMAGE from beginning daemon_image="$(echo "${daemon_image}" | tr -s ' ')" # Remove whitespace -make FLAVORS="$FLAVOR" BASEOS_REGISTRY="${REGISTRY}/centos" BASEOS_REPO="centos" build.parallel +make FLAVORS="$FLAVOR" BASEOS_TAG="stream8" BASEOS_REGISTRY="${REGISTRY}/centos" BASEOS_REPO="centos" build.parallel # start a local docker registry docker run -d -p 5000:5000 --restart=always --name registry registry:2 @@ -95,9 +95,10 @@ docker run -d -p 5000:5000 --restart=always --name registry registry:2 docker tag "${daemon_image}" localhost:5000/ceph/daemon:latest-pacific # this avoids a race condition between the tagging and the push # which causes this to sometimes fail when run by jenkins -sleep 1 +sleep 5 docker --debug push localhost:5000/ceph/daemon:latest-pacific + cd "$CEPH_ANSIBLE_SCENARIO_PATH" bash "$TOXINIDIR"/ceph-ansible/tests/scripts/vagrant_up.sh --no-provision --provider="$VAGRANT_PROVIDER" diff --git a/tox.ini b/tox.ini index 906c589db..9b17d52ce 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ setenv= REGISTRY_ADDRESS = 192.168.121.1:5000 CEPH_ANSIBLE_BRANCH = stable-6.0 VAGRANT_PROVIDER = {env:VAGRANT_PROVIDER:libvirt} - CEPH_ANSIBLE_VAGRANT_BOX = centos/8 + CEPH_ANSIBLE_VAGRANT_BOX = centos/stream8 REGISTRY = quay.io deps= ceph_ansible: ansible>=2.9,<2.10