SlideShare a Scribd company logo
Photo by Abele Gigante on Unsplash Cheng Wei Chen @ Cloud Edge Sumit 2020
From DevOps to GitOps
with GitLab
Cheng Wei Chen 陳 正瑋
DevOps Engineer @ 得寬科技

《Effective DevOps 中文版》譯者、GitLab Hero
http://chengweichen.com
https://devopstw.club
Agenda
‧什麼是 GitOps
‧範例分享
‧如何開始實踐 GitOps
‧結語
STORY
Photo by Timothy Meinberg on Unsplash
Commit
Code OK!
Dev
Ops
Deploy
Code
炸
炸炸
啊~我忘了了說有⼀一個新的 Config ~
Commit
Code OK Again !
Dev
Ops
Code
Deploy
炸
炸炸
AgainAgainAgain
Ops啊!我昨天有⼿手動改了了
⼀一個 Config,應該不是
這個原因吧?
Commit
Code OK Again x2
Dev
Ops
Code
Deploy
炸
炸炸
AgainAgainAgain
AgaiAgaAga
炸
炸炸炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
炸
炸炸
Infra
Infra 有⼀一些調整,忘了了
跟你說~
Photo by Fancycrave on Unsplash
什什麼是 GitOps
Provision
Code DeployArtifacts Production
⼀一條龍
⼯工程師
Configuration
Provision
Code DeployCI / CD Production
⼀一條龍
⼯工程團隊
Configuration
Automation
Code DeployCI / CD Production
⼀一條龍
⼯工程團隊
Configuration
Automation
Ops / Infra
團隊
Provision
圖片來來源 https://youtu.be/Usb9iUphT6Y
GitOps = IaC + MRs + CI/CD
GitLab 說的~
GitOps = IaC + MRs + CI/CD
Infrastructure as Code
Infrastructure System Configuration Application Configuration
GitOps = IaC + MRs + CI/CD
Merge Requests
GitOps = IaC + MRs + CI/CD
Continuous Integration
Continuous Delivery
And Automation
GitOps = IaC + MRs + CI/CD
DevOps
Photo by Fancycrave on Unsplash
範例例分享
新 Issue
Coding
Commit CI/CD Pipeline
建立 Feature branch
測試驗收
Feature branch
Master branch
Prod Pipeline
新 Issue
Merge
Merge
Monitor
Production branch
Feedback
Code Review
CI/CD Pipeline
Commit
檢查 .gitlab-ci.yml
GitLab
Server
產⽣生 CI/CD Pipeline
GitLab
Runner
執行 Job
CI Job
回傳 Logs
顯⽰示於 Pipeline
Terraform Ansible
Cloud
Vault Repository
Cloud
Cloud
App
Infra
GitLab
Runner
1. App 有更更新嗎?
2. infra 有更更新嗎?
3.有!執⾏行行異異動!
Worker
Build Test Release
Validate Plan
Validate Plan Approve
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
圖片來來源 https://gitlab.com/gitops-demo/readme
Photo by Fancycrave on Unsplash
如何開始實踐 GitOps
1. IaC
2. Automation
3. Code Review & Approve
4. Multi environment
5. CI/CD
6. Use Repository
7. Agile & Iteration
DevOps
1. IaC
讓⼀一切都成為 Code
2. Automation
盡可能⾃自動化
如果不成,就紀錄它!
3. Code Review & Approve
審查、複閱、檢查、稽核
4. Multi environment
運⽤用在所有的環境!
5. CI/CD
⾃自動化的唯⼀一觸發點!
6. Use Repository
分⽀支策略略、Flow、Workflow
7. Agile & Iteration
⼩小粒度、多迭代
Tools
VCS
CI
CD
Container Registry
CM
IaC
Container orchestration
Yes
Yes
Yes
Yes
透過 Runner 間接運⽤用
透過 Runner 間接運⽤用
可整合
Photo by Fancycrave on Unsplash
結語
GitOps = IaC + MRs + CI/CD
GitOps is IaC done right !
DevOps, then GitOps !
GitOps is not for everyone !
(with K8S)
現階段

More Related Content

What's hot

The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
Weaveworks
 

What's hot (20)

Kubernetesのワーカーノードを自動修復するために必要だったこと
Kubernetesのワーカーノードを自動修復するために必要だったことKubernetesのワーカーノードを自動修復するために必要だったこと
Kubernetesのワーカーノードを自動修復するために必要だったこと
 
The Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps ToolkitThe Power of GitOps with Flux & GitOps Toolkit
The Power of GitOps with Flux & GitOps Toolkit
 
GitOps w/argocd
GitOps w/argocdGitOps w/argocd
GitOps w/argocd
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
intro to DevOps
intro to DevOpsintro to DevOps
intro to DevOps
 
DevOps Culture
DevOps CultureDevOps Culture
DevOps Culture
 
DevOps
DevOps DevOps
DevOps
 
和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow
 
Devops Devops Devops
Devops Devops DevopsDevops Devops Devops
Devops Devops Devops
 
DevOps Introduction
DevOps IntroductionDevOps Introduction
DevOps Introduction
 
DevOps 101 - an Introduction to DevOps
DevOps 101  - an Introduction to DevOpsDevOps 101  - an Introduction to DevOps
DevOps 101 - an Introduction to DevOps
 
DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..
 
Istio a service mesh
Istio   a service meshIstio   a service mesh
Istio a service mesh
 
DevOps
DevOpsDevOps
DevOps
 
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | EdurekaDevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
DevOps vs Agile | DevOps Tutorial For Beginners | DevOps Training | Edureka
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and Linkerd
 
Argo CD Deep Dive
Argo CD Deep DiveArgo CD Deep Dive
Argo CD Deep Dive
 
About DevOps in simple steps
About DevOps in simple stepsAbout DevOps in simple steps
About DevOps in simple steps
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 

Similar to From DevOps to GitOps with GitLab

40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflow
Ruben Tan
 

Similar to From DevOps to GitOps with GitLab (20)

Gitlab meets Kubernetes
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetes
 
JHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tddJHipster conf : craftsmanship & tdd
JHipster conf : craftsmanship & tdd
 
Docker is killing your #devops Efforts
Docker is killing your #devops EffortsDocker is killing your #devops Efforts
Docker is killing your #devops Efforts
 
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
[KubeCon NA 2018] Effective Kubernetes Develop: Turbocharge Your Dev Loop - P...
 
From Config Management Sucks to #cfgmgmtlove
From Config Management Sucks to #cfgmgmtlove From Config Management Sucks to #cfgmgmtlove
From Config Management Sucks to #cfgmgmtlove
 
Foundations for the perfect technology stream
Foundations for the perfect technology streamFoundations for the perfect technology stream
Foundations for the perfect technology stream
 
Visual Studio Mobile Center: A story about mobile DevOps
Visual Studio Mobile Center: A story about mobile DevOpsVisual Studio Mobile Center: A story about mobile DevOps
Visual Studio Mobile Center: A story about mobile DevOps
 
Ivy renderer
Ivy rendererIvy renderer
Ivy renderer
 
40 square's git workflow
40 square's git workflow40 square's git workflow
40 square's git workflow
 
How can Enterprises benefit from GitOps.pdf
How can  Enterprises benefit from GitOps.pdfHow can  Enterprises benefit from GitOps.pdf
How can Enterprises benefit from GitOps.pdf
 
Docker e git lab
Docker e git labDocker e git lab
Docker e git lab
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols10 Deployments a day - A brief on extreme release protocols
10 Deployments a day - A brief on extreme release protocols
 
gopaddle-meetup
gopaddle-meetupgopaddle-meetup
gopaddle-meetup
 
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
Accelerated compositing in WebKit: Now and in the future (DEVIEW 2015)
 
Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics
 
Scaling Up Lookout
Scaling Up LookoutScaling Up Lookout
Scaling Up Lookout
 
Git of Parts
Git of PartsGit of Parts
Git of Parts
 
Nightmare on Docker street
Nightmare on Docker streetNightmare on Docker street
Nightmare on Docker street
 
[k8s] github CICD (1).pdf
[k8s] github CICD (1).pdf[k8s] github CICD (1).pdf
[k8s] github CICD (1).pdf
 

More from Chen Cheng-Wei

More from Chen Cheng-Wei (20)

GitLab Auto DevOps 大解析—CI/CD 原來可以這樣做
GitLab Auto DevOps 大解析—CI/CD 原來可以這樣做GitLab Auto DevOps 大解析—CI/CD 原來可以這樣做
GitLab Auto DevOps 大解析—CI/CD 原來可以這樣做
 
Become a GitLab Hero
Become a GitLab HeroBecome a GitLab Hero
Become a GitLab Hero
 
以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享以自動化先行的 DevOps 實踐經驗分享
以自動化先行的 DevOps 實踐經驗分享
 
SRE 讀書會:導讀《持續交付》第15章 - 持續交付管理
SRE 讀書會:導讀《持續交付》第15章 - 持續交付管理SRE 讀書會:導讀《持續交付》第15章 - 持續交付管理
SRE 讀書會:導讀《持續交付》第15章 - 持續交付管理
 
DevOpsDays Taiepi 2018 - Farewell 閉幕
DevOpsDays Taiepi 2018 - Farewell 閉幕DevOpsDays Taiepi 2018 - Farewell 閉幕
DevOpsDays Taiepi 2018 - Farewell 閉幕
 
SRE 讀書會 - 導讀:第 31 章
SRE 讀書會 - 導讀:第 31 章SRE 讀書會 - 導讀:第 31 章
SRE 讀書會 - 導讀:第 31 章
 
SRE 讀書會 - 導讀:第 30 章
SRE 讀書會 - 導讀:第 30 章SRE 讀書會 - 導讀:第 30 章
SRE 讀書會 - 導讀:第 30 章
 
跟著 geerlingguy 大神
一起測試 Ansible Roles
跟著 geerlingguy 大神
一起測試 Ansible Roles跟著 geerlingguy 大神
一起測試 Ansible Roles
跟著 geerlingguy 大神
一起測試 Ansible Roles
 
iThome Serverless All-Star 開場
iThome Serverless All-Star 開場iThome Serverless All-Star 開場
iThome Serverless All-Star 開場
 
CI/CD、自動化,你還沒準備好(GCPUG.TW Meetup #34)
CI/CD、自動化,你還沒準備好(GCPUG.TW Meetup #34)CI/CD、自動化,你還沒準備好(GCPUG.TW Meetup #34)
CI/CD、自動化,你還沒準備好(GCPUG.TW Meetup #34)
 
Ignite talks
Ignite talksIgnite talks
Ignite talks
 
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
Ansible & GitLab CI / CD Workshop 101 ( @Agile Tour Taipei 2017)
 
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
 
Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)Effective DevOps (Agile Tour HsinChu 2017)
Effective DevOps (Agile Tour HsinChu 2017)
 
SRE 讀書會 - 導讀:第一章
SRE 讀書會 - 導讀:第一章SRE 讀書會 - 導讀:第一章
SRE 讀書會 - 導讀:第一章
 
DevOpsDays Taipei 2017 Opening Talk
DevOpsDays Taipei 2017 Opening TalkDevOpsDays Taipei 2017 Opening Talk
DevOpsDays Taipei 2017 Opening Talk
 
DevOpsDays Taipei 2017 Farewell
DevOpsDays Taipei 2017 FarewellDevOpsDays Taipei 2017 Farewell
DevOpsDays Taipei 2017 Farewell
 
Effective DevOps:一場文化與技術的轉型運動
Effective DevOps:一場文化與技術的轉型運動Effective DevOps:一場文化與技術的轉型運動
Effective DevOps:一場文化與技術的轉型運動
 
Ignite talks - 自動化的關鍵
Ignite talks - 自動化的關鍵Ignite talks - 自動化的關鍵
Ignite talks - 自動化的關鍵
 
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
提到 DevOps 到底在
談些什麼玩意兒?(@ Agile Tour Taichung 2017)
 

Recently uploaded

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

From DevOps to GitOps with GitLab