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:
- 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. - 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. - 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. - 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.
- Store all Kubernetes resource configurations in Git.
- 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.
- All Git modifications trigger a post-commit hook or Ansible integration that immediately applies the changes to the cluster.
- 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.
Sobre el autor
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.
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Programas originales
Vea historias divertidas de creadores y líderes en tecnología empresarial
Productos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Servicios de nube
- Ver todos los productos
Herramientas
- Training y Certificación
- Mi cuenta
- Soporte al cliente
- Recursos para desarrolladores
- Busque un partner
- Red Hat Ecosystem Catalog
- Calculador de valor Red Hat
- Documentación
Realice pruebas, compras y ventas
Comunicarse
- Comuníquese con la oficina de ventas
- Comuníquese con el servicio al cliente
- Comuníquese con Red Hat Training
- Redes sociales
Acerca de Red Hat
Somos el proveedor líder a nivel mundial de soluciones empresariales de código abierto, incluyendo Linux, cloud, contenedores y Kubernetes. Ofrecemos soluciones reforzadas, las cuales permiten que las empresas trabajen en distintas plataformas y entornos con facilidad, desde el centro de datos principal hasta el extremo de la red.
Seleccionar idioma
Red Hat legal and privacy links
- Acerca de Red Hat
- Oportunidades de empleo
- Eventos
- Sedes
- Póngase en contacto con Red Hat
- Blog de Red Hat
- Diversidad, igualdad e inclusión
- Cool Stuff Store
- Red Hat Summit