From: Sage Weil Date: Mon, 5 Apr 2021 18:49:18 +0000 (-0500) Subject: qa/distros/podman: preserve registries.conf X-Git-Tag: v15.2.14~65^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1d6bacc787d5fa84c447abcd8ba5a15ea075c06;p=ceph.git qa/distros/podman: preserve registries.conf Otherwise we'll lose the mirror configuration. trivial-fix: specify location for container registry since we use sepia labs as our container registery, which otherwise can't find registries.conf Signed-off-by: Sage Weil (cherry picked from commit 917a9c49e55ab107c1e5b1d035398344bcd33858) --- diff --git a/qa/distros/podman/centos_8.2_kubic_stable.yaml b/qa/distros/podman/centos_8.2_kubic_stable.yaml index dde0c532c65..5ea907f758f 100644 --- a/qa/distros/podman/centos_8.2_kubic_stable.yaml +++ b/qa/distros/podman/centos_8.2_kubic_stable.yaml @@ -8,9 +8,12 @@ overrides: tasks: - exec: all: + - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - sudo dnf -y module disable container-tools - sudo dnf -y install 'dnf-command(copr)' - sudo dnf -y copr enable rhcontainerbot/container-selinux - sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo - sudo dnf remove -y podman - sudo dnf -y install podman + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf diff --git a/qa/distros/podman/rhel_8.3_kubic_stable.yaml b/qa/distros/podman/rhel_8.3_kubic_stable.yaml index 817dd3b47e9..541cf5180e3 100644 --- a/qa/distros/podman/rhel_8.3_kubic_stable.yaml +++ b/qa/distros/podman/rhel_8.3_kubic_stable.yaml @@ -8,9 +8,12 @@ overrides: tasks: - exec: all: + - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - sudo dnf -y module disable container-tools - sudo dnf -y install 'dnf-command(copr)' - sudo dnf -y copr enable rhcontainerbot/container-selinux - sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo - sudo dnf remove -y podman - sudo dnf -y install podman + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf diff --git a/qa/distros/podman/ubuntu_18.04_kubic_stable.yaml b/qa/distros/podman/ubuntu_18.04_kubic_stable.yaml index 214e964ac80..136d5c4f865 100644 --- a/qa/distros/podman/ubuntu_18.04_kubic_stable.yaml +++ b/qa/distros/podman/ubuntu_18.04_kubic_stable.yaml @@ -5,8 +5,10 @@ os_version: "18.04" tasks: - exec: all: + - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/Release.key | sudo apt-key add - - echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list - sudo apt update - sudo apt -y install podman - - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf diff --git a/qa/distros/podman/ubuntu_20.04_kubic_stable.yaml b/qa/distros/podman/ubuntu_20.04_kubic_stable.yaml index bd57bbf3d13..9c42eb2ffb8 100644 --- a/qa/distros/podman/ubuntu_20.04_kubic_stable.yaml +++ b/qa/distros/podman/ubuntu_20.04_kubic_stable.yaml @@ -5,8 +5,10 @@ os_version: "20.04" tasks: - exec: all: + - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | sudo apt-key add - - echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list - sudo apt update - - sudo apt -y install podman - - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf diff --git a/qa/distros/podman/ubuntu_20.04_kubic_testing.yaml b/qa/distros/podman/ubuntu_20.04_kubic_testing.yaml index 5656703fd3e..75e72d7397b 100644 --- a/qa/distros/podman/ubuntu_20.04_kubic_testing.yaml +++ b/qa/distros/podman/ubuntu_20.04_kubic_testing.yaml @@ -5,8 +5,10 @@ os_version: "20.04" tasks: - exec: all: + - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup - curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/Release.key | sudo apt-key add - - echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:testing.list - sudo apt update - - sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman - - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf + - sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins + - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf