Successfully reported this slideshow.

쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)

72

Share

Upcoming SlideShare
Github in Action
Github in Action
Loading in …3
×
1 of 85
1 of 85

쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)

72

Share

Download to read offline

어떻게 하면 배포 프로세스를 빠르게 개선할 수 있을까요?
git branch를 푸시하고 개별 테스트 서버를 만드려면 어떻게 해야 할까요?
쿠버네티스와 GitOps, Argo CD를 이용한 배포 방법을 소개 합니다.

Open Infrastructure & Cloud Native Days Korea 2019 발표자료

원본 슬라이드 다운로드 - http://bit.ly/subicura-gitops

어떻게 하면 배포 프로세스를 빠르게 개선할 수 있을까요?
git branch를 푸시하고 개별 테스트 서버를 만드려면 어떻게 해야 할까요?
쿠버네티스와 GitOps, Argo CD를 이용한 배포 방법을 소개 합니다.

Open Infrastructure & Cloud Native Days Korea 2019 발표자료

원본 슬라이드 다운로드 - http://bit.ly/subicura-gitops

More Related Content

Similar to 쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)

Related Books

Free with a 14 day trial from Scribd

See all

쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)

  1. 1. (GitOps CI/CD) KIM CHUNGSUB subicura Open Infrastructure & Cloud Native Days Korea 2019
  2. 2. Open Infrastructure & Cloud Native Days Korea 2019 Container / Serverless / DevOps / ReactJS E-Commerce http://subicura.com subicura
  3. 3. Open Infrastructure & Cloud Native Days Korea 2019
  4. 4. Open Infrastructure & Cloud Native Days Korea 2019 CI(Continuous integration) / CD(Continuous Delivery) Kubernetes / GitOps / ArgoCD
  5. 5. Open Infrastructure & Cloud Native Days Korea 2019 CI(Continuous integration) / CD(Continuous Delivery) Kubernetes / GitOps / ArgoCD → commit
  6. 6. 01
  7. 7. Open Infrastructure & Cloud Native Days Korea 2019 Code svn SVN Build DeploySFTP
  8. 8. Open Infrastructure & Cloud Native Days Korea 2019 SVN svn SVN - - 😱 - ? - →
  9. 9. Open Infrastructure & Cloud Native Days Korea 2019 - → - → chef? ansible? - Deploy
  10. 10. Open Infrastructure & Cloud Native Days Korea 2019 Code svn SVN Build DeploySFTP
  11. 11. Open Infrastructure & Cloud Native Days Korea 2019 Code 1 - Git Docker git Build Docker Deploy ♥ ♥
  12. 12. Open Infrastructure & Cloud Native Days Korea 2019 git git - git - Merge Request + Code Review - GitLab → UI ♥
  13. 13. Open Infrastructure & Cloud Native Days Korea 2019 = - - - - ♥ Docker
  14. 14. Open Infrastructure & Cloud Native Days Korea 2019 - - - - → - QA
  15. 15. Open Infrastructure & Cloud Native Days Korea 2019 Google Cloud Next 2019 .
  16. 16. Open Infrastructure & Cloud Native Days Korea 2019 releasing the code multiple times a day
  17. 17. Open Infrastructure & Cloud Native Days Korea 2019 ! 😳
  18. 18. Open Infrastructure & Cloud Native Days Korea 2019 ! ✊
  19. 19. Open Infrastructure & Cloud Native Days Korea 2019 - ? - ? - ? - ?
  20. 20. Open Infrastructure & Cloud Native Days Korea 2019 - ? → - ? → - ? → - ? →
  21. 21. Open Infrastructure & Cloud Native Days Korea 2019 - ? → - ? → - ? → - ? → 10 1 = ??? 🤩
  22. 22. Open Infrastructure & Cloud Native Days Korea 2019 Code 2 - GitLab webhook + CI CD git Build Docker Deploy
  23. 23. Open Infrastructure & Cloud Native Days Korea 2019 Code 2 - GitLab webhook + CI CD git Build Job (branch) Docker Deploy Job Deploy
 (test01~05) CI CD event ♥ ♥ ♥
  24. 24. Open Infrastructure & Cloud Native Days Korea 2019 GitLab webhook
  25. 25. Open Infrastructure & Cloud Native Days Korea 2019 Build - branch - 1 image:branch-1 branch - 2 image:branch-2 branch - 3 image:branch-3
  26. 26. Open Infrastructure & Cloud Native Days Korea 2019 Deploy - Parameterized Build 1~5 git branch = docker image tag
  27. 27. Open Infrastructure & Cloud Native Days Korea 2019 Jenkins - Input
  28. 28. Open Infrastructure & Cloud Native Days Korea 2019 Jenkins -
  29. 29. Open Infrastructure & Cloud Native Days Korea 2019 2 - - - , QA - Jenkins - - 2 > 5
  30. 30. Open Infrastructure & Cloud Native Days Korea 2019 - (1 , 2 ..) - (0 ~8 ) - - - - Jenkins
  31. 31. Open Infrastructure & Cloud Native Days Korea 2019 ..
  32. 32. 02 Kubernetes GitOps ArgoCD
  33. 33. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes
  34. 34. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes - Cluster Autoscaler → - Ingress Controller → - Cert Manager → SSL - Helm → manifest - Amazon EKS → - Spot Instance → Autoscaling Group
  35. 35. Open Infrastructure & Cloud Native Days Korea 2019 Cluster Autoscaler - Pod - Spot
  36. 36. Open Infrastructure & Cloud Native Days Korea 2019 Ingress Controller + Cert Manager -
  37. 37. Open Infrastructure & Cloud Native Days Korea 2019 Helm package manager apiVersion: v1 kind: Pod metadata: name: mypod spec: container: - name: mypod-container image: {{ .Values.image }} image: busybox apiVersion: v1 kind: Pod metadata: name: mypod spec: container: - name: mypod-container image: busybox pod.yaml values.yaml output.yaml + - yaml (Image tag, domain)
  38. 38. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes ? $ helm upgrade
  39. 39. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes ? $ helm upgrade
  40. 40. Open Infrastructure & Cloud Native Days Korea 2019 → context → Jenkins, ( ) → kubectl, helm → → →
  41. 41. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes ? $ helm upgrade
  42. 42. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes ? $ helm sync 
 (no code) Agent
  43. 43. Open Infrastructure & Cloud Native Days Korea 2019 Let's GitOps
  44. 44. Open Infrastructure & Cloud Native Days Korea 2019 Let's GitOps
  45. 45. Open Infrastructure & Cloud Native Days Korea 2019 Let's GitOps
  46. 46. Open Infrastructure & Cloud Native Days Korea 2019 Developer % GitOps workflow Git (code) CI Unit Test Build
 Container
 Image Push
 Container
 Image Git (env) Merge Request or Push Sync Agent kubectl apply helm / ... Kubernetes Deploy docker registry Update k8s manifest Merge Request or Push
  47. 47. Open Infrastructure & Cloud Native Days Korea 2019 1. - CI 2. - 3. MSA 4. 5. CI git git > ci > git > ci
  48. 48. Open Infrastructure & Cloud Native Days Korea 2019 GitOps - git - git - - (kubectl, helm, skaffold...) - , - - Merge Request -
  49. 49. Open Infrastructure & Cloud Native Days Korea 2019 Argo CD - Declarative GitOps CD for Kubernetes - git - kustomize, helm, ksonnet, jsonnet, plain yaml manifest - SSO (OIDC, OAuth2, LDAP, SAML 2.0, GitHub, GitLab, ...) - WEB UI → - Webhook integration (GitHub, BitBucket, GitLab) - PreSync, Sync, PostSync hooks -
  50. 50. Open Infrastructure & Cloud Native Days Korea 2019
  51. 51. Open Infrastructure & Cloud Native Days Korea 2019
  52. 52. Open Infrastructure & Cloud Native Days Korea 2019
  53. 53. 03
  54. 54. Open Infrastructure & Cloud Native Days Korea 2019 CI - Continuous Integration feature-1 branch git (app) image:feature-1 Jenkins build job env:feature-1 git (env)
  55. 55. Open Infrastructure & Cloud Native Days Korea 2019 CD - Continuous Deploy env:feature-1 git (env) ArgoCD feature-1.test.com feature-2.test.com {branch}.test.com kubernetes
  56. 56. Open Infrastructure & Cloud Native Days Korea 2019 - - - ({branch_name}.test.com) - kubectl, helm - WEB UI - Spot
  57. 57. Open Infrastructure & Cloud Native Days Korea 2019 5
  58. 58. Open Infrastructure & Cloud Native Days Korea 2019 !
  59. 59. Open Infrastructure & Cloud Native Days Korea 2019
  60. 60. Open Infrastructure & Cloud Native Days Korea 2019
  61. 61. 04
  62. 62. GitLab, Jenkins, ArgoCD
  63. 63. 05
  64. 64. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes - Amazon EKS - terraform (terraform-aws-eks module) - autoscaling_enabled: true - spot_price: xx - Helm package - cluster-autoscaler(auto discovery), k8s-spot-termination-handler - nginx-ingress, cert-manager
  65. 65. Open Infrastructure & Cloud Native Days Korea 2019 Jenkins - Build job (open merge request - app) - build - create & push container image - update helm chart value - Deploy job (push - env) - create argo application - Close job (accept merge request - app) - delete argo application
  66. 66. Open Infrastructure & Cloud Native Days Korea 2019 ArgoCD - Connect repository
  67. 67. 06
  68. 68. Open Infrastructure & Cloud Native Days Korea 2019 Continuous Integration - Jenkins X - Circle CI - GitLab CI - Travis CI - Tekton - Azure Devops
  69. 69. Open Infrastructure & Cloud Native Days Korea 2019 Continuous Deploy - kustomize - ksonnet - skaffold - spinnaker - weave flux
  70. 70. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes Cluster - GoogleCloud - Azure - kops (AWS) - kubeadm, kubespray - k3s
  71. 71. 07
  72. 72. Open Infrastructure & Cloud Native Days Korea 2019 released codes every 11.7 seconds on average
  73. 73. Open Infrastructure & Cloud Native Days Korea 2019 releasing the product bi-weekly
  74. 74. Open Infrastructure & Cloud Native Days Korea 2019 releases to its production servers 50 times a day
  75. 75. Open Infrastructure & Cloud Native Days Korea 2019 releasing the code multiple times a day
  76. 76. Open Infrastructure & Cloud Native Days Korea 2019 *2018 accelerate: state of devops
  77. 77. Open Infrastructure & Cloud Native Days Korea 2019 " "
  78. 78. Open Infrastructure & Cloud Native Days Korea 2019 🛠 Kubernetes, Jenkins, ArgoCD 👍 % GitOps 👍
  79. 79. Open Infrastructure & Cloud Native Days Korea 2019 Kubernetes, Jenkins, ArgoCD GitOps
  80. 80. Open Infrastructure & Cloud Native Days Korea 2019 , 👍 ⁉ ? !
  81. 81. Open Infrastructure & Cloud Native Days Korea 2019 - http://slack.opencontainer.co.kr/ - https://www.facebook.com/subicura - https://twitter.com/subicura - subicura(at)subicura(dot)com - !
  82. 82. Open Infrastructure & Cloud Native Days Korea 2019 Thanks!

×