How are you launching your tasks and are they containerized? If you use your own framework and launch tasks in containers, you can configure the networking mode as BRIDGED (in ContainerInfo), and your Framework will obtain (in the response / callback it receives after the task is launched) the port (and will already know the hostname/ip of the Agent whose Offer it accepted) - this information can then be fed to whatever discovery mechanism you use (or, more trivially, in the Framework's Web UI - which itself can be advertised to the Master - via the `webui_url` field in the FrameworkInfo protobuf [0]
I don't know enough of Marathon to really be able to help there - but if you post the question in their user group, I'm sure there's a less involved way to do this if you use it. :) [0] ./include/mesos/mesos.proto LL #206 -- *Marco Massenzio* http://codetrips.com On Thu, Feb 11, 2016 at 9:27 PM, Jeff Schroeder <[email protected]> wrote: > With a few of the newly added features, marathon-lb is actually a pretty > elegant solution: > > https://github.com/mesosphere/marathon-lb > > > On Thursday, February 11, 2016, Alfredo Carneiro < > [email protected]> wrote: > >> Hi guys, >> >> I have been searching for the past few weeks about Mesos and VHosts, >> saddly, I have not found anything useful. >> >> I have a mesos cluster running some webapps. So, I have assigned specifc >> ports to these apps, so I access this apps using >> *http://<mesos-master-ip>:<app-port>*. How could I use Virtual Hosts to >> access these apps? *http://myapp.com <http://myapp.com>*? >> >> 1x Mesos Master with HAProxy and Chronos >> 9x Mesos Slave with Docker >> >> Thanks, >> >> -- >> Alfredo Miranda >> > > > -- > Text by Jeff, typos by iPhone >

