docker - Should Swarm Master Join As Node in a Single Node Cluster? -
we building small cluster, , (strange) requirement setup in 1 machine, other machines can join in future.
i set consul with:
docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap
and master with:
docker run -d -p 4000:4000 swarm manage -h :4000 --advertise <ip_here>:4000 consul://<ip_here>:8500
where docker run with:
sudo docker daemon -h tcp://0.0.0.0:2375 -h unix:///var/run/docker.sock
and docker -h :4000 info
lists nodes 0 @ stage, cannot run images docker -h :4000 run <image>
because no healthy node available in cluster.
when join master node cluster with:
docker run -d swarm join --advertise=<ip_here>:2375 consul://<ip_here>:8500
then docker -h :4000 info
lists nodes 1, , can run containers.
please note <ip_here>
refers same ip of machine.
is intended behaviour? if not, doing wrong?
after seeing docker machine's way of creating swarm cluster, using swarm integrated docker v1.12.0, wanted post update. swarm master join swarm cluster, running 2 containers, agent , master.
Comments
Post a Comment