[Nix-dev] Fwd: NixOps: How do I bind services to internal IP addresses on GCE?
Rob Vermaas
rob.vermaas at gmail.com
Wed Jun 24 09:12:36 CEST 2015
Forgot to include the list:
---------- Forwarded message ----------
From: Rob Vermaas <rob.vermaas at gmail.com>
Date: Wed, Jun 24, 2015 at 7:12 AM
Subject: Re: [Nix-dev] NixOps: How do I bind services to internal IP
addresses on GCE?
To: roconnor at theorem.ca
Hi,
> My question is, is there some way to access the internal IP address of a
> deployed machine so I can add it to my cassandra.yaml file during
> deployment? Alternatively is there some way to have the /etc/hosts
> resolve the machines name, "db", to the internal IP address instead of the
> external IP address? Or is there some other solution to this problem I am
> having?
NixOps provides two options that will allow accessing public and
private IP addresses. In your case you can use networking.privateIPv4.
>From the manual:
===========
networking.privateIPv4
IPv4 address of this machine within in the logical network. This
address can be used by other machines in the logical network to reach
this machine. However, it need not be visible to the outside (i.e.,
publicly routable).
Example: "10.1.2.3"
Declared by:
<nixops/options.nix>
networking.publicIPv4
Publicly routable IPv4 address of this machine.
Example: "198.51.100.123"
Declared by:
<nixops/options.nix>
===========
Cheers,
Rob
--
Rob Vermaas
[email] rob.vermaas at gmail.com
--
Rob Vermaas
[email] rob.vermaas at gmail.com
More information about the nix-dev
mailing list