3 ms·
systemd is great. I used it successfully for operations on many projects that I ran. It provides the standardized way to reliably run and manage services on a s
by snidane 6y ago
systemd is great. I used it successfully for operations on many projects that I ran. It provides the standardized way to reliably run and manage services on a single machine. I also agree with opponents that shell was the de facto standard way to orchestrate things, allowing you to go from dev to prod without significant changes. I was a fan of runit as a process manager before systemd took over the space.
That said there is a problem when you want to run things on multiple machines. What then? Unix and systemd were not designed as an OS for machine clusters, even though it won't be hard to imagine the concepts to be stretched even to this realm.
The docker/kubernetes crowd has been targeting the multi-machine OS scene much sooner and better, even though the solution of let's pack all dependencies, the entire machine and then some to a fat package and then have it run by a scheduler complex as f seems not like the ultimate future of the space.
I took a look at Nomad as a replacement for Kubernetes, which is much much simpler and you can get up and running with a single binary within 2 hours using this tutorial [0]. Nomad supports not only docker as a backend, but you can run raw_exec backend as well - that is any binary, such as shell script, that you wish to run without packaging the entire world with it. Now imagine if only you could schedule to run systemd units using Nomad. You'd scale from a single machine OS to cluster OS just like that.
I predict that Kubernetes will NOT be the ultimate answer as many are hoping for, betting their careers on it. It is too complex and not supporting other than docker runtimes makes it much inferior product than Nomad. Simple solutions usually win ultimately, so Nomad or systemd extended for multi machine services or even just vanilla linux process management extended to cluster level seem like much saner approaches.
[0] https://medium.com/hashicorp-engineering/hashicorp-nomad-from-zero-to-wow-1615345aa539 https://medium.com/hashicorp-engineering/hashicorp-nomad-fro...
- intellix 6y agoWhen you say that Kubernetes only supports the Docker runtime I guess you meant only containers as it supports anything that implements CRI (Container Runtime Interface) like containerd. Think I just saw from your article that Nomad supports straight up Java binaries but don't know how flexible that is
- ibiza 6y agoWhat you describe is essentially the original CoreOS fleet[0] project. It's distributed systemd init files. [0] https://github.com/coreos/fleet#fleet---a-distributed-init-system https://github.com/coreos/fleet#fleet---a-distributed-init-s... I find it ironic half of k8s mojo, etcd, came out of this project as well.
- JanMa 6y ago> Now imagine if only you could schedule to run systemd units using Nomad With some tweaks to your unit files this is actually possible. Nomad has the concept of custom task drivers you can implement to make it schedule any kind of workload you like. I am maintaining a task driver which allows you to run systemd-nspawn containers with Nomad [1]. Using this task driver you can deploy your systemd units running inside a systemd-nspawn container into a Nomad cluster. If this sounds interesting to you I have written a how-to blog-post about this [2] [1]: https://github.com/JanMa/nomad-driver-nspawn https://github.com/JanMa/nomad-driver-nspawn [2]: https://janma.tk/2021-01-10/nomad-deploy-systemd-units/ https://janma.tk/2021-01-10/nomad-deploy-systemd-units/
- sofixa 6y agoWhat would be the point of using Nomad to orchestrate systemd units instead of just using Nomad to raw_exec stuff? Nomad does health checks and all that, so systemd isn't really needed. Btw i wrote an article about how great, easy and feature rich Nomad is which might interest you - https://atodorov.me/2021/02/27/why-you-should-take-a-look-at-nomad-before-jumping-on-kubernetes/ https://atodorov.me/2021/02/27/why-you-should-take-a-look-at...