Skip to content

Commit a127b1d

Browse files
authored
Merge pull request #1042 from rackerlabs/build-cinder-container
feat: initial cinder plugin and cinder container with plugin
2 parents 7c690ad + b5f6877 commit a127b1d

File tree

23 files changed

+332
-6
lines changed

23 files changed

+332
-6
lines changed

.github/workflows/build-container-images.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
4444
with:
4545
context: containers/python311_alpine/
46-
file: containers/python311_alpine/Dockerfile.python311_alpine
46+
file: containers/python311_alpine/Dockerfile
4747
# push for all main branch commits
4848
push: ${{ github.event_name != 'pull_request' }}
4949
tags: ghcr.io/${{ github.repository }}/argo-python3.11.8-alpine3.19:latest,ghcr.io/${{ github.repository }}/argo-python3.11.8-alpine3.19:${{ env.VERSION_PYTHON311 }}
@@ -54,7 +54,7 @@ jobs:
5454
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
5555
with:
5656
context: containers/python312_alpine/
57-
file: containers/python312_alpine/Dockerfile.python312_alpine
57+
file: containers/python312_alpine/Dockerfile
5858
# push for all main branch commits
5959
push: ${{ github.event_name != 'pull_request' }}
6060
tags: ghcr.io/${{ github.repository }}/argo-python3.12.2-alpine3.19:latest,ghcr.io/${{ github.repository }}/argo-python3.12.2-alpine3.19:${{ env.VERSION_PYTHON312 }}

.github/workflows/containers.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
strategy:
3434
matrix:
3535
# if you add a container here, add it to the 'clean_containers' job below
36-
project: [ironic, neutron, keystone, nova, openstack-client]
36+
project: [ironic, neutron, keystone, nova, openstack-client, cinder]
3737

3838
steps:
3939
- name: setup docker buildx
@@ -66,7 +66,7 @@ jobs:
6666
- name: build and deploy openstack container image to registry
6767
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
6868
with:
69-
file: containers/${{ matrix.project }}/Dockerfile.${{ matrix.project }}
69+
file: containers/${{ matrix.project }}/Dockerfile
7070
build-args: OPENSTACK_VERSION=${{ env.OPENSTACK_VERSION }}
7171
pull: true # ensure we always have an up to date source
7272
push: true
@@ -110,7 +110,7 @@ jobs:
110110
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
111111
with:
112112
context: "{{defaultContext}}:containers/dnsmasq"
113-
file: Dockerfile.dnsmasq
113+
file: Dockerfile
114114
push: ${{ github.event_name != 'pull_request' }}
115115
tags: ${{ steps.meta.outputs.tags }}
116116
labels: ${{ steps.meta.outputs.labels }}
@@ -159,7 +159,7 @@ jobs:
159159
- name: build and deploy container image to registry
160160
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
161161
with:
162-
file: containers/${{ matrix.container.name }}/Dockerfile.${{ matrix.container.name }}
162+
file: containers/${{ matrix.container.name }}/Dockerfile
163163
pull: true # ensure we always have an up to date source
164164
push: true
165165
tags: ${{ steps.meta.outputs.tags }}

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ repos:
6363
# uv version.
6464
rev: 0.7.13
6565
hooks:
66+
- id: uv-lock
67+
name: cinder-understack
68+
args: ["-D", "python/cinder-understack"]
6669
- id: uv-lock
6770
name: diff-nautobot-understack
6871
args: ["-D", "python/diff-nautobot-understack"]

components/images-openstack.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,15 @@ images:
9090
# skyline
9191
skyline: "quay.io/airshipit/skyline:latest"
9292
skyline_db_sync: "quay.io/airshipit/skyline:latest"
93+
94+
# cinder
95+
cinder_api: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
96+
cinder_db_sync: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
97+
cinder_scheduler: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
98+
cinder_volume: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
99+
cinder_volume_usage_audit: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
100+
cinder_db_purge: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
101+
cinder_backup: "ghcr.io/rackerlabs/understack/cinder:2024.2-ubuntu_jammy"
102+
cinder_storage_init: "docker.io/openstackhelm/ceph-config-helper:latest-ubuntu_jammy"
103+
cinder_backup_storage_init: "docker.io/openstackhelm/ceph-config-helper:latest-ubuntu_jammy"
93104
...
File renamed without changes.

containers/cinder/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# syntax=docker/dockerfile:1
2+
3+
ARG OPENSTACK_VERSION="required_argument"
4+
FROM docker.io/openstackhelm/cinder:${OPENSTACK_VERSION}-ubuntu_jammy AS builder
5+
6+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
7+
8+
COPY python/cinder-understack /tmp/cinder-understack
9+
10+
RUN --mount=type=cache,target=/root/.cache/uv \
11+
cd /tmp/cinder-understack && \
12+
uv build --wheel --out-dir /tmp/wheels/
13+
14+
FROM docker.io/openstackhelm/cinder:${OPENSTACK_VERSION}-ubuntu_jammy AS final
15+
16+
RUN --mount=type=cache,target=/root/.cache/pip \
17+
--mount=from=builder,source=/tmp/wheels,target=/tmp/wheels \
18+
/var/lib/openstack/bin/python -m pip install --no-input --find-links /tmp/wheels/ cinder-understack
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)