From bf229424fac8bf30ef0e0c7b8b4194e01a5c0a2a Mon Sep 17 00:00:00 2001 From: Richard Mortier Date: Mon, 28 Jul 2014 09:41:27 +0100 Subject: [PATCH 1/6] [make] more cleaner; only pass through env vars to `configure` --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d3a11864..7da60c193 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,8 @@ build: cd src && make build run: - cd src && sudo NET=$(NET) IPADDR=$(IPADDR) FS=$(FS) make run + cd src && sudo make run clean: cd src && make clean - $(RM) log + $(RM) log src/mir-www src/*.img src/make-fat*.sh From 3dac45b0870caba0867557936397fb0946dad882 Mon Sep 17 00:00:00 2001 From: Richard Mortier Date: Mon, 28 Jul 2014 09:41:48 +0100 Subject: [PATCH 2/6] [src] allow specify `$PORT` during `configure` --- src/config.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.ml b/src/config.ml index a2c6943b3..c63b62ad8 100644 --- a/src/config.ml +++ b/src/config.ml @@ -47,8 +47,14 @@ let stack console = | `Direct, false -> direct_stackv4_with_default_ipv4 console tap0 | `Socket, _ -> socket_stackv4 console [Ipaddr.V4.any] +let port = + try match Sys.getenv "PORT" with + | "" -> 80 + | s -> int_of_string s + with Not_found -> 80 + let server = - http_server 80 (stack default_console) + http_server port (stack default_console) let main = let libraries = [ "cow.syntax"; "cowabloga" ] in From fd3e25ed2a3b10eae7115653009efd00d035e2fa Mon Sep 17 00:00:00 2001 From: Richard Mortier Date: Mon, 28 Jul 2014 09:42:03 +0100 Subject: [PATCH 3/6] [links] add more links post-mirage-2.0 --- src/data.ml | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/src/data.ml b/src/data.ml index 758f2c7ae..9757d5b46 100644 --- a/src/data.ml +++ b/src/data.ml @@ -494,6 +494,118 @@ module Links = struct } let entries = [ + { id="mirage-20-pr-congoo"; + uri=Uri.of_string "http://www.congoo.com/news/addstorycomment.aspx?st=291376442&Channel_ID=8&Category_ID=-1"; + title="Xen Project Introduces New Mirage OS Release"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-reuters"; + uri=Uri.of_string "http://www.reuters.com/article/2014/07/22/idUSnMKWyFRLBa+1de+MKW20140722"; + title="Xen Project Introduces New Mirage OS Release"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-phoronix"; + uri=Uri.of_string "http://www.phoronix.com/scan.php?page=news_item&px=MTc0NjY"; + title="Xen Project Announces Mirage OS 2.0"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-linux-embedded"; + uri=Uri.of_string "https://www.linux.com/news/embedded-mobile/mobile-linux/781359-xen-project-announces-mirage-os-20"; + title="Xen Project Announces Mirage OS 2.0"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-slashdot"; + uri=Uri.of_string "http://beta.slashdot.org/submission/3717339/news-mirage-os-20----compile-your-own-cloud"; + title="News: Mirage OS 2.0 -- Compile Your Own Cloud"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-vmblog"; + uri=Uri.of_string "http://vmblog.com/archive/2014/07/22/xen-project-introduces-new-mirage-os-release.aspx"; + title="Xen Project Introduces New Mirage OS Release"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-lastminutegeek"; + uri=Uri.of_string "http://www.lastminutegeek.com/english/77-linuxtoday/1151651-mirage-os-v20-the-new-features.html"; + title="Mirage OS v2.0: The new features"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-techinvestornews"; + uri=Uri.of_string "http://www.techinvestornews.com/Cloud/Latest-Cloud-Computing-News/xen-unveils-mirage-os-2.0-for-open-source-virtual-cloud-apps"; + title="Xen Unveils Mirage OS 2.0 for Open Source Virtual Cloud Apps"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-slashdot-2"; + uri=Uri.of_string "http://beta.slashdot.org/submission/3720459/xen-unveils-mirage-os-20-for-open-source-virtual-cloud-apps"; + title="Xen Unveils Mirage OS 2.0 for Open Source Virtual Cloud Apps"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-linuxtoday"; + uri=Uri.of_string "http://www.linuxtoday.com/high_performance/mirage-os-v2.0-the-new-features.html"; + title="Mirage OS v2.0: The new features"; + date=day(2014,07,23); + stream=press; + }; + + { id="mirage-20-pr-twit"; + uri=Uri.of_string "https://plus.google.com/+TWiT/posts/6DkCPz3TSdd"; + title="FLOSS Weekly 302 | TWiT.TV"; + date=day(2014,07,23); + stream=press; + }; + + { id="mirage-20-pr-cloudcomputinginfo"; + uri=Uri.of_string "http://cloudcomputing.info/en/news/2014/07/xen-project-releases-mirage-os-2-0.html"; + title="Xen Project releases Mirage OS 2.0"; + date=day(2014,07,23); + stream=press; + }; + + { id="mirage-20-pr-vibriefing"; + uri=Uri.of_string "http://www.vibriefing.com/xen-unveils-mirage-os-2-0-for-open-source-virtual-cloud-apps/"; + title="Xen Unveils Mirage OS 2.0 for Open Source Virtual Cloud Apps"; + date=day(2014,07,25); + stream=press; + }; + + { id="mirage-20-pr-marketwatch"; + uri=Uri.of_string "http://www.marketwatch.com/story/xen-project-introduces-new-mirage-os-release-2014-07-22"; + title="Xen Project Introduces New Mirage OS Release"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-linuxquestions"; + uri=Uri.of_string "http://www.linuxquestions.org/questions/syndicated-linux-news-67/lxer-xen-unveils-mirage-os-2-0-for-open-source-virtual-cloud-apps-4175512075/"; + title="LXer: Xen Unveils Mirage OS 2.0 for Open Source Virtual Cloud Apps"; + date=day(2014,07,22); + stream=press; + }; + + { id="mirage-20-pr-4-traders"; + uri=Uri.of_string "http://www.4-traders.com/news/Xen-Project-Introduces-New-Mirage-OS-Release--18774589/"; + title=" Xen Project Introduces New Mirage OS Release"; + date=day(2014,07,22); + stream=press; + }; + { id="mirage-20-pr-release"; uri=Uri.of_string "http://www.marketwired.com/press-release/xen-project-introduces-new-mirage-os-release-1931602.htm"; title="Xen Project Introduces New Mirage OS Release"; From 04e51a83eef1e97056a077898fb0e9eceef1bda4 Mon Sep 17 00:00:00 2001 From: Amir Chaudhry Date: Mon, 28 Jul 2014 13:57:51 +0100 Subject: [PATCH 4/6] microkernel -> unikernel Purge mentions of microkernels wherever possible and replace with unikernel. Must be consistent about this to avoid confusion. --- tmpl/blog/an-outing-to-cufp.md | 4 ++-- tmpl/blog/oscon13-trip-report.md | 4 ++-- tmpl/blog/spring-cleaning.md | 2 +- tmpl/wiki/weekly/2013-05-14.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tmpl/blog/an-outing-to-cufp.md b/tmpl/blog/an-outing-to-cufp.md index be7bbb271..3f8229b7f 100644 --- a/tmpl/blog/an-outing-to-cufp.md +++ b/tmpl/blog/an-outing-to-cufp.md @@ -10,9 +10,9 @@ The team signed up to do a tutorial at [CUFP](http://cufp.org) on the topic of [ * *Devices*: we can now synthesise binaries that share common code but have very different I/O interfaces. This is due to a new device manager, and David also heroically wrote a complete [FAT12/16/32 library](http://github.com/avsm/mirage/tree/master/lib/fs) that we demonstrated. Yaron Minsky suggested a [different approach](https://gist.github.com/1245418) to the device manager using [first-class modules](http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc81) instead of objects, so I am experimentally trying this before writing documentation on it. -* *TCP*: the notorious Mirage stack is far more robust due to our resident networking guru Balraj hunting down last-minute bugs. Although it held together with sticky tape during the tutorial, he is now adding retransmission and congestion control to make it actually standards-compliant. Still, if you dont have any packet loss, the [microkernel version](http://xen.openmirage.org/) of this website does actually serve pages. +* *TCP*: the notorious Mirage stack is far more robust due to our resident networking guru Balraj hunting down last-minute bugs. Although it held together with sticky tape during the tutorial, he is now adding retransmission and congestion control to make it actually standards-compliant. Still, if you dont have any packet loss, the [unikernel version](http://xen.openmirage.org/) of this website does actually serve pages. -* *OpenFlow*: is a new [standard](http://www.openflow.org/wk/index.php/OpenFlow_v1.0) for [Software Defined Networking](http://networkheresy.wordpress.com/), and Haris and Mort have been hacking away at a complete implementation directly in Mirage! We will be giving a tutorial on this at the [OFELIA summer school](http://changeofelia.info.ucl.ac.be/) in November (it is summer somewhere, I guess). The prospect of a high-speed microkernel switching fabric for the cloud, programmed in a functional style, is something I am really looking forward to seeing! +* *OpenFlow*: is a new [standard](http://www.openflow.org/wk/index.php/OpenFlow_v1.0) for [Software Defined Networking](http://networkheresy.wordpress.com/), and Haris and Mort have been hacking away at a complete implementation directly in Mirage! We will be giving a tutorial on this at the [OFELIA summer school](http://changeofelia.info.ucl.ac.be/) in November (it is summer somewhere, I guess). The prospect of a high-speed unikernel switching fabric for the cloud, programmed in a functional style, is something I am really looking forward to seeing! * *Jane Street Core*: preceeding us was Yaron's [Core](http://cufp.org/conference/sessions/2011/t2-janestreets-ocaml-core-library) tutorial. Since Mirage provides it own complete standard library, we can adopt portions of Core that do not require OS threads or UNIX-specific features. I really like the idea that Mirage enforces a discipline on writing portable interfaces, as dependencies on OS-specific features do sneak in insiduously and make switching to different platforms very difficult (e.g. Windows support). Incidentally, Yaron's [ACM Queue](http://queue.acm.org/detail.cfm?id=2038036&ref=fullrss) article is a great introduction to OCaml. diff --git a/tmpl/blog/oscon13-trip-report.md b/tmpl/blog/oscon13-trip-report.md index 31d207153..f0125d6df 100644 --- a/tmpl/blog/oscon13-trip-report.md +++ b/tmpl/blog/oscon13-trip-report.md @@ -10,10 +10,10 @@ Partly because MirageOS is about synthesising extremely specialised guest kernels from high-level code, and partly because both Anil and I are constitutionally incapable of taking the easy way out, we self-hosted the slide deck on Mirage: after some last-minute hacking -- on content not Mirage -I should add! -- we built a self-contained microkernel of the talk. +I should add! -- we built a self-contained unikernel of the talk. This was what you might call a "full stack" presentation: the custom -microkernel (flawlessly!) ran a type-safe +unikernel (flawlessly!) ran a type-safe [network device driver](https://github.com/mirage/mirage-platform/blob/master/xen/lib/netif.ml), OCaml [TCP/IP stack](http://github.com/mirage/mirage-net) supporting an OCaml [HTTP](http://github.com/mirage/ocaml-cohttp) framework that served slides diff --git a/tmpl/blog/spring-cleaning.md b/tmpl/blog/spring-cleaning.md index a5bfe1a05..8376d6a0a 100644 --- a/tmpl/blog/spring-cleaning.md +++ b/tmpl/blog/spring-cleaning.md @@ -1,6 +1,6 @@ We've been plugging away on Mirage for the last few months, and things are starting to take shape nicely. As the older blog entries were out-of-date, we have shifted the descriptive material to a new [wiki](/wiki) section instead. What else has been happening? -* The Xen microkernel backend is fully event-driven (no interrupts) and very stable under stress testing now. The TCP stack is also complete enough to self-host this website, and you can try it out by navigating to [xen.openmirage.org](http://xen.openmirage.org). The stack doesnt actually do retransmissions yet, so your user experience may "vary". Check out the [installation](/wiki/install) and [hello world](/wiki/hello-world) guides to try it out for yourself. +* The Xen unikernel backend is fully event-driven (no interrupts) and very stable under stress testing now. The TCP stack is also complete enough to self-host this website, and you can try it out by navigating to [xen.openmirage.org](http://xen.openmirage.org). The stack doesnt actually do retransmissions yet, so your user experience may "vary". Check out the [installation](/wiki/install) and [hello world](/wiki/hello-world) guides to try it out for yourself. * [Richard Mortier](http://www.cs.nott.ac.uk/~rmm/) has put together a performance testing framework that lets us analyse the performance of Mirage applications on different backends (e.g. UNIX vs Xen), and against other conventional applications (e.g. BIND for DNS serving). Read more in the wiki [here](/wiki/performance). * [Thomas Gazagnaire](http://gazagnaire.org) has rewritten the website to use the COW syntax extensions. He has also started a new job with [OCamlPro](http://www.ocamlpro.com/) doing consultancy on OCaml, so congratulations are in order! * Thomas has also started integrating experimental Node.js support to fill in our buzzword quota for the year (and more seriously, to explore alternative VM backends for Mirage applications). diff --git a/tmpl/wiki/weekly/2013-05-14.md b/tmpl/wiki/weekly/2013-05-14.md index 3276e4b38..66b89abe1 100644 --- a/tmpl/wiki/weekly/2013-05-14.md +++ b/tmpl/wiki/weekly/2013-05-14.md @@ -25,7 +25,7 @@ the new). *Anil:* This sounds suspiciously similar to what Irminsule could offer. We're going to work with Thomas next week to figure out how all this fits together. -*Dave Scott:* Citrix also needs a simple messaging system, with queues persistent in memory (not necessarily on disk). This all needs to run on a Mirage VM also, and will coordinate the nextgen microkernel architecture. +*Dave Scott:* Citrix also needs a simple messaging system, with queues persistent in memory (not necessarily on disk). This all needs to run on a Mirage VM also, and will coordinate the nextgen unikernel architecture. Apps will talk about named queues of events. The current implementation uses file descriptor passing but will fall back to TCP if across different hosts in the cluster. Using Lwt at the moment. It's a [prototype on Github](http://github.com/djs55/message-switch] so feedback on semantics would be helpful. Taken some ideas from OpenStack etc. Could use Fable when it's ready (looks pointedly at Anil). *Anil:* This work may unblock some of the OCamlot prototyping too. We can use Irminsule when ready but leave that out for the very first release of OCamlot, since we need tests running asap. However, this all converging nicely for the longer term. From bdf87981dca9292c5d25005275cf7bd4aff8d850 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Wed, 6 Aug 2014 14:45:58 +0100 Subject: [PATCH 5/6] Updated Cubie instructions --- tmpl/wiki/xen-on-cubieboard2.md | 34 +++++++++++---------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/tmpl/wiki/xen-on-cubieboard2.md b/tmpl/wiki/xen-on-cubieboard2.md index 443637f0d..d6fdaf48f 100644 --- a/tmpl/wiki/xen-on-cubieboard2.md +++ b/tmpl/wiki/xen-on-cubieboard2.md @@ -1,12 +1,10 @@ **Author:** Thomas Leonard, addendums from Anil Madhavapeddy -**Status:** work-in-progress - -These notes detail the process of setting up a Xen system on a Cubieboard2. +These notes detail the process of setting up a Xen system on a Cubieboard2 (or Cubietruck). They are based on the [Xen ARM with Virtualization Extensions/Allwinner](http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Allwinner) documentation, but try to collect everything into one place. I'm trying to document the exact steps I took (with the wrong turns removed); some changes will be needed for other systems. -**TL;DR**: There is now a script available that generates an image with Xen, Ubuntu dom0, and the OCaml tools installed. Just run the `make` instructions at [mirage/xen-arm-builder](https://github.com/mirage/xen-arm-builder) and copy the resulting image onto an SDcard and boot up your Cubieboard2 or Cubietruck (password `linaro`/`linaro` which you should change as the first thing you do). +**TL;DR**: There is now a script available that generates an image with Xen, Ubuntu dom0, and the OCaml tools installed. Just run the `make` instructions at [mirage/xen-arm-builder](https://github.com/mirage/xen-arm-builder) and copy the resulting image onto an SDcard and boot up your Cubieboard2 or Cubietruck (password `mirage`/`mirage` which you should change as the first thing you do). The script is kept more up-to-date than the instructions on this page. The remainder of this guide covers: @@ -162,9 +160,7 @@ Run `make` to build `boot.scr`. ## Building Linux -Get [linux-sunxi Git tree](https://github.com/linux-sunxi/linux-sunxi), sunxi-devel branch. - -Note: DO NOT use the "sunxi-next" branch! Only the "sunxi-devel" branch has MMC support. +Get my [Linux Git tree](https://github.com/talex5/linux.git), master branch. This fork has a few extra patches we need. Configure: @@ -229,11 +225,10 @@ Then: ## Building Xen -You can use the official [Xen 4.4 release](http://www.xenproject.org/downloads/xen-archives/xen-44-series/xen-440.html), but I used the Git version: +Currently, some minor patches are needed to the official [Xen 4.4 release](http://www.xenproject.org/downloads/xen-archives/xen-44-series/xen-440.html), so use this Git version: - git clone git://xenbits.xen.org/xen.git + git clone -b stable-4.4 https://github.com/talex5/xen.git cd xen - git checkout stable-4.4 Edit `Config.mk` and turn debug on: `debug ?= y`. This enables some features that are useful when debugging guests, such as allowing guests to write debug messages to the Xen console. @@ -288,10 +283,10 @@ Mount the fat partition and copy in boot.scr, the Linux kernel, the FDT and Xen: The wiki's links to the prebuilt root images are broken, but a bit of searching turns up some alternatives. -I used [linaro-saucy-developer-20140406-651.tar.gz](https://snapshots.linaro.org/ubuntu/images/developer/latest/linaro-saucy-developer-20140406-651.tar.gz). +I used [linaro-trusty-developer-20140522-661.tar.gz](http://releases.linaro.org/14.05/ubuntu/trusty-images/developer/linaro-trusty-developer-20140522-661.tar.gz). cd /mnt/mmc2 - sudo tar xf /data/arm/linaro-saucy-developer-20140406-651.tar.gz + sudo tar xf /data/arm/linaro-trusty-developer-20140522-661.tar.gz sudo mv binary/* . sudo rmdir binary @@ -388,14 +383,7 @@ You should now be able to ssh in directly. ## Xen toolstack -The Ubuntu 13.10 image comes with Xen 4.3, so we need to upgrade: - - apt-get install update-manager-core python-apt - do-release-upgrade -d - -Reboot and fix any problems. Edit `/etc/init/rc-sysinit.conf` if you need to change the default runlevel - for some reason, booting to level 1 and then doing `init 2` works for me, but booting directly to level 2 doesn't. - -Then install the new Xen tools: +Install the Xen tools: apt-get install xen-utils-4.4 @@ -460,7 +448,7 @@ Copy the Linux kernel image into /root (the dom0 one is fine). Create `domU_test kernel = "/root/zImage" memory = 512 - name = "Ubuntu-13.10" + name = "Ubuntu-14.04" vcpus = 2 serial="pty" disk = [ 'phy:/dev/vg0/linux-guest-1,xvda,w' ] @@ -555,7 +543,7 @@ You'll need to install a few things to build it: Clone the repository and build: - git clone https://github.com/talex5/xen.git + git clone -b devel https://github.com/talex5/xen.git cd xen/extras/mini-os make @@ -594,4 +582,4 @@ On success, it will write lots of text to the Xen console (note: this requires a (d6) Initialising timer interface ... -(to be continued...) +You can now try [running a Mirage unikernel](/blog/introducing-xen-minios-arm). From 766f29e124c656c7a6b06ef21a51d9b54f99b4d2 Mon Sep 17 00:00:00 2001 From: Amir Chaudhry Date: Sat, 9 Aug 2014 14:19:00 +0100 Subject: [PATCH 6/6] add blog post on talk about MISO stack closes #206 --- src/data.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/data.ml b/src/data.ml index 9757d5b46..82574d9db 100644 --- a/src/data.ml +++ b/src/data.ml @@ -494,6 +494,13 @@ module Links = struct } let entries = [ + { id="miso-talk-entrepreneur-first"; + uri=Uri.of_string "http://amirchaudhry.com/describing-miso-entrepreneur-first-2014/"; + title="Describing the MISO stack at Entrepreneur First"; + date=day(2014,07,25); + stream=blog; + }; + { id="mirage-20-pr-congoo"; uri=Uri.of_string "http://www.congoo.com/news/addstorycomment.aspx?st=291376442&Channel_ID=8&Category_ID=-1"; title="Xen Project Introduces New Mirage OS Release";