Closed jnonon closed 8 years ago
@jnonon How can I use this with mesos-consul in a docker container? It defaults to localhost and I can't figure out how to make it listen on ${HOST}.
@dpgeekzero If you are planning to deploy via Marathon, is necessary to specify the some parameters explicitly. To run it locally in a container, specify the arguments to the image --healthcheck
and --healthcheck-ip=0.0.0.0
. In the end, the initiaialization will looks something like this:
docker run -p 31113:24476 {YOUR}/{IMAGE} --zk=zk://zookeeper.service.consul:2181/mesos --log-level=WARN --refresh=5s --mesos-ip-order=host,docker --healthcheck --healthcheck-ip=0.0.0.0
if it works, you can test heath check by running curl -i localhost:31113/health
.
@jnonon Thank you, I didn't try 0.0.0.0 as the IP.
@dpgeekzero As a side note, remember that using 0.0.0.0 will bind to every available network interface.
When deploying this service over Mesos + Marathon using a docker container, there is no way for Marathon to know if the service is up and running at any given time. [See http://i.imgur.com/lGnVqZm.png]. In this PR, an optional feature has been added that allows health checks over an specified interface ip and port. Documentation have been updated accordingly.
TODO: