nixops-aws icon indicating copy to clipboard operation
nixops-aws copied to clipboard

Associate ENIs to a machine using nixops

Open mdallali opened this issue 9 years ago • 9 comments

We have a use case where we access instance privately through directconnect. For this usecase, we use DNS names that resolve to private IP of servers within our VPC. It's of a good use for us to associate to the instances elastic network interfaces in order to keep static private IP addresses in case of instance stop/crash.

I did not find a reference to this in the nixops manual : http://nixos.org/nixops/manual/.

Can we have this feature : attaching an ENI to a VPC instance.

If the feature already exists and I missed it, can someone help on how to do it? Thanks.

mdallali avatar Jun 26 '15 13:06 mdallali

@edolstra, did we make progress on this one? thanks.

mdallali avatar Jul 23 '15 08:07 mdallali

I did some experimentation with attaching ENIs to NixOS EC2 instances, which seems to work fine. You do need to restart dhcpcd after attaching/removing an ENI, though.

Can you say a bit more about your use case? Do you want NixOps to provision ENIs, for instance, or just be able to attach them?

edolstra avatar Jul 23 '15 11:07 edolstra

Well we have Directconnect set up in an account and therefore our apps are accessible internally via a DNS name pointing to the private IP address of instances in the VPC. The thing is that the Private IP addresses would change ifter an instance stop/start. A way to prevent this is by attaching an ENI to each instance so that the Private IPs become static and therefore the DNS names will always point to that unchanged IP address.

Just attaching the ENI would be enough ofr us for now. But having the possiblity to provisions ENI's and configure them with nixops is a very nice thing to have.

Thanks

mdallali avatar Jul 23 '15 13:07 mdallali

I'd like to attach ENI at instance launch. EIP -> ENI -> instance.

ip1981 avatar Mar 29 '16 13:03 ip1981

Changing instance type via nixops is also a problem:

<Message>There are multiple interfaces attached to instance 'i-XXXXXXXX'. Please specify an interface ID for the operation instead.</Message>

ip1981 avatar Mar 29 '16 13:03 ip1981

We currently have the exact same problem. Has there been any progress on this? @ip1981 @mdallali Have you found any solution/workaround?

gilligan avatar Jul 13 '16 12:07 gilligan

Detach an extra interface :-)

ip1981 avatar Jul 13 '16 13:07 ip1981

@ip1981 I don't really know what you mean by that.

I'd like to attach ENI at instance launch. EIP -> ENI -> instance.

I am looking for a way to do exactly that via NixOps.

gilligan avatar Jul 13 '16 13:07 gilligan

Has this ever been implemented? vpc.nix seems to contain at least part of this, but I haven't figured out yet how to build an HTML manual for a recent version of nixops.

coretemp avatar Feb 28 '18 21:02 coretemp