-
Notifications
You must be signed in to change notification settings - Fork 198
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
Add new treefile-apply
experimental command
#5274
Conversation
Skipping CI for Draft Pull Request. |
This uses coreos/rpm-ostree#5274 to build FCOS as a derivation of fedora-bootc.
cb81b87
to
5e697b1
Compare
5e697b1
to
26f9175
Compare
I think we could use a test case for this, should be pretty easy right? Anything else keeping this in draft? |
This uses coreos/rpm-ostree#5274 to build FCOS as a derivation of fedora-bootc.
26f9175
to
b0edb06
Compare
b0edb06
to
1669f13
Compare
Added test, rebased and moved out of draft! There's definitely more to add here, but it's enough for some success. |
We are working towards rebasing FCOS and RHCOS on top of fedora-bootc and rhel-bootc. As one can imagine, we are quite heavily invested in treefiles currently, so being able to keep using what we already have as we transition into becoming a layered build is valuable. Dockerfiles are great of course as the common language used to build container images. But it's not great for implementing complex logic. Add a new `rpm-ostree experimental compose treefile-apply` command which takes a treefile, but applies its directives _live_ in the running environment. So in this model, the business logic in the Dockerfile is kept to a minimum and all the heavy lifting happens via `RUN rpm-ostree compose treefile-apply manifest.yaml`. A very small subset of the treefile spec is actually supported. The goal is _not_ to reimplement everything, but only what is needed and useful in a derivation context. For now, only `packages`, `recommends`, and `postprocess` are supported. More will be added in the future. This code actually started as a Python script in openshift/os, currently used to build the OCP node image: https://github.com/openshift/os/blob/master/scripts/apply-manifest So in fact, the node image (which in turn is a layered build on top of RHCOS) will also be using this code.
1669f13
to
057ccd9
Compare
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.
LGTM!
Looks like CI failed actually with
|
CI fix in #5286. I guess let's make it required after that merges? |
We are working towards rebasing FCOS and RHCOS on top of fedora-bootc
and rhel-bootc. As one can imagine, we are quite heavily invested in
treefiles currently, so being able to keep using what we already have as
we transition into becoming a layered build is valuable.
Dockerfiles are great of course as the common language used to build
container images. But it's not great for implementing complex logic.
Add a new
rpm-ostree experimental compose treefile-apply
commandwhich takes a treefile, but applies its directives live in the running
environment.
So in this model, the business logic in the Dockerfile is kept to a
minimum and all the heavy lifting happens via
RUN rpm-ostree compose treefile-apply manifest.yaml
.A very small subset of the treefile spec is actually supported. The goal
is not to reimplement everything, but only what is needed and useful
in a derivation context.
This code actually started as a Python script in openshift/os, currently
used to build the OCP node image:
https://github.com/openshift/os/blob/master/scripts/apply-manifest
So in fact, the node image (which in turn is a layered build on top of
RHCOS) will also be using this code.