Permalink
Browse files

update nginx rumprun README

- add insturction for running nginx rumprun on KVM
  • Loading branch information...
huikang committed Dec 22, 2016
1 parent eac2973 commit 9f866b9a167b6785fab9f3f6190a964738fe630e
Showing with 34 additions and 4 deletions.
  1. +34 −4 nginx/README.md
View
@@ -29,15 +29,21 @@ Run `make`:
make
```
-Bake the final unikernel image:
+Bake the final unikernel image for Xen:
```
rumprun-bake xen_pv bin/nginx.bin bin/nginx
```
-(Replace `xen_pv` with the platform you are baking for.)
+or KVM:
-Examples
-========
+```
+rumprun-bake hw_generic bin/nginx.bin bin/nginx
+```
+
+(Replace `xen_pv`/` hw_generic` with the platform you are baking for.)
+
+Examples on Xen
+===============
To start a Xen domU running nginx serving static files, as root run (for
example):
@@ -50,3 +56,27 @@ rumprun xen -M 128 -di \
````
Replace `10.10.10.10/24` with a valid IP address on your Xen network.
+
+Examples on KVM
+===============
+
+Create a tap device (named tap0) on the host:
+
+````
+ip tuntap add tap0 mode tap
+ip addr add 10.0.0.10/24 dev tap0
+ip link set dev tap0 up
+````
+
+Replace `10.0.0.10/24` with a valid IP address that is not used by the host.
+
+To start a unikernel running nginx serving static files, as root run (for
+example):
+
+````
+rumprun qemu -M 128 -i \
+ -I if,vioif,"-net tap,script=no,ifname=tap0" \
+ -W if,inet,static,10.0.0.11/24 \
+ -b images/data.iso,/data \
+ -- bin/nginx.bin -c /data/conf/nginx.conf
+````

0 comments on commit 9f866b9

Please sign in to comment.