Welcome to the nrunc repository! This project serves as an experimental testing playground for exploring and validating features related to nanos and urunc integration. Our goal is to experiment with various functionalities, test APIs, and gather insights.
The findings and results from our experiments will be pushed to the upstream repository urunc once the APIs are finalized. This ensures that our contributions are integrated into the main project, benefiting the broader community.
This project is intended for Linux environments only. To run the experiments, you need to have one of the following installed:
- Docker: https://docs.docker.com/engine/install/debian/
- Ops: https://ops.city Needed to build Nanos unikernels.
- Go: You need to have Go installed to build nrunc. Please follow the official Go installation guide for instructions.
- VMM: Being tested right now:
- Firecracker: https://github.com/firecracker-microvm/firecracker
- Cloud Hypervisor: https://github.com/cloud-hypervisor/cloud-hypervisor
- Qemu: https://www.qemu.org/download/#linux
Make sure to follow the installation instructions for your chosen hypervisor before proceeding with the usage steps.
To use the nrunc project, follow these steps:
-
Clone the Repository: Clone the repository to your local machine using the following command:
git clone https://github.com/rinor/nrunc.git cd nrunc
-
Build and Install: Make sure to install any required dependencies. You can typically do this with:
make make install # or sudo make install
-
Run Experiments: Check some container files in examples folder. Assuming you already have some nanos unikernels ready,
ops image list +------+----------------------------+---------+-------------+ | NAME | PATH | SIZE | CREATEDAT | +------+----------------------------+---------+-------------+ | app | /home/user/.ops/images/app | 14.9 MB | 4 hours ago | +------+----------------------------+---------+-------------+
copy that
app
image toexamples
foldercd examples cp /home/user/.ops/images/app app
build a "container" image for
firecracker
from Containerfile.firecracker#syntax=harbor.nbfc.io/nubificus/pun:latest FROM scratch COPY app /nanos/image LABEL "com.urunc.unikernel.binary"="/nanos/kernel" LABEL "com.urunc.unikernel.cmdline"="" LABEL "com.urunc.unikernel.block"="/nanos/image" LABEL "com.urunc.unikernel.useDMBlock"="false" LABEL "com.urunc.unikernel.unikernelType"="nanos" LABEL "com.urunc.unikernel.hypervisor"="firecracker"
let's build it
docker buildx build --builder=default --output "type=image,oci-mediatypes=true" -f Containerfile.firecracker -t "nanos/app:firecracker" .
let's try to run it
docker run --rm --name app_firecracker --runtime io.containerd.nrunc.v2 nanos/app:firecracker
You can do the same for:
-
cloud-hypervisor - Containerfile.cloud-hypervisor
docker buildx build --builder=default --output "type=image,oci-mediatypes=true" -f Containerfile.cloud-hypervisor -t "nanos/app:cloud-hypervisor" . docker run --rm --name app_cloud-hypervisor --runtime io.containerd.nrunc.v2 nanos/app:cloud-hypervisor
-
qemu - Containerfile.qemu
docker buildx build --builder=default --output "type=image,oci-mediatypes=true" -f Containerfile.cloud-hypervisor -t "nanos/app:qemu" . docker run --rm --name app_qemu --runtime io.containerd.nrunc.v2 nanos/app:qemu
-
-
Known issues:
firecracker
does support networking, butqemu
andcloud-hypervisor
do not - nanovms/nanos#2090
-
Contribute: If you have insights or improvements, feel free to contribute by creating a pull request or an issue.