-
Notifications
You must be signed in to change notification settings - Fork 254
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
OCI configuration updates to support containerd #1857
Comments
Thanks for breaking down the updates needed for compatibility with containerd and pointing to a prototype approach @jsturtevant! We should have the flexibility to incorporate these changes; in fact, it seems we'd been waiting for an excuse to finalize media types, as you've probably noticed :) As an aside (probably eventually best for its own issue/discussion), we also are or will be using a few more media types that I don't see used yet in the shim:
Is there guidance on appropriate names for these two as well? |
Right now the current thinking with the wasi component model is to package almost everything as a component. In the case of static or data files, the idea would be to create a virtual file system component that could serve those up. @devigned might have more details |
@vdice Would this have compatibility implications for loading already-published applications? If so, can we continue to accept the old format alongside the new one (while only publishing the new one), at least for a transitional period? |
i have a feeling there are a lot transitory periods abounding... |
I don't see any issue with supporting both formats, It should be fairly straightforward to identify them and handle them accordingly. The only caveat is that the current format with the oci |
Ah, ok - this would require a more concerted effort and non-trivial refactor for Spin to update the way it publishes (and pulls/loads) data layers. I'll bring this up with the team tomorrow. But it sounds like containerd will only be compatible with Spin apps comprised only of the config layer and one or more wasm layers? I suppose we could add support in the shim for handling other types (eg the 'data' type Spin also currently handles) -- but unneeded work if alignment/standardization on wasm-layers-only appears the best path forward. In the meantime, we can knock out the other asks mentioned above (add spin config as add'l layer, update wasm layer and config mediaType, update artifact mediaType and artifactType). Oh, one more question. For the |
@itowlson yes, we'll want to hash this out when we tackle this larger bit of re-work in Spin. Like @jsturtevant mentions, it sounds like support in containerd for Spin apps as currently published isn't in the cards, so compatibility concerns would only be relevant on Spin's side. |
to be clear, the OCI Format today won't work in containerd but we do have spin working in with container images https://github.com/deislabs/containerd-wasm-shims/tree/main/containerd-shim-spin-v1.
Yes, since component model isn't offiically out, I've been using module to make the disctinction.
right, as it is implemented now, spin shim can handle the additional layers in any way it wants. I think long term we definitely want try to align but we are yet to see many examples of this implemented. |
@vdice @itowlson Also want to bring to your attention an issue we are discussing in OCI repository,. If you have any opinions on it from a WASM project perspective I think it would valuable to add your insight |
@jsturtevant when convenient, would be great to get early feedback and confirm direction in #1882 looks good. |
Closing per #1882. Note there may be follow-ups (eg #2000) but we can track in dedicated issues. Thanks @jsturtevant! |
Based on the issue created in runwasi containerd/runwasi#108 and the proposal to support WASI OCI artifacts in Containerd spins current OCI format won't work with out some minor modifications.
The approach outlined in the doc is to add
"artifactType": "application/vnd.bytecodealliance.component.v1+wasm"
and useconfig.mediaType
asapplication/vnd.oci.image.config.v1+json
. This allows for runtimes to still properly configure and launch the wasm applications (see containerd/runwasi#147 as an example).This means the current spin configuration of
application/vnd.fermyon.spin.application.v1+config
would need to move to be a layer in the OCI artifact and artifact type would be specified.An example of the image manifest might look like:
I have a prototype using this approach at deislabs/containerd-wasm-shims#164. Happy to answer any questions and feedback is appreciated!
The text was updated successfully, but these errors were encountered: