Argo

Argo CD๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค(Kubernetes) ํ™˜๊ฒฝ์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌ๋ฅผ ์ž๋™ํ™”ํ•˜๋Š” ์˜คํ”ˆ์†Œ์Šค ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. GitOps ์›์น™์„ ๋”ฐ๋ฅด๋ฉฐ, Git ์ €์žฅ์†Œ์— ์ €์žฅ๋œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ฝ”๋“œ์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ถ”์ ํ•˜๊ณ  ๋ฐฐํฌ ์ž๋™ํ™”๋ฅผ ์œ„ํ•œ ์„ค์ •์„ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

Argo CD์˜ ์ฃผ์š” ๊ธฐ๋Šฅ

1. ์ง€์†์ ์ธ ๋ฐฐํฌ

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

2. ์„ ์–ธ์ ์ธ ๋ฐฐํฌ

Argo CD๋Š” ์„ ์–ธ์ ์ธ ๋ฐฐํฌ๋ฅผ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์–ด๋–ค ๋ฐฐํฌ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•˜๋Š”์ง€ ๋ช…์‹œํ•˜๋Š” ๋Œ€์‹ , ์–ด๋–ค ์ƒํƒœ๊ฐ€ ๋˜์–ด์•ผ ํ•˜๋Š”์ง€ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ์ž๋Š” ์‹œ์Šคํ…œ์˜ ์ƒํƒœ๋ฅผ ๋” ์ž˜ ์ดํ•ดํ•˜๊ณ , ๋” ์‰ฝ๊ฒŒ ๋ฐฐํฌ๋ฅผ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

3. ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ๋ฐฉ์‹

Argo CD๋Š” ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ๋ฐฉ์‹์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์ž์›, ํ—ฌ๋ฆ„(Helm) ์ฐจํŠธ, Kustomize ๋“ฑ ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ์‚ฌ์šฉ์ž ์ •์˜ ๋ฐฐํฌ ๋„๊ตฌ๋ฅผ ํ†ตํ•ฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

4. ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๋กœ๊น…

Argo CD๋Š” ๋ฐฐํฌ ๊ณผ์ •์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ๋ฅผ ์ถ”์ ํ•˜๊ณ , ๋ฐฐํฌ ์ƒํƒœ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ๋กœ๊ทธ๋ฅผ ์ˆ˜์ง‘ํ•˜๊ณ  ๋ถ„์„ํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ ๋น ๋ฅด๊ฒŒ ๋Œ€์‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Argo CD์˜ ์žฅ์ 

1. ์•ˆ์ •์ ์ธ ๋ฐฐํฌ

Argo CD๋Š” GitOps ์›์น™์„ ๋”ฐ๋ฅด๋ฏ€๋กœ, ์•ˆ์ •์ ์ธ ๋ฐฐํฌ๋ฅผ ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค. Git ์ €์žฅ์†Œ์— ์ €์žฅ๋œ ๋ชจ๋“  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ถ”์ ํ•˜๊ณ , ์ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž๋™์œผ๋กœ ๋ฐฐํฌํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ์‹ค์ˆ˜๋‚˜ ์ธ์  ์˜ค๋ฅ˜๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

2. ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ UI

Argo CD๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์‰ฝ๊ฒŒ ๋ฐฐํฌ๋ฅผ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” UI๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ ๋ฐฐํฌ ์ƒํƒœ๋ฅผ ์‰ฝ๊ฒŒ ํ™•์ธํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋ฐฐํฌ ์ด๋ ฅ์„ ์ถ”์ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

3. ์œ ์—ฐํ•œ ์„ค์ •

Argo CD๋Š” ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ๋ฐฉ์‹์„ ์ง€์›ํ•˜๋ฏ€๋กœ, ์‚ฌ์šฉ์ž๋Š” ๋‹ค์–‘ํ•œ ํ™˜๊ฒฝ์—์„œ ์œ ์—ฐํ•˜๊ฒŒ ๋ฐฐํฌ๋ฅผ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋˜ํ•œ, ์‚ฌ์šฉ์ž ์ •์˜ ๋ฐฐํฌ ๋„๊ตฌ๋ฅผ ํ†ตํ•ฉํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—, ๋”์šฑ ์œ ์—ฐํ•œ ๋ฐฐํฌ ํ™˜๊ฒฝ์„ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

argo ์„ค์น˜

> echo "Install Argo CD"
> kubectl create namespace argocd
> kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml

> echo "Install Argo CLi"
> mkdir ~/bin
> curl -sSL -o ~/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
> chmod +x ~/bin/argocd

> echo "External application"
> kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'

> echo "Get password"
> $ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
{{password}}

> kubectl get svc argocd-server -n argocd
NAME            TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
argocd-server   LoadBalancer   10.96.176.107   <pending>     80:32038/TCP,443:31129/TCP   8m24s

{{Master IP}} :31129 ๋กœ ์ ‘์†ํ•  ์ˆ˜ ์žˆ๋‹ค.

๋งˆ๋ฌด๋ฆฌ

Argo CD๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํ™˜๊ฒฝ์—์„œ ์•ˆ์ •์ ์ด๊ณ  ์œ ์—ฐํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ์˜คํ”ˆ์†Œ์Šค ๋„๊ตฌ์ž…๋‹ˆ๋‹ค. GitOps ์›์น™์„ ๋”ฐ๋ฅด๋ฉฐ, ์‚ฌ์šฉ์ž ์นœํ™”์ ์ธ UI์™€ ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ๋ฐฉ์‹์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

Last updated