Skip to content

rinor/nrunc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nrunc: Experimental Testing Playground

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.

Purpose

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.

Usage

Requirement

This project is intended for Linux environments only. To run the experiments, you need to have one of the following installed:

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:

  1. Clone the Repository: Clone the repository to your local machine using the following command:

    git clone https://github.com/rinor/nrunc.git
    cd nrunc
  2. Build and Install: Make sure to install any required dependencies. You can typically do this with:

    make
    make install # or sudo make install
  3. 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 to examples folder

    cd 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
  4. Known issues:

    • firecracker does support networking, but qemu and cloud-hypervisor do not - nanovms/nanos#2090
  5. Contribute: If you have insights or improvements, feel free to contribute by creating a pull request or an issue.