You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/07/14 17:07:50 UTC

Configured port in mesos healthchecks

How can I best get the healthcheck to use the port that is configured as 
environment the variable TOMCAT_HTTP_PORT? Sort of looking for a 
solution where I put the 8080 once.



{
  "id": "/webchat",
  "user": "nobody",
  "cpus": 1,
  "mem": 256,
  "disk": 0,
  "instances": 1,
  "acceptedResourceRoles": ["*"],
  "upgradeStrategy": { "minimumHealthCapacity": 0, 
"maximumOverCapacity": 0 },
  "constraints": [["hostname","CLUSTER","c04.local"]],
  "backoffSeconds": 10,
  "env": { "TOMCAT_HTTP_PORT": "8080", "OPENFIRE_SERVER": 
"192.168.122.250" },
  "networks": [ 
    { "mode": "container", "name": "cni-apps-gw","labels": {"CNI_ARGS": 
"IP=192.168.122.248"} }
  ],
  "container": {
    "type": "MESOS",
    "docker": {
        "image": "webchat:4.2.0",
        "credential": null,
        "forcePullImage": true
        }
  },
  "healthChecks": [
    {
      "gracePeriodSeconds": 300,
      "intervalSeconds": 30,
      "timeoutSeconds": 5,
      "maxConsecutiveFailures": 3,
      "port": 8080,
      "path": "/webchat/",
      "protocol": "MESOS_HTTP" 

    }
  ]
}