GithubHelp home page GithubHelp logo

edwardt / osv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudius-systems/osv

0.0 3.0 0.0 16.27 MB

OSv, a new operating system for the cloud.

Home Page: osv.io

License: Other

C++ 31.96% Assembly 0.31% C 63.22% Python 2.03% Objective-C 0.22% Erlang 0.01% Shell 0.30% Hack 0.02% Java 1.00% Lua 0.39% Perl 0.54%

osv's Introduction

OSv

OSv is a new open-source operating system for virtual-machines. OSv was designed from the ground up to execute a single application on top of a hypervisor, resulting in superior performance and effortless management when compared to traditional operating systems which were designed for a vast range of physical machines.

OSv has new APIs for new applications, but also runs unmodified Linux applications (most of Linux's ABI is supported) and in particular can run an unmodified JVM, and applications built on top of one.

For more information about OSv, see http://osv.io/ and https://github.com/cloudius-systems/osv/wiki

Documentation

Building

OSv can only be built on a 64-bit x86 Linux distribution. Please note that this means the "x86_64" or "amd64" version, not the 32-bit "i386" version.

If you wish, you can run the script 'scripts/setup.py' as root to install all dependencies. Otherwise, you may follow the manual instructions below.

First, install prerequisite packages:

Fedora

scripts/setup.py

Debian stable(wheezy) Debian stable(wheezy) requires to compile gcc, gdb and qemu. And also need to configure bridge manually.

More details are available on wiki page: Building OSv on Debian stable

Debian testing(jessie)

apt-get install build-essential libboost-all-dev genromfs autoconf libtool openjdk-7-jdk ant qemu-utils maven libmaven-shade-plugin-java python-dpkt tcpdump gdb qemu-system-x86 gawk gnutls-bin openssl python-requests lib32stdc++-4.9-dev p11-kit

Arch Linux

pacman -S base-devel git python apache-ant maven qemu gdb boost

Before start building OSv, you'll need to add your account to kvm group.

usermod -aG kvm <user name>

Ubuntu users: you may use Oracle JDK if you don't want to pull too many dependencies for openjdk-7-jdk

To ensure functional C++11 support, Gcc 4.8 or above is required, as this was the first version to fully comply with the C++11 standard.

Make sure all git submodules are up-to-date:

git submodule update --init --recursive

Finally, build everything at once:

make

By default make creates image in qcow2 format. To change this pass format value via img_format variable, i.e.

make img_format=raw

By default make will use the static libraries and headers of gcc in external submodule. To change this pass host via *_env variables:

make build_env=host

This will use static libraries and headers in the system instead (make sure they are installed before run make), if you only want to use C++ static libraries in the system, just set cxx_lib_env to host:

make cxx_lib_env=host

Running OSv

./scripts/run.py

By default, this runs OSv under KVM, with 4 VCPUs and 2GB of memory, and runs the default management application containing a shell, a REST API server and a browser base dashboard (at port 8000).

If running under KVM you can terminate by hitting Ctrl+A X.

External Networking

To start osv with external networking:

sudo ./scripts/run.py -n -v

The -v is for kvm's vhost that provides better performance and its setup requires a tap and thus we use sudo.

By default OSv spawns a dhcpd that auto config the virtual nics. Static config can be done within OSv, configure networking like so:

ifconfig virtio-net0 192.168.122.100 netmask 255.255.255.0 up
route add default gw 192.168.122.1

Test networking:

test invoke TCPExternalCommunication

Running Java or C applications that already reside within the image:

# Building and running a simple java application example
$ make image=java-example
$ scripts/run.py -e "java.so -cp /java-example Hello"

# Running an ifconfig by explicit execution of ifconfig.so (compiled C++ code)
$ make
$ sudo scripts/run.py -nv -e "/tools/ifconfig.so"

osv's People

Contributors

avikivity avatar nyh avatar tgrabiec avatar dorlaor avatar amnonh avatar asias avatar raphaelsc avatar gleb-cloudius avatar syuu1228 avatar pdziepak avatar zifeitong avatar elcallio avatar benoit-canet avatar joshi-prasad avatar jaspal-dhillon avatar wdauchy avatar arnonka avatar wuzhy avatar slivne avatar efpiva avatar janikokkonen avatar gaohaifeng-huawei avatar sashalevin avatar davedoesdev avatar elazarl avatar renatolfc avatar tzach avatar penberg avatar hamo avatar wangbicheng avatar

Watchers

edwardt avatar James Cloos avatar  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.