1111 description : Build Ubuntu 24.04 Noble
1212 type : boolean
1313 default : true
14+ ubuntu-jammy :
15+ description : Build Ubuntu 22.04 Jammy
16+ type : boolean
17+ default : False
1418 runner_env :
1519 description : Which cloud to run on?
1620 type : choice
1721 default : SMS Lab
1822 options :
1923 - SMS Lab
2024 - Leafcloud
25+ cpu-platform-architecture :
26+ description : Select the image's build architecture
27+ type : choice
28+ default : x86_64
29+ options :
30+ - x86_64
31+ - aarch64
2132 secrets :
2233 KAYOBE_VAULT_PASSWORD :
2334 required : true
3243 ANSIBLE_FORCE_COLOR : True
3344 KAYOBE_ENVIRONMENT : ci-builder
3445 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
46+ overcloud_dib_architecture : ${{ inputs.cpu-platform-architecture == 'x86_64' && 'amd64' || 'arm64' }}
47+ pulp_artifact_path : ${{ inputs.cpu-platform-architecture == 'x86_64' && 'kayobe-images' || 'kayobe-images/aarch64' }}
3548jobs :
3649 runner-selection :
3750 uses : ./.github/workflows/runner-selector.yml
@@ -212,7 +225,7 @@ jobs:
212225 source venvs/kayobe/bin/activate &&
213226 source src/kayobe-config/kayobe-env --environment ci-builder &&
214227 kayobe seed host command run \
215- --command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv" --show-output
228+ --command "sudo apt update && sudo apt -y install gcc git libffi-dev python3-dev python-is-python3 python3-venv qemu-user-static " --show-output
216229 env :
217230 KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
218231
@@ -256,7 +269,7 @@ jobs:
256269 src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \
257270 -e artifact_path=/opt/kayobe/images/overcloud-rocky-9 \
258271 -e artifact_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \
259- -e artifact_type="kayobe-images" \
272+ -e artifact_type=${{ env.pulp_artifact_path }} \
260273 -e file_regex="*.qcow2" \
261274 -e os_distribution="rocky" \
262275 -e os_release="9"
@@ -271,7 +284,8 @@ jobs:
271284 kayobe playbook run \
272285 src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
273286 -e local_image_path="/opt/kayobe/images/overcloud-rocky-9/overcloud-rocky-9.qcow2" \
274- -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }}
287+ -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }} \
288+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
275289 env :
276290 CLOUDS_YAML : ${{ secrets.CLOUDS_YAML }}
277291 OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
@@ -285,13 +299,84 @@ jobs:
285299 kayobe playbook run \
286300 src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
287301 -e local_image_path="/opt/kayobe/images/overcloud-rocky-9/overcloud-rocky-9.qcow2" \
288- -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }}
302+ -e image_name=overcloud-rocky-9-${{ steps.host_image_tag.outputs.host_image_tag }} \
303+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
289304 env :
290305 CLOUDS_YAML : ${{ secrets.CLOUDS_YAML_OTHER_CLOUD }}
291306 OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID_OTHER_CLOUD }}
292307 OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET_OTHER_CLOUD }}
293308 if : inputs.rocky9 && steps.build_rocky_9.outcome == 'success'
294309
310+ - name : Build an Ubuntu Jammy 22.04 overcloud host image
311+ id : build_ubuntu_jammy
312+ continue-on-error : true
313+ run : |
314+ source venvs/kayobe/bin/activate &&
315+ source src/kayobe-config/kayobe-env --environment ci-builder &&
316+ kayobe overcloud host image build --force-rebuild \
317+ -e os_distribution="ubuntu" \
318+ -e os_release="jammy" \
319+ -e stackhpc_overcloud_dib_name=overcloud-ubuntu-jammy
320+ env :
321+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
322+ if : inputs.ubuntu-jammy
323+
324+ - name : Show last error logs
325+ continue-on-error : true
326+ run : |
327+ source venvs/kayobe/bin/activate &&
328+ source src/kayobe-config/kayobe-env --environment ci-builder &&
329+ kayobe seed host command run --command "tail -200 /opt/kayobe/images/overcloud-ubuntu-jammy/overcloud-ubuntu-jammy.stdout" --show-output
330+ env :
331+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
332+ if : steps.build_ubuntu_jammy.outcome == 'failure'
333+
334+ - name : Upload Ubuntu Jammy 22.04 overcloud host image to Ark
335+ run : |
336+ source venvs/kayobe/bin/activate &&
337+ source src/kayobe-config/kayobe-env --environment ci-builder &&
338+ kayobe playbook run \
339+ src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \
340+ -e artifact_path=/opt/kayobe/images/overcloud-ubuntu-jammy \
341+ -e artifact_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \
342+ -e artifact_type=${{ env.pulp_artifact_path }} \
343+ -e file_regex="*.qcow2" \
344+ -e os_distribution="ubuntu" \
345+ -e os_release="jammy"
346+ env :
347+ KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
348+ if : inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
349+
350+ - name : Upload Ubuntu Jammy overcloud host image to current Dev Cloud (SMS/Leafcloud)
351+ run : |
352+ source venvs/kayobe/bin/activate &&
353+ source src/kayobe-config/kayobe-env --environment ci-builder &&
354+ kayobe playbook run \
355+ src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
356+ -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-jammy/overcloud-ubuntu-jammy.qcow2" \
357+ -e image_name=overcloud-ubuntu-jammy-${{ steps.host_image_tag.outputs.host_image_tag }} \
358+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
359+ env :
360+ CLOUDS_YAML : ${{ secrets.CLOUDS_YAML }}
361+ OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
362+ OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }}
363+ if : inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
364+
365+ - name : Upload Ubuntu Jammy overcloud host image to other Dev Cloud (Leafcloud/SMS)
366+ run : |
367+ source venvs/kayobe/bin/activate &&
368+ source src/kayobe-config/kayobe-env --environment ci-builder &&
369+ kayobe playbook run \
370+ src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
371+ -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-jammy/overcloud-ubuntu-jammy.qcow2" \
372+ -e image_name=overcloud-ubuntu-jammy-${{ steps.host_image_tag.outputs.host_image_tag }} \
373+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
374+ env :
375+ CLOUDS_YAML : ${{ secrets.CLOUDS_YAML_OTHER_CLOUD }}
376+ OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID_OTHER_CLOUD }}
377+ OS_APPLICATION_CREDENTIAL_SECRET : ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET_OTHER_CLOUD }}
378+ if : inputs.ubuntu-jammy && steps.build_ubuntu_jammy.outcome == 'success'
379+
295380 - name : Build an Ubuntu Noble 24.04 overcloud host image
296381 id : build_ubuntu_noble
297382 continue-on-error : true
@@ -324,7 +409,7 @@ jobs:
324409 src/kayobe-config/etc/kayobe/ansible/pulp-artifact-upload.yml \
325410 -e artifact_path=/opt/kayobe/images/overcloud-ubuntu-noble \
326411 -e artifact_tag=${{ steps.host_image_tag.outputs.host_image_tag }} \
327- -e artifact_type="kayobe-images" \
412+ -e artifact_type=${{ env.pulp_artifact_path }} \
328413 -e file_regex="*.qcow2" \
329414 -e os_distribution="ubuntu" \
330415 -e os_release="noble"
@@ -339,7 +424,8 @@ jobs:
339424 kayobe playbook run \
340425 src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
341426 -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-noble/overcloud-ubuntu-noble.qcow2" \
342- -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }}
427+ -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }} \
428+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
343429 env :
344430 CLOUDS_YAML : ${{ secrets.CLOUDS_YAML }}
345431 OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }}
@@ -353,7 +439,8 @@ jobs:
353439 kayobe playbook run \
354440 src/kayobe-config/etc/kayobe/ansible/openstack-host-image-upload.yml \
355441 -e local_image_path="/opt/kayobe/images/overcloud-ubuntu-noble/overcloud-ubuntu-noble.qcow2" \
356- -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }}
442+ -e image_name=overcloud-ubuntu-noble-${{ steps.host_image_tag.outputs.host_image_tag }} \
443+ -e cpu-platform=${{ env.overcloud_dib_architecture }}
357444 env :
358445 CLOUDS_YAML : ${{ secrets.CLOUDS_YAML_OTHER_CLOUD }}
359446 OS_APPLICATION_CREDENTIAL_ID : ${{ secrets.OS_APPLICATION_CREDENTIAL_ID_OTHER_CLOUD }}
0 commit comments