It is possible to start app on Mesos with Marathon on ports which range I set? . For example I want start this app:
{
"id": "http",
"cmd": "python -m SimpleHTTPServer $PORT",
"mem": 50,
"cpus": 0.1,
"instances": 1
}
only on posts from this range [31000 - 31010]. it is possible?
This is not directly supported, but you can achieve through Mesos resource roles.
When you start a Mesos Slave, you can specify a list of resources and the roles they belong to (http://mesos.apache.org/documentation/attributes-resources/). If you specify that the port range [31000 - 31010] belongs to a specific role, then you can tell Marathon (via the acceptedResourceRoles attribute) to schedule the tasks using only offers belonging to that role.