Skip to content

Commit

Permalink
Stop using CDN for CI (#2185)
Browse files Browse the repository at this point in the history
Switch image builds to use Harbor
Switch Zuul to avoid CDN
Small more fixes
Configure CI bits to not use CDN
  • Loading branch information
mnaser authored Dec 12, 2024
1 parent 776703f commit 4ad7b51
Show file tree
Hide file tree
Showing 63 changed files with 129 additions and 120 deletions.
7 changes: 5 additions & 2 deletions build/pin-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ def get_digest(image_ref, token=None):
def get_pinned_image(image_src):
image_ref = reference.Reference.parse(image_src)

if image_ref.domain() == "registry.atmosphere.dev":
if (
image_ref.domain() == "registry.atmosphere.dev"
or image_ref.domain() == "harbor.atmosphere.dev"
):
# Get token for docker.io
r = requests.get(
"https://registry.atmosphere.dev/service/token",
"https://harbor.atmosphere.dev/service/token",
timeout=5,
params={
"service": "harbor-registry",
Expand Down
4 changes: 2 additions & 2 deletions images/barbican/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG BARBICAN_GIT_REF=ca57ef5436e20e90cf6cd6853efe3c89a9afd986
ADD --keep-git-dir=true https://opendev.org/openstack/barbican.git#${BARBICAN_GIT_REF} /src/barbican
RUN git -C /src/barbican fetch --unshallow
Expand All @@ -14,5 +14,5 @@ pip3 install \
pykmip
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
COPY --from=build --link /var/lib/openstack /var/lib/openstack
4 changes: 2 additions & 2 deletions images/cinder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG CINDER_GIT_REF=b0f0b9015b9dfa228dff98eeee5116d8eca1c3cc
ADD --keep-git-dir=true https://opendev.org/openstack/cinder.git#${CINDER_GIT_REF} /src/cinder
RUN git -C /src/cinder fetch --unshallow
Expand All @@ -25,7 +25,7 @@ ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/bobcat/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/os_brick/initiator/connectors/storpool.py

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/designate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG DESIGNATE_GIT_REF=097ffc6df181290eba1bcd7c492b1b505bc15434
ADD --keep-git-dir=true https://opendev.org/openstack/designate.git#${DESIGNATE_GIT_REF} /src/designate
RUN git -C /src/designate fetch --unshallow
Expand All @@ -15,7 +15,7 @@ pip3 install \
/src/designate
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/glance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG GLANCE_GIT_REF=0bcd6cd71c09917c6734421374fd598d73e8d0cc
ADD --keep-git-dir=true https://opendev.org/openstack/glance.git#${GLANCE_GIT_REF} /src/glance
RUN git -C /src/glance fetch --unshallow
Expand All @@ -21,7 +21,7 @@ ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/bobcat/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/os_brick/initiator/connectors/storpool.py

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/heat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HEAT_GIT_REF=80eea85194825773d1b60ecc4386b2d5ba52a066
ADD --keep-git-dir=true https://opendev.org/openstack/heat.git#${HEAT_GIT_REF} /src/heat
RUN git -C /src/heat fetch --unshallow
Expand All @@ -13,7 +13,7 @@ pip3 install \
/src/heat
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/horizon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG HORIZON_GIT_REF=14212342cf8f7eb987e50de112958af31063e02e
ADD --keep-git-dir=true https://opendev.org/openstack/horizon.git#${HORIZON_GIT_REF} /src/horizon
RUN git -C /src/horizon fetch --unshallow
Expand Down Expand Up @@ -39,7 +39,7 @@ pip3 install \
pymemcache
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/ironic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG IRONIC_GIT_REF=22aa29b864eecd00bfb7c67cc2075030da1eb1d0
ADD --keep-git-dir=true https://opendev.org/openstack/ironic.git#${IRONIC_GIT_REF} /src/ironic
RUN git -C /src/ironic fetch --unshallow
Expand All @@ -15,7 +15,7 @@ pip3 install \
sushy
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion images/keepalived/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
FROM harbor.atmosphere.dev/library/ubuntu:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/keystone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG KEYSTONE_GIT_REF=8ca73f758bb613a57815fbe4ae78e3d2afa4af49
ADD --keep-git-dir=true https://opendev.org/openstack/keystone.git#${KEYSTONE_GIT_REF} /src/keystone
RUN git -C /src/keystone fetch --unshallow
Expand All @@ -14,7 +14,7 @@ pip3 install \
keystone-keycloak-backend==0.1.8
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion images/kubernetes-entrypoint/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-06-25T22:49:25Z

FROM golang:1.21 AS build
FROM harbor.atmosphere.dev/docker.io/library/golang:1.21 AS build
ARG KUBERNETES_ENTRYPOINT_GIT_REF=4fbcf7ce324dc66e78480f73035e31434cfea1e8
ADD https://opendev.org/airship/kubernetes-entrypoint.git#${KUBERNETES_ENTRYPOINT_GIT_REF} /src
WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion images/libvirtd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-runtime:${RELEASE}
ADD --chmod=644 https://download.ceph.com/keys/release.gpg /etc/apt/trusted.gpg.d/ceph.gpg
COPY <<EOF /etc/apt/sources.list.d/ceph.list
deb http://download.ceph.com/debian-reef/ jammy main
Expand Down
6 changes: 3 additions & 3 deletions images/magnum/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
FROM harbor.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
ARG TARGETOS
ARG TARGETARCH
ARG HELM_VERSION=3.14.0
ADD https://get.helm.sh/helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /helm.tar.gz
RUN tar -xzf /helm.tar.gz
RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG MAGNUM_GIT_REF=c613ea4e419edc0086116da07e93cf19206746e1
ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
RUN git -C /src/magnum fetch --unshallow
Expand All @@ -25,7 +25,7 @@ pip3 install \
magnum-cluster-api==0.24.0
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/manila/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG MANILA_GIT_REF=d8987589ae88ae9b2769fbe6f26d5b6994098038
ADD --keep-git-dir=true https://opendev.org/openstack/manila.git#${MANILA_GIT_REF} /src/manila
RUN git -C /src/manila fetch --unshallow
Expand All @@ -13,7 +13,7 @@ pip3 install \
/src/manila
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/netoffload/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

ARG RELEASE

FROM golang:1.20 AS build
FROM harbor.atmosphere.dev/docker.io/library/golang:1.20 AS build
ARG NETOFFLOAD_GIT_REF=94b8c0fdb0b83bd1b7e14b9a58077a047c78a800
ADD https://github.com/vexxhost/netoffload.git#${NETOFFLOAD_GIT_REF} /src
WORKDIR /src
RUN go build -v -o offloadctl ./cmd/offloadctl/main.go

FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
FROM harbor.atmosphere.dev/library/ubuntu:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/neutron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG NEUTRON_GIT_REF=019294c71d94b788c14b23dc1da3c21f51bcdb0b
ADD --keep-git-dir=true https://opendev.org/openstack/neutron.git#${NEUTRON_GIT_REF} /src/neutron
RUN git -C /src/neutron fetch --unshallow
Expand All @@ -25,7 +25,7 @@ pip3 install \
/src/neutron-ovn-network-logging-parser
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion images/nova-ssh/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/nova/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG NOVA_GIT_REF=c199becf52267ba37c5191f6f82e29bb5232b607
ADD --keep-git-dir=true https://opendev.org/openstack/nova.git#${NOVA_GIT_REF} /src/nova
RUN git -C /src/nova fetch --unshallow
Expand All @@ -25,7 +25,7 @@ ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/bobcat/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/os_brick/initiator/connectors/storpool.py

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
ADD https://github.com/novnc/noVNC.git#v1.4.0 /usr/share/novnc
RUN <<EOF bash -xe
apt-get update -qq
Expand Down
4 changes: 2 additions & 2 deletions images/octavia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG OCTAVIA_GIT_REF=824b51a1dad80292b7a8ad5d61bf3ce706b1fb29
ADD --keep-git-dir=true https://opendev.org/openstack/octavia.git#${OCTAVIA_GIT_REF} /src/octavia
RUN git -C /src/octavia fetch --unshallow
Expand All @@ -16,7 +16,7 @@ pip3 install \
/src/ovn-octavia-provider
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion images/openstack-runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

ARG FROM=registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
ARG FROM=harbor.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
FROM ${FROM}
ONBUILD ARG PROJECT
ONBUILD ARG SHELL=/usr/sbin/nologin
Expand Down
4 changes: 2 additions & 2 deletions images/openstack-venv-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE} AS requirements
FROM harbor.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE} AS requirements
ARG REQUIREMENTS_GIT_REF=18098b9abacbd8d7257bebc1b302294f634441ab
ADD --keep-git-dir=true https://opendev.org/openstack/requirements.git#${REQUIREMENTS_GIT_REF} /src/requirements
RUN cp /src/requirements/upper-constraints.txt /upper-constraints.txt
Expand All @@ -12,7 +12,7 @@ sed -i '/glance-store/d' /upper-constraints.txt
sed -i '/horizon/d' /upper-constraints.txt
EOF

FROM registry.atmosphere.dev/library/python-base:${RELEASE}
FROM harbor.atmosphere.dev/library/python-base:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
Expand Down
4 changes: 2 additions & 2 deletions images/ovn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM golang:1.20 AS ovn-kubernetes
FROM harbor.atmosphere.dev/docker.io/library/golang:1.20 AS ovn-kubernetes
ARG OVN_KUBERNETES_REF=5359e7d7f872058b6e5bf884c9f19d1922451f29
ADD https://github.com/ovn-org/ovn-kubernetes.git#${OVN_KUBERNETES_REF} /src
COPY patches/ovn-kubernetes /patches/ovn-kubernetes
Expand All @@ -13,7 +13,7 @@ cd /src/go-controller
go build -o /usr/bin/ovn-kube-util ./cmd/ovn-kube-util
EOF

FROM registry.atmosphere.dev/library/openvswitch:${RELEASE}
FROM harbor.atmosphere.dev/library/openvswitch:${RELEASE}
ARG TARGETPLATFORM
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
ARG OVN_SERIES=24.03
Expand Down
4 changes: 2 additions & 2 deletions images/placement/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG PLACEMENT_GIT_REF=96a9aeb3b4a6ffff5bbf247b213409395239fc7a
ADD --keep-git-dir=true https://opendev.org/openstack/placement.git#${PLACEMENT_GIT_REF} /src/placement
RUN git -C /src/placement fetch --unshallow
Expand All @@ -13,5 +13,5 @@ pip3 install \
/src/placement
EOF

FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
COPY --from=build --link /var/lib/openstack /var/lib/openstack
2 changes: 1 addition & 1 deletion images/python-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
FROM harbor.atmosphere.dev/library/ubuntu-cloud-archive:${RELEASE}
ENV PATH=/var/lib/openstack/bin:$PATH
RUN \
apt-get update -qq && \
Expand Down
4 changes: 2 additions & 2 deletions images/python-openstackclient/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

ARG RELEASE

FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
pip3 install \
--constraint /upper-constraints.txt \
Expand All @@ -21,7 +21,7 @@ pip3 install \
python-swiftclient
EOF

FROM registry.atmosphere.dev/library/python-base:${RELEASE}
FROM harbor.atmosphere.dev/library/python-base:${RELEASE}
COPY --from=build --link /var/lib/openstack /var/lib/openstack

# NOTE(mnaser): The Magnum client relies on the SHELL environment variable
Expand Down
Loading

0 comments on commit 4ad7b51

Please sign in to comment.