Docker Swarm on top of Mantl
See original GitHub issueWhy
I propose that support for Docker Swarm should be added to Mantl. By having Swarm on Mantl, all the (available) resources on a cluster are exposed via the Docker API directly. Developers are already used to this API / model of working.
Swarm is ideal to run one-time-jobs in production easily. Think about database migrations (which could be run detached), or running some interactive script to generate a report (in which the attached input/output is really usefull).
Finally, Swarm could allow for easy development of microservices on top of Mantl. A developer could write the code for microservices on his local MackBook Air, and use Docker Compose to start a set of microservices via Swarm on top of Mantl, which would use way more memory and CPU than his MacBook Air could provide.
How
Swarm registers itself as a Mesos framework, uses it to allocate resources and uses the Docker Executor to start containers. So far, so good! However, it also requires access to the Docker API on each worker node to provide services like pulling/pushing of images and showing the logs. At the moment, only the /var/run/sock
unix domain socket is enabled in Mantl. To expose the Docker API in a secure way, I propose to add a proxy container (just like is done with Consul), to avoid some issues in Swarm [1].
Furthermore, Mesos Framework authentication should be implemented in Swarm [2]. After some investigation, It appears that adding this will take about 100 lines of Go code.
To make sure that a crash of a single Swarm daemon does not take down all containers started via Swarm, Swarm’s high availability option should be used [3]. I suggest that Swarm should run on each Mesos master node, to provide the same level of availability as Mesos itself.
[1] https://github.com/docker/swarm/issues/1089 [2] https://github.com/docker/swarm/issues/1944 [3] https://docs.docker.com/swarm/multi-manager-setup/
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (8 by maintainers)
@moretea @distributorofpain @lguminski I put in a PR and would love some feedback!
Second set of eyes thing 😃
I just started playing with docker last week. I had to setup a registry and client to test it. I really like docker, i can see why people are running with it. Heck even mantl brought in kubernetes now 😃
I saw the demo on youtube of docker swarm running on messoshpere, very impressive. Everyone is really charging forward with this stuff.