d2iq-archive / mesos-dns

DNS-based service discovery for Mesos.
https://mesosphere.github.com/mesos-dns
Apache License 2.0
483 stars 137 forks source link

Tutorial to run Mesos DNS should not rely on constraints #391

Open ssk2 opened 8 years ago

ssk2 commented 8 years ago

It's bad practice to pin the tutorial to one node - the documentation should suggest how it should be run in production (multiple nodes?) and how you might point an ELB or similar to the DNS servers.

sargun commented 8 years ago

People really shouldn't run Mesos-DNS on Mesos IMHO. Why do you think they should?

ssk2 commented 8 years ago

I wasn't addressing that, more the fact that the tutorial relies upon an anti-pattern for Mesos applications in general.

jazzista88 commented 8 years ago

Hi guys

I am really lost on mesos-dns The tutorial i followed

https://open.mesosphere.com/advanced-course/building-and-running-mesos-dns/

Is not clear enogh. I have done all the steps, but when i run the command, which works on slave command line, in marathon the app goes in running and waiting continuously. I need some suggestions on which kind of IPs addresses i have to use...for instance, in resolv.conf i need to put the private or floating IP ? And in config.json as masters should i set private or public ? Consider that im working on openstack of a private network of a datacenter. Moreover, since on mesos ui the hostnames of slaves were not resolvable, i set in /etc/mesos-slave/hostname the public ip that gives me now resolvable hostnames on mesos, even if have not a name but an address, it's the same i guess right ? So i set in constraints: hostname:CLUSTER:131.154.XXX.XXX Correspondent to the public ip, so the hostname of the slave on which i have mesos-dns. Another question, should the sudo command running both on terminal and marathon ? Or just on one of them?

Thanks to all and best regards

tobilg commented 8 years ago

@sargun Could you please elaborate why people shouldn't use Mesos DNS on Mesos? As I run Mesos DNS in a Docker container on CoreOS, I'd really be interested in potential downsides of this approach.

The motivation behind running it on Mesos in a container is that I don't want the applications I run on my clusters "pollute" the OS installation, that's why I run everything via Docker when possible.

sargun commented 8 years ago

@tobilg You can run into a bootstrapping problem. Since Mesos doesn't have the idea of dependencies yet, if applications inside of your cluster depend on Mesos DNS, and Mesos DNS hasn't yet come up, you can run into a bootstrapping problem.

We specifically don't do it in DCOS because our Mesos agents themselves rely on Mesos-DNS.

tobilg commented 8 years ago

@sargun Thanks for the clarification. I understand that there can potentially be bootstrapping problems, but the question is with how much probability this can occur.

We bootstrap our clusters first (manually, not via DCOS), and then launch the applications. Furthermore, there is a official Mesos DNS Docker image, and the docs mention Docker deployments as well. Maybe this should be changed then.