gliderlabs / registrator

Service registry bridge for Docker with pluggable adapters
http://gliderlabs.com/registrator
MIT License
4.66k stars 912 forks source link

Feature : Use docker swarm event bus with UCP #422

Open deuch opened 8 years ago

deuch commented 8 years ago

Is it possible to use the docker swarm event API instead of the local engine one ? For UCP, it can be useful to start just a few registrator (1 per project for example with different consul or configuration)

deuch commented 8 years ago

I think i found it :) Using this env variables do the trick with UCP :

DOCKER_HOST=tcp://lb_on_front_of_ucp_controller:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/certs

I uses the volumes ucp-node-certs on each ucp notes as DOCKER_CERT_PATH (external volumes set like this ucp-node-certs:/certs)

With this i can watch events on the swarm cluster and not only the local engine of the registrator. No more need to mount the socket.