4 ms·
Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abst
by haolez 7y ago
Forgive me for using buzzwords, but what's the "cloud native" story on NixOS? Can I easily create containers and update my orchestrator's deployment? Can I abstract things like AWS Lambdas into this immutable build structure?
- bennofs 7y agoYou can build docker images with Nix (https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools), but right now it wouldn't make much sense to use the NixOS modules (like nginx) for that. The modules in NixOS assume a systemd based environment and are thus not suitable for use in containers (in the end, most service modules generated systemd units). What you can do, though, is use Nix to build a container image with an nginx config. You just can't use the abstractions present in NixOS as-is to generate the nginx config, you'd have to write the nginx config yourself (just as you would if you use a Dockerfile). You could perhaps re-use parts, or modify the NixOS modules, though.
- slobotron 7y agoWe are using Continix[0] to package up regular NixOS modules in docker [0] https://github.com/notgne2/continix https://github.com/notgne2/continix
- jarvuschris 7y agoChef Habitat might be more what you're looking for in that regard, it very much feels like an intellectual derivative of NixOS and focuses on the cloud native story
- wyager 7y agoNot having used it, maybe NixOps is the thing you want.
- haolez 7y agoI think it's more geared towards creating VM instances. I'm thinking about other resources as well, such as Lambdas.
- arianvanp 7y agoI would say Nix's cloud native story is "best in class". you can take any nixos configuration and turn it into a cloud image https://github.com/nix-community/nixos-generators https://github.com/nix-community/nixos-generators You can take any nix package and turn it into a docker image https://news.ycombinator.com/item?id=20720922 https://news.ycombinator.com/item?id=20720922 https://news.ycombinator.com/item?id=18111954 https://news.ycombinator.com/item?id=18111954 You can even use Nix to create and deploy cloud resources ala Terraform: github.com/nixos/nixops Some other notable uses of Nix in cloud native landscape: https://github.com/saschagrunert/kubernix https://github.com/saschagrunert/kubernix - a KIND alternative https://github.com/xtruder/kubenix https://github.com/xtruder/kubenix a Nix DSL for defining and deploying entire kubernetes clusters + deployments (combines nix's docker image building support and deployment support for and end to end cloud-native solution) I personally think Nix should heavily market itself to the CLoud Native buzzword hype train. as it's my favourite weapon in this space
- kalium-xyz 7y agoI switched to using Pulumi from NixOps because of the lack of tooling in the Nix ecosystem (also NixOps is frequently broken in all sorts of ways due to not having as large a community). Is there some ideal way to work with it to get it to behave without having to make your own tooling or would you consider my approach to instead create support for Nix in Pulumi (which I have not done as of yet but there are terraform packages so I'm hopeful on the feasibility of this project)?
- catern 7y agoI think it would be great to have a Pulumi-based Nix deployment stack. I think Nix/Nixpkgs/NixOS are great, and by far the best way to package applications. But NixOps, I think, is a mistake - it's an over-extension, the technologies behind Nix are perfect and way better than anything else for package management, but merely OK for host management. I actually think Pulumi has some better ideas for this, so it would be cool to use Pulumi to orchestrate deployment of Nix/NixOS stuff.
- 7y ago
- ghuntley 7y agohttps://grahamc.com/blog/nix-and-layered-docker-images https://grahamc.com/blog/nix-and-layered-docker-images