Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction of Cloud Native CI/CD on Kubernetes

Introduction of Cloud Native CI/CD on Kubernetes

Slides for in-house study meeting.

Kyohei Mizumoto

August 30, 2019
Tweet

More Decks by Kyohei Mizumoto

Other Decks in Technology

Transcript

  1. 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
  2. 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
  3. 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
  4. 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/
  5. 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
  6. 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