Skip to content

Conversation

m-bull
Copy link
Contributor

@m-bull m-bull commented Dec 27, 2024

Override package mirrors for both Ubuntu Jammy and Rocky Linux 9 overcloud images so that they are built from package snapshots defined in pulp-repo-versions.yml.

Also build IPA from the same mirrors, although this fails currently because python3.10-dev supplied by Ark in the snapshot defined in pulp-repo-versions.yml is too old. Updating the package snapshot to a newer version means dependencies can be solved and the image is able to be built.

Use the authenticating Pulp proxy for everything that touches packages on Ark, to prevent credentials accidentally leaking into built artefacts.

Requires: stackhpc/stackhpc-image-elements#67

@m-bull m-bull requested a review from a team as a code owner December 27, 2024 16:51
@product-auto-label product-auto-label bot added size: m workflows Workflow files have been modified labels Dec 27, 2024
@m-bull
Copy link
Contributor Author

m-bull commented Dec 27, 2024

TODO: Some automation to trigger a host/IPA image build when pulp-repo-versions.yml is updated, ?

@Alex-Welsh Alex-Welsh self-requested a review December 28, 2024 11:29
Copy link
Member

@Alex-Welsh Alex-Welsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work. LGTM and will approve once stackhpc/stackhpc-image-elements#67 is finalised

@Alex-Welsh
Copy link
Member

Thinking about it, should probably add a release note

@m-bull m-bull marked this pull request as draft January 20, 2025 09:00
@m-bull
Copy link
Contributor Author

m-bull commented Jan 20, 2025

Back to draft while I tweak this a bit.

I think it would be nicer to have switch(es) that could be set which enables this functionality, then leave all of the config in the base environment behind that switch, and just make enabling it in an environment (either CI or customer) something like:

stackhpc_build_overcloud_image_from_pulp_package_mirrors: true
stackhpc_build_ipa_image_from_pulp_package_mirrors: true

Copy link
Member

@Alex-Welsh Alex-Welsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, @m-bull is there anything else we have to add before we merge?

@jackhodgkiss jackhodgkiss force-pushed the build-images-from-ark branch from 9afdf57 to 17931a4 Compare August 4, 2025 13:04
@jackhodgkiss jackhodgkiss changed the base branch from stackhpc/2024.1 to stackhpc/2025.1 August 4, 2025 13:04
@Alex-Welsh
Copy link
Member

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the capability to build overcloud host images using packages from Ark, controlled by the stackhpc_build_overcloud_image_from_pulp_package_mirrors flag. The changes correctly enable this for the ci-builder environment, configure DIB to use the Pulp mirrors, and use an authenticating proxy to avoid leaking credentials. The refactoring to centralize the stackhpc-image-elements repository definition is a good improvement for maintainability.

My main feedback concerns potential code duplication in the new hook files, which should ideally reference a single shared playbook instead of duplicating content. I've also left a minor suggestion to improve the wording of the release note. Overall, the changes are well-structured and align with the goals outlined in the description.

@Alex-Welsh
Copy link
Member

Alex-Welsh commented Sep 18, 2025

Before I forget, there is a trivy scanner for VM images, but it's got pretty rubbish support at the moment (and has done for a while so I don't know if it'll ever get any better). Currently only works on VMDK images, and only the streamOptimised disk type. We might be able to convert things to that, then scan them but that'd be a lot of faff. Anyways, if it gets better, we should totally scan our images as well

@MoteHue MoteHue merged commit 6f7ea1f into stackhpc/2025.1 Sep 18, 2025
21 checks passed
@MoteHue MoteHue deleted the build-images-from-ark branch September 18, 2025 08:27
@bbezak
Copy link
Member

bbezak commented Sep 24, 2025

btw, those images were not promoted, I promoted them via GitHub actions, however the checksum of (at least) R9 image here is broken

curl -L https://musica:[email protected]/pulp/content/kayobe-images/2025.1/rocky/9/2025.1-20250916T145046/overcloud-rocky-9.qcow2.sha256
25afb927b163fd1e57d29ee8a275982e1bd4dae928c668550299859d6ac66902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s workflows Workflow files have been modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants