Codepipeline
Last updated
Was this helpful?
Last updated
Was this helpful?
์ด์ ์ ์ฌ์ฉํ์ฌ AWS CodePipeline์ ์์ฑํ๊ฒ ์ต๋๋ค. ์ด ํ์ดํ๋ผ์ธ์ GitHub Source repo(eks-example)์์ ๋์ปค ์ด๋ฏธ์ง๋ฅผ ๊ตฌ์ถํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์ด๋ ๊ฒ ํด๋ ์ด๋ฏธ์ง๊ฐ ๋ฐฐํฌ๋์ง ์์ผ๋ฉฐ Weave Flux ์์ ์ด๋ฅผ ์ฒ๋ฆฌํฉ๋๋ค.
CloudFormation์ ํด๋ผ์ฐ๋ ํ๊ฒฝ์ ๋ชจ๋ ์ธํ๋ผ ๋ฆฌ์์ค๋ฅผ ์ค๋ช ํ๊ณ ํ๋ก๋น์ ๋ํ ์ ์๋ ๊ณตํต ์ธ์ด๋ฅผ ์ ๊ณตํ๋ IaC() ํด์ ๋๋ค. CloudFormation์ ์ฌ์ฉํ๋ฉด ๊ฐ๋จํ ํ ์คํธ ํ์ผ์ ์ฌ์ฉํ์ฌ ๋ชจ๋ region๊ณผ account์ ๊ฑธ์ณ ์ ํ๋ฆฌ์ผ์ด์ ์ ํ์ํ ๋ชจ๋ ๋ฆฌ์์ค๋ฅผ ์๋ํ๋๊ณ ์์ ํ๊ฒ ๋ชจ๋ธ๋งํ๊ณ ํ๋ก๋น์ ๋ํ ์ ์์ต๋๋ค.
๊ฐ EKS ๋ฐฐํฌ/์๋น์ค๋ ์์ฒด CodePipeline์ด ์์ด์ผ ํ๋ฉฐ ๋ถ๋ฆฌ๋ ์์ค ์ ์ฅ์์ ์์ด์ผ ํฉ๋๋ค.
์๋ ํ์ผ์ ํด๋ฆญํ์ฌ ๋ค์ด ๋ก๋ ํ AWS Management Console์ CloudFormation ์คํ์ ์์ฑํฉ๋๋ค.
์คํ ์ด๋ฆ : image-codepipeline
Username : git username
Access token : git access key
Repository : eks-example
Branch : main
Stack์ด ์๋ฃ(CREATE_COMPLETE)๋ ๋ ๊น์ง ๊ธฐ๋ค๋ฆฝ๋๋ค.
GitHub repo์ ์ํ ์ ํ๋ฆฌ์ผ์ด์ ์ ์ถ๊ฐํ ๊ฒ์ ๋๋ค. ์๋ ${YOURUSER}๋ฅผ GitHub ์ฌ์ฉ์ ์ด๋ฆ์ ๋์ฒดํฉ๋๋ค.
๊ทธ๋ฐ ๋ค์ ๊ธฐ๋ณธ README ํ์ผ, ์๋ณธ ๋๋ ํฐ๋ฆฌ๋ฅผ ๋ง๋ค๊ณ ์ํ nginx ๊ตฌ์ฑ(hello.conf), ํ ํ์ด์ง(index.html) ๋ฐ ๋์ปค ํ์ผ์ ๋ค์ด๋ก๋ํฉ๋๋ค.
์ด์ ๊ฐ๋จํ hello world app๋ฅผ commitํ์ฌ codepipeline ์ ์์์ํต๋๋ค.
์ ์ ์ํ์ฌ image-codepipeline ์ผ๋ก codepipeline์ด ์์๋ ๊ฒ์ ๋ณผ ์ ์์ต๋๋ค. ํ์ฌ ์ ์ฅ์์ ์ฝ๋๊ฐ ์๊ธฐ ๋๋ฌธ์ ์ด๋ฏธ์ง ๋น๋์ ์คํจ๊ฐ ๋ฉ๋๋ค.
๋น๋ ์ด๋ฏธ์ง๋ฅผ ํ์ธํ์ฌ ์ํ์ฌ ์ ์ํ์ฌ eks-example image repository๋ฅผ ํ์ธํฉ๋๋ค.