nix-community / nixops-digitalocean

NixOps Digitalocean plugin [maintainer=@Kiwi]
GNU Lesser General Public License v3.0
19 stars 10 forks source link

Replace `nixos-infect` with image-based droplet instantiation #3

Open ixxie opened 4 years ago

ixxie commented 4 years ago

Using nixos-infect is slow, so considering alternatives is worthwhile.

It seems there is relatively fresh work supporting builds of a NixOS image specifically for Digital Ocean - https://github.com/NixOS/nixpkgs/pull/66978

Quoting @infinisil on this Reddit thread:

To use it, include this in some default.nix file:

{
  imports = [
    <nixpkgs/nixos/modules/virtualisation/digital-ocean-image.nix>
  ];
}

then run this to build the image:

nix-build '<nixpkgs/nixos>' --arg configuration ./default.nix -A config.system.build.digitalOceanImage

So we could use a CI/CD pipeline to build such an image and host it as a release on Github, and then leverage python-digitalocean's Image submodule to push it to their project. This would allow NixOS droplets to be created way more rapidly than they currently are.

mmahut commented 4 years ago

I would love to see this. @grahamc is it something maybe hydra and existing nixos.org infrastructure could do for us?

ixxie commented 4 years ago

Lets indeed see if this can be done in Hydra; would be nice to avoid the hassle of managing the builds ourselves.

ixxie commented 4 years ago

@grahamc pointed out Hoverbear has their own image as well: https://github.com/Hoverbear-Consulting/nixos-digitalocean

They host a build of that image too, but its unclear how often its updated.