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

feat: integrate youki to the spin shim #119

Merged
merged 7 commits into from
Aug 2, 2023
Merged

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Jul 28, 2023

This PR integrates youki's libcontainer crate to the spin shim.

Signed-off-by: jiaxiao zhou <[email protected]>
this commits deletes the runtime config path which isn't being used
in the spin trigger. It also removes some commented lines of the stdio
becuase now in the cgroup all the ios are handled by the prepare_stdio
function and spin can just use the default stdio wiring up wasmtime.
As a consequence of it, we can also remove podio.rs

Signed-off-by: jiaxiao zhou <[email protected]>
This commits removes the command from workloads yamls. This is because
now the spin image has an explicit entrypoint pointing to a
executable wasm module, which is required by the libcontainer.

I am expecting that this will go away with futuer iteration of the
libcontainer

Signed-off-by: jiaxiao zhou <[email protected]>
@Mossaka Mossaka force-pushed the youki-spin branch 2 times, most recently from 531b668 to 5f8df2c Compare July 29, 2023 02:47
@Mossaka Mossaka closed this Jul 31, 2023
@Mossaka Mossaka reopened this Jul 31, 2023
@Mossaka Mossaka requested a review from devigned August 1, 2023 00:16
@Mossaka
Copy link
Member Author

Mossaka commented Aug 1, 2023

wooo the pipelines succeed!

@Mossaka
Copy link
Member Author

Mossaka commented Aug 2, 2023

I am going to merge this in if there are no other comments.

One breaking thing from the user side is that they no longer can just do command: ["/"] in pod spec. This is because the youki libcontainer verifies that the first argument to ENTRYPOINT must be an executable bianry. So that to build a spin image, we have to do:

COPY --from=build --chmod=0755 /opt/build/target/wasm32-wasi/release/spin_rust_hello.wasm .
COPY --from=build /opt/build/spin.toml .
ENTRYPOINT [ "./spin_rust_hello.wasm" ]

This isn't super desired and I expect that this will go away once this issue closes.

@Mossaka Mossaka merged commit df29600 into deislabs:main Aug 2, 2023
8 of 9 checks passed
@Mossaka Mossaka deleted the youki-spin branch August 2, 2023 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant