惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
博客园_首页
T
Tailwind CSS Blog
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 聂微东
S
SegmentFault 最新的问题
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
Jina AI
Jina AI
WordPress大学
WordPress大学
U
Unit 42
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog

Luca Cavallin

AI Engineering for Developers | Blog AI Engineering for Developers Platform Engineering End-to-End | Blog Google Cloud Networking 101: The Comprehensive TLDR | Blog Google Cloud Networking 101: The Comprehensive TLDR Containers Are Not Automatically Secure | Blog Containers Are Not Automatically Secure Watery Stone Beacon | Photography Blue Iceman Suture | Photography Hidden Emerald Pool | Photography Autumn Chapel Pinnacles | Photography A Tour of eBPF in the Linux Kernel: Observability, Security and Networking | Blog A Tour of eBPF in the Linux Kernel: Observability, Security and Networking Shared Violet Pulse | Photography Kubernetes Networking from Packets to Pods | Blog An Overview of Network Protocols | Blog An Overview of Network Protocols A Quick Journey Into the Linux Kernel | Blog A Quick Journey Into the Linux Kernel OpenTelemetry: A Guide to Observability with Go | Blog I'm on the Cillers Podcast Talking About Tech and Hackathons | Blog Yet Another List of Random Opinions on Writing Readable Code and Other Rants | Blog My post about Istio is now on the Istio blog too! | Blog Tropical Jungle Escape | Photography The Istio Service Mesh for People Who Have Stuff to Do | Blog Dreamy Cartoonscape Windmill | Photography Twilight Windmill Reflections | Photography Notes I took while reading "Applied Machine Learning and AI for Engineers" and "Introducing MLOps" | Blog Things I've Learned About Terraform That I Keep Telling People About | Blog Analyzing Unsplash Photo Performance with Python | Blog
What is GitOps?
Luca Cavallin · 2021-12-02 · via Luca Cavallin

← all posts

deploymentgitdevopscicdcncf

GitOps is an operational approach combining DevOps best practices like CI/CD, version control, and teamwork.

Luca Cavallin

Luca Cavallin

Published

⏱ 3 min read

What is GitOps?

GitOps is known as an operational framework that takes the best practices of DevOps, such as CI/CD, version control and collaboration and applies them to infrastructure automation. GitOps is a set of code-based practices that use Git, an open-source version control system, to manage infrastructure and application configurations. Git is the single source of truth, and pull requests are used to verify and automatically manage/deploy infrastructure changes. Just like developers use application source code, operation teams that practice GitOps use infrastructure as code (configurations files stored as code) to generate the same infrastructure environment during each deployment. In short, GitOps uses similar processes and tools used in software development to manage infrastructure, ensuring the automation that teams need.

How does GitOps work?

Since GitOps involves Git as a version control system, it can be considered an advancement in Infrastructure as Code (IaC). In GitOps, changes are triggered via pull requests that change the state in the Git repository.

A GitOps workflow for updating or creating new feature is as follow:

  • Initiate a pull request for the new feature in Git

  • Review code and merge it to Git

  • Git will automatically trigger CI and build pipelines, run tests, apply infrastructure changes and create -when in a container-based environment- a new image which is then uploaded to the registry

  • Specifically for applications, deployment tools can be used to automatically update the running version on, for example, a Kubernetes cluster or another serverless product

The workflows of GitOps are meant to improve productivity and speed of development and deployment, along with ensuring that systems remain stable and reliable!

Pros and Cons of GitOps

Following are the major pros and cons associated with GitOps:

Pros

  • It enhances the DevOps team's productivity, as they can instantly deploy new configurations of infrastructures. If the changes aren't performing as required, the Git history lets the team easily revert to a stable state

  • It ensures faster deployment, as the team does not have to switch between tools for deploying the application (application and infrastructure changes can be deployed using the same tools)

  • It brings end-to-end standardization to the workflow

  • It can scale to hundreds of Kubernetes clusters

  • Since Git is used for storing the complete information of the deployed infrastructure, changes can easily be tracked and also it encourages a culture of sharing knowledge in teams

  • With automation in infrastructure definition and testing, lots of manual work go away. The team becomes more productive, while downtime gets reduced due to rollback/revert capability. GitOps can lower costs significantly!

Cons

  • GitOps encourages collaboration, but it also sometimes becomes a time-consuming and tedious job. For example, the approval process in GitOps involves many stages, such as creating a merge request, approving the changes, and deploying the changes. Engineers that are used to doing manual and fast changes might feel the whole process is time-consuming.

  • Collaborative culture also requires discipline from all the members to ensure commitment to the process. Moreover, teams are required to write and formalize everything so that GitOps can work perfectly.

Summary

GitOps is a powerful framework for managing modern infrastructure with a focus on the developer experience. It enables infrastructure management from the same version control system involved in application development, empowering teams to have a central collaborative environment with improved system reliability and stability.

Luca Cavallin

Platform Engineer at Xebia working on the infrastructure beneath AI. Google Developer Expert & CNCF Ambassador. Writes here for ~10,000 readers a month.

More about Luca