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

CoreOS + NodeOS = Win #17

Closed
groundwater opened this Issue Feb 18, 2014 · 16 comments

Comments

Projects
None yet
8 participants
@groundwater
Copy link
Contributor

groundwater commented Feb 18, 2014

I've had a number of people who've tried to run node-os, but run into problems deploying docker. See NodeOS/NodeOS-Docker#5

I'm exploring using CoreOS as the base system.

  1. it comes with docker
  2. it's lightweight
  3. it has a one-step vagrantbox ready to go

Assuming you have Vagrant installed, you can get node-os running with

$ git clone https://github.com/coreos/coreos-vagrant/
$ cd coreos-vagrant
$ vagrant up
$ vagrant ssh
core $ docker run nodeos/nodeos
  • @jtenner this should side-step all those ubuntu/docker pains.

I haven't really explored CoreOS much yet, but it looks promising. Basically CoreOS treats Docker as its package manager, which is pretty sweet. I think these two compliment each other well. To use docker-speak CoreOS is the lightweight cargo ship, and node-os is the lightweight container.

I'm going to explore this more, and hopefully turn this into a blog post.

@groundwater groundwater added the blog label Feb 18, 2014

@eugeneware

This comment has been minimized.

Copy link

eugeneware commented Feb 18, 2014

I use the coreos vagrant image quite a bit. I'm not sure if the current image supports docker 0.8 though. (I could be wrong, I installed a pretty early coreos image which was only 0.7.3).

The other option is boot2docker or just the stock docker vagrant image.

With boot2docker due to the new mac OS X command line support, if it is listening on port 4243, then you can just docker run from your mac terminal, and not even have to vagrant ssh.

See my install instructions on docker-spawn which detail for all the options how to make this work.

Out of all the options coreos is the most solid IMHO.

Particularly if you want to do mapping of your mac file system into a container. Coreos uses nfs with vagrant which means things like mmap() work properly.

The default docker vagrant image VirtualBox which has a bug in vboxfs which means that mmap() won't work, which means running most database servers (eg. leveldb, lmdb) won't work among other things.

boot2docker is really easy to install, but it's still pretty rough around the edges, but it will be the way to go in the future for local dev IMHO.

The mechanism to change the docker daemon to listen on port 4243 is a little tricky (see the install instructions linked above).

I think to make it completely braindead you can fork the vagrantfile, tweak it to change the default, or to add an option to expose port 4243, and go from there.

Either way, coreos is the most stable, dependable way to go at the moment.

Only thing to be aware of is that coreos does have chaos monkey built in apparently, so it will randomly reboot (as a feature).

You have been warned :-)

@EndangeredMassa

This comment has been minimized.

Copy link

EndangeredMassa commented Feb 18, 2014

I admit that getting set up wasn't as smooth as it could have been, but I've had no real issues uses docker on Ubuntu.

@groundwater

This comment has been minimized.

Copy link
Contributor

groundwater commented Feb 18, 2014

@eugeneware I thought you were joking, but apparently not

During our alpha period, Chaos Monkey (i.e. random reboots) is built in and will give you plenty of opportunities to test out systemd.

I don't really agree with their rationale here, but I get their intentions. The real chaos monkey from netflix operates on a single instance in a auto-scale cluster, so taking down a single instance doesn't actually destroy your application.

I have two concerns here:

  1. first time users who want to try node-os
  2. people wishing to host node-os servers

Whatever I choose for (1) needs to be easier than the Ubuntu setup is now. CoreOS is pretty easy, but I'm afraid of answering "why did node-os crash" questions because of random reboots. The boot2docker project looks cool; ideally I want someone with osx to be up and running node-os after copy-pasting a few commands.

As for (2) I definitely don't want an OS that randomly reboots, especially when that OS is acting as the hypervisor.

Eventually node-os will not require another system in place, but for now I think it's more interesting to see node-os close to the user applications and not the hardware.

@EndangeredMassa I didn't really have any issues with Ubuntu either, but I don't want my experience with Ubuntu/Docker to color my judgement. I think a lot of people interested in node-os may be coming to with limited systems experience.

Thanks for your feedback, especially @eugeneware for your awesome docker references. I'm going to check those out and see if I can simplify the quickstart process.

@tekknolagi

This comment has been minimized.

Copy link

tekknolagi commented Feb 18, 2014

@groundwater I use PXE+CoreOS

@jtenner

This comment has been minimized.

Copy link

jtenner commented Feb 18, 2014

Installing docker was really my only issue though. @EndangeredMassa echos my sentiments. I just wish something prompted me to download it correctly.

Running docker was extremely straightforward.

Getting used to ubuntu and linux has been a challenge for me (But a worth-while one for sure.)

@groundwater I wouldn't worry too much about this issue unless you think it adds value to your project.

@groundwater

This comment has been minimized.

Copy link
Contributor

groundwater commented Feb 19, 2014

CoreOS kinda fits into my vision of where node-os will exist in the deploy stack. I don't want to couple this project to CoreOS, but I do imagine having a lightweight system in-between the hardware and each node-os instance.

@jtenner I didn't mean to call you out, it's something that others including myself have had problems with.

@jtenner

This comment has been minimized.

Copy link

jtenner commented Feb 19, 2014

@groundwater I was only worried my small (non)issue prompted something unnecessary. Sounds like it helped.

@groundwater

This comment has been minimized.

Copy link
Contributor

groundwater commented Feb 19, 2014

@jtenner it definitely helped, and your issue is a very real issue. You happened to report the failure, but I bet many others did not. We may have lost an enthusiast, or future contributor.

A node-os instances almost certainly has fewer features than a linux distro, we can't do much about that. What we can do however is try to make the experience more welcoming to beginners.

In the not too distant future, I want a nice way to deploy node-os instances in the cloud through wssh so you don't even need to install docker.

@jtenner

This comment has been minimized.

Copy link

jtenner commented Feb 19, 2014

👍

@eugeneware

This comment has been minimized.

Copy link

eugeneware commented Feb 20, 2014

In case we go the ship a custom Vagrantfile option, I've forked the coreos Vagrant project, and shown my customization to automatically export port 4243 from the box. So you can just do:

$ git clone https://github.com/eugeneware/coreos-vagrant
$ cd coreos-vagrant
$ PRIVATE_NETWORK=172.12.8.150 vagrant up
$ curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-latest
$ chmod +x ./docker
$ export DOCKER_HOST=tcp://172.12.8.150:4243
$ ./docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Here's the modified VagrantFile and modified systemd unit service file docker-local.service

@eugeneware

This comment has been minimized.

Copy link

eugeneware commented Feb 20, 2014

boot2docker is a lot simpler, but currently doesn't export a private interface (but it's coming soon):

$ brew update
$ brew install boot2docker
$ export DOCKER_HOST=tcp://localhost:4243
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS 
@eugeneware

This comment has been minimized.

Copy link

eugeneware commented Feb 20, 2014

@groundwater I've also updated my coreos VagrantFile to disable the coreos chaos monkey reboots after updates.

@groundwater groundwater referenced this issue Jun 14, 2014

Closed

distro? #30

@stevenvachon

This comment has been minimized.

Copy link

stevenvachon commented Aug 14, 2014

... = Windows?
:P


How about:
CoreOS + NodeOS == CodeOS || CorodeOS || CorrodeOS
CorrodeOS + Blink == BrowserOS

@kitingChris

This comment has been minimized.

Copy link

kitingChris commented Sep 11, 2014

I tried it with the instructions from @groundwater but got this in the end:

core@core-01 ~ $ docker run nodeos/nodeos
Unable to find image 'nodeos/nodeos' locally
Pulling repository nodeos/nodeos
44628f22098b: Download complete 
8ab5f2db6f52: Download complete 
e09baf7974ce: Download complete 
6196c1c0658f: Download complete 
6666b7eee46f: Download complete 
d32b35f67349: Download complete 
c7a0f89ed032: Download complete 
8892a41fa432: Download complete 
3417399f0987: Download complete 
81840a248d03: Download complete 
f5a4c48ccb64: Download complete 
1a610d14bdc2: Download complete 
9a7ae02d27c9: Download complete 
6d2082c7a159: Download complete 
c54f3a2a62ba: Download complete 
a6f53a9d9665: Download complete 
992f066e8cae: Download complete 
e5373f364745: Download complete 
loopback device not activated
----> starting init
      bind: 127.0.0.1
      port: 1
      boot: 0
----> starting first runner
      exec: nsh
      args: []
      cwd : /
/ # ^D
<---- first runner exited
<---- stopping init because BOOT=0 (set BOOT=1 to override)
core@core-01 ~ $

Is this expected?

@piranna

This comment has been minimized.

Copy link
Member

piranna commented Sep 12, 2014

NodeOS starts, you get a shell, you close the shell, NodeOS switch off. Yes, I think it's expected :-)

@groundwater

This comment has been minimized.

Copy link
Contributor

groundwater commented Sep 12, 2014

To add to this. The init process (pid 1) is in non-boot mode, meaning when
you log out of your shell it shuts down.

For demo purposes with Docker, this is usually what you want to happen. If
you booted it with the environment variable BOOT=1 then init would keep on
trucking after your shell dies. It would be up to you to have booted the
system and start something like ssh (or whatever the node ssh would be)

On Thu, Sep 11, 2014 at 6:10 PM, Jesús Leganés Combarro <
notifications@github.com> wrote:

NodeOS starts, you get a shell, you close the shell, NodeOS switch off.
Yes, I think it's expected :-)


Reply to this email directly or view it on GitHub
#17 (comment).

@piranna piranna closed this Jan 6, 2016

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