spin icon indicating copy to clipboard operation
spin copied to clipboard

Push component to registry

Open itowlson opened this issue 1 month ago • 5 comments

Spin recently added experimental support for sourcing a component's Wasm from a registry. However, you can't yet upload such a component using spin registry push: you have to use a specific oras incantation. It would be good to have an end-to-end story around this.

One possible way of doing this is to extend the use of the -f flag to accept a Wasm file, as spin up now allows. Thus spin registry push ghcr.io/itowlson/fileserver:1.0.0 -f ./target/wasm32-wasi/release/fileserver.wasm would upload a single Wasm blob, which could then be reused via [component] source = { registry = "ghcr.io", package = "itowlson/fileserver", version = "1.0.0" }.

A risk here is confusion over whether "push a component" pushes the fully configured component or just the Wasm blob. Referencing a file hopefully makes that clear.

On the other hand, it's also arguably not something Spin needs to be involved in, because that could be any Wasm file, it doesn't have to be a Spin component. There should be and, and undoubtedly soon will be, other and more general tooling for that. Anyway jotting it down as a ponderable.

itowlson avatar May 30 '24 19:05 itowlson