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

Gitlab CI 入門

Avatar for Jerry Jerry
March 19, 2019

Gitlab CI 入門

Avatar for Jerry

Jerry

March 19, 2019
Tweet

More Decks by Jerry

Other Decks in Technology

Transcript

  1.  • Jerry Cheng • DevOps Engineer •  Software

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

     Gitlab CI •   Gitlab
  3. CI/CD  Syntax Check Test Build Artifacts Deploy Syntax Check

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

    •  " .gitlab-ci.yml    •  job  container  " •  Container Registry
  5. ARTIFACTS & DEPENDENCIES • Artifacts • Job   •

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

    Docker in Docker https://gitlab.com/gitlab-ci-start/use-docker
  7. 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
  8. 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
  9. 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
  10. GITLAB CI RUNNER •   Gitlab  • ..

     • https://docs.gitlab.com/runner/