5
5
Lightweight operating system using [ Node.js] ( http://nodejs.org ) as userspace.
6
6
7
7
NodeOS is an operating system build entirely in Javascript and managed by
8
- [ npm] ( https://www.npmjs.com/ ) . Any package in npm is a NodeOS package, which at
9
- last count was 201,871 packages. The goal of NodeOS is to provide just enough to
8
+ [ npm] ( https://www.npmjs.com ) . Any package in npm is a NodeOS package, which at
9
+ last count was 206,609 packages. The goal of NodeOS is to provide just enough to
10
10
let npm provide the rest. Since anyone can contribute to npm, anyone can create
11
11
NodeOS packages.
12
12
@@ -20,50 +20,52 @@ and the Granada University [2nd Free Projects prize](http://osl.ugr.es/bases-de-
20
20
21
21
## find us
22
22
23
- - Web: please use [ github issues] ( https://github.com/NodeOS/NodeOS/issues ) for discussion
23
+ - Web: please use [ github issues] ( https://github.com/NodeOS/NodeOS/issues ) for
24
+ discussion
24
25
- IRC: join ` #node-os ` on Freenode
25
26
26
27
## introduction
27
28
28
29
NodeOS is a Node.js based operating system, built-off of the Linux kernel.
29
30
The eventual goal of NodeOS is to produce images that can be run on
30
31
31
- - ** real hardware** like desktop PCs, servers or Raspberry Pi
32
+ - ** real hardware** like desktop PCs, laptops, servers or Raspberry Pi
32
33
- ** cloud providers** like Joyent, Amazon or Rackspace
33
34
- ** virtual machines** like QEmu, VirtualBox, VMWare and KVM
34
35
- ** PaaS providers** like Heroku or Joyent's Manta
35
- - ** container providers** like Docker
36
+ - ** container providers** like Docker or vagga
36
37
37
38
Core development is being done in layers. There could be some differences to
38
39
adjust better to each target platform, but the general structure is:
39
40
40
41
- * barebones* custom Linux kernel with an initramfs that boots to a Node.js REPL
41
- - * initramfs* Initram environment to mount the users partition & root filesystem
42
+ - * initramfs* Initram environment to mount the users partition & boot the system
42
43
- * rootfs* Read-only partition image to host Linux kernel and initramfs files
43
44
- * usersfs* multi-user environment with the same behaviour of traditional OSes
44
45
45
46
### Booting process
46
47
47
- All the layers are bootable, leading * barebones* to a Node.js
48
- [ REPL] ( http://nodejs.org/api/repl.html ) prompt. * initramfs* (and by extension
49
- * rootfs* ) lead to a Node.js REPL by default if not using a custom one. In all
50
- the cases, it will be used an initramfs as root filesystem and all the changes
51
- will be lost when powered-off.
48
+ All the layers are bootable, leading * barebones* to a raw naked Node.js
49
+ [ REPL] ( http://nodejs.org/api/repl.html ) prompt as PID 1 . * initramfs* (and by
50
+ extension * rootfs* ) lead to a Node.js REPL where ` /dev ` and ` /proc ` filesystems
51
+ are mounted. In all the cases, it will be used an initramfs as root filesystem
52
+ and all the changes will be lost when powered-off.
52
53
53
54
If a users partition is being set at boot time, it will be mounted and the
54
55
system will considerate each one of the folders there as the home folder for a
55
- valid user on the system and executing a ``` init ``` file in the root of each of
56
- them. If found, ``` root ``` user will be the first to be considerated and will
57
- have access to all the home directories.
56
+ valid user on the system and will execute a ` init ` file in the root of each of
57
+ them. If found, ` root ` user will be the first to be considerated and will have
58
+ access to all the home directories, but by design it will not be possible to
59
+ elevate permissions once the system has booted.
58
60
59
61
### Hacking
60
62
61
63
If you are hacking on NodeOS as a somewhat production server, you are likely
62
64
building * usersfs* images since each user is isolated of others, but you can be
63
65
able to customize all layers. For example, you could be able to modify
64
66
* initramfs* to login the users and mount their home folders from a cloud service
65
- or craft a system without global services (no ``` root ``` user) or also dedicate
66
- a full NodeOS instance to a single application.
67
+ or craft a system without global services (no ` root ` user) or also dedicate a
68
+ full NodeOS instance to a single Node.js application.
67
69
68
70
69
71
# Pre-build images
@@ -77,57 +79,54 @@ The *iso* can be written to a CD-R or flashed to an USB pendrive, but will only
77
79
provide the read-only rootfs and the changes will be done in memory loosing them
78
80
after reboot, so you'll need to set manually a read-write usersfs partition if
79
81
you want to persist them. On the other hand, if you want to flash it to an USB
80
- pendrive, it's recomended to so it by using ``` bin/istallUSB ``` command so it
81
- will create automatically a read-write usersfs partition to fill the remaining
82
- space so your changes will persist.
82
+ pendrive, it's recomended to so it by using ` bin/istallUSB ` command so it will
83
+ create automatically a read-write usersfs partition to fill the remaining space
84
+ so your changes will persist.
83
85
84
86
# Build NodeOS in three steps
85
87
86
88
NodeOS require to have first installed some build tools, on a Ubuntu based
87
- system you can install them by executing the file ``` bin/install-dependencies `` `
89
+ system you can install them by executing the file ` bin/install-dependencies `
88
90
89
91
1 . Download the project source code and build NodeOS for QEmu:
90
-
91
- ``` bash
92
- git clone git@github.com:NodeOS/NodeOS.git
93
- cd NodeOS
94
- npm install
95
- ```
96
- By default it generate some files that can be used with QEmu, compiled for your
97
- current architecture. You can be able to configure the build process by passing
98
- some environment variables. For example, to force to build for 32 bits, use
99
- ` ` ` PLATFORM=qemu_32 npm install` ` ` instead.
100
-
92
+ ``` bash
93
+ git clone git@github.com:NodeOS/NodeOS.git
94
+ cd NodeOS
95
+ npm install
96
+ ```
97
+ By default it generate some files that can be used with QEmu, compiled for
98
+ your current architecture. You can be able to configure the build process by
99
+ passing some environment variables. For example, to force to build for 32
100
+ bits, use ` PLATFORM=qemu_32 npm install ` instead.
101
101
2 . Pick some microwave pop-corn and go to see a movie. No, really, do it.
102
102
3 . Exec your fresh compiled NodeOS image:
103
-
104
- ` ` ` bash
105
- npm start
106
- ` ` `
107
- It will automatically detect what CPU architecture will need to be used on QEmu.
103
+ ``` bash
104
+ npm start
105
+ ```
106
+ It will automatically detect what CPU architecture will need to be used on
107
+ QEmu.
108
108
109
109
...and profit! :-D
110
110
111
111
If you encounter an error when building NodeOS, take a look at
112
112
[ the wiki] ( https://github.com/NodeOS/NodeOS/wiki/Fixing-NodeOS-Build-Errors ) or
113
113
open an [ issue] ( https://github.com/NodeOS/NodeOS/issues ) .
114
114
115
- # NodeOS on Docker
115
+ # NodeOS on LXC containers ( Docker and vagga)
116
116
117
- Currently Docker support is unmaintained. There are some NodeOS images on Docker
118
- Hub, but they are outdated. If you are interested on help or testing, you can
117
+ Currently LXC containers support is unmaintained due to imposibility of mount
118
+ filesystems from inside them. There are some NodeOS images on Docker Hub, but
119
+ they are totally outdated. If you are interested on help or testing, you can
119
120
build them from source code.
120
121
121
122
## Quick Start
122
123
123
124
1 . [ Install Docker] ( http://docs.docker.io/en/latest/installation/ )
124
125
2 . One Liner
125
-
126
- ` ` ` bash
127
- sudo docker run -t -i nodeos/nodeos
128
- ` ` `
129
-
130
- or learn how to make a [Custom Build](http://node-os.com/blog/get-involved/)
126
+ ``` bash
127
+ sudo docker run -t -i nodeos/nodeos
128
+ ```
129
+ or learn how to make a [ Custom Build] ( http://node-os.com/blog/get-involved/ )
131
130
132
131
## Build from Source
133
132
0 commit comments