|
| 1 | +# Building and Running Example Unikernels with urunc |
| 2 | + |
| 3 | +This document explains how to build and run example unikernels using urunc. |
| 4 | +It is intended for users who want to quickly experiment with urunc using |
| 5 | +real-world applications. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +Before building any unikernel, ensure the following tools are installed: |
| 12 | + |
| 13 | +- Git |
| 14 | +- Build tools (make, gcc or clang) |
| 15 | +- Docker (optional, but recommended for reproducible builds) |
| 16 | +- A working urunc installation |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Redis Unikernel Example |
| 21 | + |
| 22 | +Redis is a popular in-memory data store and a good candidate for a unikernel. |
| 23 | + |
| 24 | +### Build Steps |
| 25 | + |
| 26 | +1. Clone the Redis unikernel repository: |
| 27 | + ``` |
| 28 | + git clone <redis-unikernel-repository> |
| 29 | + cd redis-unikernel |
| 30 | + ``` |
| 31 | + |
| 32 | +2. Build the unikernel image: |
| 33 | + ``` |
| 34 | + make |
| 35 | + ``` |
| 36 | + |
| 37 | +3. Verify that the image was created successfully. |
| 38 | + |
| 39 | +### Running with urunc |
| 40 | + |
| 41 | +``` |
| 42 | +urunc run redis.img |
| 43 | +``` |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Nginx Unikernel Example |
| 48 | + |
| 49 | +Nginx can be used to demonstrate HTTP workloads running as unikernels. |
| 50 | + |
| 51 | +### Build Steps |
| 52 | + |
| 53 | +1. Clone the Nginx unikernel repository: |
| 54 | + ``` |
| 55 | + git clone <nginx-unikernel-repository> |
| 56 | + cd nginx-unikernel |
| 57 | + ``` |
| 58 | + |
| 59 | +2. Build the unikernel:s |
| 60 | + ``` |
| 61 | + make |
| 62 | + ``` |
| 63 | + |
| 64 | +### Running with urunc |
| 65 | + |
| 66 | +``` |
| 67 | +urunc run nginx.img |
| 68 | +``` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Httpreply Unikernel Example |
| 73 | + |
| 74 | +Httpreply is a minimal HTTP service useful for testing networking behavior. |
| 75 | + |
| 76 | +### Build Steps |
| 77 | + |
| 78 | +1. Clone the Httpreply unikernel repository: |
| 79 | + ``` |
| 80 | + git clone <httpreply-unikernel-repository> |
| 81 | + cd httpreply-unikernel |
| 82 | + ``` |
| 83 | + |
| 84 | +2. Build the unikernel: |
| 85 | + ``` |
| 86 | + make |
| 87 | + ``` |
| 88 | + |
| 89 | +### Running with urunc |
| 90 | + |
| 91 | +``` |
| 92 | +urunc run httpreply.img |
| 93 | +``` |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## Notes |
| 98 | + |
| 99 | +- Exact build steps may vary depending on the unikernel framework used. |
| 100 | +- Docker-based builds are recommended to ensure consistent and reproducible environments. |
| 101 | +- These examples can be extended to additional applications and frameworks supported by urunc. |
0 commit comments