Giter Site home page Giter Site logo

nodeos's Introduction

Build Status Stories in Ready Join the chat at https://gitter.im/NodeOS/NodeOS bitHound Overall Score MIT Licence

NodeOS

Lightweight operating system using Node.js as userspace.

NodeOS is an operating system build entirely in Javascript and managed by npm. Any package in npm is a NodeOS package, which at last count was more than 400,000 packages. The goal of NodeOS is to provide just enough to let npm provide the rest. Since anyone can contribute to it, anyone can create NodeOS packages.

This project won the spanish 9th National Free Software Championship on the Systems category and was Honorable Mention of its 10th edition. It was also presented as the degree thesis of Jesús Leganes Combarro with a qualification of 10/10 with distinction.

Useful links

Join the Discussion

Introduction

NodeOS is a Node.js based operating system, built-off of the Linux kernel. The NodeOS Project is aiming to, and can already run on some of the following platforms:

  • real hardware like desktops, laptops, or SoC's (Raspberry Pi)
  • cloud providers like Joyent, Amazon or Rackspace
  • virtual machines like QEmu, VirtualBox, VMWare and KVM
  • PaaS providers like Heroku or Joyent's Manta
  • container providers like Docker & Vagga

Core development is being done in layers. There could be some differences to adjust better to each target platform, but the general structure is:

  • barebones custom Linux kernel with an initramfs that boots to a Node.js REPL
  • initramfs Initram environment to mount the users partition & boot the system
  • usersfs multi-user environment with the same behaviour of traditional OSes

Booting process

All the layers are bootable, leading barebones to a raw naked Node.js REPL prompt as PID 1, while initramfs exec actual NodeOS code to mount the usersfs partition. In all the cases, it will be used an initramfs as root filesystem and all the changes will be lost when powered-off.

If a usersfs partition is being set at boot time, it will be mounted and the system will considerate each one of its folders as the home folder for a valid user on the system, and will execute a init file in the root of each of them. If found, root user will be the first to be considerated and will have access to all the home directories, but by design it will not be possible to elevate permissions once the system has booted.

Hacking

If you are hacking on NodeOS for a somewhat production environment, you are likely building usersfs images since each user is isolated of others, but you can be able to customize all layers. For example, you could be able to modify initramfs to login the users and mount their home folders from a cloud service or craft a system without global services (no root user) or also dedicate a full NodeOS instance to a single Node.js application.

Pre-built Images

Ready to use pre-build images are automatically generated after each commit in master branch that sucessfully pass the tests. To exec them, you'll need to have QEmu installed on your system.

The iso can be written to a CD-R or flashed to an USB pendrive, but will only provide the read-only rootfs and the changes will be done in memory loosing them after reboot, so you'll need to set manually a read-write usersfs partition if you want to persist them. On the other hand, if you want to flash it to an USB pendrive, it's recomended to do it by using bin/installUSB command so it will create automatically a read-write usersfs partition to fill the remaining space so your changes will persist.

Build NodeOS in five steps

  1. Download the project source code:

    git clone [email protected]:NodeOS/NodeOS.git
    cd NodeOS
  2. Install the required build tools, on a Ubuntu based system you can do it by executing

    sudo bin/install-dependencies
  3. Install NodeOS build dependencies:

    npm install
  4. Build NodeOS:

    npm run build

    By default it will generate some files that can be used with QEmu, compiled for your current machine architecture. You can be able to configure the build process by passing some environment variables. For example, to force to build for 32 bits, use PLATFORM=qemu_32 npm install instead.

  5. Exec your fresh compiled NodeOS image:

    npm start

    It will automatically detect what CPU architecture will need to be used on QEmu and exec the correct emulation.

...and profit! :-D

If you encounter an error when building NodeOS, take a look at the wiki or open an issue.

NodeOS on LXC containers (Docker and vagga)

NodeOS fully officially supports Docker, although is not publishing the images on DockerHub (pull-requests welcome), so they are totally outdated. If you are interested in help or testing, you can build them from source code.

Vagga support is fairly experimental, and help here will be greatly appreciated.

Quick Start

  1. Install Docker

  2. One Liner (outdated images)

    sudo docker run -t -i nodeos/nodeos

    or learn how to make a Custom Build

Build from Source

Warning: the build process is hairy, it probably won't work the first time. I'm working on that.

git clone https://github.com/NodeOS/NodeOS.git
cd NodeOS
PLATFORM=docker npm install

License

MIT

This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history available at https://github.com/NodeOS/NodeOS

nodeos's People

Contributors

alspore avatar ankon avatar avckp avatar djesmond avatar frankstein-1 avatar gitter-badger avatar grant avatar greenkeeperio-bot avatar groundwater avatar hackintoshrao avatar heavyk avatar jimihford avatar joshgarde avatar juliangruber avatar luii avatar mitsukaki avatar navarroaxel avatar oritwoen avatar piranna avatar smdmori avatar tylerleonhardt avatar waffle-iron avatar zodern avatar

Watchers

 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.