[Infra] Docker, Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ CI/CD ๊ตฌ์ถ•ํ•˜๊ธฐ(3) - Jenkins ํŒŒ์ดํ”„๋ผ์ธ ๊ตฌ์ถ•
ยท
Infra
์ด ์‹œ๋ฆฌ์ฆˆ์—์„œ๋Š” MSA ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค, Docker์™€ Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. ์ด์ „ ํฌ์ŠคํŒ…์—์„œ๋Š” Docker๋ฅผ ์„ค์น˜์™€ ์ˆ˜๋™ ๋ฐฐํฌ ๊ณผ์ •๊ณผ ์ž๋™ ๋ฐฐํฌ์˜ ํ•„์š”์„ฑ์— ๋Œ€ํ•ด ์„ค๋ช…ํ–ˆ์—ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  Jenkins๋ฅผ ์„ค์น˜ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ๋„ ์„ค๋ช…ํ–ˆ๋‹ค Docker ์„ค์น˜ํ•˜๊ธฐ : https://programmingiraffe.tistory.com/12 [Infra] Docker, Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ CI/CD ๊ตฌ์ถ•ํ•˜๊ธฐ(1) - Docker ์„ค์น˜ ์ด ํฌ์ŠคํŒ…์—์„œ๋Š” MSA ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค, Docker์™€ Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. ๊ตฌ๊ธ€๋ง ํ•˜๋ฉด์„œ ๋…ํ•™์„ ํ–ˆ๊ณ , ๋ฌด์ˆ˜ํ•œ ์‚ฝ์งˆ๊ณผ ์ด์ „ ํ”„๋กœ์ ํŠธ๋“ค์˜ ๋ฌธ์„œ์™€ ์ฃผ๋ณ€ ๋™..
[Infra] Docker, Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ CI/CD ๊ตฌ์ถ•ํ•˜๊ธฐ(2) - Jenkins ์„ค์น˜
ยท
Infra
์ด ์‹œ๋ฆฌ์ฆˆ์—์„œ๋Š” MSA ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค, Docker์™€ Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. ์ด์ „ ํฌ์ŠคํŒ…์—์„œ๋Š” Docker๋ฅผ ์„ค์น˜์™€ ์ˆ˜๋™ ๋ฐฐํฌ ๊ณผ์ •๊ณผ ์ž๋™ ๋ฐฐํฌ์˜ ํ•„์š”์„ฑ์— ๋Œ€ํ•ด ์„ค๋ช…ํ–ˆ์—ˆ๋‹ค. https://programmingiraffe.tistory.com/123 [Infra] Docker, Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ CI/CD ๊ตฌ์ถ•ํ•˜๊ธฐ(1) - Docker ์„ค์น˜ ์ด ํฌ์ŠคํŒ…์—์„œ๋Š” MSA ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค, Docker์™€ Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. ๊ตฌ๊ธ€๋ง ํ•˜๋ฉด์„œ ๋…ํ•™์„ ํ–ˆ๊ณ , ๋ฌด์ˆ˜ํ•œ ์‚ฝ์งˆ๊ณผ ์ด์ „ ํ”„๋กœ์ ํŠธ๋“ค์˜ ๋ฌธ์„œ์™€ ์ฃผ๋ณ€ ๋™ programmingiraffe.tistory.com ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” ์ง€์†์  ..
[Infra] Docker, Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ MSA ํ”„๋กœ์ ํŠธ CI/CD ๊ตฌ์ถ•ํ•˜๊ธฐ(1) - Docker ์„ค์น˜
ยท
Infra
์ด ํฌ์ŠคํŒ…์—์„œ๋Š” MSA ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•œ ๋’ค, Docker์™€ Jenkins๋ฅผ ์ด์šฉํ•˜์—ฌ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณผ์ •์„ ์„ค๋ช…ํ•˜๋„๋ก ํ•˜๊ฒ ๋‹ค. ๊ตฌ๊ธ€๋ง ํ•˜๋ฉด์„œ ๋…ํ•™์„ ํ–ˆ๊ณ , ๋ฌด์ˆ˜ํ•œ ์‚ฝ์งˆ๊ณผ ์ด์ „ ํ”„๋กœ์ ํŠธ๋“ค์˜ ๋ฌธ์„œ์™€ ์ฃผ๋ณ€ ๋™๊ธฐ๋“ค์˜ ๋„์›€์„ ๋ฐ›์€ ๋์— ๋‚ด ํ”„๋กœ์ ํŠธ์˜ ํ™˜๊ฒฝ์— ๋งž๊ฒŒ CI/CD๋ฅผ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค! ๋ถ€์กฑํ•œ ๋ถ€๋ถ„๋„ ์žˆ์ง€๋งŒ(๋ฌด์ค‘๋‹จ ๋ฐฐํฌ X, docker-compse ์‚ฌ์šฉ X, ๋ณด์•ˆ ์‹ ๊ฒฝ ๋ชป์”€) ์Šค์Šค๋กœ Docker, Jenkins์˜ ๊ฐœ๋…์„ ๊ณต๋ถ€ํ•˜๊ณ , ๋ฐ”๋กœ ํŒ€ ํ”„๋กœ์ ํŠธ์— ์ ์šฉํ–ˆ๋‹ค๋Š” ์ ์—์„œ ์ข‹์•˜๋‹ค. ์‚ฝ์งˆํ•˜๋ฉด์„œ ๋ฐฐ์šด ๊ฒƒ์„ ์•ˆ ๊นŒ๋จน๊ณ ์ž, ๊ทธ๋ฆฌ๊ณ  ๋ˆ„๊ตฐ๊ฐ€์—๊ฒŒ ๋„์›€์ด ๋˜๊ณ ์ž ๊ณผ์ •์„ ์ •๋ฆฌํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค. 3๊ฐœ์˜ ํฌ์ŠคํŒ…์— ๋‚˜๋ˆ ์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋‚ด์šฉ์œผ๋กœ ์ง„ํ–‰๋  ๊ฒƒ์ด๋‹ค. 1. Docker ์„ค์น˜ํ•˜๊ธฐ + ์ˆ˜๋™ ๋ฐฐํฌ 2. ์ž๋™ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ Je..
[Infra] Jenkins ์ปจํ…Œ์ด๋„ˆ ์•ˆ Docker ์„ค์น˜ํ•˜๊ธฐ(Docker In Docker)
ยท
Infra
๐Ÿ’ป ๋ฌธ์ œJenkins๋ฅผ Docker๋กœ ์„ค์น˜๋ฅผ ํ•ด์„œ ๋‚ด๋ถ€์—์„œ ๋„์ปค๋กœ ์‹คํ–‰์‹œํ‚ค๊ณ  ์‹ถ์—ˆ๋‹ค. (Docker In Docker)  ํ•˜์ง€๋งŒ ์ฒ˜์Œ์— ์ด๋ ‡๊ฒŒ Jenkins๋ฅผ ์„ค์น˜ํ–ˆ๋‹ค๊ฐ€ ๋ฌด์ˆ˜ํ•œ ์‚ฝ์งˆ์„ ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค. sudo docker run -d --name jenkins -p 8080:8080 jenkins/jenkins:jdk11  1. Jenkins๋ฅผ ์‹คํ–‰ํ–ˆ์„ ๋•Œ, ๋‚ด๋ถ€์— ๋„์ปค๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์ง€ ์•Š์•„์„œ Docker ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†์—ˆ๋‹ค.2. ๊ทธ๋ž˜์„œ Jenkins ์•ˆ์— Docker๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ–ˆ๋”๋‹ˆ root๋กœ ์ ‘์†ํ•˜๋ผ๊ณ  ํ•œ๋‹ค.3. ๊ทธ๋ž˜์„œ root๋กœ ์ ‘์†ํ•ด์„œ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ–ˆ๋”๋‹ˆ cli๋กœ ์„ค์น˜๊ฐ€ ์•ˆ๋œ๋‹ค๊ณ  ํ•œ๋‹ค.     ๐Ÿ”Ž ์›์ธ1) ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ๋‚ด๋ถ€์—์„œ ๋„์ปค๋กœ ์‹คํ–‰์‹œํ‚ค๋ ค๋ฉด, ๋„์ปค ์†Œ์ผ“์œผ๋กœ ์—ฐ๊ฒฐํ•ด์•ผ ํ•œ๋‹ค.  * ..
giraffe_
'Infra' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก