Difference between revisions of "Docker Swarm Classic"
From berki WIKI
Line 21: | Line 21: | ||
116582ce7e0c swarm:latest "/swarm join --adver…" 9 minutes ago Up 9 minutes 2375/tcp swarm-master/swarm-agent | 116582ce7e0c swarm:latest "/swarm join --adver…" 9 minutes ago Up 9 minutes 2375/tcp swarm-master/swarm-agent | ||
88440d8e5e1b swarm:latest "/swarm manage --tls…" 9 minutes ago Up 9 minutes 2375/tcp, 192.168.42.35:3376->3376/tcp swarm-master/swarm-agent-master | 88440d8e5e1b swarm:latest "/swarm manage --tls…" 9 minutes ago Up 9 minutes 2375/tcp, 192.168.42.35:3376->3376/tcp swarm-master/swarm-agent-master | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | # docker info | ||
+ | Containers: 3 | ||
+ | Running: 3 | ||
+ | Paused: 0 | ||
+ | Stopped: 0 | ||
+ | Images: 2 | ||
+ | Server Version: swarm/1.2.9 | ||
+ | Role: primary | ||
+ | Strategy: spread | ||
+ | Filters: health, port, containerslots, dependency, affinity, constraint, whitelist | ||
+ | Nodes: 2 | ||
+ | swarm-master: 192.168.42.35:2376 | ||
+ | └ ID: UVDV:W5VI:NRDU:25KM:43GY:2ZL6:AIBL:TKKL:ASEG:JSMM:6DI5:NLLN|192.168.42.35:2376 | ||
+ | └ Status: Healthy | ||
+ | └ Containers: 2 (2 Running, 0 Paused, 0 Stopped) | ||
+ | └ Reserved CPUs: 0 / 1 | ||
+ | └ Reserved Memory: 0 B / 1.021 GiB | ||
+ | └ Labels: kernelversion=4.9.93-boot2docker, operatingsystem=Boot2Docker 18.05.0-ce (TCL 8.2.1); HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018, ostype=linux, provider=kvm, storagedriver=aufs | ||
+ | └ UpdatedAt: 2018-07-04T20:45:47Z | ||
+ | └ ServerVersion: 18.05.0-ce | ||
+ | worker1: 192.168.42.181:2376 | ||
+ | └ ID: SMB3:EZOK:OZJ7:22W6:3PBB:ZLCF:BUFA:VYMU:PLH5:RWBT:2E7D:GAOT|192.168.42.181:2376 | ||
+ | └ Status: Healthy | ||
+ | └ Containers: 1 (1 Running, 0 Paused, 0 Stopped) | ||
+ | └ Reserved CPUs: 0 / 1 | ||
+ | └ Reserved Memory: 0 B / 1.021 GiB | ||
+ | └ Labels: kernelversion=4.9.93-boot2docker, | ||
</pre> | </pre> |
Revision as of 20:47, 4 July 2018
https://docs.docker.com/swarm/reference/manage/
There are two main options for creating swarm classic cluster.
- We create the physical or virtual environment, and install docker manually. Then the nodes must be added to the cluster also manually.
- We use the docker-machine command with the --swarm options to create new VMs that are part of the swarm cluster out of the box.
A régi swarm használatához szükség van egy 'discovery' szolgáltatásra. Ezek közül kettőt emelnék ki:
- token: egy
# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4d6e01c1b7ce swarm:latest "/swarm join --adver…" 6 minutes ago Up 6 minutes 2375/tcp worker1/swarm-agent 116582ce7e0c swarm:latest "/swarm join --adver…" 9 minutes ago Up 9 minutes 2375/tcp swarm-master/swarm-agent 88440d8e5e1b swarm:latest "/swarm manage --tls…" 9 minutes ago Up 9 minutes 2375/tcp, 192.168.42.35:3376->3376/tcp swarm-master/swarm-agent-master
# docker info Containers: 3 Running: 3 Paused: 0 Stopped: 0 Images: 2 Server Version: swarm/1.2.9 Role: primary Strategy: spread Filters: health, port, containerslots, dependency, affinity, constraint, whitelist Nodes: 2 swarm-master: 192.168.42.35:2376 └ ID: UVDV:W5VI:NRDU:25KM:43GY:2ZL6:AIBL:TKKL:ASEG:JSMM:6DI5:NLLN|192.168.42.35:2376 └ Status: Healthy └ Containers: 2 (2 Running, 0 Paused, 0 Stopped) └ Reserved CPUs: 0 / 1 └ Reserved Memory: 0 B / 1.021 GiB └ Labels: kernelversion=4.9.93-boot2docker, operatingsystem=Boot2Docker 18.05.0-ce (TCL 8.2.1); HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018, ostype=linux, provider=kvm, storagedriver=aufs └ UpdatedAt: 2018-07-04T20:45:47Z └ ServerVersion: 18.05.0-ce worker1: 192.168.42.181:2376 └ ID: SMB3:EZOK:OZJ7:22W6:3PBB:ZLCF:BUFA:VYMU:PLH5:RWBT:2E7D:GAOT|192.168.42.181:2376 └ Status: Healthy └ Containers: 1 (1 Running, 0 Paused, 0 Stopped) └ Reserved CPUs: 0 / 1 └ Reserved Memory: 0 B / 1.021 GiB └ Labels: kernelversion=4.9.93-boot2docker,