Usage example for LAUNCH_EXT_NETWORKS_IPV4
n1nj4888 opened this issue · 4 comments
Am I correct in understanding that the recent LAUNCH_EXT_NETWORKS_IPV4 feature allows for a container launched with swarm-launcher to have a static IPv4 address on the local network, essentially a floating VIP? Ie in the following network scenario, the container could be able to be launched and failover across the swarm nodes with a static IP of say 192.168.1.10 configured?
Network: 192.168.1.0/24
Router: 192.168.1.254 (DHCP Range: 192.168.1.100-200)
Swarm Hosts: 192.168.1.1, 192.168.1.2, 192.168.1.3
if this is the case, could you update the Usage Examples for how this would be configured?
thanks!
Thanks for the question.
I haven't added this to the documentation, because this isn't the use case that's covered by LAUNCH_EXT_NETWORKS_IPV4
, but it's an implementation of the missing feature documented here: moby/moby#24170
When you create a swarm-scoped network, that network is not reachable from the host itself (see also the documentation). Now, if you were to create a macvlan network on every swarm member where you plan to allow your container started by swarm-launcher
to run, in theory it should be possible to do what you describe.
If you try it out and see that it works, I'm more than happy to accept a pull request for the documentation 🙂
Best
ok thanks, I'll give it a try... Am I correct to assume that the VIP will still not be reachable by the host on which it runs (at least not without some manual network routing configuration outside docker on each of the swarm nodes)?
Oh my, this ticket has been 'lost' open for a long time.
I'll close it now. If you have other questions, please feel free to open a new ticket.