Commit 9993a27
authored
Fix unikernel deployment (#109)
This PR addresses an issue a user noticed where the instructions
resulted in a broken deployment.
### Issue
Instances based off the pushed image would do nothing but reboot as
shown by the logs. Of note the uploaded image was 37MB.
### Changes
* The primary fix is the addition of a flag specifying that the `initrd`
filesystem is EROFS.
* The headless image memory allocation is increased from 1024MB as it
was insufficient.
* Variables are added to `run-unikernel.sh` scripts that allow adjusting
the `volimport` path prefix and the VCPUS parameter.
* The `volimport` prefix environment variable might be unnecessary but
was preferred as the original references `onkernel`. The `official`
version seems to work and is the default.
* The README is improved.
Both headless and headful images were built and run. The headful image
ran with WebRTC enabled.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Package unikernels with EROFS, increase headless memory, add VCPUS and
VOLIMPORT_PREFIX envs, and refine README unikernel instructions.
>
> - **Unikernel build**
> - Add `--rootfs-type erofs` to
`images/chromium-headless/build-unikernel.sh` and
`images/chromium-headful/build-unikernel.sh`.
> - **Unikernel run**
> - `images/chromium-headless/run-unikernel.sh`:
> - Memory: `-M` increased from `1024` to `3072`.
> - vCPUs configurable via `VCPUS` (default `1`).
> - `images/chromium-headful/run-unikernel.sh`:
> - vCPUs configurable via `VCPUS` (default `4`).
> - Volume import image prefix configurable via `VOLIMPORT_PREFIX`
(defaults to `onkernel`).
> - **Docs**
> - `README.md`: Update Unikraft instructions—split secret exports, use
explicit `IMAGE=... images/.../{build,run}-unikernel.sh` commands, add
headful run alternative with `VOLIMPORT_PREFIX`, and note `VCPUS`
tunable.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d390334. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent fd4952c commit 9993a27
File tree
5 files changed
+14
-8
lines changed- images
- chromium-headful
- chromium-headless
5 files changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments