Skip to content
Paste-eur as unikernel
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
README.md
_tags
config.ml
form.ml
language.ml
show.ml
unikernel.ml

README.md

Pasteur

Pasteur is an unikernel (MirageOS) which provide an mini-website to paste snippets and save them into a Git repository. The goal of this project is to be an example of: how to write an unikernel today?

This example uses several stacks like the HTTP stack (with http/af), the Git stack (with ocaml-git) with Irmin with underlaying layers - available in MirageOS organization.

Design comes from paste.isomorphis.me.

How to use it?

MirageOS let user to choose which backend he wants. So we have 3 generals backends:

  • KVM (with Solo5)
  • Unix
  • Xen

Currently, the project is tested with the Unix backend - the most easy to deploy.

Unix backend

First, you need to have the MirageOS tool:

$ opam install mirage

Then, under the repository:

$ mirage configure -t unix
$ make depends
$ mirage build

And you builded the unikernel! However, this unikernel needs to communicate with a remote Git repository. In an other shell, we need to make a new Git repository with, at least, one commit in master:

$ mkdir pasteur
$ cd pasteur
$ git init --bare
$ git read-tree --empty
$ FIRST_COMMIT=`git commit-tree $(git write-tree) -m .`
$ git update-ref "refs/heads/master" $FIRST_COMMIT`

Then, we can launch the Git server:

$ cd ..
$ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose --enable=receive-pack 

You can clone it by this way:

$ git clone git://127.0.0.1/pasteur

So we can start to launch the unikernel:

$ ./main.native

It listens into 4343, so you can open http://127.0.0.1:4343 and see your Git repository feeded.

You can’t perform that action at this time.