Skip to content

Commit

Permalink
update nginx rumprun README
Browse files Browse the repository at this point in the history
- add insturction for running nginx rumprun on KVM
  • Loading branch information
huikang committed Dec 22, 2016
1 parent eac2973 commit 9f866b9
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions nginx/README.md
Expand Up @@ -29,15 +29,21 @@ Run `make`:
make make
``` ```


Bake the final unikernel image: Bake the final unikernel image for Xen:
``` ```
rumprun-bake xen_pv bin/nginx.bin bin/nginx 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 To start a Xen domU running nginx serving static files, as root run (for
example): example):
Expand All @@ -50,3 +56,27 @@ rumprun xen -M 128 -di \
```` ````


Replace `10.10.10.10/24` with a valid IP address on your Xen network. 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.