ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

AWS

[AWS] CI/CD๋ž€?

๊ฐœ๋ฐœ๊ฐœ๊ตด๐Ÿธ 2023. 6. 11. 16:59

์ตœ๊ทผ์— ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ์— ๋“ค์–ด๊ฐ€๋ฉฐ, AWS CodePipeline์„ ํ™œ์šฉํ•ด ๋นŒ๋“œ/๋ฐฐํฌ ์ž๋™ํ™” ํ™˜๊ฒฝ์„ ์…‹ํŒ…ํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด์ฐธ์— CI/CD ๊ฐœ๋…์„ ์ž์„ธํžˆ ์ •๋ฆฌํ•˜๊ณ ์ž ํ•ด๋‹น ๊ธ€์„ ์ž‘์„ฑํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

 

[์ถœ์ฒ˜: https://velog.io/@whattsup_kim/CI-CD%EB%9E%80]

 

CI/CD ๋ž€?

์ง€์†์  ํ†ตํ•ฉ(Continuous Integration, CI)๊ณผ ์ง€์†์  ์ œ๊ณต&๋ฐฐํฌ(Continuous Delivery&Continuous Deployment, CD)์˜ ์•ฝ์ž๋กœ,

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ ๋‹จ๊ณ„๋ฅผ ์ž๋™ํ™”ํ•˜์—ฌ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋”์šฑ ์งง์€ ์ฃผ๊ธฐ๋กœ ๊ณ ๊ฐ์—๊ฒŒ ์ œ๊ณตํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. 

 

DevOps ์—”์ง€๋‹ˆ์–ด์˜ ํ•ต์‹ฌ ์—…๋ฌด๋ผ๊ณ  ๋ถˆ๋ฆฌ๊ธฐ๋„ ํ•˜๋Š” CI/CD๋Š” ํ†ตํ•ฉ๊ณผ ์ œ๊ณต์„ ์ž๋™ํ™”ํ•จ์œผ๋กœ์จ ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœํŒ€์ด ์ฝ”๋“œ ํ’ˆ์งˆ๊ณผ ์†Œํ”„ํŠธ์›จ์–ด ๋ณด์•ˆ์„ ๋ณด์žฅํ•˜๋Š” ๋™์‹œ์— ๋น„์ฆˆ๋‹ˆ์Šค ์š”๊ตฌ์‚ฌํ•ญ์„ ์ถฉ์กฑํ•˜๋Š” ๋ฐ ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ค๋‹ˆ๋‹ค.


CI/CD์˜ ํ•ต์‹ฌ ๊ฐœ๋…

CI/CD๋Š” *์ธํ„ฐ๊ทธ๋ ˆ์ด์…˜ ํ—ฌ์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ํ•˜๋‚˜์˜ ์†”๋ฃจ์…˜์œผ๋กœ ํ•ต์‹ฌ ๊ฐœ๋…์„ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ธ ๊ฐ€์ง€๋กœ ๊ตฌ๋ถ„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

*์ธํ„ฐ๊ทธ๋ ˆ์ด์…˜ ํ—ฌ(Integration Hell): ๊ฐœ๋ฐœ/์šด์˜ ์กฐ์ง์—์„œ ์ƒˆ๋กœ์šด ์ฝ”๋“œ ํ†ตํ•ฉ(merge) ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฌธ์ œ๋“ค๋กœ, ํ†ตํ•ฉ์„ ์œ„ํ•œ ์ž‘์—…์œผ๋กœ ์ˆ˜ ์‹œ๊ฐ„์ด ์†Œ์š”๋˜๋ฉฐ ๋กค๋ฐฑ์„ ์ˆ˜ํ–‰ํ•˜๊ธฐ๋„ ํ•จ

 

CI(Continuous Integration) - ์ง€์†์ ์ธ ํ†ตํ•ฉ

์ƒˆ๋กœ์šด ์ฝ”๋“œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ์ฃผ๊ธฐ์ ์œผ๋กœ ๋นŒ๋“œ ๋ฐ ํ…Œ์ŠคํŠธ๋ฅผ ๊ฑฐ์ณ ๊ณต์œ  ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ํ†ตํ•ฉ(merge)๋˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

 

ํ•œ ํ”„๋กœ์ ํŠธ์— ์—ฌ๋Ÿฌ๋ช…์˜ ๊ฐœ๋ฐœ์ž๊ฐ€ ํ˜‘์—…์„ ํ•˜๋ฉฐ ๊ฐœ๋ฐœํ•˜๋Š” ์ƒํ™ฉ์ด ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด๋ด…์‹œ๋‹ค. ์ด๋•Œ, ๋„ˆ๋ฌด ์˜ค๋žœ ์ฃผ๊ธฐ๋กœ merge๋ฅผ ํ•œ๋‹ค๋ฉด ์ถฉ๋Œ ์ฝ”๋“œ๊ฐ€ ๋งŽ์•„์งˆ ์ˆ˜ ์žˆ๊ณ , ๋˜ ๋„ˆ๋ฌด ๋นˆ๋ฒˆํ•œ merge๋ฅผ ํ•˜์ž๋ฉด ๊ท€์ฐฎ๋‹ค๋Š” ๋‹จ์ ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, ๊ฐ€๋Šฅํ•œ ์ž‘์€ ๋‹จ์œ„๋กœ ๋‚˜๋ˆ„์–ด ์ฃผ๊ธฐ์ ์ธ ํ†ตํ•ฉ์ด ์ค‘์š”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ํ•ด๋‹น ์ž‘์—…์„ ์ž๋™ํ™”ํ•˜์—ฌ ์ง€์†์ ์ธ ํ†ตํ•ฉ์„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

 

์žฅ์ 

  • ์—ฌ๋Ÿฌ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋™์‹œ์— ์ž‘์—…ํ•˜๋ฉฐ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์ถฉ๋Œ ๋ฌธ์ œ๋ฅผ ์ˆ˜์‹œ๋กœ ํ™•์ธํ•˜๊ณ  ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Œ
  • ๋ฒ„๊ทธ๋ฅผ ๋น ๋ฅด๊ฒŒ ์ฐพ์•„ ํ•ด๊ฒฐํ•˜๊ณ , ์†Œํ”„ํŠธ์›จ์–ด ํ’ˆ์งˆ์„ ๊ฐœ์„  ๊ฐ€๋Šฅ
  • ์ƒˆ๋กœ์šด ์—…๋ฐ์ดํŠธ ํ…Œ์ŠคํŠธ์™€ ์ถœ์‹œ ์‹œ๊ฐ„์„ ๋‹จ์ถ•์‹œํ‚ด

 

CD(Continuous Delivery & Deployment) - ์ง€์†์ ์ธ ์„œ๋น„์Šค ์ œ๊ณต & ๋ฐฐํฌ

๊ฐœ๋ฐœ์ž์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์—์„œ ๊ณ ๊ฐ์ด ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ๊นŒ์ง€ ์ž๋™์œผ๋กœ ๋ฆด๋ฆฌ์ฆˆํ•˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

 

์žฅ์ 

  • ๊ฐœ๋ฐœ์ž๋Š” ๋ฐฐํฌ๋ณด๋‹ค๋Š” ๊ฐœ๋ฐœ์— ๋”์šฑ ์‹ ๊ฒฝ ์“ธ ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์คŒ
  • ๊ฐœ๋ฐœ์ž๊ฐ€ ์›ํด๋ฆญ์œผ๋กœ ์ˆ˜์ž‘์—… ์—†์ด ๋นŒ๋“œ, ํ…Œ์ŠคํŠธ, ๋ฐฐํฌ๊นŒ์ง€์˜ ์ž๋™ํ™”๋ฅผ ํ•  ์ˆ˜ ์žˆ์Œ

CI/CD ํŒŒ์ดํ”„๋ผ์ธ

์ƒˆ ๋ฒ„์ „์˜ ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ์œ„ํ•ด ์ˆ˜ํ–‰ํ•ด์•ผ ํ•  ์ผ๋ จ์˜ ๋‹จ๊ณ„๋ฅผ ๋œปํ•ฉ๋‹ˆ๋‹ค.

[์ถœ์ฒ˜: https://www.redhat.com/ko/topics/devops/what-is-ci-cd]

  1. ๋นŒ๋“œ(Build) : ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ปดํŒŒ์ผํ•˜๋Š” ๋‹จ๊ณ„
  2. ํ…Œ์ŠคํŠธ(Test): ์ฝ”๋“œ๋ฅผ ํ…Œ์ŠคํŠธํ•˜๋Š” ๋‹จ๊ณ„, ์ด ๋‹จ๊ณ„๋ฅผ ์ž๋™ํ™”ํ•˜์—ฌ ์‹œ๊ฐ„๊ณผ ์ˆ˜๊ณ ๋ฅผ ์ค„์ผ ์ˆ˜ ์žˆ์Œ
  3. ๋ฆด๋ฆฌ์ฆˆ(Release): ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ฆฌํฌ์ง€ํ† ๋ฆฌ์— ์ œ๊ณตํ•˜๋Š” ๋‹จ๊ณ„
  4. ๋ฐฐํฌ(Delpoy): ์ฝ”๋“œ๋ฅผ ํ”„๋กœ๋•์…˜์— ๋ฐฐํฌํ•˜๋Š” ๋‹จ๊ณ„
  5. ๊ฒ€์ฆ ๋ฐ ์ปดํ”Œ๋ผ์ด์–ธ์Šค(Validation & Compliance): ๋นŒ๋“œ ๊ฒ€์ฆ ๋‹จ๊ณ„๋Š” ํ•ด๋‹น ์กฐ์ง์˜ ํ•„์š”์— ๋”ฐ๋ผ ๊ฒฐ์ •๋˜๋ฉฐ, ์†Œํ”„ํŠธ์›จ์–ด ํ’ˆ์งˆ์„ ๋ณด์žฅํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์คŒ

[์ฐธ๊ณ ]

https://walkingplow.tistory.com/78

 

CI/CD์˜ ๊ฐœ๋…๊ณผ ์ฐจ์ด์ 

CI/CD์˜ ๊ฐœ๋… CI/CD๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ ๋‹จ๊ณ„๋ฅผ ์ž๋™ํ™”ํ•ด ๋ณด๋‹ค ์งง์€ ์ฃผ๊ธฐ๋กœ ํ†ตํ•ฉ ๋ฐ ๋ฐฐํฌํ•˜๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ์ธํ„ฐ๊ทธ๋ ˆ์ด์…˜ ํ—ฌ(Integration Hell)์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ์†”๋ฃจ์…˜์œผ๋กœ ์ง€์†์ ์ธ ํ†ตํ•ฉ, ์ง€์†์ 

walkingplow.tistory.com

https://www.redhat.com/ko/topics/devops/what-is-ci-cd

 

CI/CD(CI CD, ์ง€์†์  ํ†ตํ•ฉ/์ง€์†์  ๋ฐฐํฌ): ๊ฐœ๋…, ํˆด, ๊ตฌ์ถ•, ์ฐจ์ด

CI/CD๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ํ†ตํ•ฉ ๋ฐ ํ…Œ์ŠคํŠธ ๋‹จ๊ณ„๋ถ€ํ„ฐ ์ œ๊ณต ๋ฐ ๋ฐฐํฌ๊นŒ์ง€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ผ์ดํ”„์‚ฌ์ดํด ์ „์ฒด์—์„œ ์ง€์†์ ์ธ ์ž๋™ํ™”์™€ ์ง€์†์ ์ธ ๋ชจ๋‹ˆํ„ฐ๋ง์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์„ ๋œปํ•ฉ๋‹ˆ๋‹ค.

www.redhat.com

https://www.ciokorea.com/insider/233289

 

'CI/CD๋ž€?' ์•Œ๊ธฐ ์‰ฝ๊ฒŒ ์„ค๋ช…ํ•œ ์ง€์†์  ํ†ตํ•ฉ๊ณผ ์ง€์†์  ์ „๋‹ฌ

์ง€์†์  ํ†ตํ•ฉ(Continuous integration, CI)๊ณผ ์ง€์†์  ์ œ๊ณต(Continuous delivery, CD), ์ค„์—ฌ์„œ CI/CD๋Š”

www.ciokorea.com

https://jud00.tistory.com/entry/CICD%EB%9E%80-%EB%AC%B4%EC%97%87%EC%9D%BC%EA%B9%8C

 

CI/CD๋ž€ ๋ฌด์—‡์ผ๊นŒ?

์˜ค๋Š˜์€ CI/CD์— ๋Œ€ํ•ด์„œ ์ž‘์„ฑํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์•ž์œผ๋กœ๋Š” ๊ธ€์„ ์ž‘์„ฑํ•˜๋Š”๋ฐ ํŽธํ•œ ๊ธ€์”จ์ฒด๋กœ ์ž‘์„ฑํ•  ์ƒ๊ฐ์ž…๋‹ˆ๋‹ค :) CI/CD๋ž€? CI/CD๋Š” ๊ฐœ๋ฐœ์ž๋ผ๋ฉด ํ•œ ๋ฒˆ์ฏค์€ ๋‹ค๋“ค ๋“ค์–ด๋ดค์„ ๋งŒํ•œ ๋‹จ์–ด์ผ ๊ฒƒ์ด๋‹ค. CI/CD๋Š” ์• ํ”Œ๋ฆฌ

jud00.tistory.com

https://velog.io/@woodonggyu/Deployment-Pipeline-CICD

 

WHAT IS "CI/CD" ?

๋ณธ ๊ธ€์—์„œ๋Š” CI/CD ์— ๋Œ€ํ•œ ๊ธฐ๋ณธ์ ์ธ ๋‚ด์šฉ์„ ๋‹ค๋ฃฌ๋‹ค.

velog.io