-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support docker-swarm #1795
Comments
Currently dokku is a single host solution. I think deis is the proposed multi host alternative, currently. I know some folks have been tinkering a bit with swarm and dokku but not sure where all that stands. I would definitely be interested in helping to spec out a swarm implementation, though. Would you mind linking to that document from docker? |
@michaelshobbs We are trying to use deis to run a PaaS but it has no concept of addon or plugin in deis, which means I can just run a web application without cache, database. |
@aisensiy I don't think there is currently a way to script set the I'll try and see if I can set this up this weekend, would be interesting. |
@josegonzalez Thanks for your reply, I tried with |
I've played with this quite a bit, being able to have dokku running in a "swarmy", however most of the time gives me errors on not being able to find the image in the host, and I stopped there. I assume it has to do with the cleanup it runs on deploy. Anyways, I did have to modify dokku itself, so there's no easy way so far. |
@blackxored what did you do to modify dokku? I'm definitely into any changes necessary. One thing I think that might be a PITA is that images are built on a single box, and I don't know if swarm knows how to locate "local" images. Might that be the reason why you can't easily scale up/down instances? Seems related: docker-archive/classicswarm#806 Not sure of a good way to get around ^ if that is a real issue, other than creating a registry, pushing the image there, then scaling... |
@josegonzalez In 360 view I had to pass/obey/verify DOCKER_HOST, DOCKER_TLS_VERIFY, plus DOCKER_CERT_PATH, had to have it respect custom-made overlay net $DOCKER_NETWORK_NAME, and due to the nature of multi-host, disable the host's nginx altogether and run it in a container instead (mounting /etc/nginx and /home/dokku as volumes). Anyways, between the volatile image errors on deployment and the fact that I was half-way through and clueless into having it send the right IP to nginx's configuration template I kinda gave up at the moment. |
I was running into issues with the IP addresses, and it seems that it's using an incorrect/outdated syntax for retrieving the container's IP Address. In multi-host networking `NetworkSettings.IPAddress` is empty. The docker documentation at https://docs.docker.com/engine/reference/commandline/inspect/ uses a different syntax which I've tested to work both on multi-host and standard bridge networking. If you're interested in the other issues and the work/hacks I've been doing related to dokku#1795, let me know. In the meantime, I think this fix is needed.
The ghost images issues might have to do with the cleanup dokku does everytime, can someone confirm? dokku/plugins/common/functions Line 355 in c561a8b
|
Image cleanup happens before a deploy for previously used images (that aren't attached to containers), so I doubt it. |
Because the cluster manager presents itself just like the standard docker cli (dokku just wraps the cli today) I was able to get dokku/swarm working with only minor work. The biggest issue for dokku is that we configure a local nginx server. Disabling nginx and moving to another routing mechanism that would allow routing to any backend server would be required. Moving forward, we also need to remove the assumption that you're always on the same machine from dokku plugins. But that might not be a blocker for core. |
Could we use |
@u2mejc mind wrapping up your changes to dokku to get initial support going? Would be good since in 0.5.x, we're going to have the ability to disable the nginx proxy (and potentially support alternative proxies...). |
Okay, I looked more into swarm because I have a need for this at work. Some thoughts:
|
@josegonzalez maybe the "affinity" flag could help with the image location issue (at least partially for a single container instance)? See https://docs.docker.com/swarm/scheduler/filter/ |
Yeah but that doesn't really gain you anything other than now you have swarm on a single instance. |
I'm hoping to take a look at this pretty soon. I think it'll be doable without too much modification to Dokku. |
Fix the docker swarm documentation, which is better than misleading users while we investigate support. Refs dokku/dokku#1795
I'm going to close this issue for the following reasons:
For the record, I have already opened issues that would get us partially there - the If you'd like to work on this feature, a pull request that aligns with the above thoughts would be great (feel free to pm me with questions!). Otherwise, I think it's in the project's best interest to remain simple in this area. |
I read the document in docker it said that it is possible to use dokku with swarm and I install dokku and a 3-node swarm cluster with vagrant and is there some method to let dokku's default docker host is the cluster?
The text was updated successfully, but these errors were encountered: