New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not a toy OS anymore #216

Closed
piranna opened this Issue Mar 3, 2016 · 14 comments

Comments

Projects
None yet
7 participants
@piranna
Member

piranna commented Mar 3, 2016

With the release of the release candidate it would seems that this repository has been somewhat quiet, but the fact is that there has been a lot of progress lately on other areas of NodeOS (and I'm not talking only about the new 700 stargazers or the repercussion on Twitter of the project and the publication of several articles on Internet... ;-) ) like my bachelor thesis or the rewrite of nsh (still in progress, but when I get to rid the stdin problems it will be really awesome :-D ) and specially thanks to the work of @lite20, @Coretool and @formula1 here on the issues but also on projects like noGUI (keep rocking guys!!! ;-) ).

But last February 29th (what a charismatic date ;-) ) something "magic" happened, that by the way while I'm writting this there are some spies asking me for details ;-)

The suggestion of @Xe about using an independent C-based init process didn't worked as expected but at least it helped to have an init process that shutdown gracefully the system when no more processes are running.

But I was thinking: Node.js can run on regular Linux systems, so something happens between starting the system init and executing Node.js that allow latest ones to run correctly that was not needed before. Maybe the kernel filesystems like /proc or more probably /sys (that I was not using before)? So trying to isolate it I made a copy of my Ubuntu initrd.img file and included it Node.js and its needed libraries. Later booted my computer using it and disabling my hard disk to force to keep into the initram and there I was able to run Node.js. Cool! Time to clean the init script. Mount root partition, NFS, parsing Linux command line... at the end I get only three suspects: the mounting of /sys, /proc and /dev filesystems, of course.

But I was afraid. What if I was wrong? What if by removing them Node.js still runs on the Ubuntu initram? Could be the problem be somewhere else? And ironically, that would have been the time I most enjoyed something doesn't work :-P After checking it found the culprit: /dev, the system devices filesystem. WTF? What could have changed on v8 that makes uses of the system devices that's missing and makes it consume the full CPU? Anyway I didn't wanted to fix the Ubuntu initram but instead to make NodeOS to boot with newer versions by mounting /dev before executing Node.js, so now that I have an independent init process that would be a good candidate to do it. Just a couple of lines, and check that everything was working. Ok, let's go for the real deal. Use Node.js 0.12.10 (one of the closests to the 0.11.14 one used by NodeOS) as I was using on my tests with the Ubuntu initram? No, let's go crazy, run before walk, fail with a lot of noise and use the latest 4.3.1 stable. And after 30 minutes compiling... magic:

img-20160229-wa0003
NodeOS barebones layer. Using Node.js 4.3.1. For real

I don't have words to explain that moment beyond the fact my cat run scaried and my parents though I got insane :-P One year and a half looking back for a bug... that would turn mad to anybody :-P

After the exctatic moment and some well gained nice tea drinking (not pun intended, I still don't sell hats :-P ), I needed to update all the NodeOS dependencies that use a compiled module due to the fact I was using outdated ones that were compatible with Node.js 0.11.14. Really a lot (8 of them just only on the NodeOS organization...). It was greatly useful the previous work done by @heavyk (since I've never used nan before), and after two days now we have NodeOS fully working with Node.js 4.3.1 and ready for the upcoming ones :-)

There are not prebuild images yet because the build process has got to be really huge and fat and the CI server is not capable to manage so much downloads and compiling steps. I'm thinking about moving to another more capable alternative, but there are also son discussions and pull-requests to remove some functionality from the build process and move it to another independent projects that could more easily be tested and generated and also get it faster to generate NodeOS itself by using prebuild binaries.

Anyway, the code is already available in master branch, and whatever direction the project carry on from now, keep this sentence in your mind: NodeOS is not a toy OS anymore, and it's very capable to be used on production environments for real use cases from now on. F*ck yeah B-)

@lite20

This comment has been minimized.

Show comment
Hide comment
@lite20

lite20 Mar 3, 2016

Member

YEAAAH! Freedom! I've been waiting for this day for so long. Looking back on all the investigation and testing we've done, I've only been here for a short while but it's been energizing. Looking forward to the future of the project!

Long live Node! Long live JS!

Member

lite20 commented Mar 3, 2016

YEAAAH! Freedom! I've been waiting for this day for so long. Looking back on all the investigation and testing we've done, I've only been here for a short while but it's been energizing. Looking forward to the future of the project!

Long live Node! Long live JS!

@lite20

This comment has been minimized.

Show comment
Hide comment
@lite20

lite20 Mar 3, 2016

Member

there are also son discussions and pull-requests to remove some functionality from the build process

So those were the commits you wanted to make first! I'll go ahead and make the adjustments and update that PR. I've taken the npm name 'qemu' for the package.

Member

lite20 commented Mar 3, 2016

there are also son discussions and pull-requests to remove some functionality from the build process

So those were the commits you wanted to make first! I'll go ahead and make the adjustments and update that PR. I've taken the npm name 'qemu' for the package.

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 3, 2016

Member

So those were the commits you wanted to make first!

Yes, that's it! :-D I wanted to publish this first since you were removing QEmu from the build process and I wanted to have something working without having risking experiments on it. Now we can safely remove it and work on create the new qemu npm package :-)

Member

piranna commented Mar 3, 2016

So those were the commits you wanted to make first!

Yes, that's it! :-D I wanted to publish this first since you were removing QEmu from the build process and I wanted to have something working without having risking experiments on it. Now we can safely remove it and work on create the new qemu npm package :-)

@Coretool

This comment has been minimized.

Show comment
Hide comment
@Coretool

Coretool Mar 3, 2016

Member

Yeah ! You/We/Who ever did it ! ;-)

Member

Coretool commented Mar 3, 2016

Yeah ! You/We/Who ever did it ! ;-)

@Marak

This comment has been minimized.

Show comment
Hide comment
@Marak

Marak Mar 3, 2016

Can someone please update the docker image so we can see that least version by running:

sudo docker run -t -i nodeos/nodeos 

:-)

Marak commented Mar 3, 2016

Can someone please update the docker image so we can see that least version by running:

sudo docker run -t -i nodeos/nodeos 

:-)

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 3, 2016

Member

Can someone please update the docker image so we can see that least version by running:

sudo docker run -t -i nodeos/nodeos

:-)

I could give it a try, but the fact is that I think Docker still don't support OverlayFS and FUSE filesystems inside containers, so since they are a fundamental part of NodeOS probably you would only be able to check out barebones and maybe initramfs layers on Docker instead of a full-fledged system... I would recommend you to generate yourself a QEmu image (at least until we got them working again).

Member

piranna commented Mar 3, 2016

Can someone please update the docker image so we can see that least version by running:

sudo docker run -t -i nodeos/nodeos

:-)

I could give it a try, but the fact is that I think Docker still don't support OverlayFS and FUSE filesystems inside containers, so since they are a fundamental part of NodeOS probably you would only be able to check out barebones and maybe initramfs layers on Docker instead of a full-fledged system... I would recommend you to generate yourself a QEmu image (at least until we got them working again).

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 3, 2016

Member

Yeah ! You/We/Who ever did it ! ;-)

Yeah, all of you have helped me a lot, a sincere thank you :-) If it's not because you have been there, probably a long time ago I would have give it up and start working on another thing :-P

Member

piranna commented Mar 3, 2016

Yeah ! You/We/Who ever did it ! ;-)

Yeah, all of you have helped me a lot, a sincere thank you :-) If it's not because you have been there, probably a long time ago I would have give it up and start working on another thing :-P

@formula1

This comment has been minimized.

Show comment
Hide comment
@formula1

formula1 Mar 3, 2016

Contributor

That was an exciting read :)

Contributor

formula1 commented Mar 3, 2016

That was an exciting read :)

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 3, 2016

Member

That was an exciting read :)

I'm happy you liked it :-)

Member

piranna commented Mar 3, 2016

That was an exciting read :)

I'm happy you liked it :-)

@looterz

This comment has been minimized.

Show comment
Hide comment
@looterz

looterz Mar 3, 2016

Congrats! excited to see all the progress NodeOS is making.

looterz commented Mar 3, 2016

Congrats! excited to see all the progress NodeOS is making.

@piranna

This comment has been minimized.

Show comment
Hide comment
@piranna

piranna Mar 5, 2016

Member

And... well, we have just been published on Barrapunto, spanish version of Slashdot and the most important tech news site ^^

Member

piranna commented Mar 5, 2016

And... well, we have just been published on Barrapunto, spanish version of Slashdot and the most important tech news site ^^

@lite20

This comment has been minimized.

Show comment
Hide comment
@lite20

lite20 Mar 6, 2016

Member

And... well, we have just been published on Barrapunto, spanish version of Slashdot and the most important tech news site ^^

Duuude! Fantastic!

Member

lite20 commented Mar 6, 2016

And... well, we have just been published on Barrapunto, spanish version of Slashdot and the most important tech news site ^^

Duuude! Fantastic!

@nooitaf

This comment has been minimized.

Show comment
Hide comment
@nooitaf

nooitaf commented Mar 6, 2016

\o/

@lite20

This comment has been minimized.

Show comment
Hide comment
@lite20

lite20 Mar 7, 2016

Member

@nooitaf I agree 😛

Member

lite20 commented Mar 7, 2016

@nooitaf I agree 😛

@piranna piranna closed this Apr 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment