Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to CloudSIG images #2302

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions images/barbican/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-06-25T22:49:25Z
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: GPL-3.0-only
# Atmosphere-Rebuild-Time: 2025-01-04T23:34:28Z

ARG RELEASE
ARG FROM=harbor.atmosphere.dev/library/centos:${RELEASE}

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
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
pip3 install \
--constraint /upper-constraints.txt \
/src/barbican \
pykmip
FROM --platform=$BUILDPLATFORM ${FROM} AS installer
ARG TARGETARCH
RUN --mount=type=cache,id=dnf-cache-${TARGETARCH},target=/var/cache/dnf --mount=type=cache,id=dnf-cache-${TARGETARCH},target=/target/var/cache/dnf <<EOF bash -xe
install-packages \
openstack-barbican \
uwsgi-plugin-python3 \
https://trunk.rdoproject.org/centos9-dalmatian/build-deps/latest/noarch/python3-pykmip-0.8.0-9.el9s.noarch.rpm
EOF

FROM harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
COPY --from=build --link /var/lib/openstack /var/lib/openstack
FROM scratch
COPY --link --from=installer /target/ /
13 changes: 13 additions & 0 deletions images/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: GPL-3.0-only
# Atmosphere-Rebuild-Time: 2025-01-04T23:34:28Z

FROM --platform=$BUILDPLATFORM quay.io/centos/centos:stream9 AS installer
ADD dnf.conf /etc/dnf/dnf.conf
ARG BUILDARCH
RUN --mount=type=cache,id=dnf-cache-${BUILDARCH},target=/var/cache/dnf <<EOF bash -xe
dnf config-manager --set-enabled crb
dnf install -y centos-release-openstack-dalmatian epel-release
dnf config-manager --save --setopt="epel.priority=100" --setopt="epel-next.priority=100"
EOF
ADD install-packages /usr/local/bin/install-packages
7 changes: 7 additions & 0 deletions images/centos/dnf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
keepcache=True
39 changes: 39 additions & 0 deletions images/centos/install-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -xe

case "$TARGETARCH" in
amd64)
ARCH=x86_64
;;
arm64)
ARCH=aarch64
;;
*)
esac

dnf_install () {
dnf install \
-y \
--nodocs \
--setopt=keepcache=true \
--setopt=install_weak_deps=False \
--setopt=tsflags=nodocs \
--installroot=/target \
--releasever=9 \
--forcearch=${ARCH} \
"$@"
}

dnf_install ${@}

# NOTE(mnaser): "requests" throws warnings about chardet missing so
# if it ends up being installed, we should install
# chardet to avoid the warnings.
if dnf list installed --installroot=/target --releasever=9 | grep -q requests; then
dnf_install python3-chardet
fi

# NOTE(mnnaser): OSH expects `python` and not `python3`, for now, we
# setup a small symlink to make it work.
pushd /target/usr/bin
ln -s python3 python
popd
58 changes: 28 additions & 30 deletions images/cinder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
# SPDX-License-Identifier: Apache-2.0
# Atmosphere-Rebuild-Time: 2024-06-25T22:49:25Z
# Copyright (c) 2024 VEXXHOST, Inc.
# SPDX-License-Identifier: GPL-3.0-only
# Atmosphere-Rebuild-Time: 2025-01-04T23:34:28Z

ARG RELEASE
ARG FROM=harbor.atmosphere.dev/library/centos:${RELEASE}

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
COPY patches/cinder /patches/cinder
RUN git -C /src/cinder apply --verbose /patches/cinder/*
FROM --platform=$BUILDPLATFORM ${FROM} AS installer
ARG TARGETARCH
RUN --mount=type=cache,id=dnf-cache-${TARGETARCH},target=/var/cache/dnf --mount=type=cache,id=dnf-cache-${TARGETARCH},target=/target/var/cache/dnf <<EOF bash -xe
install-packages \
ceph-common \
openstack-cinder \
python3-pip \
python3-rbd \
uwsgi-plugin-python3
EOF

FROM scratch
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
COPY --link --from=installer /target/ /
# TODO(mnaser): Remove this + "python3-pip" dependency once this is packaged
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
pip3 install \
--constraint /upper-constraints.txt \
/src/cinder \
purestorage \
python-3parclient \
storpool \
storpool.spopenstack
python3 -m pip install \
purestorage \
python-3parclient \
storpool \
storpool.spopenstack
EOF
ADD --chmod=644 \
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/cinder/openstack/bobcat/storpool.py \
/var/lib/openstack/lib/python3.10/site-packages/cinder/volume/drivers/storpool.py
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/cinder/openstack/caracal/storpool.py \
/usr/lib/python3.9/site-packages/cinder/volume/drivers/storpool.py
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 harbor.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
RUN <<EOF bash -xe
apt-get update -qq
apt-get install -qq -y --no-install-recommends \
ceph-common lsscsi nfs-common nvme-cli python3-rados python3-rbd qemu-utils qemu-block-extra sysfsutils udev util-linux
apt-get clean
rm -rf /var/lib/apt/lists/*
EOF
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/linux/amd64/kubectl /usr/local/bin/kubectl
COPY --from=build --link /var/lib/openstack /var/lib/openstack
https://github.com/storpool/storpool-openstack-integration/raw/master/drivers/os_brick/openstack/caracal/storpool.py \
/usr/lib/python3.9/site-packages/os_brick/initiator/connectors/storpool.py

This file was deleted.

Loading
Loading