Lurker News

Comments (97) 26 threads

Show all comments

Showing thread 1 of 26

justinsb1 reply#
The combination of service discovery and containerization is incredibly powerful for distributed applications. I love the idea that I can simply start a Docker container, and it can then discover its configuration and self-configure, rather than having to use Chef/Puppet/whatever.

To my mind, this is the missing answer to "how do I actually use Docker?"
I'm particularly excited by the idea of having a cluster of machines self-configure; normally this is incredibly painful, relying on multicast (not normally available on the cloud) or some ugly hacks (like using S3).

alperakgun3 replies#
for example.. if i m deploying a rails apps, how would coreos make it possible to install web servers, databases and rubygems? all through dockerfile descriptions? an app level getting started would be great..
FooBarWidget1 reply#
From what I understand, it doesn't. You're expected to already have a container with a web server in it, and a container that already has a database in it. The web server container then uses the CoreOS service discovery feature to find out what IP address the database container listens that, and configures itself.

In other words, it does not replace Chef/Puppet. Maybe only for the configuration part, but not for the installation part. You may still want to use Chef/Puppet for creating the container in the first place.

justinsb14 replies#
To my mind, the big idea here is that containers will self-configure. This is configuration _inside_ the container, rather than configuration from _outside_ the container (like Chef/Puppet etc).

This means that your Docker container doesn't need to run a Chef/Puppet/SSH configuration agent. It will need some sort of "discover my config and configure myself" process running, which would perform much the same role though.
In other words, the container is "smart" and self-assembles. If you need to add more webserver capacity (for scaling), you just launch more webserver containers; they will register themselves with the load balancer and attach to the database.
Of course, building these smart containers is non-trivial, so I'm eager to see some real-world examples.

Continue this thread — 14 replies

philips1 reply#
This is where we are going next; CoreOS is super young today though.

We want to build an environment where you run and manage all of those servers and databases inside of containers and via APIs. Or even better skip the APIs and just add nodes and have something like etcd help you configure it dynamically
But, we needed to get all of the foundations solid and that is where we are today.

dschiptsov2 replies#
So, you are not encountered the dependency and version hell yet and just assumed that maintaining all the libs and tools a rails app is implicitly requires is a easy task?) Good luck, then.)
RickHull1 reply#
No, that part is already solved. That's what containers do.

I believe philips is saying that CoreOS is still experimenting with and reifying exactly what the layer above containerized applications should be composed of and look like.

dschiptsov2 replies#
So, basically, it looks like as if I move my /usr/local directory between hosts to be run under chroot, using aufs instead of tar.gz, lxc instead of chroot and some wrapper around ssh and scp? but with all that hype and memes? It looks like implementation of FreeBSD's jails with impoverished ports and fancy command-line tool. OK.

Update: what is really interesting is the amount of hype the Docker project created, having no fundamentally new ideas or technological advances, just well-written (we must admit) web pages full of buzzwords.
As a person who ran FreeBSD jail-based virtual hosting in production, I would say that disk and network I/O will be a bottleneck, because either interface does not scale well enough.)

justincormack#
SSD and 10Gb Ethernet are big changes...
Ixiaus1 reply#
I've been running FreeBSD zfs backed jails for quite some time too (I still think FreeBSD is superior to Linux in many ways). What docker does that ezjails + zfs doesn't do is make it transportable. Sure you could write a script to bundle up your jail but Docker is making it possible to distribute an application orthogonally. Docker is also replete with tools for sharing containers, providing a container server (privately!), and many others...

On performance: containerization > virtualization. Containerization is also not just about performance (people are running it in virtualized environments) it's also about contained configurations.
Your tone is unnecessarily belligerent (I could be reading into what you wrote though).
Also - I know people who know people and are pushing for the Docker team to support containerizing FreeBSD jails too. Since the primary work horse right now for Docker is lxc, it should be possible to generalize it enough to include support for FreeBSD jails.
Docker does more than just "jail"; it does for jails what package managers did for programs.

dschiptsov2 replies#
I do not understand "orthogonality", sorry. I think in terms of ldd's output, and it tells me that nothing fundamentally new could be created. It either packages in /usr or stuff in /usr/local/ You might mount /usr as uniounfs - same for many jails, but you cannot undo dynamic linking, at least statically linked ruby is nonsense (but static linking sometimes is a good idea). I also cannot understand "containerization" why a snapshot created by tar is not a container? The assumption that you could reduce /lib is naive. Yes, /usr/lib could be reduced, but only by removing gnome stuff and some fancies.

I have tried to make minimalist but compatible system. It doesn't happen. Things like kerberos, sasl, ldap, pam messes everything up. I ended up with almost exactly the "minimum install". Paraphrasing a bit "dependencies! dependencies! dependencies!" and minimal install of Fedora or Ubuntu Server is almost optimal.

Continue this thread — 2 replies

cmelbye#
Is it not an easy task? Install rvm and run "bundle" and you're pretty much done. Regardless, that's not necessarily part of the scope of this project as far as I can see. That's handled within the container which is managed by Docker and it's configuration system.
jon-wood2 replies#
I just threw together a really simple proof of concept which uses a shell script to spin up a Docker instance running NGinx, and then register the port that instance is listening on with Etcd. Because it's quite so simple, here it is:

`INSTANCE=$(docker run jonwood/nginx-node) && curl http://127.0.0.1:4001/v1/keys/nginx-nodes/$INSTANCE -d $(docker port $INSTANCE 80)`
You'd then use Etcd's tree listing interface to grab the JSON fragments for each of those NGinx nodes, and configure Varnish or HAProxy or something to hit those backends.
Obviously this isn't anywhere near production ready (for example if one of your NGinx instances goes down there's nothing to remove it from the pool), but so far I'm impressed with what CoreOS is doing.

ideal0227#
"for example if one of your NGinx instances goes down there's nothing to remove it from the pool" For now, you can set up a node with TTL and update it. If the server goes down, the node will disappear. We are going to provide a client that will keep long connection with the server.
johnbellone#
> (for example if one of your NGinx instances goes down there's nothing to remove it from the pool)

My plan to solve this was to use Doozer with a small daemon in each agent server which would keep some kind of registry of the services running on the machine. I think that could be relatively lightweight and with the ability to broadcast via watches there could be some kind of action attached to a node being removed and added.