Goodbye Docker on CentOS, Hello Ubuntu
linux-toys.com
linux-toys.com
Docker does have it's uses, but in the majority of cases you are better off using native OS package and dependency management (RPM/YUM in the case on Redhat-based distros). One very obvious thing is that package managers usually track versions and dependencies and allow for install actions to happen based on the versions delta. With Docker you just replace the whole environment, which is fine, unless some of the data context is outside of Docker.
I think the majority of Docker uses are of a class "I can't figure out how to manage dependencies for a given OS, so I am going to skirt the issue by using Docker".
It's actually: "Distro-provided dependencies are two-three years old and I don't want to deal with backports, ppas or whatever to get a fresh stable version of Python, Node or anything else."
Either you're doing something wrong or everybody's extremely lucky. If you've used Docker for 30 minutes I would bet on the former :)
I believe that the filesystem layering feature in Docker is an anti-feature. It depends on unstable kernel features to work properly and doesn't really address the caching issues properly. Dependencies are usually in a tree, not linear like presented in a Dockerfile.
My company is extensively using docker. It has made deployment and maintaining different versions too smooth.
It's easier to get our devs wrapping all of their dependencies in a container, it's easier to just deploy the container, it's easier to separate what's "state" and "data" that should be maintained from the application and what's throwable.
Docker helps a lot to get away from the snowflake-machine mentality, everything is ephemeral so think carefully what you really need not to be like that and treat those cases like they should.
I do understand a lot of criticism about Docker but having worked with almost every mainstream configuration management tool (CFEngine, Puppet, Chef and Ansible) I can say I truly prefer to only have to care about Docker (or containers, I'm taking a look at other solutions atm) than the tangled mess that every single of them become later on.
And I'm sorry, only using "package managers" don't cut for the vast majority of deployments, you still have to manage configuration files, env vars and all of the other ugly mess.
How long have you worked with a scale of hundreds to thousands of automated servers?
I don't really see how the Docker model is better. I wouldn't trust a person who wrote a terrible Puppet file to work on a Docker container.
I can understand that from a Devops point a view, it's more convenient, however you can easily just build a VM image with Puppet and deploy that to your billions of servers.
RHEL, CentOS, and Fedora do not ship the AUFS kernel module because it is not part of the mainline Linux kernel and is unlikely to be included in future, and these distros have an "upstream first, no out-of-tree bits" policy. Instead, they recommend using devicemapper on LVM [1][2].
The same advice is provided in the official Docker documentation [3]:
> Docker hosts running the devicemapper storage driver default to a configuration mode known as loop-lvm... The mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under loop-lvm mode... The preferred configuration for production deployments is direct lvm.
You might consider using CentOS Atomic Host, which comes preconfigured with LVM thin pools.
OverlayFS is also an alternative, but it can be problematic. It only implements a subset of the POSIX standard [4], which can cause some programs to fail.
[1] http://www.projectatomic.io/blog/2015/06/notes-on-fedora-cen... [2] https://access.redhat.com/documentation/en/red-hat-enterpris... [3] https://docs.docker.com/engine/userguide/storagedriver/devic... [4] https://docs.docker.com/engine/userguide/storagedriver/overl...
>> Yes, there is. There is a known issue using AUFS(Which Ubuntu uses for Docker) with CentOS/Fedora images:
https://github.com/docker/docker/issues/6980
To make it easier, I just changed the base image from CentOS/Fedora to Ubuntu so I do not have to worry about it.
https://jpetazzo.github.io/assets/2015-03-03-not-so-deep-div...
If you've got a new enough kernel though (i.e. 3.18+), you're best off using Overlay for your storage driver. It's fast and doesn't require a lot of tuning.
As long as you don't mind gifting root to your container tenants.
We waited a year for this to "stabilize" but it never did.
There is not enough information in this blog post to say exactly what the problem is, but switching distros may be overkill here.
Overlay(fs) is likely going to be the way forward.
CentOS is neither minimal nor light. Ubuntu also isn't either of these things. Both of these distributions are more targeted towards convenience and ease of use, which means a lot of features/services that are generally unnecessary are enabled by default. The main reasons to use CentOS is compatibility with proprietary software made for RHEL, Ubuntu for people already familiar with its desktop version, or if needing to buy enterprise support for either.
If the op is primarily looking for minimal and light, he should look at pretty much any other major popular Linux distribution like Debian proper, Slackware, or Gentoo before CentOS or Ubuntu.
For many years I would craft a system from the Ubuntu minimal install. It appears CentOS has a similar installer.[0] With Ubuntu's one could create a pretty good minimal install.
But we see this a lot - people jump onto Ubuntu despite not having an interest in running Unity, Mir, upstart, etc, or having a slightly fancier installer, or different schedule on release of stable / long term support versions.
I suspect it's simply that for many people unfamiliar with the various GNU/Linux distros, Ubuntu is the one they've heard of more often. And while most people marvel at the sophisticated package management system, few ponder why the package files don't have a .ubu suffix.
Could you please explain this reasoning:
> Being "heard of more often" translates into the most up-to-date package manager
I think you're agreeing with me when I say Ubuntu is heard of more often, and you say it's well-known.Support -- have you compared the length of support for Debian stable and Ubuntu LTS releases? Did you conclude that Ubuntu has long-term support and Debian does not?
Can you also explain what you mean by:
> [Ubuntu has] wider software compatibility than any other distro
I'd be curious what software runs on Ubuntu that doesn't run on, Debian, CentOS/RHEL, etc.Generally speaking, a server environment is not the right place to run bleeding edge software. Debian's conservatism is quite sensible when it comes to production server environments, and traditionally (before the whole systemd debacle) they were pretty good at prioritizing stability over the feature of the week demanded by more desktop-centric folks. There's Ubuntu and other derivatives that can cater to their specific needs without compromising the integrity of the distribution in general. And if you have a specific application that requires a more recent version, you can always make use of a 3rd party repository (that you'd of course have carefully vetted first), a binary package, or just rolling your own from source. It makes much more sense to take those extra steps for specific applications than take a blanket approach to rolling out new code all over your production environment.
In addition, there is Ubuntu Minimal (https://help.ubuntu.com/community/Installation/MinimalCD) which is the most minimal you can get in Ubuntu.