question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker Swarm on top of Mantl

See original GitHub issue

Why

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:closed
  • Created 7 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
langston-barrettcommented, May 18, 2016

@moretea @distributorofpain @lguminski I put in a PR and would love some feedback!

0reactions
distributorofpaincommented, May 10, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swarm mode overview - Docker Documentation
Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior. Docker Swarm mode is built...
Read more >
Administer and maintain a swarm of Docker Engines
Docker manager nodes store the swarm state and manager logs in the /var/lib/docker/swarm/ directory. This data includes the keys used to encrypt the...
Read more >
Swarm mode key concepts - Docker Documentation
A swarm consists of multiple Docker hosts which run in swarm mode and act as managers (to manage membership and delegation) and workers...
Read more >
Manage nodes in a swarm - Docker Documentation
After a node leaves the swarm, you can run the docker node rm command on a manager node to remove the node from...
Read more >
Deploy services to a swarm - Docker Documentation
Swarm services use a declarative model, which means that you define the desired state of the service, and rely upon Docker to maintain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found