23

One of the top-level projects on nixos.org is Disnix, "a distributed deployment extension for Nix". Another project is NixOps, "a tool for deploying NixOS machines in a network or cloud".

The feature sets sound very similar. Are they competitors, or is one a successor to the other, or are they solving different problems? If they are "competitors", as they seem to be, then what are the differences, and which should I be using?

EDIT: if it's any indication, NixOps appears to be under active development, but I can't see when Disnix was last worked on.

Charles
  • 50,943
  • 13
  • 104
  • 142
jameshfisher
  • 34,029
  • 31
  • 121
  • 167
  • 3
    you can see [disnix on github](https://github.com/svanderburg/disnix) for the project history – Janus Troelsen Mar 02 '16 at 12:14
  • @aij's answer quotes Sander van der Burg's post [On NixOps, Disnix, service deployment and infrastructure deployment](http://sandervanderburg.blogspot.com/2015/03/on-nixops-disnix-service-deployment-and.html), but his later writing [A more realistic public Disnix example](http://sandervanderburg.blogspot.com/2018/02/a-more-realistic-public-disnix-example.html) was the one that drove it home for me. – toraritte Nov 29 '20 at 04:47

2 Answers2

16

NixOps is a tool for "spinning up" nixos machines. Think: ec2 API.

Disnix is a toolset for managing the services running on a network of machines. Think: Chef/Puppet for multiple hosts.

Using DisnixOS (see the latest builds) the two can work together well, delegating to NixOps for instantiation of servers and delegating to Disnix to configure all your services on those servers.

If you are just deploying to a single server or the relationships between your services are simple, then NixOps can probably do everything you need. If you have multiple machines, running multiple services that are all subtly inter-related... then you will want Disnix/DisnixOS.

toraritte
  • 6,300
  • 3
  • 46
  • 67
Chris Farmiloe
  • 13,935
  • 5
  • 48
  • 57
  • What would be advantages/disadvantages of using Disnix versus using things like Ansible/Chef/Puppet to manage a fleet of NixOS machines? – CMCDragonkai Apr 27 '14 at 11:02
  • That doesn't seem right. NixOps is great for configuration management of NixOS machines. I wouldn't use it for stateful management, but a lot is well managed declaratively on NixO(p)S, including services. I'm even computing the configuration for Prometheus based on the config of the whole deployment. – aij Dec 19 '17 at 02:55
6

Sander van der Burg (the author of Disnix) has a rather detailed blog post explaining the relation/differences.

The short answer is: while both tools perform distributed deployment tasks and use the Nix package manager as underlying (local) deployment technology, they are designed for different purposes and address different concerns. Furthermore, they can also be effectively used together to automate deployment processes for certain kinds of systems.

[...]

[Nixops] does infrastructure deployment, while [Disnix] does service deployment. Infrastructure deployment is a prerequisite of doing service deployment and both tools can actually be combined to automate both concerns.

Service deployment is particularly useful for distributed systems that can be decomposed into "distributable units" (such as service-oriented systems), but not all kinds of distributed systems.

Moreover, NixOps is a tool that has been specifically designed to deploy NixOS configurations, while Disnix can deploy services to machines running any operating system capable of running the Nix package manager.

aij
  • 5,903
  • 3
  • 37
  • 41