This section discusses GitHub projects related to my research.

mirage/mirage-decks

This project demonstrates the use of mirage as a selfhosting unikernel: in this demo, mirage is compiled with a set of slide presentation to produce a server of slide presentations. It was developed by the OCaml Lab and the source code is avaliable from mirage-decks.

I needed to alter some of the slides which involved forking of the Git repository (see) and recompilation of the sources. Here is a summary of the compilation procedure that I followed on my MacBook Air running OS X 10.9.5 and deployed with all the OCaml tools and libraries involved in this project.

  1.          1) Let us say you have the source files in a local folder 
             
             bash-3.2$ pwd
             /Users/carlosmolina/local/git/mirage-decks
    
             2) The folder includes the following
             
             bash-3.2$ ls
             LICENSE         README.md       log             slides/
             Makefile        assets/         pdf/            src/
    
             3) Run make configure
    
             bash-3.2$ make configure
    
             mirage configure src/config.ml --unix
             Mirage      Using specified config file: src/config.ml
             Mirage      Compiling for target: Unix
             ...
    
             4) Change directory to src.
    
             sh-3.2$ pwd
             /Users/carlosmolina/local/git/mirage-decks/src
    
             bash-3.2$ ls -l
             total 120
             -rw-r--r--   1 carlosmolina  staff   1062  5 Feb 12:05 Makefile
             drwxr-xr-x  14 carlosmolina  staff    476  5 Feb 12:05 _build/
             -rw-r--r--   1 carlosmolina  staff   1747  4 Feb 20:14 config.ml
             -rw-r--r--   1 carlosmolina  staff   1098  4 Feb 20:14 deck.ml
             -rwxr-xr-x   1 carlosmolina  staff   1284  5 Feb 12:05 decks.xe*
             ...
    
    
             5) Run make build to produce the seflcontained unikernel. It is stored
             as 'mir-decks;.
     
             bash-3.2$ make build
             ocamlbuild -classic-display -use-ocamlfind -pkgs lwt.syntax,conduit.mirage, ...
    
             6) mir-decks can be executed as a unix process. It works as an http
             server that respondes to http://localhost         
    
             7) Execute the mir-decks under 'sudo' privileges.
    
             bash-3.2$ sudo mir-decks
             Password:              /* provide the root passwords of your computer */
             Manager: connect
             Manager: configuring
             Manager: socket config currently ignored (TODO) /* server is ready */
                             
             8) The "Manager: socket config currently ignored (TODO)" line
             indicates that the http server is running and ready to accept
             requests.
             Open your browser and point it to http://localhost
             You will see something like in the following figure.
    
             9) You can alter the source code and recompile again.