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

2017-04-03 Thread Danylo Hlynskyi
You may be interested in
https://github.com/NixOS/nixpkgs/issues/18355#issuecomment-288903363

But perhaps the easiest option would be to generate container .conf file
via `environment.etc."containers/***.conf"`, if you control host.

2017-04-03 21:57 GMT+03:00 Bas van Dijk :

> 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..localAddress
>
> Is there a way to override the computed IP address with a user supplied
> address for imperative containers deployed using nixops?
>
> Cheers,
>
> Bas
>
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


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

2017-04-03 Thread Bas van Dijk
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..localAddress

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

Cheers,

Bas
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev