Docker Community Forums

Share and learn in the Docker community.

Docker swarm on 2 physical macbooks

Hi,

I have 2 macbooks and I am trying to setup a swarm cluster with the 2 physical hosts acting as master and workers. Is this even possible? (I am unable to find documentation regarding setting up swarm cluster across multiple physical hosts where all the hosts are macs)

On a single machine (using multiple VM’s and through docker-machine) I am able to setup a swarm cluster.
My objective is to start a swarm cluster (either directly on host or through docker machine such that the docker-machine hosts across multiple physical machines can talk to each other)

Any help would be much appreciated.

Thanks

Hi,
If you are using docker-machine and virtualbox to host the docker images on the different physical machines, you might have to look at all the NATting being ok, because that might mess up things badly. When you change the adapter settings on the VM’s to bridge mode (and reboot the image), that should make things easier. Then create the swarm.

I did not try, but running docker for mac on both machines, that shoud be ok in my opnion if no firewalling is active.

Kind regards

Thanks so much @xxradar ! setting network adapter to bridged mode did the trick.
However it seems docker machine is not able to ssh to the VM in bridged mode (is this normal?).

Here’s what I did (for benefit of others)

Macbook 1 - Start a VM in bridged mode , using virtual box login and initialize swarm manager with advertise-addr to the ip from dhcp

Macbook2 - (normal macbook docker (no VM)) join using join token for worker directly

Hi,
a bit late, but can still we useful:

Regards,

@docker4chan Hi, i am trying to setup selenium grid with docker swarm mode on two mac machines but i am gettting ‘Error response from daemon: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp 192.168.99.101:2377: connect: connection refused’ Can you please elaborate what did you do to setup docker swarm on two physical mac books , and i tried to follow your instructions but i am bit confused on network settings part (i.e. Vm on bridged mode ), please help , got stuck here , Thanks a lot in advance .