[Nix-dev] nixops: how to deploy containers with specified IP addresses

Bas van Dijk v.dijk.bas at gmail.com
Mon Apr 3 20:57:58 CEST 2017


Dear list,

I have a nixops deployment configuration where the machines are configured
to run in a container on localhost:

  deployment.targetEnv = "container"

When deploying the configuration a machine gets the IP address 10.233.n.2
where n is the order in which the machines got deployed. Since this happens
in parallel the IP addresses are nondeterministic. I see that this is
happening here:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/virtualization/nixos-container/nixos-container.pl#L155

With declarative containers user can specify the address using:

  containers.<name>.localAddress

Is there a way to override the computed IP address with a user supplied
address for imperative containers deployed using nixops?

Cheers,

Bas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170403/8f581ad1/attachment.html>


More information about the nix-dev mailing list