https://github.com/hannesm/mirageos-bobkonf2019-tutorial
MirageOS unikernels used for bobkonf 2019 tutorial
https://github.com/hannesm/mirageos-bobkonf2019-tutorial
example functional-programming mirageos ocaml tutorial unikernel
Last synced: 5 months ago
JSON representation
MirageOS unikernels used for bobkonf 2019 tutorial
- Host: GitHub
- URL: https://github.com/hannesm/mirageos-bobkonf2019-tutorial
- Owner: hannesm
- Created: 2019-03-21T21:10:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T16:38:34.000Z (over 6 years ago)
- Last Synced: 2025-05-09T00:58:37.316Z (5 months ago)
- Topics: example, functional-programming, mirageos, ocaml, tutorial, unikernel
- Language: OCaml
- Size: 16.6 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MirageOS tutorial at bobkonf 2019
[](https://travis-ci.org/hannesm/mirageos-bobkonf2019-tutorial)
In this repository are some example unikernels, used as tutorial introduction
at Bobkonf 2019.The only real prerequisite is [opam](https://opam.ocaml.org) >= 2.0.0. Any macOS
or Linux/BSD system should be fine.To get started, install first some OCaml tools:
```bash
$ opam version
2.0.0 (or higher)
$ opam init
$ opam update
$ opam switch create 4.07.1
..takes some time, compiles OCaml..
$ eval `opam env` # set's environment variables, need to be repeated in every new shell (.shrc is your friend)!
$ opam install merlin ocp-indent mirage utop
merlin instructions (setting up emacs, vim, etc.)
$ mirage --version
3.5.0 (at least)
```Now, we're ready to get started with the first example in 00-hello! :)
```bash
$ mirage configure --help #outputs configure man page
$ mirage configure #configures the unikernel for unix
$ make depend #installs opam dependencies
$ mirage build #or make, compiles the unikernel
$ ./main.native
```For the hypervisor
```bash
$ mirage configure -t hvt && make depend && mirage build
#configures the same unikernel for hvt (kvm)
#compiles the unikernel. providing solo5-hvt and hello.hvt
$ ./solo5-hvt hello.hvt #executes the unikernel as virtual machine
```Command-line arguments
```bash
$ ./solo5-hvt hello.hvt -l \*:debug
$ ./solo5-hvt --net=tap0 dns_client.hvt --ipv4=10.0.42.5/24 --ipv4-gateway=10.0.42.1 -l debug
$ ./solo5-hvt --mem=16 --net=tap0 dns_client.hvt --help
$ ./solo5-hvt --mem=16 --net=tap0 dns_client.hvt --ipv4=10.0.42.5/24 --ipv4-gateway=10.0.42.1 --hostname=example.com
```