swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

Add template support for network aliases

Open benturner opened this issue 8 years ago • 7 comments

This is at least a piece of #2207...

benturner avatar Jun 13 '17 22:06 benturner

👍 👍

A use-case:

  • deploys a global service named svc1
  • deploy a service named svc2
  • from svc2 wants to contact the container from svc1 that sits on its machine (note: no ports exposed, svc1 and svc2 are in the same network)

If svc1 can template its network-alias, then it can include {{.Node.Id}} such that svc2 can use its node-id to target the svc1 instance in that machine.

cirocosta avatar Jul 20 '17 14:07 cirocosta

Any updates on this? Definetely useful

mustafaakin avatar Oct 06 '17 06:10 mustafaakin

Any update?

iTaybb avatar Mar 08 '18 19:03 iTaybb

?

stepan-romankov avatar Sep 04 '18 08:09 stepan-romankov

I would also like this. Its especially useful, when running a seperate nginx and php service accross multiple nodes. And you only want nginx-node01 to hit php-node01, because you are using an external HOST loadbalancer like Cloudflare. Right now the only option I have is to make a "merged" service, using supervisord, and that doesn't seem very docker like.

firecow avatar Jun 20 '19 07:06 firecow

I would also like to use this to run an Elasticsearch Cluster with Metricbeat

tom-x1 avatar Feb 06 '20 13:02 tom-x1

Any updates??? Using templates and making alias stick to the hostname solves a lot of problems with node-bound software like zookeeper and Kafka

upcFrost avatar May 12 '20 11:05 upcFrost