Skip to content

chromium headless unikernel - #8

Merged
rgarcia merged 13 commits into
mainfrom
chromium-headless
Jul 1, 2025
Merged

chromium headless unikernel#8
rgarcia merged 13 commits into
mainfrom
chromium-headless

Conversation

@rgarcia

@rgarciargarcia commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

Headless chromium image!

Main features:

  • Runnable as a docker image (./{build,run}-docker.sh) for local testing
  • Unikernel build (./{build,run}-unikernel.sh) uses erofs for max resource efficiency (erofs == memory on demand, cpio == first allocate all in memory, then use)
  • some test scripts:
    • cdp-test: python script that you can feed the url of the docker image or the unikernel instance and it will figure out hte debugger URL and run a basic test
    • uk-check-stats.sh: polls the unikraft API for memory, CPU, and network usage data for an instance. Useful for figuring out what the memory allocation should be

@rgarcia
rgarcia requested a review from juecdApril 24, 2025 20:23
Comment threadunikernels/unikraft-chromium-headless/README.md Outdated
@juecd
juecd requested a review from mertcelebiApril 28, 2025 04:14
Comment threadunikernels/unikraft-chromium-headless/README.md Outdated
Comment threadunikernels/unikraft-chromium-headless/README.md Outdated
Comment threadunikernels/unikraft-chromium-headless/README.md Outdated
Comment threadunikernels/unikraft-chromium-headless/deploy.sh
Comment threadunikernels/unikraft-chromium-headless/deploy.sh Outdated
Comment threadunikernels/unikraft-chromium-headless/deploy.sh Outdated
Comment threadunikernels/unikraft-chromium-headless/deploy.sh
@rgarcia
rgarcia requested a review from Sayan-July 1, 2025 15:52
Comment on lines +58 to +63
docker build --platform linux/amd64 -t "$IMAGE" .
docker rm cnt-"$app_name" || true
docker create --platform linux/amd64 --name cnt-"$app_name" "$IMAGE" /bin/sh
docker cp cnt-"$app_name":/ ./.rootfs
rm -f initrd || true
mkfs.erofs --all-root -d2 -E noinline_data -b 4096 initrd ./.rootfs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just to confirm: this difference from the headful image is due to requirements for erofs?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yeah this is how the final filesystem for the vm is constructed. In the headful image we use kraft's built in support for Dockerfiles but that doesn't use erofs. So here we use the Dockerfile "by hand" and construct the root fs for the VM, and then reference that folder in the Kraftfile

@rgarcia
rgarcia merged commit 6c169dc into mainJul 1, 2025
@rgarcia
rgarcia deleted the chromium-headless branch July 1, 2025 18:38
Sign up for freeto 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.

4 participants

@rgarcia@Sayan-@mertcelebi@juecd