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

Add new build-cimage command #3128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Oct 20, 2022

Depends #3127


This is a big step towards #2685

I know there's a lot going on with the pipeline, and I don't
want to conflict with all that work - but at the same time,
in my opinion we are just too dependent on complex Jenkins flows
and our bespoke "meta.json in S3".

The core of CoreOS is a container image now. This new command
adds an opinionated flow where one can do:

$ cosa init https://github.com/coreos/fedora-coreos-config
$ cosa build-cimage quay.io/cgwalters/ostest

And that's it - we do proper change detection, reading and
writing from the remote container image. We don't do silly things
like storing an .ociarchive in S3 when we have native registries
available.

Later, we can build on this and rework our disk images to
derive from that container image, as #2685 calls for.

Also in the near term future, I think we can rework cmd-build
such that it reuses this flow, but outputs to an .ociarchive instead.
However, this code is going to need a bit more work to run in
supermin.


@openshift-ci
Copy link

openshift-ci bot commented Oct 20, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cgwalters
Copy link
Member Author

One reason we need this wrapper is that 90% of what goes into a cosa build ostree is just RPMs, that are natively handled by rpm-ostree compose image. But, there's a lot in that remaining 10%:

  • We have our custom image.yaml handling that gets generated as part of cosa build --prepare-only
  • We also commit the layers
  • cosa today injects standard git metadata for src/config, rpm-ostree does not (perhaps it should)
  • Computing available lockfiles

I think where we want to go is probably to lower most of this into rpm-ostree as stable API, but it needs some thought.

@cgwalters
Copy link
Member Author

Ah yes, had to add support for variants to build c9s

@cgwalters
Copy link
Member Author

Rebased 🏄

@cgwalters cgwalters marked this pull request as ready for review November 30, 2022 16:11
This is a big step towards coreos#2685

I know there's a lot going on with the pipeline, and I don't
want to conflict with all that work - but at the same time,
in my opinion we are just too dependent on complex Jenkins flows
and our bespoke "meta.json in S3".

The core of CoreOS *is a container image* now.  This new command
adds an opinionated flow where one can do:

```
$ cosa init
$ cosa build-cimage quay.io/cgwalters/ostest
```

And *that's it* - we do proper change detection, reading and
writing from the remote container image.  We don't do silly things
like storing an `.ociarchive` in S3 when we have native registries
available.

Later, we can build on this and rework our disk images to
derive from that container image, as coreos#2685 calls for.

Also in the near term future, I think we can rework `cmd-build`
such that it reuses this flow, but outputs to an `.ociarchive` instead.
However, this code is going to need a bit more work to run in
supermin.
@cgwalters
Copy link
Member Author

Lifting draft on this...it could use some tests, but it does work today and greatly streamlines the flow of "I want to build a custom FCOS container image and push it to a registry".

@openshift-merge-robot
Copy link

@cgwalters: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants