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

Gitlab CI 入門

874075a61b80cbb2a152117c7c8bea77?s=47 Jerry
March 19, 2019

Gitlab CI 入門

874075a61b80cbb2a152117c7c8bea77?s=128

Jerry

March 19, 2019
Tweet

Transcript

  1.  GITLAB CI  JERRY CHENG

  2.  • Jerry Cheng • DevOps Engineer •  Software

    Engineer  Agile (?) DevOps   •  
  3. AGENDA •   CI/CD • Why Gitlab CI •

     Gitlab CI •   Gitlab
  4.  CI/CD

  5. CI/CD  Syntax Check Test Build Artifacts Deploy Syntax Check

    Test Build Artifacts Deploy Syntax Check Test Build Artifacts Deploy
  6. WHY GITLAB CI • ! "Gitlab CI  Gitlab 

    •  " .gitlab-ci.yml    •  job  container  " •  Container Registry
  7. None
  8. None
  9. None
  10.  .GITLAB-CI.YML  CI/CD https://docs.gitlab.com/ce/ci/yaml/

  11. SCRIPT https://gitlab.com/gitlab-ci-start/sayhi

  12.   IMAGE https://gitlab.com/gitlab-ci-start/use-image • Image   • 

    
  13. STAGES & JOB https://gitlab.com/gitlab-ci-start/stages-and-job

  14. ARTIFACTS & DEPENDENCIES • Artifacts • Job   •

    Composer install >> ./vendor • Dependencies •   job  https://gitlab.com/gitlab-ci-start/artifacts
  15.  DOCKER • Services •  Link  container •

    Docker in Docker https://gitlab.com/gitlab-ci-start/use-docker
  16. BUILD & DEPLOY composer install docker build (nginx/php) deploy (qa)

    tag (deploy to staging) deploy to production https://gitlab.com/gitlab-ci-start/build-and-deploy
  17.  GITLAB • Docker • Kubernetes

  18. DOCKER  GITLAB •  docker-compose • docker-compose pull &&

    docker-compose up –d () •   host 22port  • https://docs.gitlab.com/omnibus/do cker/#install-gitlab-using-docker- compose
  19. K8S ! GITLAB •  Helm chart (K8S  Package

    Manager)  •  • Gitlab  • Gitlab CI Runner (unprivileged) • Storage (PostgreSQL/Redis/Minio/Container Registry) • Nginx Ingress Controller ( #   tcp22  gitlab shell service) • Cert Manager • "! domain • gitlab.yourdomain • registry.yourdomain • minio.yourdomain •  • https://docs.gitlab.com/ce/install/kubernetes/gitlab _chart.html • Chart • https://gitlab.com/charts/gitlab/tree/master • https://gitlab.com/gitlab-ci-start/gitlab-chart-values
  20. GITLAB CI RUNNER •   Gitlab  • ..

     • https://docs.gitlab.com/runner/
  21.   •   •  CI/CD  •

      
  22. THANKS FOR LISTEN