Docker 4

# Docker Swarm ํด๋Ÿฌ์Šคํ„ฐ ๋ชจ๋‹ˆํ„ฐ๋ง

Docker Swarm ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋ง ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ์•ˆ์€ ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ์ง€๋งŒ Grafana๋ฅผ ์ด์šฉํ•œ ๋ฐฉ์•ˆ์„ ์•Œ์•„๋ณด๊ฒ ๋‹ค. Docker Swarm ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์„ฑ ๋ฐฉ๋ฒ•์€ ์ด์ „ ํฌ์ŠคํŒ… ๊ธ€์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. # Docker Swarm ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์„ฑ # Docker Swarm ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์„ฑ Docker Swarm ์ด๋ž€ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” Orchestration Tool ์ค‘์˜ ํ•˜๋‚˜์ด๋‹ค. Orchestration Tool ์ด๋ž€? ์ปจํ…Œ์ด๋„ˆ์˜ ๋‹จ์ˆœ ๋ฐฐํฌ ๋ฟ๋งŒ์ด ์•„๋‹ˆ๋ผ ํ™•์žฅ, ๋„คํŠธ์›Œํ‚น ๋“ฑ์„ ์ž๋™ํ™”ํ•˜์—ฌ ์ˆ˜๋ฐฑ ๋˜๋Š” ์ˆ˜์ฒœ ๊ฐœ์˜ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๏ฟฝ๏ฟฝ skysoo1111.tistory.com Step 1. Docker ๋ฐ๋ชฌ ๋ฉ”ํŠธ๋ฆญ ๋…ธ์ถœ ๋ฐ Docker ์žฌ๊ธฐ๋™ $ sudo vi /etc/docker/daemon.json { "me..

Cloud/Docker 2020.10.13

# docker ๊ธฐ๋ฐ˜ Gitlab-CI ๊ตฌ์ถ• 3 - Gitlab-runner ์‹คํ–‰

์ง€๋‚œ ํฌ์ŠคํŒ… # docker ๊ธฐ๋ฐ˜ Gitlab-CI ๊ตฌ์ถ• 2 ์—์„œ Gitlab์„ Docker๋กœ ์‹คํ–‰ํ–ˆ๊ณ  CI ์Šคํฌ๋ฆฝํŠธ(.gitlab-ci.yml)๊นŒ์ง€ ๋“ฑ๋กํ•ด์ฃผ์—ˆ๋‹ค. 1. CI ์ƒํƒœ ๋ณด๊ธฐ ๊ทธ๋ฆฌ๊ณ  CI์˜ Pipelines๋ฅผ ํ™•์ธํ–ˆ์„ ๋•Œ, Pending ์ƒํƒœ์ธ ๊ฒƒ์„ ํ™•์ธํ–ˆ๋Š”๋ฐ, ์ด๋Š” CI๋ฅผ ์ˆ˜ํ–‰ํ•ด์ค„ Runner๊ฐ€ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์ƒ๊ธฐ๋Š” ํ˜„์ƒ์ด๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” CI๋ฅผ ์ˆ˜ํ–‰ํ•ด์ค„ Gitlab-runner๋ฅผ ๋“ฑ๋กํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž. 2. Gitlab-runner ๋“ฑ๋ก 1) gitlab ์„œ๋ฒ„์˜ Runners ์„ค์ • ํŽ˜์ด์ง€์—์„œ Runner Setup ์ •๋ณด(URL / TOKEN)๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. 2) gitlab ์„œ๋ฒ„์—์„œ ํ™•์ธํ•œ URL๊ณผ TOKEN ์ •๋ณด๋กœ ๋ฐฐํฌ ์„œ๋ฒ„์—์„œ Gitlab-runner๋ฅผ ๋“ฑ๋กํ•œ๋‹ค. $..

Git 2020.03.27

# docker ๊ธฐ๋ฐ˜ Gitlab-CI ๊ตฌ์ถ• 2 - Gitlab ์‹คํ–‰

โ€ป ์‚ฌ์ „ ์ค€๋น„ ์‚ฌํ•ญ์œผ๋กœ docker(# docker ์„ค์น˜)๊ฐ€ ์„ค์น˜ ๋˜์–ด ์žˆ์–ด์•ผ ํ•œ๋‹ค. 1. Gitlab ์‹คํ–‰ # docker gitlab ์‹คํ–‰ $ sudo docker run --detach \ --hostname 192.168.10.X \# git pull or push ์—์„œ ์‚ฌ์šฉ๋  hostname --publish 443:443 --publish 80:80 --publish 22:22 \ # hostPort:containerPort hostPort์—์„œ ์ง€์ •ํ•œ Port์˜ ๋ฐฉํ™”๋ฒฝ์€ ๋ฐ˜๋“œ์‹œ ์˜คํ”ˆํ•ด์ค˜์•ผ ํ•œ๋‹ค. --name gitlab \ --restart always \ --volume /srv/gitlab/config:/etc/gitlab \# volume์€ gitlab ๊ธฐ๋™์‹œ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ ์ €์žฅํ•˜๊ธฐ ์œ„..

Git 2020.03.27

# docker ์„ค์น˜

์ด์ „ ๊ธ€(k8s + docker ๊ฐœ๋…)์—์„œ docker์— ๋Œ€ํ•ด ๊ฐ„๋žตํžˆ ์„ค๋ช…ํ•˜์˜€๊ณ , ์ด์–ด์„œ docker ์„ค์น˜๋ฅผ ์ง„ํ–‰ํ•  ๊ฒƒ์ด๋‹ค. [๊ตฌ์„ฑ ํ™˜๊ฒฝ] OS version : CentOS Linux release 7.6.1810 [docker ์ตœ์‹  ๋ฒ„์ „ ์„ค์น˜ ๋ฐฉ๋ฒ•] [java/wget/telnet ๋ฏธ์„ค์น˜์‹œ - optional] yum install java-devel yum install wget yum install telnet [docker ์„ค์น˜] yum -y upgrade

Cloud/Docker 2019.09.06