Docker:Swarm
Current versions of Docker include swarm mode for natively managing a cluster of Docker Engines called a swarm. Use the Docker CLI to create a swarm, deploy application services to a swarm, and manage swarm behavior.
Display and rotate the root CA
만약 스웜이 초기화되지 않았다면 다음과 같은 메시지가 출력된다.
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
초기화(docker swarm init
하거나 스웜에 참여docker swarm join
해야 한다.
Initialize a swarm
초기화에 성공하면 다음과 같이 출력된다.
Swarm initialized: current node (4mu50fuj9paosdcor6sjsi4bp) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-67muwgaig1jyfnpzmyn2yj55o2fcxx1awlrta28ssgwgf9v25i-aal0nt4ytluxowo8g70malidi 192.168.70.21:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
스웜에 참여하고 싶은 PC에서 위에 출력된 docker swarm join ...
명령을 복사하고 실행하면 된다.
docker swarm join --token SWMTKN-1-67muwgaig1jyfnpzmyn2yj55o2fcxx1awlrta28ssgwgf9v25i-aal0nt4ytluxowo8g70malidi 192.168.70.21:2377
공시 주소 (advertise addr)
Join a swarm as a node and/or manager
docker swarm join --token SWMTKN-1-67muwgaig1jyfnpzmyn2yj55o2fcxx1awlrta28ssgwgf9v25i-aal0nt4ytluxowo8g70malidi 192.168.70.21:2377
Leave the swarm
Swarm 에서 노드를 선택하는 방법
Take a look at the Swarm filter docs. You can set various constraints on what node Swarm should pick for any given container. For your case try something like:
This would start the container on node1
.
Docker Swarm 구성 확인
Container orchestration
Tools
See also
Favorite site
- Docker Swarm vs. Kubernetes
- About Docker Swarm (ko)
- Docker Swarm: Docker Swarm 간략한 소개 및 설치 가이드
- arisu1000.tistory.com: Docker Swarm
- [추천] Slideshare: 오픈소스컨설팅: Docker on Cloud(Digital Ocean)
- Docker Swarm
- Orchestration을 위한 Machine, Swarm, Compose 발표
- DevOps with Docker
- 스타트업을 위한 DevOps 환경 - Docker 인프라
- [추천] Docker Swarm을 이용한 쉽고 빠른 분산 서버 관리 1
- [추천] 도커를 이용한 웹서비스 무중단 배포하기 2
- Blue-Green Deployment 항목을 참조.