mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

should consul have any port? #74

Open bravowhale-jenkins opened 8 years ago

bravowhale-jenkins commented 8 years ago

i build consul in docker ,and run it on marathon, i'm a little confused ,should consul expose some port like mesos-dns , and should i change the /etc/resolve.conf ,point the nameserver to consul's IP , and i see consul-temples the command like this

$ consul-template \ -consul 127.0.0.1:8500 \ -template "/tmp/template.ctmpl:/var/www/nginx.conf:service nginx restart" \ -retry 30s \ -once

is the port 8500 belong to consul ?

mhamann commented 7 years ago

Yes, port 8500 belongs to Consul's REST API. It also optionally exposes a DNS listener in port 8600. You can use that to do things like DNS SRV requests to get host/port info for deployed services.

If you want to use Consul DNS, then you should deploy dnsmasq, point /etc/resolv.conf to the dnsmasq ip / port, and then set up dnsmasq to use consul's port 8600 to route all service.consul. domains to that DNS server, leaving all of the other DNS requests alone.

Theaxiom commented 7 years ago

Thanks @mhamann 👍

thomasvincent commented 7 years ago

can this be closed out and or added to the wiki?