I've setup a scenario with fabio + consul and a custom micro service called "zwitscher-chuck". See the according docker-compose file below:
consul.marathon.mesos:
image: gliderlabs/consul-server:0.6
command: "-data-dir /tmp/consul -bootstrap-expect 1 -server -ui -node=consul-server"
environment:
- GOMAXPROCS=10
ports:
- "8300:8300"
- "8400:8400"
- "8500:8500"
- "8600:53/udp"
fabio.marathon.mesos:
image: magiconair/fabio:latest
volumes:
- "./zwitscher-api-gateway/etc/cluster/fabio.properties:/etc/fabio/fabio.properties"
links:
- consul.marathon.mesos
- zwitscher-chuck.marathon.mesos
ports:
- "9998:9998"
- "9999:9999"
zwitscher-chuck.marathon.mesos:
build: ../services/zwitscher-app-chuck
ports:
- "12340:12340"
environment:
- PORT=12340
- CONSUL=consul.marathon.mesos:8500
links:
- consul.marathon.mesos
Fabio is configured to use the remote consul server (consul.marathon.mesos). The "zwitscher-chuck" registers itself at consul with the fabio service tag "urlprefix-/chuck". After that everything is fine: The service is registered at consul and healthy and I can see a route at the fabio web UI. But I can't call the "zwitscher-chuck" service because fabio uses the consul IP in the destination URL and not the IP of the "zwitscher-chuck" container. Can I enhance the fabio service tag with the destination IP to fix this?
I've setup a scenario with fabio + consul and a custom micro service called "zwitscher-chuck". See the according docker-compose file below:
Fabio is configured to use the remote consul server (consul.marathon.mesos). The "zwitscher-chuck" registers itself at consul with the fabio service tag "urlprefix-/chuck". After that everything is fine: The service is registered at consul and healthy and I can see a route at the fabio web UI. But I can't call the "zwitscher-chuck" service because fabio uses the consul IP in the destination URL and not the IP of the "zwitscher-chuck" container. Can I enhance the fabio service tag with the destination IP to fix this?