Skip to content
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

buildextend: create initramfs and kernel artifacts #440

Merged
merged 1 commit into from
Mar 27, 2019

Conversation

mike-nguyen
Copy link
Member

The installer ISO generation already pulls the initramfs and kernel
from the ostree repo so this just piggybacks off that and copies the
artifacts to the build directory. Having the initramfs and kernel is
useful for tools like virt-install and OZ to look at a tree and boot
the kernel with fine grain control over the kernel command line.

Copy link
Member

@miabbott miabbott left a comment

Choose a reason for hiding this comment

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

LGTM

@cgwalters
Copy link
Member

cgwalters commented Mar 27, 2019

Having the initramfs and kernel is
useful for tools like virt-install and OZ to look at a tree and boot
the kernel with fine grain control over the kernel command line.

But those projects currently only know how to parse traditional Pungi/lorax/Anaconda generated .treeinfo/"install tree" directories, right?

IOW you can't just virt-install --location https://ci.centos.org/artifacts/fedora-coreos/prod/builds/29.841/ even after this lands. Which is fine! But are we trying to scope that in?

It feels like this is more about "convenience of retrieving" the kernel/initrd. They're in that ISO (and for that matter the qemu/etc images)...but extracting them from the .iso requires tooling not everyone will have handy.

I'm fine with this patch as is, but I wonder whether it'd be better to e.g. tar up the kernel/initramfs together. Everyone will have tar - this way it's only one HTTP fetch.

Also...today we add the version number into our VM images - I think we should do the same with this, so that one can drop multiple builds into a PXE server and not have them conflict.

@mike-nguyen
Copy link
Member Author

mike-nguyen commented Mar 27, 2019

Having the initramfs and kernel is
useful for tools like virt-install and OZ to look at a tree and boot
the kernel with fine grain control over the kernel command line.

But those projects currently only know how to parse traditional Pungi/lorax/Anaconda generated .treeinfo/"install tree" directories, right?

IOW you can't just virt-install --location https://ci.centos.org/artifacts/fedora-coreos/prod/builds/29.841/ even after this lands. Which is fine! But are we trying to scope that in?

It feels like this is more about "convenience of retrieving" the kernel/initrd. They're in that ISO...but extracting them from the .iso requires tooling not everyone will have handy.

I copied some of the commit message from the upstream issue: coreos/fedora-coreos-tracker#161. @imcleod can you clarify on how you use these artifacts?

I'm fine with this patch as is, but I wonder whether it'd be better to e.g. tar up the kernel/initramfs together. Everyone will have tar - this way it's only one HTTP fetch.

Also...today we add the version number into our VM images - I think we should do the same with this, so that one can drop multiple builds into a PXE server and not have them conflict.

taring the file makes sense. The files won't need to be renamed and the tar filename can be versioned.

@arithx
Copy link
Contributor

arithx commented Mar 27, 2019

One benefit to producing these individually rather than in a tar is that in iPXE setups they can reference the upstream / production buckets rather than downloading and re-hosting.

@cgwalters
Copy link
Member

The files won't need to be renamed and the tar filename can be versioned.

Yep, I'm also suggesting adding the version to the kernel/initramfs so that one can safely unpack the tarball into a PXE server directory and not overwrite earlier builds.

@mike-nguyen
Copy link
Member Author

We have a use case to keep them uncompressed and separated for iPXE. I'll just do the rename with the version and keep them separated unless there are objections.

@cgwalters
Copy link
Member

The iPXE argument makes sense, so SGTM!

The installer ISO generation already pulls the initramfs and kernel
from the ostree repo so this just piggybacks off that and copies the
artifacts to the build directory.  Having the initramfs and kernel is
useful for tools like virt-install and OZ to look at a tree and boot
the kernel with fine grain control over the kernel command line.

Do not compress the kernel or initramfs.img because they can be used
directly by URL in iPXE.
@mike-nguyen
Copy link
Member Author

⬆️ pushed changes for

  • rename file with version
  • skip compression of the initramfs and kernel

@cgwalters cgwalters merged commit 8b9f10a into coreos:master Mar 27, 2019
@mike-nguyen mike-nguyen deleted the kernel_initramfs branch February 28, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants