Skip to content

Commit 32941d0

Browse files
committed
Add iPXE workflow and reorganize image docs
- Add workflow for building iPXE images (latest-ipxe) - Remove unused ISO build from iPXE Makefile - Move download sections to top in all READMEs - Add NAT64 appliance download info - Simplify build dependencies (8 → 5 packages) - Enhance devsetup guide with upload examples Pre-built images now available from GitHub releases. Assisted-By: Claude (claude-sonnet-4) Signed-off-by: Harald Jensås <hjensas@redhat.com>
1 parent c8171d2 commit 32941d0

File tree

7 files changed

+389
-108
lines changed

7 files changed

+389
-108
lines changed

.github/workflows/build-blank-image.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
echo "Image renamed to: $TAGGED_IMAGE"
5858
ls -lh ${TAGGED_IMAGE}
5959
60+
# yamllint disable rule:line-length
6061
- name: 5. Create Versioned GitHub Release
6162
uses: softprops/action-gh-release@v2
6263
with:
@@ -75,10 +76,7 @@ jobs:
7576
7677
```bash
7778
# Download the image
78-
REPO="${{ github.repository }}"
79-
TAG="${{ steps.release_tag.outputs.release_tag }}"
80-
FILE="${{ steps.release_tag.outputs.tagged_image }}"
81-
curl -L -O "https://github.com/${REPO}/releases/download/${TAG}/${FILE}"
79+
curl -L -O https://github.com/${{ github.repository }}/releases/download/${{ steps.release_tag.outputs.release_tag }}/${{ steps.release_tag.outputs.tagged_image }}
8280
8381
# Upload to OpenStack Glance (qcow2 works for most deployments)
8482
openstack image create sushy-tools-blank-image \
@@ -101,6 +99,7 @@ jobs:
10199
--file blank-image.raw
102100
```
103101
files: ${{ steps.release_tag.outputs.tagged_image }}
102+
# yamllint enable rule:line-length
104103

105104
- name: 6. Update 'latest-blank' Release Tag
106105
uses: softprops/action-gh-release@v2

.github/workflows/build-controller-image.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
echo "Image renamed to: $TAGGED_IMAGE"
6666
ls -lh ${TAGGED_IMAGE}
6767
68+
# yamllint disable rule:line-length
6869
- name: 6. Create Versioned GitHub Release
6970
uses: softprops/action-gh-release@v2
7071
with:
@@ -88,10 +89,7 @@ jobs:
8889
8990
```bash
9091
# Download the image
91-
REPO="${{ github.repository }}"
92-
TAG="${{ steps.release_tag.outputs.release_tag }}"
93-
FILE="${{ steps.release_tag.outputs.tagged_image }}"
94-
curl -L -O "https://github.com/${REPO}/releases/download/${TAG}/${FILE}"
92+
curl -L -O https://github.com/${{ github.repository }}/releases/download/${{ steps.release_tag.outputs.release_tag }}/${{ steps.release_tag.outputs.tagged_image }}
9593
9694
# Upload to OpenStack Glance (qcow2 works for most deployments)
9795
openstack image create hotstack-controller \
@@ -108,6 +106,7 @@ jobs:
108106
--file controller.raw
109107
```
110108
files: ${{ steps.release_tag.outputs.tagged_image }}
109+
# yamllint enable rule:line-length
111110

112111
- name: 7. Update 'latest-controller' Release Tag
113112
uses: softprops/action-gh-release@v2
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
name: Build iPXE Images
3+
4+
"on":
5+
# Allows you to run this workflow manually from the Actions tab
6+
workflow_dispatch:
7+
inputs:
8+
release_tag:
9+
description: 'Release tag (e.g., v1.0.0)'
10+
required: true
11+
12+
jobs:
13+
build-image:
14+
runs-on: ubuntu-22.04
15+
16+
# Permission needed to create a release and upload assets
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install System Dependencies
25+
run: |
26+
echo "Installing system dependencies for iPXE build..."
27+
sudo apt-get update
28+
sudo apt-get install -y \
29+
gcc \
30+
make \
31+
perl \
32+
git \
33+
libguestfs-tools
34+
echo "System dependencies installed"
35+
36+
- name: Build iPXE Images
37+
run: |
38+
echo "Building iPXE images using ipxe/Makefile..."
39+
cd ipxe
40+
make
41+
echo "iPXE images built successfully"
42+
ls -lh efi.img ipxe-boot-usb.raw
43+
cd ..
44+
45+
- name: Create Release Tag and Rename Images
46+
id: release_tag
47+
run: |
48+
RELEASE_TAG="${{ inputs.release_tag }}"
49+
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
50+
echo "Release tag: $RELEASE_TAG"
51+
52+
# Rename images to include the release tag
53+
TAGGED_EFI_IMAGE="ipxe-efi-${RELEASE_TAG}.img"
54+
TAGGED_BIOS_IMAGE="ipxe-bios-${RELEASE_TAG}.img"
55+
56+
cp ipxe/efi.img ${TAGGED_EFI_IMAGE}
57+
cp ipxe/ipxe-boot-usb.raw ${TAGGED_BIOS_IMAGE}
58+
59+
echo "tagged_efi_image=$TAGGED_EFI_IMAGE" >> $GITHUB_OUTPUT
60+
echo "tagged_bios_image=$TAGGED_BIOS_IMAGE" >> $GITHUB_OUTPUT
61+
62+
echo "Images renamed:"
63+
ls -lh ${TAGGED_EFI_IMAGE} ${TAGGED_BIOS_IMAGE}
64+
65+
# yamllint disable rule:line-length
66+
- name: Create Versioned GitHub Release
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
tag_name: ${{ steps.release_tag.outputs.release_tag }}
70+
name: "iPXE Images ${{ steps.release_tag.outputs.release_tag }}"
71+
body: |
72+
iPXE boot images built by GitHub Actions.
73+
74+
## Images Included
75+
76+
- **ipxe-efi-${{ steps.release_tag.outputs.release_tag }}.img** - UEFI boot image
77+
- **ipxe-bios-${{ steps.release_tag.outputs.release_tag }}.img** - BIOS boot image (USB)
78+
79+
## Usage
80+
81+
These images are used for network booting OpenShift nodes in HotStack scenarios.
82+
83+
### Download
84+
85+
```bash
86+
# Download UEFI boot image
87+
curl -L -O https://github.com/${{ github.repository }}/releases/download/${{ steps.release_tag.outputs.release_tag }}/ipxe-efi-${{ steps.release_tag.outputs.release_tag }}.img
88+
89+
# Download BIOS boot image
90+
curl -L -O https://github.com/${{ github.repository }}/releases/download/${{ steps.release_tag.outputs.release_tag }}/ipxe-bios-${{ steps.release_tag.outputs.release_tag }}.img
91+
```
92+
93+
### Upload to Glance
94+
95+
See [iPXE README](https://github.com/${{ github.repository }}/blob/main/ipxe/README.md) for detailed upload instructions.
96+
files: |
97+
${{ steps.release_tag.outputs.tagged_efi_image }}
98+
${{ steps.release_tag.outputs.tagged_bios_image }}
99+
# yamllint enable rule:line-length
100+
101+
- name: Update 'latest-ipxe' Release Tag
102+
uses: softprops/action-gh-release@v2
103+
with:
104+
tag_name: latest-ipxe
105+
name: "iPXE Images (Latest)"
106+
prerelease: true
107+
body: |
108+
This is the latest iPXE images build. This release is automatically updated.
109+
110+
**Latest Build**: ${{ steps.release_tag.outputs.release_tag }}
111+
112+
## Download
113+
114+
Use the static URLs for the latest build:
115+
116+
```bash
117+
# Download UEFI boot image
118+
curl -L -O https://github.com/${{ github.repository }}/releases/download/latest-ipxe/ipxe-efi-latest.img
119+
120+
# Download BIOS boot image
121+
curl -L -O https://github.com/${{ github.repository }}/releases/download/latest-ipxe/ipxe-bios-latest.img
122+
```
123+
124+
## Upload to Glance
125+
126+
Upload the BIOS boot image for OCP nodes:
127+
128+
```bash
129+
openstack image create --disk-format=raw --file ipxe-bios-latest.img ipxe-boot-usb \
130+
--property os_shutdown_timeout=5 \
131+
--public
132+
```
133+
134+
Upload the UEFI rescue image:
135+
136+
```bash
137+
openstack image create --disk-format=raw --file ipxe-efi-latest.img ipxe-rescue-uefi \
138+
--property os_shutdown_timeout=5 \
139+
--property hw_firmware_type=uefi \
140+
--property hw_machine_type=q35 \
141+
--public
142+
```
143+
144+
Upload the BIOS rescue image:
145+
146+
```bash
147+
openstack image create --disk-format=raw --file ipxe-bios-latest.img ipxe-rescue-bios \
148+
--property os_shutdown_timeout=5 \
149+
--public
150+
```
151+
152+
For detailed documentation, see the [iPXE README](https://github.com/${{ github.repository }}/blob/main/ipxe/README.md).
153+
files: |
154+
${{ steps.release_tag.outputs.tagged_efi_image }}
155+
${{ steps.release_tag.outputs.tagged_bios_image }}
156+
157+
- name: Upload Images with Static Filenames to Latest Release
158+
run: |
159+
echo "Creating static filename copies for easy downloading..."
160+
161+
# Copy the images with static names
162+
cp ${{ steps.release_tag.outputs.tagged_efi_image }} ipxe-efi-latest.img
163+
cp ${{ steps.release_tag.outputs.tagged_bios_image }} ipxe-bios-latest.img
164+
165+
echo "Uploading to latest-ipxe release with static filenames..."
166+
# Upload to latest-ipxe release, replacing any existing files with the same names
167+
gh release upload latest-ipxe ipxe-efi-latest.img --clobber --repo ${{ github.repository }}
168+
gh release upload latest-ipxe ipxe-bios-latest.img --clobber --repo ${{ github.repository }}
169+
170+
echo "Static URLs available at:"
171+
echo "https://github.com/${{ github.repository }}/releases/download/latest-ipxe/ipxe-efi-latest.img"
172+
echo "https://github.com/${{ github.repository }}/releases/download/latest-ipxe/ipxe-bios-latest.img"
173+
env:
174+
GH_TOKEN: ${{ github.token }}

devsetup/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ openstack security group rule create ${HOTSTACK_SG} \
119119

120120
### Upload Images
121121

122+
#### CentOS Stream 9 Cloud Image
123+
122124
Download and upload the CentOS Stream 9 cloud image:
123125

124126
```shell
@@ -132,6 +134,85 @@ openstack image create CentOS-Stream-GenericCloud-9 \
132134
--public
133135
```
134136

137+
#### HotStack Controller Image
138+
139+
Download and upload the HotStack controller image:
140+
141+
```shell
142+
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-controller/controller-latest.qcow2
143+
openstack image create hotstack-controller \
144+
--disk-format qcow2 \
145+
--file controller-latest.qcow2 \
146+
--public
147+
```
148+
149+
#### iPXE Boot Images
150+
151+
Download and upload the iPXE boot images for network booting:
152+
153+
```shell
154+
# Download iPXE images
155+
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-ipxe/ipxe-bios-latest.img
156+
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-ipxe/ipxe-efi-latest.img
157+
158+
# Upload BIOS boot image (used for OCP nodes)
159+
openstack image create ipxe-boot-usb \
160+
--disk-format raw \
161+
--file ipxe-bios-latest.img \
162+
--property os_shutdown_timeout=5 \
163+
--public
164+
165+
# Upload UEFI rescue image
166+
openstack image create ipxe-rescue-uefi \
167+
--disk-format raw \
168+
--file ipxe-efi-latest.img \
169+
--property os_shutdown_timeout=5 \
170+
--property hw_firmware_type=uefi \
171+
--property hw_machine_type=q35 \
172+
--public
173+
174+
# Upload BIOS rescue image
175+
openstack image create ipxe-rescue-bios \
176+
--disk-format raw \
177+
--file ipxe-bios-latest.img \
178+
--property os_shutdown_timeout=5 \
179+
--public
180+
```
181+
182+
#### Blank Image (for virtual baremetal)
183+
184+
If using virtual baremetal with sushy-emulator, download and upload the blank image:
185+
186+
```shell
187+
curl -L -O https://github.com/openstack-k8s-operators/hotstack/releases/download/latest-blank/blank-image-latest.qcow2
188+
openstack image create sushy-tools-blank-image \
189+
--disk-format qcow2 \
190+
--file blank-image-latest.qcow2 \
191+
--property hw_firmware_type=uefi \
192+
--property hw_machine_type=q35 \
193+
--property os_shutdown_timeout=5 \
194+
--public
195+
```
196+
197+
#### NAT64 Appliance Image (for IPv6-only environments)
198+
199+
If using IPv6-only networks, download and upload the NAT64 appliance image:
200+
201+
```shell
202+
curl -L -O https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci/releases/download/latest/nat64-appliance-latest.qcow2
203+
openstack image create nat64-appliance \
204+
--disk-format qcow2 \
205+
--file nat64-appliance-latest.qcow2 \
206+
--property hw_firmware_type=uefi \
207+
--property hw_machine_type=q35 \
208+
--public
209+
```
210+
211+
For building images locally or for more details, see:
212+
213+
- [Building images](../images/README.md)
214+
- [Building iPXE images](../ipxe/README.md)
215+
135216
### Configure Networking
136217

137218
**For Packstack:**

0 commit comments

Comments
 (0)