-
Notifications
You must be signed in to change notification settings - Fork 168
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 deploy-via-container
key for image.yaml
#2523
Conversation
To try this out, first you will need an rpm-ostree build from coreos/rpm-ostree#3139 Then do e.g.
Now, what we actually want is something like Or...I've been thinking about this more, and it feels like longer term we should be reworking the entire build flow around this, where we actually split things up like:
|
809093e
to
9da4b48
Compare
It turns out instead of typing in English here it was almost equally easy to do ostreedev/ostree-rs-ext#135 there |
Apart from the container target ref, what's the difference in end state between |
Deploying via a container in this way also e.g. writes a ref for each blob in the container (today, just one, but in the future multiple), and also creates a new commit which is where the manifest is stored.
An important aspect of this per above is that because we write a ref for the blob, we know not to re-download it when upgrading even if the |
We can do this earlier rather than intermixing it with the pull/deploy. Prep for further work.
5412885
to
4d0c149
Compare
This builds on the `image-format: oci` key to switch to using the new ostree-container code to do the deployment (via rpm-ostree). Unlike the above though, this is not something we can turn on by default until we intend to hard cut over to fetching updates via containers. The intention is to use this to produce image builds that are initially provisioned via a container image so that we can more easily experiment with the "container native" flow. A side note; I suspect this will indirectly fix openshift/os#594 because now we're opening a single large file and pulling that over virtio instead of lots of smaller files.
4d0c149
to
d11dd39
Compare
OK, I tested this one in concert with coreos/rpm-ostree#3139 and since this is just an optional thing, nothing blocks landing this before that code lands. |
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!
In coreos/coreos-assembler#2523 we taught coreos-assembler how to generate disk images with a "pre-pulled" container image. This means that the *first* OS update will use shared layers. However...right now running e.g. `rpm-ostree rebase quay.io/newimage` won't necessarily prune the previous image. (This may be considered a bug) But in practice, particularly for RHEL CoreOS we may not want to have a default image reference - we don't (necessarily) want typing `rpm-ostree upgrade` to do something. With this, we can effectively pre-pull just the layers but not the final image.
In coreos/coreos-assembler#2523 we taught coreos-assembler how to generate disk images with a "pre-pulled" container image. This means that the *first* OS update will use shared layers. However...right now running e.g. `rpm-ostree rebase quay.io/newimage` won't necessarily prune the previous image. (This may be considered a bug) But in practice, particularly for RHEL CoreOS we may not want to have a default image reference - we don't (necessarily) want typing `rpm-ostree upgrade` to do something. With this, we can effectively pre-pull just the layers but not the final image.
I was trying to use coreos/coreos-assembler#2523 to test something and discovered that coreos/coreos-assembler#2523 regressed this. We need to use the target imgref if provided.
create_disk: Initialize stateroot earlier
We can do this earlier rather than intermixing it with
the pull/deploy. Prep for further work.
Add
deploy-via-container
key forimage.yaml
This builds on the
image-format: oci
key to switch to usingthe new ostree-container code to do the deployment (via rpm-ostree).
Unlike the above though, this is not something we can turn on
by default until we intend to hard cut over to fetching updates
via containers.
The intention is to use this to produce image builds that are
initially provisioned via a container image so that we can more
easily experiment with the "container native" flow.
A side note; I suspect this will indirectly fix
openshift/os#594
because now we're opening a single large file and pulling that
over virtio instead of lots of smaller files.