diff --git a/.github/workflows/build-images-action.yml b/.github/workflows/build-images-action.yml index a5468f996..60a4514d0 100644 --- a/.github/workflows/build-images-action.yml +++ b/.github/workflows/build-images-action.yml @@ -47,3 +47,15 @@ jobs: QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + build_client: + name: build ironic-client image + if: github.repository == 'metal3-io/ironic-image' + uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main + with: + image-name: 'ironic-client' + dockerfile-directory: resources/ironic-client + pushImage: true + secrets: + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/docs/releasing.md b/docs/releasing.md index 3af355e9c..7e6ae4c73 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -137,7 +137,9 @@ For that, please continue following the instructions provided in ## Keeping sync with other images and tools -- The [sushy-tools and vbmc](https://github.com/metal3-io/ironic-image/tree/main/resources) +- The [sushy-tools](), + [vbmc](https://github.com/metal3-io/ironic-image/tree/main/resources/vbmc) + and [ironic-client](https://github.com/metal3-io/ironic-image/tree/main/resources/ironic-client) images won't be versioned, we expect them to work with any version. - The [ipa-downloader](https://github.com/metal3-io/ironic-ipa-downloader) image uses the [ironic-python-agent](https://opendev.org/openstack/ironic-python-agent) diff --git a/resources/ironic-client/Dockerfile b/resources/ironic-client/Dockerfile new file mode 100644 index 000000000..d4217e489 --- /dev/null +++ b/resources/ironic-client/Dockerfile @@ -0,0 +1,13 @@ +FROM quay.io/centos/centos:stream9 + +# Help people find the actual baremetal command +COPY scripts/openstack /usr/bin/openstack + +RUN dnf install -y python3 python3-pip genisoimage && \ + pip install python-ironicclient --prefix /usr --no-cache-dir && \ + chmod +x /usr/bin/openstack && \ + dnf update -y && \ + dnf clean all && \ + rm -rf /var/cache/{yum,dnf}/* + +ENTRYPOINT ["/usr/bin/baremetal"] diff --git a/resources/ironic-client/README.md b/resources/ironic-client/README.md new file mode 100644 index 000000000..678061b0f --- /dev/null +++ b/resources/ironic-client/README.md @@ -0,0 +1,9 @@ +# Metal3 Ironic Client Container + +This repo contains the files needed to build a container image with the Ironic +CLI utilities, which are useful for debugging via Ironic APIs. + +## Description + +When updated, builds are automatically triggered on +[Quay](https://quay.io/repository/metal3-io/ironic-client). diff --git a/resources/ironic-client/scripts/openstack b/resources/ironic-client/scripts/openstack new file mode 100755 index 000000000..52d3b4d60 --- /dev/null +++ b/resources/ironic-client/scripts/openstack @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "Please use /usr/bin/baremetal instead" +exit 1