3 ms·
> Are you using NixOps or Morph or something else? How does your world look like without K8s and Containers? Not using NixOps or Morph. I recall considering a
by smilliken 5y ago
> Are you using NixOps or Morph or something else? How does your world look like without K8s and Containers?
Not using NixOps or Morph. I recall considering a few others as well. In each case, I wasn't able to understand what they were doing that I couldn't do with a simple script. Instead, there's a python program that does an rsync, installs some configuration files, and runs the nix build. It deploys to any linux OS, but it does some stuff differently for NixOS, and the differences account for about 100 lines while increasing scope (managing filesystems, kernel versions, kernel modules, os users, etc). A deploy to all hosts takes about a minute because it runs in parallel. Deploys are zero downtime, including restarting a bunch of web apps.
The NixOS configuration itself is another ~200 lines, plus a bit per host for constants like hostname and ip addresses. It's really neat being able to define an entire operating system install in a single configuration file that gets type checked.
- osener 5y agoFor others interested in deploying like this, this approach sounds exactly like what krops does. Krops is similar to Morph, except it does the derivative building on the remote host. It is very simple and works great. Deploying from macOS to NixOS is possible as well. https://github.com/krebs/krops https://github.com/krebs/krops https://tech.ingolf-wagner.de/nixos/krops/ https://tech.ingolf-wagner.de/nixos/krops/