-
Notifications
You must be signed in to change notification settings - Fork 53
Add Deploying OCI images with custom IPA Hardware Manager post #601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: source
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for metal3io-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
5d70888 to
91ecd87
Compare
Signed-off-by: s3rj1k <[email protected]>
91ecd87 to
88b7cdb
Compare
|
The post does not render in the listing, I wonder why: https://deploy-preview-601--metal3io-website.netlify.app/blog/ |
yea, had to run render locally |
|
|
||
| ## Introducing the deb_oci_efi_lvm Hardware Manager | ||
|
|
||
| The `DebOCIEFILVMHardwareManager` is a custom IPA hardware manager that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a link would be handy here
| partition | ||
| - **Optional RAID1** - Software mirroring across two disks for | ||
| redundancy | ||
| - **Cloud-init integration** - Ironic configdrive data is written |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe make "configdrive" a link to https://book.metal3.io/bmo/instance_customization.html#implementation-notes for context?
| The deployment process extracts an OCI image using Google's `crane` tool, | ||
| then installs the necessary boot infrastructure on top. The default image | ||
| is `ubuntu:24.04`, but any Debian-based image can be specified via an | ||
| annotation on the BareMetalHost object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side question: why not use the standard spec.image.url? Is there some validation that gets in your way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you are referring to metal3-io/baremetal-operator@0d9fc3a, I would very much like using spec.image.url and might just migrate to that with newer BMO.
Still, for the post, I think it is worth keeping annotation configuration example, and maybe adding a note about a possibility to use spec.image.url with newer BMO.
Annotation config is not directly obvious when reading general CustomDeploy docs.
| online: true | ||
| bootMode: UEFI | ||
| rootDeviceHints: | ||
| # Two space-separated serial numbers enable RAID1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: you could probably also use MetaData to pass arbitrary stuff to the installation process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm mentioning it because the way it is here, this BMH cannot be used by any other Metal3MachineTemplate. This is not a concern for you, but may become a concern for somebody following your post.
|
|
||
| # Get the download URL | ||
| if [ "${CRANE_VERSION}" = "latest" ]; then | ||
| DOWNLOAD_URL=$(curl -s https://api.github.com/repos/google/go-containerregistry/releases/latest | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if you considered using podman, which is readily available in CS9 and also has the export command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I guess that can also be an option
| DEVICE_WAIT_DELAY = 5 | ||
|
|
||
|
|
||
| def run_command(cmd, check=True, capture_output=True, timeout=300): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I was avoiding reusing IPA code as much as possible, reason is to avoid keeping this in constant sync with IPA changes and retesting, but might be a good idea to mention that similar function exists in IPA and can be reused
|
|
||
| <!-- markdownlint-enable MD033 --> | ||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be useful to split this very large code block into smaller parts with separate commentary, and potentially organize it in a reversed way: start by showing the highest level code (the deploy step itself), then descend into details. You may even decide to omit helper functions, pointing at your repository instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to have a code snapshot in the post itself, so maybe splitting into separate code functions would be nicer, repo link for a full solution yes
|
This is awesome! I've left a couple of comments, the only important one is about reorganizing the code block. We also need to figure out why the post does not render... |
No description provided.