virt-do / quark

A virtualized container image runner and builder
Apache License 2.0
1 stars 4 forks source link

quark builder #3

Open sameo opened 2 years ago

sameo commented 2 years ago

The quark builder is a CLI tool for building images for lumper to boot.

Those images will be made of:

  1. A minimal Linux guest kernel
  2. A minimal initramfs image containing: a. A run0 binary b. A container image

The output of the builder will be a quark bundle, i.e. a quardle. A quardle is a compressed tarball (tar gz) made of a kernel, an initrd and a config file (quark.json).

quark.json must at least contain the kernel and initrd file names, a kernel command line and the container URL.

CLI

Building a quardle with the container image bundled into the initramfs image:


quark build  --image <container_image_url> --offline --quardle <quardle_name>

Building a quardle with the container image to be pulled from within the guest:


quark build  --image <container_image_url> --quardle <quardle_name>

Output

The above command will generate quardle_name.qrk

leofvo commented 2 years ago

What should we use for the following?

leofvo commented 2 years ago

Those images will be made of:

  1. A minimal Linux guest kernel
  2. A minimal initramfs image containing: a. A run0 binary b. A container image

How do we have to get the kaps (old run0) binary ?

sameo commented 2 years ago

Those images will be made of:

  1. A minimal Linux guest kernel
  2. A minimal initramfs image containing: a. A run0 binary b. A container image

How do we have to get the kaps (old run0) binary ?

You'd build it from source.

sameo commented 2 years ago

What should we use for the following?

  • A minimal Linux guest kernel
  • A minimal initramfs image

https://github.com/virt-do/lab/tree/main/do-vmm could be a good starting point.

leofvo commented 2 years ago

Hey @sameo, i don't understand what you're expecting from "a kernel command line" in : quark.json must at least contain the kernel and initrd file names, a kernel command line and the container URL. Can you give me more details plz

sameo commented 2 years ago

Hey @sameo, i don't understand what you're expecting from "a kernel command line" in : quark.json must at least contain the kernel and initrd file names, a kernel command line and the container URL. Can you give me more details plz

Hey @LeoFVO . This is the set of kernel parameters that you pass to a kernel when booting it. This is our default kernel command line, but this is something that should be configurable. So quark.json should have a field containing that command line, and that's a string.

Does that make sense?

See https://www.freedesktop.org/software/systemd/man/kernel-command-line.html as well.

jlabatut commented 2 years ago

Hi @sameo, about the kernel command line contained in the quark.json file, should it be configurable with the CLI when building a quardle ? Therefore, would it be useful to let the user state his own quark.json, with an option of the CLI ?

If not, all the config (kernel & initrd file names, kernel cli) should be hard-coded ? Am I right ?