I'm running Mesos and Ceph clusters on CoreOS with a working Ceph RBD Docker volume plugin, but it's very unclear to me how this can be used with Mesos/Marathon... Creating/using rbd
volumes for single Docker containers is working flawlessly though.
I can find no article/blog post/whatever that deals with the automated creation (and, in case of "task migration" between Mesos slaves, remapping) of these volumes via Marathon. Especially important to me is how to run multiple instances of a stateful service when each instance needs to have it's own volume (imagine a MongoDB ReplicaSet on Mesos/Marathon).
I know the Mesos persistent volume docs, and I also saw the Marathon issue, but still I'm very confused how or when this will be usable...
There are also other questions here on SO:
- How to use volumes-from in marathon
- Docker on Mesos: Volume is placed on which node?
- Docker volume plugin marathon
which unfortunately don't really have an answer to this specific problem.
The EMC Code example with RexRay also only covers a single instance example, which I could also handle with ease with the volume plugin mentioned above:
{
"id": "nginx",
"container": {
"docker": {
"image": "million12/nginx",
"network": "BRIDGE",
"portMappings": [{
"containerPort": 80,
"hostPort": 0,
"protocol": "tcp"
}],
"parameters": [{
"key": "volume-driver",
"value": "rbd"
}, {
"key": "volume",
"value": "nginx-data:/data/www"
}]
}
},
"cpus": 0.2,
"mem": 32.0,
"instances": 1
}
The nginx-data
volume would be created automatically in this case. But what if I want to use persistent volumes and multiple instances?