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

quark: Implement quark builder #7

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

Conversation

jlabatut
Copy link

@jlabatut jlabatut commented Apr 7, 2022

close #3

@sameo
Copy link
Contributor

sameo commented Apr 18, 2022

Still a draft @jlabatut ?

@jlabatut
Copy link
Author

jlabatut commented Apr 18, 2022 via email

@jlabatut jlabatut marked this pull request as ready for review April 25, 2022 17:33
@jlabatut jlabatut requested a review from sameo April 25, 2022 17:34
@jlabatut
Copy link
Author

Hi @sameo, PR ready for review !

@jlabatut jlabatut self-assigned this Apr 26, 2022
@jlabatut jlabatut changed the title quark: Implement build subcommand quark: Implement quark builder Apr 26, 2022
Copy link
Contributor

@sameo sameo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @jlabatut. I have a few comments to address before we can merge that one.

src/cli/run.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated
#[clap(short, long)]
image: String,

/// Indicates wether or not the container image is bundled into the initramfs image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if it's not. Where will the image come from?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the role of Kaps to pull the image from the name / URL stated in the build command (and in the quark.json file).

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
src/cli/build.rs Outdated Show resolved Hide resolved
- fetches `kaps` from GitHub (https://github.com/virt-do/kaps), builds it with `cargo`.
- clones Cloud Hypervisor repository (https://github.com/cloud-hypervisor/linux), builds a Linux kernel using a specific configuration (https://github.com/virt-do/lumper/blob/main/kernel/linux-config-x86_64).
- if offline mode is selected, fetches a `.tar.gz` archive from an URL an builds a container bundle containing the rootfs of the container and a `runc` config file.
- creates an initrootfs image (`lzma` format) from an `alpine` image, containing the container bundle, the `kaps` binary and an init file to launch `kaps` using the bundle.
- wraps the kernel, the initrootfs image and a `quark.json` config file inside a `quardle`.

Signed-off-by: Julian Labatut <[email protected]>
@jlabatut
Copy link
Author

jlabatut commented May 1, 2022

Hi @sameo, PR is ready again for a review. Thanks.

@jlabatut
Copy link
Author

jlabatut commented May 2, 2022

This PR should be merged before #6 (@MaloPolese)

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.

quark builder
2 participants