nicholasjackson / demo-consul-service-mesh

Demos built using Docker Compose showing Consul Service Mesh features
144 stars 50 forks source link

Docker Swarm Consul Setup #14

Open devilmind81 opened 3 years ago

devilmind81 commented 3 years ago

Hi, I tested the uses cases of this demo, on k8s and on a local docker installation, and all works great as expected. I need to test it on a Docker Swam also but unfortunately I'm encountered a problem at the first step. I cannot use the compose on the repo because "network_mode:" isn't supported by swarm. Then, while in the docker local test I forced to apply the container network configuration manually, it is not clear if is possible to have that automated in SWARM. For example, how could I manage the static ip for my container on docker swarm using an overlay network? I could implement a script that at the bootstrap will set my eth0 but not seems the best approach, and this it would force me to use a custom docker image. There is a possibility to configure a sort of auto-registration of the consul-envoy-proxy to the consul server within Docker Swarm? (Something like auto-injection in k8s)Maybe I could install consul CLI and run it at bootstrap? It is not thinkable for me to imagine a design where I must manage each IP of my service mesh network manually. If you have tested Consul on SWARM infrastructure and can link me to a documentation/example, will be very appreciated because I cannot find anything about the setup on SWAM infrastructure.

Thanks in advance. Have you a nice day!