GithubHelp home page GithubHelp logo

tvelocity / runv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyperhq/runv

0.0 1.0 0.0 9.6 MB

Hypervisor-based Runtime for OCI

License: Apache License 2.0

Makefile 0.32% Protocol Buffer 2.04% Go 96.54% Shell 0.58% M4 0.51%

runv's Introduction

Build Status

runV

runV is a hypervisor-based runtime for OCI.

OCI

runV is compatible with OCI. However, due to the difference between hypervisors and containers, the following sections of OCI don't apply to runV:

  • Namespace
  • Capability
  • Device
  • linux and mount fields in OCI specs are ignored

Hypervisor

The current release of runV supports the following hypervisors:

  • KVM (QEMU 2.0 or later)
  • Xen (4.5 or later)
  • VirtualBox (Mac OS X)

Distro

The current release of runV supports the following distros:

  • Ubuntu 64bit
    • 15.04 Vivid
    • 14.10 Utopic
    • 14.04 Trusty
  • CentOS 64bit
    • 7.0
    • 6.x (upgrade to QEMU 2.0)
  • Fedora 20-22 64bit
  • Debian 64bit
    • 8.0 jessie
    • 7.x wheezy (upgrade to QEMU 2.0)

Build

# install autoconf automake pkg-config make gcc golang qemu
# optional install device-mapper and device-mapper-devel for device-mapper storage
# optional install xen and xen-devel for xen driver
# optional install libvirt and libvirt-devel for libvirt driver
# note: the above package names might be different in various distros
# create a 'github.com/hyperhq' in your GOPATH/src
$ cd $GOPATH/src/github.com/hyperhq
$ git clone https://github.com/hyperhq/runv/
$ cd runv
$ ./autogen.sh
$ ./configure --without-xen
$ make
$ sudo make install

Run

To run a OCI image, execute runv with the OCI JSON format file as argument, or have a config.json file in CWD.

Also, a kernel and initrd images are needed too. We recommend you to build them from HyperStart repo. If not specified, runV will try to load the kernel and initrd.img files from CWD.

runv --kernel kernel --initrd initrd.img
$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1   4352   232 ttyS0    S+   05:54   0:00 /init
root         2  0.0  0.5   4448   632 pts/0    Ss   05:54   0:00 sh
root         4  0.0  1.6  15572  2032 pts/0    R+   05:57   0:00 ps aux

Run it with docker

runv is a runtime implementation of OCI runtime and its command line is almost compatible with the runc-0.1.1(keeping updated with the newest released runc). It is still under development and uncompleted, such as container tty is not working currently.

Note, runv project also provides other smoothly way to integrate with docker.

Example(requires docker-1.11 who talks runc-0.1.1 command line):

# in terminal #1
$ docker-containerd --debug -l /var/run/docker/libcontainerd/docker-containerd.sock \
  --runtime /path/to/runv --runtime-args --debug --runtime-args --driver=libvirt \
  --runtime-args --kernel=/opt/hyperstart/build/kernel \
  --runtime-args --initrd=/opt/hyperstart/build/hyper-initrd.img \
  --start-timeout 2m
# in terminal #2
$ docker daemon -D -l debug --containerd=/var/run/docker/libcontainerd/docker-containerd.sock
# in terminal #3 for trying it
$ docker run busybox ls
bin
dev
etc
home
lib
proc
root
sys
tmp
usr
var

Example

Please check the runC example to get the container rootfs. https://github.com/opencontainers/runc#examples

And you can get a sample OCI config.json at https://github.com/opencontainers/runc#oci-container-json-format or simply execute runv spec.

runv's People

Contributors

laijs avatar gao-feng avatar gnawux avatar feiskyer avatar carmark avatar yaozengzeng avatar crazykev avatar bergwolf avatar weizhang555 avatar pmorjan avatar hukeping avatar wrouesnel avatar gnep avatar tbronchain avatar macrosheep avatar gaocegege avatar justincormack avatar ptptptptptpt avatar

Watchers

Tony Motakis 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.