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 and yaguangtang committed Dec 12, 2024
1 parent 8caaf92 commit 0d2c917
Show file tree
Hide file tree
Showing 63 changed files with 133 additions and 119 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=d99764e6112cedc6ca168a29fb0279dec2d94288
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=db98dc207060da234c32a563c13cac1edbd62952
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 @@ -19,7 +19,7 @@ pip3 install \
storpool.spopenstack
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/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=72777e203ec6f09757ddcd90011013eeafab36c1
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=b5b29a0ae15d44424f04db0686328d0a01a14853
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 @@ -18,7 +18,7 @@ pip3 install \
storpool.spopenstack
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/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=512052a0553cc3661aa850542a13466b07a0c5c6
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=dcaf0cc51fe998ca6de89a82a3cdadd26131830b
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
7 changes: 6 additions & 1 deletion images/ironic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@

ARG RELEASE

<<<<<<< HEAD
FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG IRONIC_GIT_REF=19de7ae2f48705cfa0e59d0642cec3cca7b6ca22
=======
FROM harbor.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
ARG IRONIC_GIT_REF=22aa29b864eecd00bfb7c67cc2075030da1eb1d0
>>>>>>> 4ad7b51a (Stop using CDN for CI (#2185))
ADD --keep-git-dir=true https://opendev.org/openstack/ironic.git#${IRONIC_GIT_REF} /src/ironic
RUN git -C /src/ironic fetch --unshallow
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
Expand All @@ -15,7 +20,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=f8f451455fb11fb177148cfb88bed29caf18d38a
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-26T17:38:39Z

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=2045ffb5ccbfb7873228eba9a6cecc1f65f4ab3f
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=f0c33dec536708c940f2010d11dd8c778c28d2e7
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=c6d4a3e364b11568dfd36a11551f553c11c48308
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=11301e7e3f0d81a3368632f90608e30d9c647111
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 @@ -22,7 +22,7 @@ pip3 install \
storpool.spopenstack
EOF

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=b61c340b096f0a2a90a7db8209639da11e25a4c6
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=275c45971da8970a8e01bf9618f4419dee5f8710
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=af00c864e98ae76cae3e621ad95868234d027882
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
Loading

0 comments on commit 0d2c917

Please sign in to comment.