You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.
What I an trying to do is have both docker manager and docker workers have a pre-selected token they can use so I don't need to docker ssh and run further commands. The docs seem to support that process with the --swarm-discovery flag with a token.
I can run docker-machine ssh but when I run docker node ls it says 'This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.' and then I need to run docker swarm init.
However, looking at processes I see this: /swarm manage --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -H tcp://0.0.0.0:3376 --strategy spread --advertise 192.168.99.100:3376 token://b4e72945cb52c1324REDACTED
The same issue happens when I try to run docker-machine create --swarm --driver virtualbox --swarm-discovery "token://b4e72945cb52c1324REDACTED" worker1 in that it does not automatically join the swarm... I have to ssh and run docker join.
Thus, I don't see the point of the --swarm-discovery flag using the token protocol.
$ docker -v
Docker version 1.12.1, build 6f9534c
$ docker-machine -v
docker-machine version 0.8.1, build 41b3b25
The text was updated successfully, but these errors were encountered:
You are mixing "classic swarm" (https://github.com/docker/swarm) and "swarm mode" (introduced in 1.12 and bundled into the engine).
To use "classic swarm" you do eval $(docker-machine env --swarm manager). If you want to use the new swarm mode features you have to run init and join commands on the vbox nodes yourself -- thanks
@nathanleclaire It took me a long time to find out how to config a swarm mode in using docker-machine. It doesn't seem necessary because the new mode is simple enough thanks your comment.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What I an trying to do is have both docker manager and docker workers have a pre-selected token they can use so I don't need to
docker ssh
and run further commands. The docs seem to support that process with the --swarm-discovery flag with a token.docker run swarm create
Use that token below in the next command:
docker-machine create --swarm-master --swarm --driver virtualbox --swarm-discovery token://b4e72945cb52c1324REDACTED manager2
docker-machine ssh
but when I rundocker node ls
it says 'This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.' and then I need to run docker swarm init.However, looking at processes I see this:
/swarm manage --tlsverify --tlscacert=/var/lib/boot2docker/ca.pem --tlscert=/var/lib/boot2docker/server.pem --tlskey=/var/lib/boot2docker/server-key.pem -H tcp://0.0.0.0:3376 --strategy spread --advertise 192.168.99.100:3376 token://b4e72945cb52c1324REDACTED
docker-machine create --swarm --driver virtualbox --swarm-discovery "token://b4e72945cb52c1324REDACTED" worker1
in that it does not automatically join the swarm... I have to ssh and run docker join.Thus, I don't see the point of the --swarm-discovery flag using the token protocol.
The text was updated successfully, but these errors were encountered: