-
Notifications
You must be signed in to change notification settings - Fork 173
Build via Containerfile and derive from fedora-bootc #3348
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
Conversation
|
This is still in the early phase. It doesn't work yet. Also note we're using tier-1 for now since there's no tier-x image available yet (https://gitlab.com/fedora/bootc/base-images/-/issues/25). Edit: now using a tier-x image I built myself. |
|
OK cool, got a successful build with this and coreos/rpm-ostree#5274 which I can even rebase to and boot successfully. We're not rebuilding the initramfs yet nor adding overlays. Those shouldn't be hard though. |
|
Updated this now and updated the PR description with more details! Still working on it (notably, going over preliminary diffs between a cosa-built tree and this). |
5c5f576 to
1ee6ffd
Compare
cgwalters
left a comment
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.
Looks generally sane to me!
build-rootfs
Outdated
| # inject live/ bits | ||
| target_path = os.path.join(rootfs, 'usr/share/coreos-assembler/live') | ||
| shutil.copytree(os.path.join(CONTEXTDIR, "live"), target_path) |
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 we could put this in a proper overlay to not have to special case this.
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.
Yeah, true. It's trivial too to just inject it so will just do that for now to avoid the cosa churn.
| set -xeuo pipefail | ||
| if [ -f /run/.containerenv ]; then | ||
| grep sudo /usr/lib/group >> /etc/group | ||
| fi |
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.
Should we add these three new postprocess scripts in a manifest that is shared with RHCOS/SCOS?
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.
Maybe. For a first pass, I'm just keeping all these "postprocess moves" in the same manifest as the equivalent compose key they come from to ensure I don't mess up any inheritance in the process.
|
Havne't had a chance to test this out yet. Some comments in the mean time. |
|
Updated for comments! This now requires https://gitlab.com/fedora/bootc/base-images/-/merge_requests/195. Split prep patches in #3534. Dropped the |
|
One thing worth highlighting is that if you look at the
Once we switch to the container-native flow, every key other than those could be nuked. At that point, manifests are just a way of organizing those keys into a useful hierarchy to make sharing across streams and across RHCOS/SCOS easier, but it does make it easier to switch to a different way of doing that if we wanted to. |
5b02753 to
18af51d
Compare
We should be able to revert this soon. Mostly doing this so that we can start building it in CI as part of coreos#3348.
We should be able to revert this soon. Mostly doing this so that we can start building it in CI as part of coreos#3348.
We should be able to revert this soon. Mostly doing this so that we can start building it in CI as part of coreos#3348.
|
Thanks again for all of the work on this! It's a giant milestone towards the original vision I had here...been a long, long journey and many parts have been much harder than I thought. But I do believe (hope) that this will pay itself back in a lot of ways. I mean, one thing for sure that is so much dramatically nicer is that use case of "hey I just want to drop in this one override for one package" is now just If there's anything more I (or the team) can do to help let me know! |
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline.
(And thank you for that!!!) |
This is basically my fault: Yesterday I was trying to clean up the failed releases and I accidentally triggered some of them which, for what it seems, were quite old. This should have been fixed with the latest builds from yesterday's compose |
This builds RHEL CoreOS using a Containerfile. It uses the [FROM scratch flow](https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/) to do a base compose. This is structured in a way that we can build FCOS using _both_ `podman build` _and_ `cosa build`. This allows us to make the cutover much smoother. This builds on top of coreos/fedora-coreos-config#3348. Notably, the Containerfile and build-rootfs files are shared with FCOS. See that PR message for more details on the overall approach since it applies as well here.
This builds RHEL CoreOS using a Containerfile. It uses the [FROM scratch flow](https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/) to do a base compose. This is structured in a way that we can build FCOS using _both_ `podman build` _and_ `cosa build`. This allows us to make the cutover much smoother. This builds on top of coreos/fedora-coreos-config#3348. Notably, the Containerfile and build-rootfs files are shared with FCOS. See that PR message for more details on the overall approach since it applies as well here.
This builds RHEL CoreOS using a Containerfile. It uses the [FROM scratch flow](https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/) to do a base compose. This is structured in a way that we can build FCOS using _both_ `podman build` _and_ `cosa build`. This allows us to make the cutover much smoother. This builds on top of coreos/fedora-coreos-config#3348. Notably, the Containerfile and build-rootfs files are shared with FCOS. See that PR message for more details on the overall approach since it applies as well here.
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This builds RHEL CoreOS using a Containerfile. It uses the [FROM scratch flow](https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/) to do a base compose. This is structured in a way that we can build FCOS using _both_ `podman build` _and_ `cosa build`. This allows us to make the cutover much smoother. This builds on top of coreos/fedora-coreos-config#3348. Notably, the Containerfile and build-rootfs files are shared with FCOS. See that PR message for more details on the overall approach since it applies as well here.
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. co-authored by: Bipin B Narayan <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This builds RHEL CoreOS using a Containerfile. It uses the [FROM scratch flow](https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/) to do a base compose. This is structured in a way that we can build FCOS using _both_ `podman build` _and_ `cosa build`. This allows us to make the cutover much smoother. This builds on top of coreos/fedora-coreos-config#3348. Notably, the Containerfile and build-rootfs files are shared with FCOS. See that PR message for more details on the overall approach since it applies as well here.
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This command takes as argument a `containers-transport(5)`-style pullspec and creates a new cosa build dir from it. It essentially bridges the gap between coreos/fedora-coreos-config#3348 and the rest of the cosa pipeline. Co-authored-by: Jonathan Lebon <[email protected]>
This builds Fedora CoreOS using a Containerfile. It uses the FROM scratch flow to do a base compose.
This is structured in a way that we can build FCOS using both
podman buildandcosa build. This allows us to make the cutover much smoother. So then, we could turn this on in e.g. rawhide first and let it percolate down.All the heavy lifting is done in the
build-rootfsscript. The idea is that this script is shared by both FCOS and RHCOS. Random notes:bootc-base-imagectlscript itself is in Python and so can only be used from the:standardimage.bootc-base-imagectl(seehttps://gitlab.com/fedora/bootc/base-images/-/merge_requests/178) so it's part of a single compose.
podman buildfedora-coreos-tracker#1861).Rechunking is expected to be done as a secondary step. Once we have containers/buildah#5952, we can inline it back into the Containerfile.
Requires: