Skip to content

Commit a6db894

Browse files
committed
Build Rocky IPA Images
1 parent 214f521 commit a6db894

6 files changed

Lines changed: 113 additions & 6 deletions

File tree

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

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: Build Rocky Linux 9
88
type: boolean
99
default: true
10+
rocky10:
11+
description: Build Rocky Linux 10
12+
type: boolean
13+
default: true
1014
ubuntu-noble:
1115
description: Build Ubuntu 24.04 Noble
1216
type: boolean
@@ -47,6 +51,13 @@ jobs:
4751
- runner-selection
4852
permissions: {}
4953
steps:
54+
- name: Validate inputs
55+
run: |
56+
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.rocky10 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
57+
echo "At least one distribution must be selected"
58+
exit 1
59+
fi
60+
5061
- name: Install Package
5162
uses: ConorMacBride/install-package@main
5263
with:
@@ -203,7 +214,7 @@ jobs:
203214
source venvs/kayobe/bin/activate &&
204215
source src/kayobe-config/kayobe-env --environment ci-builder &&
205216
kayobe seed host command run \
206-
--command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv" --show-output
217+
--command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv containerd docker.io docker-buildx" --show-output
207218
env:
208219
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
209220

@@ -264,6 +275,13 @@ jobs:
264275
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
265276
if: inputs.ubuntu-noble && steps.build_ubuntu_noble_ipa.outcome == 'success'
266277

278+
- name: Copy logs back
279+
continue-on-error: true
280+
run: |
281+
mkdir -p logs/ubuntu-noble
282+
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/ubuntu-noble/
283+
if: inputs.ubuntu-noble
284+
267285
- name: Build a Rocky 9 IPA image
268286
id: build_rocky_9_ipa
269287
continue-on-error: true
@@ -324,9 +342,73 @@ jobs:
324342
- name: Copy logs back
325343
continue-on-error: true
326344
run: |
327-
mkdir logs
328-
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/
329-
if: always()
345+
mkdir -p logs/rocky-9
346+
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-9/
347+
if: inputs.rocky9
348+
349+
- name: Build a Rocky 10 IPA image
350+
id: build_rocky_10_ipa
351+
continue-on-error: true
352+
run: |
353+
source venvs/kayobe/bin/activate &&
354+
source src/kayobe-config/kayobe-env --environment ci-builder &&
355+
kayobe overcloud deployment image build --force-rebuild \
356+
-e os_distribution="rocky" \
357+
-e os_release="10" \
358+
-e ipa_ci_builder_distribution="rocky" \
359+
-e ipa_ci_builder_release="10"
360+
env:
361+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
362+
if: inputs.rocky10
363+
364+
- name: Show last error logs
365+
continue-on-error: true
366+
run: |
367+
source venvs/kayobe/bin/activate &&
368+
source src/kayobe-config/kayobe-env --environment ci-builder &&
369+
kayobe seed host command run --command "tail -200 /opt/kayobe/images/ipa/ipa.stdout" --show-output
370+
env:
371+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
372+
if: steps.build_rocky_10_ipa.outcome == 'failure'
373+
374+
- name: Upload Rocky 10 IPA kernel image to Ark
375+
run: |
376+
source venvs/kayobe/bin/activate &&
377+
source src/kayobe-config/kayobe-env --environment ci-builder &&
378+
kayobe playbook run \
379+
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \
380+
-e artifact_path=/opt/kayobe/images/ipa \
381+
-e artifact_type=ipa-images \
382+
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
383+
-e os_distribution="rocky" \
384+
-e os_release="10" \
385+
-e file_regex='*.kernel'
386+
env:
387+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
388+
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'
389+
390+
- name: Upload Rocky 10 IPA ramdisk image to Ark
391+
run: |
392+
source venvs/kayobe/bin/activate &&
393+
source src/kayobe-config/kayobe-env --environment ci-builder &&
394+
kayobe playbook run \
395+
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-upload.yml \
396+
-e artifact_path=/opt/kayobe/images/ipa \
397+
-e artifact_type=ipa-images \
398+
-e artifact_tag=${{ steps.ipa_image_tag.outputs.ipa_image_tag }} \
399+
-e os_distribution="rocky" \
400+
-e os_release="10" \
401+
-e file_regex='*.initramfs'
402+
env:
403+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
404+
if: inputs.rocky10 && steps.build_rocky_10_ipa.outcome == 'success'
405+
406+
- name: Copy logs back
407+
continue-on-error: true
408+
run: |
409+
mkdir -p logs/rocky-10
410+
scp -r ubuntu@$(jq -r .access_ip_v4.value src/kayobe-config/etc/kayobe/environments/ci-builder/tf-outputs.yml):/opt/kayobe/images/*/*.std* ./logs/rocky-10/
411+
if: inputs.rocky10
330412

331413
- name: Upload logs artifact
332414
uses: actions/upload-artifact@v6
@@ -339,6 +421,7 @@ jobs:
339421
echo "Builds failed. See workflow artifacts for details." &&
340422
exit 1
341423
if: steps.build_rocky_9_ipa.outcome == 'failure' ||
424+
steps.build_rocky_10_ipa.outcome == 'failure' ||
342425
steps.build_ubuntu_noble_ipa.outcome == 'failure'
343426

344427
- name: Destroy

.github/workflows/ipa-image-promote.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: Promote Rocky Linux 9
88
type: boolean
99
default: true
10+
rocky10:
11+
description: Promote Rocky Linux 10
12+
type: boolean
13+
default: true
1014
ubuntu-noble:
1115
description: Promote Ubuntu 24.04 Noble
1216
type: boolean
@@ -25,7 +29,7 @@ jobs:
2529
steps:
2630
- name: Validate inputs
2731
run: |
28-
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
32+
if [[ ${{ inputs.rocky9 }} == 'false' && ${{ inputs.rocky10 }} == 'false' && ${{ inputs.ubuntu-noble }} == 'false' ]]; then
2933
echo "At least one distribution must be selected"
3034
exit 1
3135
fi
@@ -85,6 +89,20 @@ jobs:
8589
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
8690
if: inputs.rocky9
8791

92+
- name: Promote Rocky 10 IPA image artifact
93+
run: |
94+
source venvs/kayobe/bin/activate &&
95+
source src/kayobe-config/kayobe-env --environment ci-builder &&
96+
kayobe playbook run \
97+
src/kayobe-config/etc/kayobe/ansible/pulp/pulp-artifact-promote.yml \
98+
-e artifact_type="ipa-images" \
99+
-e os_distribution='rocky' \
100+
-e os_release='10'
101+
env:
102+
ARTIFACT_TAG: ${{ inputs.image_tag }}
103+
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD_CI_BUILDER }}
104+
if: inputs.rocky10
105+
88106
- name: Promote Ubuntu Noble 24.04 IPA image artifact
89107
run: |
90108
source venvs/kayobe/bin/activate &&
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
# IPA image versioning tags
33
stackhpc_rocky_9_ipa_image_version: "2025.1-20250929T120332"
4+
stackhpc_rocky_10_ipa_image_version: "2025.1-20260323T152004"
45
stackhpc_ubuntu_noble_ipa_image_version: "2025.1-20250929T120332"

etc/kayobe/stackhpc-ipa-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ stackhpc_ipa_image_url: "{{ stackhpc_release_pulp_content_url }}/ipa-images/\
1717
# IPA image version tag selection
1818
stackhpc_ipa_image_version: >-
1919
{{ stackhpc_rocky_9_ipa_image_version if os_distribution == 'rocky' and os_release == '9' else
20+
{{ stackhpc_rocky_10_ipa_image_version if os_distribution == 'rocky' and os_release == '10' else
2021
stackhpc_ubuntu_noble_ipa_image_version if os_distribution == 'ubuntu' and os_release == 'noble' }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Rocky 10 IPA images can now be built

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
kayobe@git+https://github.com/stackhpc/kayobe@stackhpc/18.3.0.12
1+
kayobe@git+https://github.com/stackhpc/kayobe@rocky-ipa-images
22
ansible-modules-hashivault>=5.3.0
33
pulp-glue<0.32,>=0.29.2
44
jmespath

0 commit comments

Comments
 (0)