SlideShare a Scribd company logo
1 of 46
Download to read offline
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

Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurbSidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
Koichiro Sumi
 

What's hot (20)

CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
Deploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOpsDeploy 22 microservices from scratch in 30 mins with GitOps
Deploy 22 microservices from scratch in 30 mins with GitOps
 
DevOps Explained
DevOps ExplainedDevOps Explained
DevOps Explained
 
CI CD Basics
CI CD BasicsCI CD Basics
CI CD Basics
 
Gitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCDGitlab, GitOps & ArgoCD
Gitlab, GitOps & ArgoCD
 
[2019 DevOpsDays Taipei]Azure DevOps 建立 DevOps 團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立 DevOps 團隊[2019 DevOpsDays Taipei]Azure DevOps 建立 DevOps 團隊
[2019 DevOpsDays Taipei]Azure DevOps 建立 DevOps 團隊
 
Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurbSidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
Sidekiq Proを1年ほど使ってみて良かったところ、困ったところ | 新宿.rb 29th #shinjukurb
 
Cloud Native Patterns Using AWS - Practical Examples
Cloud Native Patterns Using AWS - Practical ExamplesCloud Native Patterns Using AWS - Practical Examples
Cloud Native Patterns Using AWS - Practical Examples
 
GitOps and ArgoCD
GitOps and ArgoCDGitOps and ArgoCD
GitOps and ArgoCD
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
DevOps explained
DevOps explainedDevOps explained
DevOps explained
 
DevOps
DevOps DevOps
DevOps
 
What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...
What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...
What Is DevOps? | Introduction To DevOps | DevOps Tools | DevOps Tutorial | D...
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
Azure API Management 俺的マニュアル
Azure API Management 俺的マニュアルAzure API Management 俺的マニュアル
Azure API Management 俺的マニュアル
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 
Azure DevOps in Action
Azure DevOps in ActionAzure DevOps in Action
Azure DevOps in Action
 
Azure DevOps Presentation
Azure DevOps PresentationAzure DevOps Presentation
Azure DevOps Presentation
 
An introduction to DevOps
An introduction to DevOpsAn introduction to DevOps
An 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
 
和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow和艦長一起玩轉 GitLab & GitLab Workflow
和艦長一起玩轉 GitLab & GitLab Workflow
 
Scaling Up Lookout
Scaling Up LookoutScaling Up Lookout
Scaling Up Lookout
 
Git of Parts
Git of PartsGit of Parts
Git of Parts
 
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastrutturaGitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
 

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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

From DevOps to GitOps with GitLab