{"id":1374,"date":"2019-02-26T10:55:34","date_gmt":"2019-02-26T10:55:34","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw93\/?p=1374"},"modified":"2019-03-07T20:43:48","modified_gmt":"2019-03-07T20:43:48","slug":"announcing-rancheros-a-minimalist-distro-designed-explicitly-to-run-docker","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/02\/26\/announcing-rancheros-a-minimalist-distro-designed-explicitly-to-run-docker\/","title":{"rendered":"Announcing RancherOS: A minimalist distro designed explicitly to run Docker"},"content":{"rendered":"<p>Today I would like to announce a new open source project called<br \/>\nRancherOS \u2013 the smallest, easiest way to run Docker in production and<br \/>\nat scale. RancherOS is the first operating system to fully embrace<br \/>\nDocker, and to run all system services as Docker containers. At Rancher<br \/>\nLabs we focus on building tools that help customers run Docker in<br \/>\nproduction, and we think RancherOS will be an excellent choice for<br \/>\nanyone who wants a lightweight version of Linux ideal for running<br \/>\ncontainers.<br \/>\n<a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/02\/25001528\/rancherOS_logo_black.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/02\/25001528\/rancherOS_logo_black.png\" alt=\"rancherOS_logo_black\" \/><\/a><\/p>\n<p>##<\/p>\n<h2>How RancherOS began<\/h2>\n<p>The first question that arises when you are thinking about putting<br \/>\nDocker in production is which OS to use. The simplest answer is to run<br \/>\nDocker on your favorite Linux distribution. However, it turns out the<br \/>\nreal answer is a bit more nuanced. After running Docker on just about<br \/>\nevery distro over the last year, I eventually decided to create a<br \/>\nminimalist Linux distribution that focuses explicitly on running Docker<br \/>\nfrom the very beginning. Docker is a fast-moving target. With a constant<br \/>\ndrum beat of releases, it is sometimes difficult for Linux distributions<br \/>\nto keep up. In October 2013, I started working very actively with<br \/>\nDocker, eventually leading to an open source project called Stampede.io.<br \/>\nAt that time I decided to target one Linux distribution that I thought<br \/>\nto be the best for Docker since it was included by default. With<br \/>\nStampede.io, I was pushing the boundaries of what was possible with<br \/>\nDocker and able to do some fun things like run libvirt and KVM in Docker<br \/>\ncontainers. Consequentially I always needed the latest version of<br \/>\nDocker, which was problematic. At the time, Docker was releasing new<br \/>\nversions each month (currently Docker is on a two month release cycle).<br \/>\nIt would often take over a month for new Docker versions to make it to<br \/>\nthe stable version of the Linux distro. Initially, this didn\u2019t seem like<br \/>\na bad proposition because undoubtedly, a new Docker release couldn\u2019t be<br \/>\nconsidered \u201cstable\u201d on day one, and I could always use alpha releases of<br \/>\nmy distribution of choice. However, alpha distribution releases include<br \/>\nother recently released software, not just Docker but alpha kernel and<br \/>\nalpha versions of other software. With RancherOS we addressed this by<br \/>\nlimiting the OS to just the things we need to run Docker, specifically,<br \/>\nthe Linux kernel, Docker and the bare minimum amount of code needed to<br \/>\njoin the two together. Picking which version of RancherOS to run is as<br \/>\neasy as saying which version of Docker you wish to run. The sole purpose<br \/>\nof RancherOS is to run Docker and therefore our release schedule is<br \/>\nclosely aligned. All other software included in the distribution is<br \/>\nconsidered stable, even if you just picked up the latest and greatest<br \/>\nDocker version.<\/p>\n<h2>An OS where everything is a container<\/h2>\n<p>When most people think of Docker they think about running applications.<br \/>\nWhile Docker is excellent at that, it can also be used to run system<br \/>\nservices thanks to recently added capabilities. Since first starting<br \/>\nRancher (our Docker orchestration product), we\u2019ve wanted the entire<br \/>\norchestration stack to be packaged by and run in Docker &#8211; not just the<br \/>\napplication we were managing. This was initially quite difficult, since<br \/>\nthe orchestration stack needed to interact with the lower level<br \/>\nsubsystems. Nevertheless, we carried on with many \u201chacks\u201d to make it<br \/>\npossible. Once we determined the features we needed within Docker, we<br \/>\nhelped and encouraged the development of those items. Finally, with<br \/>\nDocker 1.5, we were able to remove the hacks, paving the way for<br \/>\nRancherOS. Docker now allows sufficient control of the PID, IPC,<br \/>\nnetwork namespaces and capabilities. This means it is now possible to<br \/>\nrun systems oriented processes within Docker containers. In RancherOS we<br \/>\nrun absolutely everything in a container, including system services such<br \/>\nas udev, DHCP, ntp, syslog, and cloud-init.<br \/>\n<img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2015\/02\/25001528\/rancherOS_lighter.png\" alt=\"rancherOS_lighter\" \/><\/p>\n<h2>A Linux distro without systemd<\/h2>\n<p>I have been running systemd and Docker together for a long time. When I<br \/>\nwas developing Stampede.io I initially architected the system to run on<br \/>\na distribution that heavily leveraged systemd. I started to notice a<br \/>\nnumber of strange errors when testing real world failure scenarios.<br \/>\nHaving previously run production cloud infrastructure, I cared very much<br \/>\nabout reliably managing things at scale. Having seen odd errors with<br \/>\nsystemd and Docker I started digging into the issue. You can see most of<br \/>\nmy comments in this <a href=\"https:\/\/github.com\/docker\/docker\/issues\/6791\">Docker<br \/>\nissue<\/a> and this <a href=\"https:\/\/groups.google.com\/d\/msg\/coreos-dev\/wf7G6rA7Bf4\/wpI44Kfy8ZsJ\">mailing<br \/>\nlist<br \/>\nthread<\/a>.<br \/>\nAs it turns out, systemd cannot effectively monitor Docker containers<br \/>\ndue to the incompatibility with the two architectures. While systemd<br \/>\nmonitors the Docker client used to launch the Docker container, this is<br \/>\nnot really helpful and I worked hard with both Docker and systemd<br \/>\ncommunities to fix the issue. I even went so far as to create an open<br \/>\nsource project called<br \/>\n<a href=\"https:\/\/github.com\/ibuildthecloud\/systemd-docker\">systemd-docker<\/a>. The<br \/>\npurpose of the project was to create a wrapper for Docker that attempted<br \/>\nto make these two systems work well together. While it fixed many of the<br \/>\nissues, there were still some corner cases I just couldn\u2019t address.<br \/>\nRealizing things must change in either Docker or systemd I shifted focus<br \/>\nto talking to<br \/>\n<a href=\"http:\/\/lists.freedesktop.org\/archives\/systemd-devel\/2014-October\/023944.html\">both<\/a><br \/>\nof<br \/>\n<a href=\"https:\/\/botbot.me\/freenode\/docker-dev\/2014-07-10\/?msg=17771621&amp;page=7\">them<\/a>.<br \/>\nWith the announcement of Rocket more effort is being put into making<br \/>\nsystemd a better container runtime. Rocket, as it stands today, is<br \/>\nlargely a <a href=\"http:\/\/www.ibuildthecloud.com\/blog\/2014\/12\/03\/is-docker-fundamentally-flawed\/\">wrapper around<br \/>\nsystemd<\/a>.<br \/>\nAdditionally, systemd itself has since added native support for pulling<br \/>\nand running <a href=\"https:\/\/plus.google.com\/+LennartPoetteringTheOneAndOnly\/posts\/SkKuBF1XaNF\">Docker<br \/>\nimages<\/a> which<br \/>\nseems to indicate that they are more interested in subsuming container<br \/>\nfunctionalities in systemd than improving interoperability with Docker.<br \/>\nUltimately, all signs continue to point to no quick resolution between<br \/>\nthese two projects. When looking at our use case for RancherOS, we<br \/>\nrealized we did not need systemd to run Docker. In fact, we didn\u2019t need<br \/>\nany other supervisor to sit at PID 1. Docker was sufficient in itself.<br \/>\nWhat we have done with RancherOS is run what we call \u201cSystem Docker\u201d as<br \/>\nPID 1. All containers providing core system services are run from System<br \/>\nDocker, which also launches another Docker daemon which we call \u201cUser<br \/>\nDocker\u201d under which we run user containers. This separation is quite<br \/>\npractical. Imagine a user did docker rm -f $(docker ps -qa). You run<br \/>\nthe risk of them deleting the entire operating system.<\/p>\n<h2>Minimalist Linux distributions<\/h2>\n<p>As users look at shifting workloads to containers, dependencies on the<br \/>\nhost system become dramatically less. All current minimalist Linux<br \/>\ndistributions have taken advantage of this fact, allowing them to<br \/>\ndrastically slim down their footprint. I love the model distributions<br \/>\nsuch as CoreOS have pioneered and we have been inspired by them. By<br \/>\nconstraining the use case of RancherOS to running Docker, we decided<br \/>\nonly core system services (logging, device management, alerting) and<br \/>\naccess (console, ssh) were required. With the ability to run these<br \/>\nservices in containers, all we needed was the container system itself<br \/>\nand a bit of bootstrap code (to get networking up, for example). If you<br \/>\ntake this one step further and put the server under the management of a<br \/>\nclustering\/orchestration system, you can even minimize the need to run a<br \/>\nfull console.<\/p>\n<h2>First Meetup<\/h2>\n<p>On March 31st, I\u2019ll be hosting an online meet up to demonstrate<br \/>\nRancherOS, discuss some of the features we are working on, and answer<br \/>\nany questions you might have. If you would like to learn more, please<br \/>\nregister now:<\/p>\n<h2>Conclusion<\/h2>\n<p>When we looked at simplifying large scale deployments of Docker, there<br \/>\nwere no solutions available that truly embraced Docker. We started the<br \/>\nRancherOS project because we love Docker and feel we can significantly<br \/>\nsimplify the Linux distribution necessary to run it. Hopefully, this<br \/>\nwill allow users to focus more on their container workloads and less on<br \/>\nmanaging the servers running them. If you\u2019re primary requirement for<br \/>\nLinux is to run Docker, we\u2019d love for you to give RancherOS a try and<br \/>\nlet us know what you think. You can find everything<br \/>\nat <a href=\"https:\/\/github.com\/rancherio\/os\">https:\/\/github.com\/rancherio\/os<\/a>.<\/p>\n<p><a href=\"https:\/\/rancher.com\/announcing-rancher-os\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I would like to announce a new open source project called RancherOS \u2013 the smallest, easiest way to run Docker in production and at scale. RancherOS is the first operating system to fully embrace Docker, and to run all system services as Docker containers. At Rancher Labs we focus on building tools that help &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/02\/26\/announcing-rancheros-a-minimalist-distro-designed-explicitly-to-run-docker\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Announcing RancherOS: A minimalist distro designed explicitly to run Docker&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1374","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/comments?post=1374"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1374\/revisions"}],"predecessor-version":[{"id":1447,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1374\/revisions\/1447"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/media?parent=1374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/categories?post=1374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/tags?post=1374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}