Most of the approaches introduced in the software development space are designed to make life easier for developers, but what about operations? DevOps was designed to make development and operation systems work better together, and as more teams successfully adopt DevOps, there is an opportunity to tackle and improve the operations process.
According to Steve George, COO of the Kubernetes management platform provider Weaveworks, when you are running applications continuously, operations become a big chunk of the life cycle and the cost to run those applications. “Ultimately you want to improve the development of those applications, that’s why the operations piece is so important,” he said.
GitOps is a new rising force in the industry that is enabling developers to take on more IT operations responsibilities.
What is GitOps?
GitOps was first coined in 2017 by Weaveworks co-founder and CEO Alexis Richardson.
Weaveworks’ definition of GitOps is “a way to do Kubernetes cluster management and application delivery. It works by using Git as a single source of truth for declarative infrastructure and applications. With GitOps, the use of software agents can alert on any divergence between Git with what’s running in a cluster, and if there’s a difference, Kubernetes reconcilers automatically update or roll back the cluster depending on the case. With Git at the center of your delivery pipelines, developers use familiar tools to make pull requests to accelerate and simplify both application deployments and operations tasks to Kubernetes.”
Sven Efftinge, CEO of Gitpod, a development environment solution provider, simplifies the definition as a way to make developers more aware of the operations part or a means to deploying software with a process around it.
Weaveworks’ Davis explained the company first realized GitOps was going to be big when they were working on their SaaS offering, which involves Kubernetes, networking and observability, and someone noticed that if they “pushed a button,” the entire system would “blow away.” So, they pushed the button, and the system “blew away,” but because they had GitOps practices like declarative configuration in place, they were able to get the system back up and running in little time. “That was when we had the realization that there was something to this new cloud-native operational pattern,” she said.
According to Davis, GitOps is best suited for cloud native and scenarios where you have applications with cloud-native architectural patterns like circuit breakers and service discovery.
GitOps and Kubernetes
GitOps is most commonly associated with Kubernetes because applications that are taking advantage of cloud-native patterns work best in a Kubernetes setting, Davis explained. Kubernetes is not mandatory for GitOps, but it does provide key elements for implementing it such as being able to declare a state, add reconcilers and an extensible API.
“Kubernetes is going to be and is the major platform used by enterprises going forward. If you started building an application or operating a large application today, your question has to be why not Kubernetes?” said Weaveworks’ George.
Sheng Liang, co-founder and CEO of Rancher Labs, the enterprise Kubernetes management company, explained that Kubernetes’ ability to declare a state is key because it eliminates risk. “With Kubernetes, everything becomes declarative. You say this is what I want the state of my infrastructure or cloud application to be, and Kubernetes makes it happen. It monitors it on an ongoing basis. If things go bad or something breaks, it does its best to get it back to that desired state, and if it can’t, it alerts you,” he said.
GitOps is a natural extension of this since Git enables developers to store that desired state, and “because the desired state description is a document, you just store it in Git and every time something changes, you just push out the new version. If it goes bad, because Git stores the previous version, you can just go back and then Kubernetes will do whatever it takes to get you back up,” Liang went on to explain. “That is why the declarative way of controlling your infrastructure and deploying applications and using GitOps to manage it is becoming very popular.”
According to Priyanka Sharma, general manager at the Cloud Native Computing Foundation (CNCF), GitOps is to Kubernetes as Git was to Linux. “Kubernetes really unleashes the power of cloud computing, containers, and just building software fast and resiliently, but it’s not going to be super useful if developers can’t use it quickly. GitOps is basically utilizing the Git workflows that every developer is used to,” she said. “Not everyone who is touching Kubernetes is using GitOps, but I know everyone wants to because it would make their life easier.”
GitOps and DevOps
GitOps is also being declared as the “next big thing for DevOps” because of their strong connection. According to Weaveworks’ Davis, while DevOps doesn’t have a concrete set of practices, GitOps does provide a concrete way of doing DevOps.
For instance, Davis explained the top DORA metrics include frequent deployments, shorter lead time, mean time to recover, and change failure rate. “There is a direct correlation between those metrics and GitOps patterns,” she said. GitOps enables self-service for development teams because at the platform layer, you can have developers request the resources they need, provide them in a way that is configured, secure and compliant, and have the ability to roll something back if something goes wrong.
“Folks generally want to have a more reliable way to run and deploy applications. That has always been the driving force behind the whole DevOps and GitOps movement,” said Rancher’s Liang.
Because developers are familiar with Git, it also helps them take a larger operations role. “How many frictions do you create in a developer workflow when you are asking them to do more than ever,” said CNCF’s Sharma. “If you want a developer to take on more operational responsibilities, it’s going to be better if they can do it in a workflow they are used to using. That’s why you need GitOps. It becomes an easy, universal language for developers to understand and thereby start being comfortable running and orchestrating their own containers, or turning on and off cloud computing resources.”
What GitOps is not
The definition of what is and what isn’t GitOps has been one of the more controversial issues around GitOps, CNCF’s Sharma explained. People believe if it doesn’t do x, y or z specifically, then it isn’t GitOps, but that’s just one flavor of GitOps, according to Sharma.
“Anyone who is utilizing the Git workflow to do operations in any way, in my opinion, is GitOps,” she said. “My philosophy is if it is a Git-based workflow making a developer operationalize his or her own code successfully, that is a GitOps workflow.”
Sharma believes a lot of people don’t even know they are using GitOps because they are so used to using Git to check code.”If that is the case, they might not know how much further it can enable them in their Kubernetes journey,” she said.
Gitpod’s Efftinge echoed similar sentiments, saying that DevOps pipelines are typically utilizing GitOps because they are using Git as a central canonical source of truth for everything that is automated. “Basically, you put everything into Git and then from there you drive automation, CI/CD, deployments, and new development,” he said.
However, Weaveworks’ Davis said it is so much more than that. While many emphasize the Git in GitOps, it’s really about the Ops part. “Just like the early days of microservices where we saw businesses trying to take legacy apps and patterns, and stick them into microservices and deploy them… people are starting to take old operational patterns, store them in Git and expect magic,” she explained. “We are pretty adamant that isn’t GitOps. Just because you put something in Git doesn’t make it GitOps. It isn’t actually the central part of GitOps. Ops is the central part of GitOps.”
Git is important because it has certain semantics like an immutable version history, but it needs to be connected to software agents.
Weaveworks’ 4 principles of GitOps are:
- The entire system is described declaratively
- The canonical desired system state is versioned in Git
- Approved changes can be automatically applied to the system
- Software agents are used to ensure correctness and alert on divergence
“The key cloud-native pattern, which is reconciliation of the fact that you are never done, that things are always correcting themselves, and you always have to respond to change is something that is popularized from Kubernetes,” she said. “The biggest misconception is that people don’t think about the reconciliation loops. And it goes back to cloud native, which is all about constant change so you are constantly reconciling.”
“Kubernetes and cloud native are changing the way we are going to be developing and operating applications and GitOps is speaking to those management practices. In many ways, the future for GitOps is the same for cloud native. It is helping teams take advantage of it. We are right at the beginning of that journey,” Weaveworks’ George added.
Credit: Source link