4 ms·
Seems like it would be perfect for declarative deployments!! So neat!
by hlfw0rd 11y ago
Seems like it would be perfect for declarative deployments!! So neat!
- arianvanp 11y agoThat's kind of the whole point of nix-os. Take the nix package manager and describe your entire OS decoratively. With atomic upgrades and rollbacks!
- selestify 11y agoHow does this compare to Docker?
- jerf 11y agoNixOS is the whole OS. It doesn't use the kernel sandboxing at all, for itself at least, any more than any other distro does. Conceivably it could be used to replace CoreOS, though I'm sure that while at a high level that makes perfect sense there's an arbitrary number of incidental details that make that impractical, as is the way of these things.
- arianvanp 11y agoIt actually has kernel sandboxing built in. You can run nix expressions in linux containers. https://nixos.org/releases/nixos/14.12/nixos-14.12.374.61adf9e/manual/ch-containers.html https://nixos.org/releases/nixos/14.12/nixos-14.12.374.61adf...
- davexunit 11y agoMuch better and not restricted to only containers.
- cwp 11y agoThe appeal of Docker is that containers give you repeatable deployments. Once you have an image, you can deploy it in a well-defined way. But it punts on the question of how you build the image. Nix provides repeatable deployments at the package level. The destination environment can be a user's environment, a container, a VM, a cloud instance, an NixOS machine, an HTTP server or whatever. Once you're using nix, I don't see any point in using Docker. If you're running Mesos or something like that, it might be worthwhile to build containers for deployment, but if all you want is your packages on a server, Nix gives you that out of the box.
- pbowyer 11y agoI wonder what Joyent and/or @bcantrill would say about that? It'd be super-cool to be able to run nix deployments in a Triton (instance|container|whateveritis)!
- cwp 11y agoYeah, Nix on SmartOS would be awesome. With the right filesystem jiggery, the nix store could be shared across zones. That would make the whole system faster and more efficient. Also, specifying a Manta job via next would be amazing. I've brought it up a few times with Joyent folk, but they haven't looked at it seriously. I think they're so spooked by Docker that they can't pay attention to anything else.
- kazagistar 11y agoDocker lets you run arbitrary N to M for Hardware to Software ala virtualization, with low enough overhead. Does Nix have a story for this?
- cwp 11y agoI suppose so. Nix allows me to run N services on M machines arbitrarily with no virtualization and no overhead. My team builds a distributed application. We have nix expressions that define packages for all the parts of the application, and systemd services to run them on NixOS. Using those packages: • Our production deployment is defined by some Nix expressions that assign the services to different machines in the cluster. • Our staging deployment is a Nix expression that runs all the services on a single machine. • Our development deployment is a Nix expression that creates an environment where all dependencies are available and the application can be executed by hand. Nix lets you do what Docker does, but at the package level, with no virtualization.
- ris 11y agoSo, nix actually tries to solve the problem of "what are your dependencies, how are they declared, how are interdependent parts related to each other?" where docker just goes "screw it. nobody's ever going to be able to tame this tangle. let's just throw it all in behind an os container and let it do what it wants" I've recently nixified the (really very complicated) deployment of our main webapp at work and I now have the entire setup of the webapp defined in about 5 .nix files. That's a really relaxing place to be in (compared to how things were before).
- davexunit 11y agoThat was a brilliant description of Docker that reflects precisely how I feel.
- arianvanp 11y agoi think ris's description pretty much covers it. What is cool though is that containers are supported natively in nixos (through systemd) https://nixos.org/releases/nixos/14.12/nixos-14.12.374.61adf9e/manual/ch-containers.html https://nixos.org/releases/nixos/14.12/nixos-14.12.374.61adf... Also, quite similar to 'cloud-config' I guess, there's a way to declaritively describe deployments to your favorite Cloud Provider TM https://nixos.org/nixops/ https://nixos.org/nixops/ As the world is moving to declarative deployments, and once the docker hype settles, I think operating systems like NixOS will prevail as they're a great solution to the problem.
- ambrop7 11y agoSee also NixOps.
- ocharles 11y agoIndeed, it works as nicely as you'd expect! I have a blog post in the pipeline describing how we do deployments... I need to get that pushed out.
- boothead 11y ago... Indeed you do :-)
- deleted 11y ago[deleted]