Hacker News new | ask | show | jobs
by siffland 2352 days ago
A good friend and old coworker has been hitting me up for how to do stuff with docker since his job now uses containers. He has about 15 containers (on 2 hosts) that do not change to much and was asking about setting up k8s (it was a buzzword his manager heard). i talked him into just setting up swarm.

It took all of about an hour (over text messaging) to get it set up and all stacks/services running. They could not be happier.

It comes down to the right tool for the job. If you don't need all the bells and whistles, then keep it stupid simple. I realize swarm is not a 100% "enterprise" solution, however before they they were just issuing docker command after each reboot.

4 comments

> i talked him into just setting up swarm.

Not contesting the heart of your comment but, given the current state of Docker, recommending Swarm to someone strikes me as bad advice. Nomad may be a better call.

Mirantis has openly said Swarm's future is a two year sunset with a transition path to k8s.

I agree, looked into swarm and routing was a mess, even discounting the bugs, lockups and moments of total disconnections, you had to rely on ugly dns hacks to know the live endpoints, making any kind of stateful service a nightmare to set up, while kubernet just give you an endpoint api, and even then, there were no guarantees for local services that swarm mesh would route the calls to the local instances, while in kubernet you can control precisely how services are resolved grouping them in pods, so that they don't needlessly clog the pipes.

I find very hard to find swarm use case that a wan, vpn, private segment or kubernet cluster can't handle better.

I've been using Docker Swarm in production for about 2 years now... processing about 1TB of data / month across 30+ containers. The networking and routing has been rock solid except for that one day that the Docker dev team, in one release, accidentally added random hashes to the internal DNS names of services. Ever since that day I've used the docker-compose network alias for internal routing https://docs.docker.com/compose/compose-file/#aliases

Discovering bugs in a technology you just started "looking into" actually sounds like the learning curve.

are you sure you're not mixing swarm and swarm mode?
Apparently out of Swarm, Swarmkit, and SwarmNext; my good experience has been from SwarmNext. So now this is even more confusing.
Ok, there is a difference? Do you have links to docs of both? This sounds hard to search for online.
Surprised to hear this, as I've been running a 3-node Swarm cluster for a couple of years now, and it's worked perfectly - and it's so much simpler than k8s.
Giving someone advice to use Nomad is bad advice as well. As much as it may not be a personal choice, k8s won by a long shot. You just can't rely on Nomad being around in 2 years, but k8s will surely be around.
Is that swarm in general, or v1 swarm that predated the current "swarmkit"?

https://forums.docker.com/t/is-there-a-roadmap-for-docker-sw...

https://github.com/docker/swarmkit/issues/2665

Apart from Swarm being slowly decomissioned, what would the benefits of Nomad vs Swarm be ?
Disregarding of Swarm's merits why would anyone care what Mirantis has to say? As any other vendor Mirantis has its own agenda and promotes their vision of cloud stack. Does not mean it is the best solution for any particular user.
> Disregarding of Swarm's merits why would anyone care what Mirantis has to say? As any other vendor Mirantis has its own agenda and promotes their vision of cloud stack. Does not mean it is the best solution for any particular user.

Because Mirantis now owns almost all of Docker's IP. https://news.ycombinator.com/item?id=22035084

Nomad, even deployed in single-node mode, is much more pleasant than dealing with Swarm in my experience.
I agree Nomad is probably a better solution, however my friend is an Oracle DBA who now manages the servers and docker since their System Administrator left and he was thrown into it.

I was addressing the:

"The takeaway is: don't use Kubernetes just because everybody else does."

line in the article, and agreeing (did not mean to start a holy war about swarm).

On a side note, I used to run a docker swarm at home up until about 4 months ago when I switched it to K8s, I really didn't have any bad mesh routing issues, and it was pretty stable. But to be a hypocrite I switched to k8s because everyone else DOES use it and I wanted to kind of stay relevant.

Mirantis is just some cloud hosting provider and from what I can tell it has no connection to Docker. I'm generally interested in why all the FUD around Docker and Swarm. Can you support these FUD statements with some legit news stories or blog posts from the people involved at Docker?
> Mirantis is just some cloud hosting provider and from what I can tell it has no connection to Docker. I'm generally interested in why all the FUD around Docker and Swarm. Can you support these FUD statements with some legit news stories or blog posts from the people involved at Docker?

https://www.mirantis.com/blog/mirantis-acquires-docker-enter...

> Today we announced that we have acquired the Docker Enterprise platform business from Docker, Inc. including its industry leading Docker Enterprise and 750 customers.

> What About Docker Swarm? > The primary orchestrator going forward is Kubernetes. Mirantis is committed to providing an excellent experience to all Docker Enterprise platform customers and currently expects to support Swarm for at least two years, depending on customer input into the roadmap. Mirantis is also evaluating options for making the transition to Kubernetes easier for Swarm users.

Mirantis owns essentially all of Docker, outside of Docker for Desktop (someone correct me here if I'm wrong), now. They are saying that Swarm is not the future of Docker. It's entirely possible that the remainder of Docker, now a developer tooling company, will continue with Swarm, but it seems unlikely. Also possible the community will keep it alive. None of those maybes are things I'd bet my platform on though.

You are honestly the first person who has been able to articulate this issue to me. Thank you.
If you look at docker swarm and other solutions, kubernetes is the first one ever to be adopted by all big companies out there.

And it doesn't has to be that one kubernetes, your solution only has to be kubernetes certified. This will allow us all to use the kubernetes api and features with different underlying implementations (as far away from the original or as close as it can get).

This is new.

but swarm mode is now part of "regular docker"
Personal opinion, but for something that small, I would probably not even use an orchestration tool at all, just some init scripts or unit files.
I have an actual production setup using docker-compose. It took 5m to setup and any idiot can read the compose file and reason about what's going on.

But I would not go spreading blog posts about it until I will have been maintaining this thing for min 1 year.

Can I hot-deploy (without downtime)? can I rollback? does it autoscale? can I monitor this thing? where are my logs? how do I create cronjobs? does it autorestart (ok that's an easy one...) will I end up with some half-assed deployment one day? can I trivially maintain dev/stage/prod envs? and so on and so forth.

The thing about k8s is that though it's (very) complex, it also solves a really broad spectrum of deployment issues OOTB.