Skip to content

Commit

Permalink
feat(mirage): Update docs with the newly MirageOS support
Browse files Browse the repository at this point in the history
Add information in docs for MirageOS and update the list of smaple
images with the new MirageOS images.

Signed-off-by: Charalampos Mainas <[email protected]>
  • Loading branch information
cmainas committed Feb 14, 2025
1 parent 060b823 commit 9b0970e
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 27 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ At the moment, `urunc` is available on GNU/Linux for x86\_64 and arm64 architect
In addition, the following table provides an overview of the currently
supported VM/Sandbox monitors and unikernels:

| Unikernel | VM/Sandbox Monitor | Arch | Storage |
|----------- |--------------------- |------------- |----------- |
| Rumprun | Solo5-hvt, Solo5-spt | x86,aarch64 | Devmapper |
| Unikraft | QEMU, Firecracker | x86 | Initrd |
| Unikernel | VM/Sandbox Monitor | Arch | Storage |
|----------- |--------------------------- |------------- |----------------- |
| Rumprun | Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |
| Unikraft | QEMU, Firecracker | x86 | Initrd |
| MirageOS | QEMU, Solo5-hvt, Solo5-spt | x86,aarch64 | Block/Devmapper |

We plan to add support for more unikernel frameworks and other platforms too.
Feel free to [contact](#Contact) us for a specific unikernel framework or similar
Expand Down
17 changes: 13 additions & 4 deletions docs/Sample-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ The naming convention used for these images is $APPLICATION-$HYPERVISOR-$UNIKERN
We plan to create and maintain multi-platform images soon, as well as enrich this list with new images.

- harbor.nbfc.io/nubificus/urunc/hello-hvt-rumprun-nonet:latest
- harbor.nbfc.io/nubificus/urunc/hello-hvt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/hello-hvt-mirage:latest
- harbor.nbfc.io/nubificus/urunc/hello-spt-mirage:latest
- harbor.nbfc.io/nubificus/urunc/hello-spt-rumprun-nonet:latest
- harbor.nbfc.io/nubificus/urunc/hello-spt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/nginx-qemu-unikraft-initrd:latest
- harbor.nbfc.io/nubificus/urunc/nginx-hvt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/nginx-hvt-rumprun-block:latest
- harbor.nbfc.io/nubificus/urunc/nginx-spt-rumprun-block:latest
- harbor.nbfc.io/nubificus/urunc/nginx-firecracker-unikraft-initrd:latest
- harbor.nbfc.io/nubificus/urunc/hello-hvt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/redis-hvt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/redis-hvt-rumprun-block:latest
- harbor.nbfc.io/nubificus/urunc/redis-spt-rumprun:latest
- harbor.nbfc.io/nubificus/urunc/redis-hvt-rumprun-block:latest
- harbor.nbfc.io/nubificus/urunc/redis-spt-rumprun-block:latest
- harbor.nbfc.io/nubificus/urunc/redis-qemu-unikraft-initrd:latest
- harbor.nbfc.io/nubificus/urunc/nginx-firecracker-unikraft-initrd:latest
- harbor.nbfc.io/nubificus/urunc/httpreply-firecracker-unikraft:latest
- harbor.nbfc.io/nubificus/urunc/net-hvt-mirage:latest
- harbor.nbfc.io/nubificus/urunc/net-spt-mirage:latest
- harbor.nbfc.io/nubificus/urunc/net-qemu-mirage:latest
- harbor.nbfc.io/nubificus/urunc/block-test-hvt-mirage:latest
- harbor.nbfc.io/nubificus/urunc/block-test-spt-mirage:latest

12 changes: 5 additions & 7 deletions docs/hypervisor-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ only Initramfs is supported for the time being.
Supported unikernel frameworks with `urunc`:

- [Unikraft](../unikernel-support#unikraft)
- [MirageOS](../unikernel-support#mirage)

An example unikernel:

Expand Down Expand Up @@ -159,7 +160,7 @@ $ sudo apt install libseccomp-dev pkg-config build-essential
Next, we can clone and build `solo5-hvt`.
```bash
$ git clone -b v0.6.9 https://github.com/Solo5/solo5.git
$ git clone -b v0.9.0 https://github.com/Solo5/solo5.git
$ cd solo5
$ ./configure.sh && make -j$(nproc)
```
Expand Down Expand Up @@ -192,6 +193,7 @@ type (e.g. ext2/3/4). This is the case for Rumprun unikernel.
Supported unikernel frameworks with `urunc`:
- [Rumprun](../unikernel-support#rumprun)
- [MirageOS](../unikernel-support#mirage)
An example unikernel with a block image inside the conntainer's rootfs:
Expand Down Expand Up @@ -240,7 +242,7 @@ $ sudo apt install libseccomp-dev pkg-config build-essential
Next, we can clone and build `solo5-spt`.
```bash
$ git clone -b v0.6.9 https://github.com/Solo5/solo5.git
$ git clone -b v0.9.0 https://github.com/Solo5/solo5.git
$ cd solo5
$ ./configure.sh && make -j$(nproc)
```
Expand All @@ -262,14 +264,10 @@ section](#solo5-hvt-and-urunc).
Supported unikernel frameworks with `urunc`:
- [Rumprun](../unikernel-support#rumprun)
- [MirageOS](../unikernel-support#mirage)
An example unikernel which utilizes devmapper for block storage:
```bash
$ sudo nerdctl run --rm -ti --snapshotter devmapper --runtime io.containerd.urunc.v2 harbor.nbfc.io/nubificus/urunc/redis-spt-rumprun:latest unikernel
```
> Note: Since only Rumrpun can boot on top of Solo5-{hvt|spt} (from the supported
unikernels in `urunc`) we use the v0.6.9 version of
[Solo5](https://github.com/Solo5/solo5) since Rumprun has not been updated for
the newer ones.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ Sandbox monitors, along with the unikernels that can run on top of them.

| Unikernel | VM/Sandbox Monitor | Arch | Storage |
|---------------------------------------- |--------------------- |------------- |----------- |
| [Rumprun](./unikernel-support#rumprun) | [Solo5-hvt](./hypervisor-support#solo5-hvt), [Solo5-spt](./hypervisor-support#solo5-spt) | x86, aarch64 | Block |
| [Rumprun](./unikernel-support#rumprun) | [Solo5-hvt](./hypervisor-support#solo5-hvt), [Solo5-spt](./hypervisor-support#solo5-spt) | x86, aarch64 | Block/Devmapper |
| [Unikraft](./unikernel-support#unikraft)| [Qemu](./hypervisor-support#qemu), [Firecracker](./hypervisor-support#aws-firecracker) | x86 | Initrd |
| [MirageOS](./unikernel-support#mirage)| [Qemu](./hypervisor-support#qemu), [Solo5-hvt](./hypervisor-support#solo5-hvt), [Solo5-spt](./hypervisor-support#solo5-spt) | x86, aarch64 | Block/Devmapper |

## Quick links

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ $ sudo systemctl restart containerd
We can clone, build and install both `Solo5-hvt` and `Solo5-spt` from their [common repository](https://github.com/Solo5/solo5)

```bash
$ git clone -b v0.6.9 https://github.com/Solo5/solo5.git
$ git clone -b v0.9.0 https://github.com/Solo5/solo5.git
$ cd solo5
$ ./configure.sh && make -j$(nproc)
$ sudo cp tenders/hvt/solo5-hvt /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Lets install `solo5-hvt`:

```bash
$ sudo apt install make gcc pkg-config libseccomp-dev
$ git clone -b v0.6.6 https://github.com/Solo5/solo5.git
$ git clone -b v0.9.0 https://github.com/Solo5/solo5.git
$ cd solo5
$ ./configure.sh && make -j$(nproc)
$ sudo cp tenders/hvt/solo5-hvt /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/How-to-urunc-on-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
spec:
runtimeClassName: urunc
containers:
- image: harbor.nbfc.io/nubificus/urunc/nginx-hvt-rumprun:latest
- image: harbor.nbfc.io/nubificus/urunc/nginx-hvt-rumprun-block:latest
imagePullPolicy: Always
name: nginx-urunc
command: ["sleep"]
Expand Down
83 changes: 75 additions & 8 deletions docs/unikernel-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,74 @@ Another example of [Unikraft](https://unikraft.org/) on top of Firecracker with
$ sudo nerdctl run --rm -ti --runtime io.containerd.urunc.v2 harbor.nbfc.io/nubificus/urunc/nginx-firecracker-unikraft-initrd:latest unikernel
```

## Mirage

[MirageOS](https://github.com/mirage/mirage) is a library operating system that
constructs unikernels for secure, high-performance network applications across
various cloud computing and mobile platforms.
[MirageOS](https://github.com/mirage/mirage) uses the OCaml language, with
libraries that provide networking, storage and concurrency support that work
under Unix during development, but become operating system drivers when being
compiled for production deployment. We can easily set up and build
[MirageOS](https://github.com/mirage/mirage) unikernels with `mirage`, which can
be installed throgu the [Opam](https://opam.ocaml.org/) source package manager.
The framework is fully event-driven, with no support for preemptive threading.

[MirageOS](https://github.com/mirage/mirage) is characterized from the extremely
fast start up times (just a few milliseconds), small binaries (usually a few
megabytes), small footprint (requires a few megabytes of memory) and safe logic,
as it is completely written in OCaml.

### VMMs and other sandbox monitors

[MirageOS](https://github.com/mirage/mirage), as one of the first unikernel
frameworks, provides support for a variety of hypervisors and platforms. In
particular, [MirageOS](https://github.com/mirage/mirage) makes use of
[Solo5](https://github.com/Solo5/solo5) and can execute as a VM over KVM/Xen and
other OSes, such as BSD OSes (FreeBSD, OpenBSD) or even Muen. Especially for
KVM, [MirageOS](https://github.com/mirage/mirage) supports
[Qemu](https://www.qemu.org/) and [Solo5-hvt](https://github.com/Solo5/solo5).
It can access the network through virtio-net in the case of Qemu and using
Solo5's I/O interface in the case of Solo5. For storage,
[MirageOS](https://github.com/mirage/mirage) supports block-based storage
through virtio-block and Solo5's I/O in Qemu and Solo5 respectively.

Furthermore, [MirageOS](https://github.com/mirage/mirage) is also
possible to execute on top of [Solo5-spt](https://github.com/Solo5/solo5) a
sandbox monitor of Solo5 project that does not use hardware-assisted
virtualization. In that context,
[MirageOS](https://github.com/mirage/mirage) can access network and block
storage through Solo5's I/O interface.

### MirageOS and `urunc`

In the case of [MirageOS](https://github.com/mirage/mirage) `urunc`
provides support for Solo5-spt, Solo5-hvt and Qemu. For all
monitors of Solo5 `urunc` allows the access of both network and block storage
through Solo5's I/O interface and for Qemu through virtio-net and virtio-block.

For the time being, the block image that the
[MirageOS](https://github.com/mirage/mirage) unikernel access during its
execution should be placed inside the container image.

For more information on packaging
[MirageOS](https://github.com/mirage/mirage) unikernels for `urunc` take
a look at our [packaging](../image-building/) page.

An example of [MirageOS](https://github.com/mirage/mirage) on top of
Solo5-hvt using a block image inside the container's rootfs with 'urunc':

```bash
$ sudo nerdctl run --rm -ti --runtime io.containerd.urunc.v2 harbor.nbfc.io/nubificus/urunc/net-mirage-hvt:latest unikernel
```

An example of [MirageOS](https://github.com/mirage/mirage) on top of
Solo5-spt with 'urunc':

```bash
$ sudo nerdctl run --rm -ti --runtime io.containerd.urunc.v2 harbor.nbfc.io/nubificus/urunc/net-mirage-spt:latest unikernel
```

## Rumprun

[Rumprun](https://github.com/cloudkernels/rumprun) is a unikernel framework
Expand Down Expand Up @@ -139,16 +207,15 @@ $ sudo nerdctl run --rm -ti --snapshotter devmapper --runtime io.containerd.urun

In the near future, we plan to add support for the following frameworks:

[Mewz](https://github.com/mewz-project/mewz): A unikernel designed
specifically for running Wasm applications and compatible with WASI.

[Linux](https://github.com/mewz-project/mewz): The widely known kernel that runs
almost everywhere. In the case of `urunc` we will support minimal Linux
configurations where the init process is the application.

[OSv](https://github.com/cloudius-systems/osv): An OS designed specifically to
run as a single application on top of a hypervisor. OSv is known for its
performance optimization and supports a wide range of programming languages,
including Java, Node.js, and Python.

[MirageOS](https://github.com/mirage/mirage): A library operating system that
constructs unikernels for secure, high-performance network applications across
various cloud computing and mobile platforms.MirageOS is written in OCaml,
offering a functional and modular approach to building lightweight, secure
unikernels.

[Mewz](https://github.com/mewz-project/mewz): A unikernel designed
specifically for running Wasm applications and compatible with WASI.

0 comments on commit 9b0970e

Please sign in to comment.