Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to setup docker-vernemq on Docker Swarm #43

Closed
mitchellvanrijkom opened this issue Apr 6, 2018 · 7 comments · Fixed by #145
Closed

How to setup docker-vernemq on Docker Swarm #43

mitchellvanrijkom opened this issue Apr 6, 2018 · 7 comments · Fixed by #145

Comments

@mitchellvanrijkom
Copy link

Environment

VerneMQ Version: None
OS: Docker Swarm (Docker images based on Alpine or Ubuntu)
Erlang/OTP version (if building from source):

Expected behavior

3 node VerneMQ cluster running in Docker Swarm with Docker services/stacks

Actual behaviour

Unknown. I can't find this use case in the documentation and it would be very, very nice to have it!
There is some documentation about starting a Docker container. But Docker swarm works with services/stacks that are available between the nodes.
Is it even possible to run as a service/stack or do you have start it manually on different servers?

We are comparing different MQTT brokers and those who appeal to us the most are VerneMQ and EMQ. We would like to run it in our production system but want to have native Docker Swarm support.

Thanks in advance!

@ioolkos
Copy link
Contributor

ioolkos commented Apr 20, 2018

Hey @mitchellvanrijkom totally sorry, missed your issue here somehow. My apologies.
Let's see. What would native Docker Swarm support mean? is there anything specific we'd need to enable or script?

@mitchellvanrijkom
Copy link
Author

Hey @ioolkos No problem! Thanks for the reply.
Docker Swarm is a clustering and orchestration tool for running Docker containers in Services.
https://docs.docker.com/engine/swarm/
To make use of scaling applications and enable load-balancing in the swarm we use Docker Services. This is one level up in the hierarchy of a distributed application of docker. See, https://docs.docker.com/get-started/part3/.

What we would like is when we have deployed VerneMQ broker as a Service. We want to make use of the scaling functionality in docker swarm to scale the numbers of running containers to autojoin a VerneMQ cluster by a simple command instead of defining own containers with the docker run command. See Docker documentation about scaling a service: https://docs.docker.com/engine/swarm/swarm-tutorial/scale-service/. When you want to use Autojoining you are required to set a IP-address of the first VerneMQ container. In a Docker swarm we can make use of Service discovery. Swarm manager nodes assign each service in the swarm a unique DNS name and load balances running containers. You can query every container running in the swarm through a DNS server embedded in the swarm. Thereby no need to set an IP-address.

Let me know if i am unclear in my explanation.

Thanks in advance!

@dergraf
Copy link
Contributor

dergraf commented Jun 26, 2018

@mitchellvanrijkom I guess this issue might be solved as part of our work in https://github.com/vernemq/vmq-discovery cc: @ioolkos, @codeadict

@codeadict
Copy link
Contributor

codeadict commented Jun 26, 2018 via email

@didasy
Copy link

didasy commented Dec 26, 2018

Any update for this? I've looked at vmq-discovery but the repo is so bare.

@codeadict
Copy link
Contributor

codeadict commented Dec 26, 2018 via email

@didasy
Copy link

didasy commented Jan 7, 2019

@codeadict sadly I don't know Erlang yet. Thanks anyway, keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants