feat(run): enable running LLB images#750
Draft
jake-ciolek wants to merge 2 commits intounikraft:stagingfrom
Draft
feat(run): enable running LLB images#750jake-ciolek wants to merge 2 commits intounikraft:stagingfrom
jake-ciolek wants to merge 2 commits intounikraft:stagingfrom
Conversation
Create a singleton for the umbrella package manager and use it instead of global package-scoped maps. Use more dependency injection. Move the scattered init() calls to RegisterPackageManager into one place. Create a bootstrap package for handling flag/zip registration. Use the bootstrapping package in main(). Propagate errors up and report them if initialization fails. This should make things a bit more testable in the future. GitHub-Fixes: unikraft#425 Signed-off-by: Jakub Ciolek <jakub@ciolek.dev>
07e69e4 to
d8820a5
Compare
WIP This introduces a `dockerImage` package to run docker images containing a unikernel built with the LLB plugin. The hello world target runs successfully. A new package manager, "docker", has been added. If the target OCI image is missing, this package manager searches for it. There's an ongoing discussion about how to handle image references, especially when an image could be in both local/remote OCI storage and local docker storage. Currently, the process first checks the OCI storage and then Docker. In case of conflicts, the user might need to choose. To-Do: - Fix targets that don't build due to missing dependencies or artifact naming issues. - Provide architecture/platform info via image, as Docker doesn't support non-standard OS like qemu. - Consider support for remote docker registries. - Refactor some interfaces; we could make some of them smaller and avoid the "not implemented" errors. - Explore testing approaches for this functionality. Signed-off-by: Jakub Ciolek <jakub@ciolek.dev>
d8820a5 to
8b3c470
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisite checklist
make fmton your commit series before opening this PR;Description of changes
WIP
We have to decide how to pass the arch/plat if we are to use docker. As brought up previously, it doesn't allow us to use qemu/fc for OS thus we can't source architecture from this field. Perhaps we could use labels instead.
To use, build the LLB plugin image, prepend a selector to kraft.yaml (tested with app-helloworld at 5845459d):
#syntax=kraftkit.sh/llb:latestBuild the image with:
docker build path/to/helloworld-root -f path/to/helloworld-root/kraft.yaml -t mydockerhelloworld:latestRun with kraft:
kraft run mydockerhelloworld:latestThis will pull the image from docker image storage, unpack it somewhere in /tmp/ and then we do the usual kraft run stuff.
Waiting for @nderjung to have a look. We also need #727