I am using mesos in a distribtued testing system. While I can specify slave/host resources very easily (on a per slave basis), is there a way I can specify a central resource (saucelab connections) in mesos? I am trying to ensure that at any given time, I don't have more than X amount of that central resource used.
Short answer: Not yet.
We've discussed the idea of cluster-wide resources before, for NAS/SAN I/O, software licenses, or even a pool of IPs, but we don't have a JIRA for it yet. Like any resource, there are a few aspects to consider:
- Registering the resource(s). I could imagine some ResourceProvider other than a Mesos-slave that registers with the master and provides resources that are accessible from some/all slaves and can be consumed by some/any task.
- Allocation: Once the resources are available to Mesos, it should be easy to modify the allocator to allocate, offer, and track the usage of these cluster-wide resources.
- Resource isolation: Once a task launches, we need each slave to be able to enforce the resource limits allocated to a task, or to enforce that a task was not allocated any of that resource. This can be done with custom isolator modules, perhaps packaged (and distributed?) by the resource provider.