Last active
August 29, 2015 14:19
-
-
Save darron/cde9aa8cb219fb705747 to your computer and use it in GitHub Desktop.
Cannot get my swarm talking to all nodes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@oswarm1:~# docker version | |
Client version: 1.6.0 | |
Client API version: 1.18 | |
Go version (client): go1.4.2 | |
Git commit (client): 4749651 | |
OS/Arch (client): linux/amd64 | |
Server version: 1.6.0 | |
Server API version: 1.18 | |
Go version (server): go1.4.2 | |
Git commit (server): 4749651 | |
OS/Arch (server): linux/amd64 | |
# All nodes joined like this: | |
export PRIVATE_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address) | |
export SWARM_TOKEN="swarm-token-went-right-here" | |
docker run -d swarm join --addr=$PRIVATE_IPV4:4243 token://$SWARM_TOKEN | |
root@oswarm1:~# docker run --rm swarm list token://$SWARM_TOKEN | |
10.132.38.99:4243 | |
10.132.38.96:4243 | |
10.132.37.251:4243 | |
root@oswarm1:~# curl -s https://discovery-stage.hub.docker.com/v1/clusters/$SWARM_TOKEN | |
# ["10.132.38.99:4243","10.132.38.96:4243","10.132.37.251:4243"] | |
root@oswarm1:~# docker -H tcp://10.132.38.99:4243 ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
fc08910ed660 swarm:latest "/swarm join --addr=" 7 minutes ago Exited (137) 6 minutes ago kickass_pasteur | |
root@oswarm1:~# docker -H tcp://10.132.38.96:4243 ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
6ec0e493dbad swarm:latest "/swarm manage token" 7 minutes ago Exited (137) 6 minutes ago happy_kirch | |
79e5b96e0bb1 swarm:latest "/swarm join --addr=" 7 minutes ago Exited (137) 6 minutes ago loving_stallman | |
root@oswarm1:~# docker -H tcp://10.132.37.251:4243 ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
746b47f6e731 swarm:latest "/swarm manage token" 6 minutes ago Up 6 minutes 0.0.0.0:2375->2375/tcp adoring_bohr | |
081dea2fc6ad swarm:latest "/swarm join --addr=" 9 minutes ago Exited (137) 6 minutes ago compassionate_yalow | |
0141a46355fb swarm:latest "/swarm join --addr=" 11 minutes ago Exited (1) 11 minutes ago cocky_sammet | |
root@oswarm1:~# docker -H tcp://0.0.0.0:2375 info | |
Containers: 2 | |
Strategy: spread | |
Filters: affinity, health, constraint, port, dependency | |
Nodes: 1 | |
oswarm3: 10.132.38.96:4243 | |
└ Containers: 2 | |
└ Reserved CPUs: 0 / 1 | |
└ Reserved Memory: 0 B / 1.019 GiB | |
root@oswarm1:~# docker -H tcp://0.0.0.0:2375 ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
6ec0e493dbad swarm:latest "/swarm manage token" 6 minutes ago Exited (137) 5 minutes ago oswarm3/happy_kirch | |
79e5b96e0bb1 swarm:latest "/swarm join --addr=" 6 minutes ago Exited (137) 5 minutes ago oswarm3/loving_stallman |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment