Commit 02dacb5b authored by JooHan Hong's avatar JooHan Hong

docker-swarm 오타수정

parent 49be33d6
Pipeline #5185 passed with stages
in 51 seconds
......@@ -252,9 +252,71 @@ RUN echo "hongsnet, 2020-01-20(d7f4a64cc6098bd61af337e0c822bc53c5ed35b7)" > /roo
```
# Swarm Manager Review
- **docker-stack.yml**
- STEP X : Swarm Manager 시스템에서 최종 상태를 Review 한다.
```bash
# cat docker-stack.yml
version: '3'
services:
hongsnet:
image: registry.hongsnet.net/joohan.hong/docker/hongsnet:latest
volumes:
- "/WEB_SRC/config/passwd:/etc/passwd"
- "/WEB_SRC/config/group:/etc/group"
- "/WEB_SRC/config/shadow:/etc/shadow"
- "/WEB_SRC/home:/home"
- "/WEB_DATA/EDU/Data:/home/edu/public_html/HongsBoard/Data"
- "/WEB_DATA/EDU/Web_editor/EDU:/home/edu/public_html/HongsBoard/Web_editor/EDU"
- "/WEB_DATA/EDU/Web_editor/FILE:/home/edu/public_html/HongsBoard/Web_editor/FILE"
- "/WEB_DATA/HONGSNET/Data:/home/hongsnet/public_html/Data"
- "/WEB_DATA/HONGSNET/Web_editor/FILE:/home/hongsnet/public_html/Web_editor/FILE"
- "/WEB_DATA/NEWHONGSYSTEM/Data:/home/newhongsystem/public_html/Data"
- "/WEB_DATA/NEWHONGSYSTEM/Web_editor/FILE:/home/newhongsystem/public_html/Web_editor/FILE"
ports:
- "80:80"
deploy:
#mode: replicated
#replicas: 3
mode: global
placement:
constraints: [node.hostname != TB2-DOCKER]
update_config:
parallelism: 5
delay: 10s
restart_policy:
condition: on-failure
max_attempts: 3
window: 120s
```
> `global mode`를 사용한다. 이는 Front-End에 Load Balancer(HA-Proxy)로 구성된 구조에 따른 것이다.
- **Docker Swarm Node status**
```bash
# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
bb6yuipq9ja8llzi25owyz1a2 TB2 Ready Active Reachable 20.10.2
5mtd5wiql2cqnh5088p8036by * TB2-DOCKER Ready Active Leader 20.10.2
m1rybwgn3facxoklcuj5j20tg TB3 Ready Active Reachable 20.10.2
t3zbiuhkpam480yfqgc78tzgn TB3-DOCKER Ready Active 20.10.2
```
서비스에 상태는 다음과 같다.
```bash
# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
xodct3yxupq6 monitor_alertmanager global 1/1 prom/alertmanager:latest *:9093->9093/tcp
zlay4qoq8gg7 monitor_cadvisor global 4/4 google/cadvisor:latest *:8080->8080/tcp
pfljlqixrepi monitor_grafana global 1/1 grafana/grafana:latest *:3000->3000/tcp
1kakkg4asokp monitor_prometheus global 1/1 prom/prometheus:latest *:9090->9090/tcp
hjsvav9409zy web_hongsnet global 3/3 registry.hongsnet.net/joohan.hong/docker/hongsnet:latest *:80->80/tcp
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment