Job unipi-with-kv

README

Skip to build

Unipi - serve git repository content as HTTPS

Unipi is a MirageOS unikernel that provides the contents of a git repository via HTTP and HTTPS. It embeds (optional) let's encrypt provisioning.

A webhook is provided to update the internal state of the git repository. An example deployment is test.nqsb.io, which serves the ocaml-dns documentation (using the gh-pages branch).

Some HTTP headers are added: "content-type", which value is looked up of the file ending using magic-mime. "last-modified" and "etag" are the timestamp of the most recent commit to the git remore, respective the hash of the most recent commit. If the client sends "if-modified-since" or "if-none-match", and either matches the most recent commit, the HTTP status Not modified (304) is returned with an empty body.

Inspiration for this unikernel is taken from Canopy after discussion with the Muen developers.

Configuration

Unipi is only configured via boot parameters, as follows:

To use git via ssh (only public/private key authentication is supported):

For HTTPS service with let's encrypt certificate:

For a complete list of boot parameters, execute the binary with --help as argument.

Installation from source

To install this unikernel from source, you need to have opam (>= 2.0.0) and ocaml (>= 4.07.0) installed. Also, mirage is required (>= 3.7.7). Please follow the installation instructions.

The following steps will clone this git repository and compile the unikernel:

$ git clone https://github.com/roburio/unipi.git
$ cd unipi
$ mirage configure -t <your-favourite-target> #i.e. hvt, spt, xen
$ make depend
$ make

Installing as binary

There are not yet any binaries available, but work is underway to provide reproducible binaries.

Questions?

Please open an issue if you have questions, feature requests, or comments.

Build 2021-10-13 22:50:50 -00:00

Back to readme

Build took 17min57s.

Execution result: exited 0.

Reproduced by builds

2021-10-15 22:42:38 -00:00, 2021-10-14 22:34:17 -00:00,

Build info

Comparisons with other builds

With latest build
With build 2021-10-12 22:27:06 -00:00 (output is identical binary)
With build 2021-10-08 22:33:18 -00:00 (output is identical binary)

Build artifacts

bin/unipi.hvt
SHA256:928b3f1cc211b96f655fc47ad311fa9666b40305c7430d4e67343ff9042cdd76 (11.9MB)
build-environment
SHA256:a3ef368cac859685dfd6c1cd1c4479c1c3011e5f1b1b28cda07d5377cc31260c (261B)
opam-switch
SHA256:50f5eee8111a344331e57a8e93c1956afdb16d4bbaa3a9a4db97fa6844f7c899 (285kB)
system-packages
SHA256:988bcce87c0157b9e31c7dac750f7814f8427a487268ce92dafc549c0b979b28 (184B)
unipi.hvt.debug
SHA256:01bd1a29f9115c8e031631ce052c981cfe9710fbb4e6a3640b0c3911fbc79d7b (17.4MB)