CoreOS Update: btrfs, docker 0.9, add users, writable /etc, and more
coreos.com
coreos.com
At the same time I want to switch to CoreOS, I also want to wait just a little while for blogs, tutorials, and tools to catch up to where CoreOS and Docker are at, and be usable in production by people who are not professional devops.
The most exciting thing for me in this post is CoreOS CloudInit. It seems to be one of those tools that a small shop could use. It looks a bit like the yaml for fig, but is something that could be used in production as well. At the moment, I have been trying to solve everything a bit on my own with Makefiles, which include Makefiles for custom variables and Makefiles for commands that can be run against each container. It is working great for dev, but I could never really see how to run the containers in prod. The Makefiles didn't really seem like a prod solution, but CoreOS CloudInit looks like it could work.
We also skipped boot2docker and use vagrant with ssh, so seeing that there is a Vagrant box which will run just like an EC2 box is pretty exciting. I would be excited if Digital Ocean would start supporting CoreOS too.
[edit] Quite a few people would like CoreOS on Digital Ocean - http://digitalocean.uservoice.com/forums/136585-digital-ocea...
I'm one of those, and currently trying to figure out a hacky workaround to make it possible.
I'm already doing this[1] to get a current Ubuntu kernel running on DO. The same principle would seem to apply: boot into the CoreOS kernel, but with an initrd that mounts a different btrfs subvolume than the "bootstrap" OS.
This would require DigitalOcean to have a btrfs-formatted image, though, because they don't offer any re-partitioning support... maybe having the initrd mount a loopback image containing a btrfs filesystem would work?
I'm getting to the point, though, where it might be less effort to just start my own CoreOS-centered hosting service than to continue with DO...
Unless something has majorly changed, the idea of using btrfs for the main FS is a bit scary.
So it isn't a "recent" change at all.
There is lots of debate if you search google for comparisons, though they usually seem to end up favoring zfs, which is why I'm a little perplexed here.
e.g. http://rudd-o.com/linux-and-free-software/ways-in-which-zfs-...
Notably, I also ran into a show-stopping kernel bug [0] with btrfs within a day or two of the first production rollout of ShipBuilder [1] (it's an open-source self-hosted PaaS Heroku clone). Since switching to zfs there have been zero file-system related issues with any ShipBuilder production or staging environment so far as I am aware.
[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1214085
Take it up with Sunacle.
However, the main issue is ZFS is also patent encumbered, so re-implementing (even with clean-room approach) it may mean meeting with Oracle's lawyers.
That's sad, considering btrfs still suffers from internal fragmentation issue, as Edward Shishkin had shown in 2010.
True, but there's no shortage of pain points in ZFS. Mixing 512 byte and 4K drives or growing/shrinking pools are good starting points.
"During our alpha period, Chaos Monkey (i.e. random reboots) is built in and will give you plenty of opportunities to test out systemd." <- https://coreos.com/docs/quickstart/
Our release cadence through the alpha has been about once a week, so 1 "random" reboot a week.
I almost think it's worth it to switch the Chaos Monkey's toggle around: disabled in dev, but enabled in test and prod, to ensure you're using http://12factor.net/ principles in your Docker containers. (I think Heroku does something similar by spontaneously killing containers every once in a while.)
CoreOS is still alpha, which is exemplified in this release, which requires a fresh install and isn't upgradeable from the previous release with their auto-update feature.
Also the team is still working out where to put things, filesystems, and how to best integrate etcd, networkd, systemd, etc., with their fleet system for a fully automated, auto-scalable, auto-discovering, self-healing clustering system. All that stuff has come a long way in recent weeks, and I'm very glad to see a distro geared towards both Docker and clustering.