Slide 1

Slide 1 text

Introduction of Cloud Native CI/CD on Kubernetes

Slide 2

Slide 2 text

Trail Map https://github.com/cncf/trailmap

Slide 3

Slide 3 text

CI/CD From the trail map: Setup Continuous Integration/Continuous Delivery (CI/CD) so that changes to your source code automatically result in a new container being built, tested, and deployed to staging and eventually, perhaps, to production

Slide 4

Slide 4 text

Landscape https://github.com/cncf/landscape

Slide 5

Slide 5 text

Landscape

Slide 6

Slide 6 text

CI/CD on Kubernetes

Slide 7

Slide 7 text

Pipeline-based CI tool Configuration as Code Fancy Visualization Management using CLI tool Concourse CI https://concourse-ci.org/

Slide 8

Slide 8 text

Get Started https://github.com/helm/charts/tree/master/stable/concourse TL;DR; $ helm install stable/concourse Need to set externalUrl to access from outside Install the fly CLI tool for concourse management $ fly -h

Slide 9

Slide 9 text

Pipeline https://github.com/starkandwayne/concourse-tutorial/blob/master/tutorials/basic/job- inputs/pipeline.yml resources: - name: resource-tutorial type: git source: uri: https://github.com/starkandwayne/concourse-tutorial.git branch: develop - name: resource-app type: git source: uri: https://github.com/cloudfoundry-community/simple-go-web-app.git jobs: - name: job-test-app public: true plan: - get: resource-tutorial - get: resource-app trigger: true - task: web-app-tests file: resource-tutorial/tutorials/basic/job-inputs/task_run_tests.yml

Slide 10

Slide 10 text

Pipeline

Slide 11

Slide 11 text

Declarative, GitOps CD tool Automated deployment of desired application states Support for config management tools (Kustomize, Helm etc) Argo CD https://argoproj.github.io/argo-cd/

Slide 12

Slide 12 text

Get Started Quick start $ kubectl create namespace argocd $ kubectl apply -n argocd -f \ https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml Access the endpoint by browser & Login Get admin password $ kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server \ -o name | cut -d'/' -f 2

Slide 13

Slide 13 text

Application

Slide 14

Slide 14 text

Application Manifest apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: concourse namespace: argocd spec: project: default source: repoURL: https://github.com/helm/charts.git targetRevision: a7816917c50bc31471793f54036a7eaf0eeeb701 path: stable/concourse helm: parameters: - name: "web.service.type" value: "LoadBalancer" - name: "concourse.web.bindPort" value: "80" - name: "concourse.web.externalUrl" value: ${URL} releaseName: concourse destination: server: https://kubernetes.default.svc namespace: default

Slide 15

Slide 15 text

CI/CD Architecture In my self-study project:

Slide 16

Slide 16 text

Demo

Slide 17

Slide 17 text

Thank you!