To avoid going OT on another threads, let’s move here for the discussion of the topic.
For the general NixOS GitOps workflow I am quite happy with comin. Solely relying on monitoring makes it a little harder to use than it should be - but I think it’s a great start. The recently added post deploy hook will also help with visibility.
Now we are still using OCI containers with nixOS. For the product that we deploying - but also for some dependencies. This has a couple of reasons:
a) Devs
There is no way to onboard all devs to Nix without some casualties. I am still struggling with nix on Darwin myself sometimes. OCI images is what everyone knows and at least they take away some of the ambiguities when it comes down to running the same code locally and on the servers.
b) Official Releases
For dependencies like databases OCI images gives easy control of what version to - independent of the OS release cycle. While this technically is also true with nix, there is a benefit of using the exact same official container release by the original project. And also a)
c) Eval
Now, if we wanted to use comin to deploy our app (multiple times a day) it would always require a switch
. Unfortunately the evaluation is expensive and I imagine doing that on a busy server is … not … that great. Having another build server that copies the derivation is … a lot more machinery.
By default we are just updating and switching in low traffic times once a week.
Oh, and I am also not a fan of a CI pipeline making commits. Instead we usually use image tagging instead of having the CI committing the SHA to the infra repo. Which would be required for the comin approach.
d) Rollout
But what might be even worse: I am not aware there is a way to roll out an update to a native service in a rolling or blue/green manner to avoid downtime. Neither is there a great concept of running multiple instances of a service. I know systemd
has @-templating … but that does not feel to be enough either.
And while I would love to ditch some of the container parts, it just feels the most pragmatic approach to still use them with NixOS.
That said, even with k3s on nixOS the complexity is still just .
Very much so when you look at helm and all the painful yaml.
We have been running with nomad before. Which was nice in-between. But the community feels tiny and IMO the operations experience isn’t that particular great either.
I have not found a solution that makes me happy TBH.