Skip to content

Commit

Permalink
feat: adds github workflow to create an ironic esp image
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaskuechler committed Nov 7, 2024
1 parent 21624f8 commit d97652b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/build-ironic-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,34 @@ jobs:
echo "yaml-files=${yaml_files}" >> $GITHUB_OUTPUT
working-directory: ironic-images

build:
build-esp-image:
runs-on: ubuntu-latest
needs: discover
defaults:
run:
working-directory: ironic-images

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Install Dependencies
run: sudo apt update && sudo apt install -y grub-efi-amd64-signed shim-signed mtools

- name: Create esp image
run: |
cp /usr/lib/shim/shimx64.efi.signed /tmp/bootx64.efi
cp /usr/lib/grub/x86_64-efi-signed/grubnetx64.efi.signed /tmp/grubx64.efi
dd if=/dev/zero of=/tmp/esp.img bs=4096 count=1024
mkfs.msdos -F 12 -n ESP_IMAGE /tmp/esp.img
mmd -i /tmp/esp.img EFI EFI/BOOT
mcopy -i /tmp/esp.img -v /tmp/bootx64.efi ::EFI/BOOT/BOOTX64.efi
mcopy -i /tmp/esp.img -v /tmp/grubx64.efi ::EFI/BOOT/GRUBX64.efi
mdir -i /tmp/esp.img ::EFI/BOOT
mv /tmp/esp.img uploads/esp.img
build-tenant-images:
runs-on: ubuntu-latest
needs: [discover, build-esp-image]
defaults:
run:
working-directory: ironic-images
Expand Down
15 changes: 14 additions & 1 deletion ironic-images/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Undercloud Ironic Image Build

The image build process is in github actions: `.github/workflows/build-ironic-images.yaml`
Tools for building Ironic images

## Ironic tenant image build

The tenant images build process is in github actions: `.github/workflows/build-ironic-images.yaml`

## Ironic ESP image build

The ESP image build process is in github actions: `.github/workflows/build-ironic-images.yaml`

ESP image documentation:

* <https://docs.openstack.org/ironic/latest/install/configure-esp.html>
* <https://docs.openstack.org/ironic/latest/install/configure-pxe.html#uefi-pxe-grub>

0 comments on commit d97652b

Please sign in to comment.