3 ms·
> There needs to be an option between them. NixOS with nixops is one such option (on bare metal or VMs). You need to climb up the Nix learning curve a bit, bu
by nh2 5y ago
> There needs to be an option between them.
NixOS with nixops is one such option (on bare metal or VMs).
You need to climb up the Nix learning curve a bit, but obtain an overall vastly less complex system than Kubernetes with its millions of lines of code and various levels of OS and networking encapsulation. It is possible for a single human to read and understand all code involved in a nixops deployment in a few months of side-time reading. It is possible to debug operational or configuration issues easily, with standard tools, and standard Linux systems understanding.
You manage your entire infrastructure, including all software and how to build it, declaratively. If you use cloud VMs, nixops will also create them for you.
It is not as powerful as Kubernetes; for example you currently don't get fully automated rolling deployments that roll back if your health checks start failing; you need to do this yourself e.g. running `--include machine1` through `--include machine3` to do a rolling deployment. However, this is often fine, as most small to medium teams do human-triggered deployment (and ensure that it works as expected) anyway.
I found that this works very well for small to medium teams that want to spend as little ops overhead as possible, while still understanding their stack entirely.
- fnordsensei 5y agoI heard about NixOS years ago and thought that an “immutable” Linux dist is an intriguing idea. Game changer if it actually works in practice. But I never properly experimented with it. Are there any good learning resources for using NixOS in an “infrastructure as code” scenario, or should I just RTFM?
- nh2 5y agoYes, you should read the manuals and try it out, given how easy and cheap it is to play around with smaller-instance cloud servers. I also started writing a tutorial series for practitioners you can check out: https://github.com/nh2/nixops-tutorial https://github.com/nh2/nixops-tutorial I've only written 2 tutorials in there so far doing basic things. In the future and as time permits, I'd like to write about how my org implemented various tasks with NixOps, such as rolling deployments, highly available database setups with automatic fallbacks, distributed file systems, how you can patch any software in your stack, how to write reliable systemd services with correct dependencies, and so on.