피드 구독

Many people and organizations have written about GitOps, including the original definition by Weaveworks, the concept's creator; Kelsey Hightower's much-cited tweet ("GitOps: versioned CI/CD on top of declarative infrastructure. Stop scripting and start shipping"); and Red Hat's What is GitOps? article.

In this article, I'll share one example workflow for GitOps from the enterprise architect's point of view.

What is GitOps?

Before implementing GitOps, it is essential to understand its four guiding principles outlined by the Open GitOps project:

  1. The principle of declarative desired state
    A system managed by GitOps must have its desired state expressed declaratively as data in a format writable and readable by both humans and machines.
  2. The principle of immutable desired state versions
    The desired state is stored in a way that supports versioning and immutability of versions and retains a complete version history.
  3. The principle of continuous state reconciliation
    Software agents continuously and automatically compare a system's actual state to its desired state. If the actual and desired states differ for any reason, initiate automated actions to reconcile them.
  4. The principle of operations through declaration
    The only mechanism through which the system is intentionally operated on is through these principles.

You can think of these principles as your runway lighting: They guide you toward adoption and help you land on your target destination as smoothly as possible. Also, if you're ever in doubt about your GitOps adoption, you can always look back at these principles to guide your team in the right direction.

[ Download An architect's guide to multicloud infrastructure. ]

An example GitOps workflow: Kubernetes

To help you understand the four guiding principles, I'll translate them into a Kubernetes perspective.

For this use case, I recommend using ArgoCD as the software agent that detects drift and synchronizes systems (or environments) to the source of truth (which is Git), satisfying the fourth GitOps principle.

  1. Store all Kubernetes resource configurations in Git.
  2. Use only pull requests to modify resources on that Git repo. For Kubernetes, that will include all the YAML files used to track Kubernetes configuration—from pod definitions to deployments.
  3. All Git modifications trigger a post-commit hook or Ansible integration that immediately applies the changes to the cluster.
  4. If the actual state drifts from the committed state in Git, trigger the same post-commit hook or Ansible integration path or alert the operations team.

[ Learn the basics of using Kubernetes in this free cheat sheet. ]

Speaking the same language

GitOps, if appropriately implemented, gives your team and broader organization the patterns to facilitate dev and ops teams working as one. Having both teams speak the same "language"—Git—improves the deployment velocity for business success. That is why automation architects and their peers should invest in GitOps.

Implementing new practices in an organization will always be challenging. Knowing this, it is vital to have a proper communication strategy in mind as you propose changes. As an architect, you need to be able to apply the principles of GitOps to your organization and decide on a path of least resistance toward adoption.

So as your fellow architect, I recommend you be ready to adopt GitOps and use it as your vehicle to yet another successful and exciting step forward for your organization.


저자 소개

Mike Calizo is a Principal Customer Service Manager at Elastic. Before Elastic, he was an Associate Principal Solution Architect based in New Zealand. His technology focuses are OpenShift, RHEL, Satellite, and Ansible. Mike is also a very active member of the open source community and enjoys organizing and presenting at Ansible and OpenShift Meetups in New Zealand several times a year.

Read full bio
UI_Icon-Red_Hat-Close-A-Black-RGB

채널별 검색

automation icon

오토메이션

기술, 팀, 인프라를 위한 IT 자동화 최신 동향

AI icon

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Original series icon

오리지널 쇼

엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리