Docker Community Forums

Share and learn in the Docker community.

How can I combine cloud and local workers (google, aws..) in Swarm


(Madleeen) #1

Hi,
I am playing around with the swarm (not the RC) and I have 3 local VM - one is swarm manager and the others are workers.
I would like to add third worker node from Google engine instance. But I am not sure how to do it. I can access google instance from my local machines (because I set the rule from my IP range), but not otherwise. So the best way would be to be able to add VM as worker directly by the IP from the swarm manager? (On the swarm manager I perform something like docker swarm join <IP_address_of_googleEngineInstance>:PORT)
Is it possible in 1.11.2 version?


(Nickdoikov) #2

if you have static docker swarm nodes list you can use common swarm .
docker run -tid -p 2377:2375 swarm manage node1_ip:2375,node2_ip:2375,node3_ip:2375 etc…
it named static list swarm . it is simplest swarm use case.
you even do not need to install something from node side - only port opened for swarm manage ip from all nodes side and docker api listening on it.

I don`t think that it is suitable configuration for overlay networks.

also you can use consul as a swarm nodes discovery :