$ colmena apply --on @tag-a [INFO ] Enumerating nodes... [INFO ] Selected 7 out of 45 hosts. (...) ✅ 0s Successfully built sigma 🕗 7s copying path '/nix/store/h6qpk8rwm3dh3zsl1wlj1jharzf8aw9f-unit-haigha-agent.service' to 'ssh://email@example.com'... theta ✅ 7s Activation successful gamma 🕘 8s Starting... alpha ✅ 1s Activation successful epsilon 🕗 7s copying path '/nix/store/fhh4rfixny8b21l6jqzk7nqwxva5k20h-nixos-system-epsilon-20.09pre-git' to 'ssh://firstname.lastname@example.org'... beta 🕗 7s removing obsolete file /boot/kernels/z28ayg10kpnlrz0s2qrb9pzv82lc20s2-initrd-linux-5.4.89-initrd kappa ✅ 2s Activation successful
It’s compatible with existing configurations written for NixOps (
none backend) or morph with minimal modification, and differs from them in the following areas:
- Entirely stateless
- Supports parallel deployment
- Supports deploying to the local machine
- Supports per-node overrides of Nixpkgs pinning
- Supports node tagging
- Has a little tool (
colmena introspect) to help you extract information out of your configurations
Also, it’s written in Rust, and that alone counts as a feature for some people
But why another deployment tool?
I’ve been using NixOps and morph for a while, and have found neither of them fit my use cases very well. NixOps is stateful, making collaboration hard for projects that allow multiple people to deploy. Morph is stateless but lacks any form of parallelism which makes it painful to use with a large number of hosts, and the problem does not appear to be easily fixable.
Furthermore, I’m used to a
nixos-rebuild-style of workflow when it comes to managing my desktop hosts, but neither tool provides an easy way to deploy to the local machine.
What’s the state of Colmena?
I started Colmena late last year and have been using it to manage 40+ hosts running NixOS. There isn’t a stable release yet, but it’s on the horizon, and I’ve been working to iron out some wrinkles in the tool. I made a post about Colmena in the NixOS subreddit a couple of months ago, and a lot has changed since then.
I would also like to thank the following people:
- Developers of NixOps and morph, for inspiring me to create this in the first place
- @aanderse and @CitadelCore (GitHub), for testing and feedback
@justinas (GitHub), for help with the implementation of
Try it out, and tell me what you think!