-
Notifications
You must be signed in to change notification settings - Fork 123
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
Implement the bootc
provision plugin
#3161
base: main
Are you sure you want to change the base?
Conversation
@cgwalters fyi |
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.
Mostly a skim (I don't know the tmt codebase either) but looks sane to me!
|
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 still trying to speedrun reading/learning all things bootc (and tmt provisioning plugins), but fwiw, looks cool to me.
@happz about the container plugin support - Fedora docs says:
for fully-fledged tests it is not recommended to run a bootable container via, for instance, podman-run. One reason among others is that the filesystem is writable when being executed as an OCI container while most of the filesystem is mounted read-only on a deployed bootc system. That means the running container behaves differently than a deployed system. Yet, if you desire to run some quick tests it is recommended to run the container in detached mode.
From what I understand, podman-bootc
could be pretty cool to use, once available.
I agree, it's not a perfect 1:1 substitution, but, exactly: for quick tests or basic test development, it may give me results faster than VM. I for one work on binutils and C/C++ toolchain in general, and my area of focus is fairly simple - compile this, run |
Thank you for the insight in your development process. I hope I can see it in more detail one day. |
641a411
to
78e86f3
Compare
I think the existing container plugin will handle this case without any additional code. The bootc image is just another container that can be run like a typical image. |
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.
--add-deps
doesn't install require/recommend yet, right?
Either way, we have chicken&egg problem in the case 'dist-git-source' is used as the list of packages is known after provision :/ But IMO we can ignore that for now to have something working.
e3058f9
to
44ff728
Compare
@happz This is ready for a review. I added some docs, tests, and code to cleanup the container images. |
44ff728
to
8cb1c10
Compare
@happz thanks for the review! I believe I addressed all your suggestions. |
Prep for LBI install tests. This is temporary until the plugin is released upstream by tmt. teemtee/tmt#3161 Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
This creates a new provision plugin that is built on top of the existing TestCloud (virtual) plugin. It adds new parameters to pass a Containerfile or container image. The plugin will then build a container image (if necessary) then build a bootc disk image from the container image using bootc image builder. Currently, bootc requires podman to be run as root when building a disk image. This is typically handled by running a podman machine as root. An additional parameter "add-deps" toggles building a derived container image with the tmt test requirements. Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
707f5a8
to
28e37f6
Compare
@happz let's rebase and run the pipeline here? |
We agreed to focus on getting this in 1.38, the due date for finishing is 24th October. |
thanks for looking at this and planning for 1.38. Is there anything I can do to help move it along? |
bootc
provision plugin
This creates a new provision plugin that is built on top of the existing TestCloud (virtual) plugin. It adds new parameters to pass a Containerfile or container image. The plugin will then build a container image (if necessary) then build a bootc disk image from the container image using bootc image builder. Currently, bootc requires podman to be run as root when building a disk image. This is typically handled by running a podman machine as root.
An additional parameter "add-deps" toggles building a derived container image with the tmt test requirements.
Pull Request Checklist
This is a work in progress. I'm opening this PR early to get feedback on the high level design. I will add tests, docs, etc. after we solidify the higher level design.
If you want to try running the code here is an example fmf plan: