blob: 81af79f8a6bdcbb85044e4895e153a1742f33496 [file] [log] [blame]
Mohammed Naserda994232024-04-13 12:34:01 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naserd30f18d2024-04-17 01:20:43 -040015ARG RELEASE
16
17FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS helm
Mohammed Naserda994232024-04-13 12:34:01 -040018ARG TARGETOS
19ARG TARGETARCH
20ARG HELM_VERSION=3.14.0
21ADD https://get.helm.sh/helm-v${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz /helm.tar.gz
22RUN tar -xzf /helm.tar.gz
23RUN mv /${TARGETOS}-${TARGETARCH}/helm /usr/bin/helm
24
Mohammed Naserd30f18d2024-04-17 01:20:43 -040025FROM registry.atmosphere.dev/library/openstack-venv-builder:${RELEASE} AS build
Mohammed Naser5d4d4412024-05-24 19:36:35 +020026ARG MAGNUM_GIT_REF=30ab9c9f5c7d5787054560e0527314509e61a897
Mohammed Naserda994232024-04-13 12:34:01 -040027ADD --keep-git-dir=true https://opendev.org/openstack/magnum.git#${MAGNUM_GIT_REF} /src/magnum
28RUN git -C /src/magnum fetch --unshallow
Mohammed Naser5d4d4412024-05-24 19:36:35 +020029COPY patches/magnum /patches/magnum
30RUN git -C /src/magnum apply --verbose /patches/magnum/*
Mohammed Naserda994232024-04-13 12:34:01 -040031RUN --mount=type=cache,mode=0755,target=/root/.cache/pip,sharing=private <<EOF bash -xe
32pip3 install \
33 --constraint /upper-constraints.txt \
34 /src/magnum \
35 magnum-cluster-api==0.16.0
36EOF
37
Mohammed Naserd30f18d2024-04-17 01:20:43 -040038FROM registry.atmosphere.dev/library/openstack-python-runtime:${RELEASE}
Mohammed Naserda994232024-04-13 12:34:01 -040039RUN <<EOF bash -xe
40apt-get update -qq
41apt-get install -qq -y --no-install-recommends \
42 haproxy
43apt-get clean
44rm -rf /var/lib/apt/lists/*
45EOF
46COPY --from=helm --link /usr/bin/helm /usr/local/bin/helm
47COPY --from=build --link /var/lib/openstack /var/lib/openstack