Coder Social home page Coder Social logo

upshotech / mirage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mirage/mirage

0.0 2.0 0.0 25.75 MB

MirageOS is a library operating system that constructs unikernels

Home Page: https://mirage.io

Shell 1.03% Makefile 0.63% Standard ML 0.25% OCaml 98.09%

mirage's Introduction

Mirage

Mirage is a programming framework for constructing secure, high-performance network applications across a variety of cloud computing and mobile platforms. Code can be developed on a normal OS such as Linux or MacOS X, and then compiled into a fully-standalone, specialised unikernel that runs under the Xen hypervisor. Since Xen powers most public cloud computing infrastructure such as Amazon EC2, this lets your servers run more cheaply, securely and finer control than with a full software stack.

The most up-to-date documentation can be found at the homepage. The site is self-hosted and a useful example. Simpler skeleton applications are also available online.

Build Status docs

This repository

This repository includes:

  • a command-line tool to create and deploy applications with Mirage; and
  • in types/, a library of type signatures that compliant applications use.

There are several diverse backends in Mirage that require rather specialised build steps (from JavaScript to Xen unikernels), and this complexity is wrapped up in the tool.

To work with Mirage, you'll need the following prerequisites installed:

  • a working OCaml compiler (4.01.0 or higher).
  • the OPAM source package manager (1.2.0 or higher).
  • an x86_64 or armel Linux host to compile Xen kernels, or FreeBSD, OpenBSD or MacOS X for the userlevel version.

There are two stages to using mirage:

  • a configure phase where OPAM package dependencies are satisfied.
  • a build phase where the compiler and any support scripts are run.

Configuration files

mirage currently uses a configuration file to build a Mirage unikernel. While we're documenting it all, please see the lib_test directory in this repository for the regression examples. The latest instructions are also to be found at http://openmirage.org/docs

Configuring Mirage Applications

Provided that one and only one file of name <foo>.conf (where <foo> can be any string) is present in the current working directory, the command:

mirage configure

will configure your project. It will generate a Makefile and main.ml with the appropriate boilerplate for your chosen platform.

To configure for the Unix-direct target (using tap interfaces), do:

mirage configure --unix

To build for the Xen target, do:

mirage configure --xen

Building Mirage Applications

To compile your application, use:

make

Running Mirage Applications

Every mirage backend will have a different way to be deployed. On Unix, the unikernel will run as a Unix process, using a virtual interface (tap) if needed:

./mir-<project-name>

On Xen, the unikernel will run as a virtual machine. For instance, using the xl command-line tool:

xl create <project-name>.xl

Configuration files for xe and libvirt are also generated by the tool (see the files <project-name>_libvirt.xml and <project-name>.xe in the build directory).

Compiling to Xen and deploying to the cloud

In order to deploy a Mirage unikernel to Amazon EC2, you need to install the AWS tools on your machine, build a unikernel with the --xen option and then use the ec2.sh script (in directory script) in order to register your kernel with AWS. Then you can start your kernel with the web interface to AWS or any other means AWS provides to start EC2 instances.

mirage's People

Contributors

avsm avatar samoht avatar drup avatar nojb avatar talex5 avatar yomimono avatar djs55 avatar pqwy avatar vbmithr avatar mor1 avatar hannesm avatar magnuss avatar yallop avatar dsheets avatar jvirtanen avatar lnmx avatar pgj avatar moonlightdrive avatar paurkedal avatar little-arhat avatar

Watchers

James Cloos avatar Chauyan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.