docker-archive / dockercloud-haproxy

HAproxy image that autoreconfigures itself when used in Docker Cloud
https://cloud.docker.com/
651 stars 187 forks source link

Still experimental in Swarm Mode? #231

Open markrendle opened 6 years ago

markrendle commented 6 years ago

The README hasn't been updated in a while; is this image still considered experimental for Swarm Mode, or is it stable?

Jascen commented 6 years ago

I am also interested in knowing if this is working with Swarm (and offically approved).

markvr commented 6 years ago

We use it with swarm and it works fine. You need to run it on master nodes, and mount the docker socket into the service.

charandas commented 6 years ago

@markvr I am curious if you are using Compose v3 with Swarm. The README only mentions Compose v2 support. I notice that with v3, if I use links, I get messages saying, ignoring links field from docker.

The reason I ask is:

docker deploy file.dab # is experiemental, even though compose v2 is able to provide file.dab

while

docker deploy STACK1 # is not experimental, but requires compose v3

so my clear preference is for the latter, but when I go down that route, the proxy always shows services as unavailable (503s).

I guess, a question for maintainers is, when is Compose v3 support coming? Can we provide cues to the service using some ENV vars instead of using the deprecated links option?

charandas commented 6 years ago

If it helps, I have also gone through the process of making an overlay network and ensuring, that all my services have the networks block referencing that network.

I am running Swarm on rancher with edge Docker (maybe that's not such a great idea), and am opting out of their managed network by using docker commands, specifically to follow the overlay network instructions in the readme.

Jascen commented 6 years ago

@charandas , I was able to successfully get Swarm working with v3. I don't think you should have any problems, however, it is worth noting that I'm using a Fork I made changes to (to support explicit targeting of Services in Swarm/Compose).

markvr commented 6 years ago

@charandas

I'm not really clear what you mean about the compose versions. We use it with docker swarm and overlay networks. I've never used "links" but I think they were deprecated when the overlay network driver was released, so I'd advise against using them.

The instructions for swarm in the readme file worked OK for us.

charandas commented 6 years ago

@Jascen thanks. I will take a look at your fork. Did you add explicit targeting just so that the code/configuration becomes easier to read, or did it actually add functionality?

@markvr excuse my ignorance but I am really new to Swarm, and so far all use cases I have seen of Swarm deployments are using a bundle dab, or a --compose-file file.yml examples.

For some reason, this haproxy container is yet to shine for me in my swarm environment (which is powered by rancher).

markvr commented 6 years ago

Just follow the instructions in the readme file, you don't need to use compose files, dab files or links: https://github.com/docker/dockercloud-haproxy#running-with-docker-swarmmode-swarm-mode