{"id":263137,"date":"2021-05-31T15:00:41","date_gmt":"2021-05-31T12:00:41","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/"},"modified":"2021-05-31T15:00:41","modified_gmt":"2021-05-31T12:00:41","slug":"what-is-gitops-and-why-does-it-matter-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/","title":{"rendered":"#What Is \u201cGitOps\u201d and Why Does It Matter? \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2738c82d970\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2738c82d970\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/#What_Is_Git\" >What Is Git?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/#Declarative_Infrastructure\" >Declarative Infrastructure<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/#Ability_to_Verify\" >Ability to Verify<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/#Challenges_with_GitOps\" >Challenges with GitOps<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-gitops-and-why-does-it-matter-cloudsavvy-it\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#What Is \u201cGitOps\u201d and Why Does It Matter? \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<figure style=\"width: 2472px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage wp-image-11634 size-full\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/05\/c4e389f1.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"git logo on background\" width=\"2472\" height=\"1200\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-photo\/moscow-russia-1-june-2020-git-1771315985\">Shutterstock\/Postmodern Studio<\/a><\/span><\/figcaption><\/figure>\n<p>GitOps is an <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>roach to infrastructure that takes the best practices of software development and applies them to IT systems. GitOps builds upon the Infrastructure as Code model to create an automated infrastructure model that\u2019s collaborative and versioned like your code.<\/p>\n<p>A modern operations team will routinely spin up new services for each deploy. Container instances, databases, and networking equipment need to be available for deployments to succeed.<\/p>\n<p>GitOps defines the resources to provision as files that exist in a Git repository. This lets everyone on the team inspect and contribute to the infrastructure that will be provisioned. You can use CI pipelines to verify your configuration and ultimately push it out to your cloud platform.<\/p>\n<p>An infrastructure repository ends up looking very much like a software repository. You create a branch for each change, update your configuration files, complete a review, and merge into your main branch. An automated tool, such as <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.ansible.com\">Ansible<\/a> or <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.terraform.io\">Terraform,<\/a> then applies the changes to your environment. The workflow is the same versioned branching model that developers use.<\/p>\n<h2 id=\"what-is-git\"><span class=\"ez-toc-section\" id=\"What_Is_Git\"><\/span>What Is Git?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Git in GitOps refers to the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/git-scm.com\">Git version control system<\/a>. Git has become the source control tool of choice for most developers. It has a decentralized storage model and emphasizes the use of local branches to evolve changes.<\/p>\n<p>Version control systems make it easy to iterate on your work. You can tackle self-contained components in parallel, using branches, before merging into a main branch that represents the \u201creleased\u201d version of your project. You push your code to a shared repository, often on a service like GitHub or GitLab, to share it with others.<\/p>\n<h2 id=\"declarative-infrastructure\"><span class=\"ez-toc-section\" id=\"Declarative_Infrastructure\"><\/span>Declarative Infrastructure<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>GitOps\u2019 biggest strength lies in its role as the source of truth. Anyone can learn what your infrastructure looks like by referring to the files in your Git repository. You\u2019ll have a set of configuration files that define the characteristics of your system.<\/p>\n<p>Configuration files are usually <em>declarative<\/em> in nature\u2014they describe the system in the present tense. You \u201cdeclare\u201d that there should be five servers in your architecture, instead of providing a list of commands that directly start five servers. Your provisioning tool converts your statements into a sequence of commands that move your infrastructure toward the desired state.<\/p>\n<p>This is where continuous integration (CI) comes in. A software developer will run automated pipelines to execute unit tests, perform static analysis, and eventually, deploy to production. A typical infrastructure team pipeline will check your config files for syntax errors before pushing them to an agent that applies the changes to your systems.<\/p>\n<h2 id=\"ability-to-verify\"><span class=\"ez-toc-section\" id=\"Ability_to_Verify\"><\/span>Ability to Verify<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Being able to use CI pipelines to enact infrastructure changes lets you verify that those changes will actually work as intended. GitOps also provides the ability of ongoing verification where agents in your infrastructure constantly monitor for discrepancies.<\/p>\n<p>The repository is the single source of truth. It follows that any difference observed in the real system is an error that should be corrected. An agent with access to the repository and the provisioned resources can take action to correct the current state if it no longer matches your declarations.<\/p>\n<p>GitOps aids you in observing your infrastructure. Declarative configuration files provide an explanation of how your systems entered their current state. You can inspect the repository\u2019s Git commits to understand how the infrastructure evolved over time.<\/p>\n<p>GitOps can also offer a way to rollback infrastructure changes. At its simplest, reverting to a previous commit restores a previous version of your configuration files. Actually applying them can be challenging, though. Whereas code can be reverted by simply overwriting the current deployment, \u201creversing\u201d the creation\u2014or deletion\u2014of infrastructure is much less straightforward.<\/p>\n<p>You\u2019ll need to evaluate the rollout agent that you\u2019re using to determine whether rollbacks are a realistic possibility. If an in-place rollout isn\u2019t possible, you can at least revert the commits in your repository and re-deploy them into a clean slate environment. You\u2019d then use your restoration procedures to reinstate your data.<\/p>\n<h2 id=\"challenges-with-gitops\"><span class=\"ez-toc-section\" id=\"Challenges_with_GitOps\"><\/span>Challenges with GitOps<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Lack of maturity is the biggest obstacle to GitOps adoption. The term remains opaque to operations teams that could be relatively inexperienced with version-controlled workflows.<\/p>\n<p>Many infrastructure teams will be used to working practices they\u2019ve honed over the past couple of decades. They SSH into servers, make their changes, and document them in a centrally maintained wiki. It\u2019s uncontrolled, but it\u2019s simple, and it works.<\/p>\n<p>GitOps addresses the lack of control and can improve visbility into the state of systems. At the same time, there\u2019s a learning curve that involves a structured workflow and a very different set of tools. Direct SSH access is no longer appropriate. Instead, you make changes by editing files and waiting for a CI pipeline to apply them.<\/p>\n<p>Getting buy-in from relevant teams can be the biggest issue when introducing GitOps to a new organization. Be prepared for decision-makers to misunderstand where the value lies or fail to recognize it altogether. Some will be frustrated by having to commit, merge, and seek approval for changes that they could achieve manually by using a quick SSH command. GitOps remains where DevOps was a few years ago, waiting to see widespread adoption outside of technical literature.<\/p>\n<p>Aside from organizational pushback, GitOps has practical weaknesses, too. One common challenge is rolling out to multiple different environments. A common approach is to assign each environment its own branch in the repository. This quickly becomes clunky if you have a lot of environments. An alternative approach could be based around multiple repositories, perhaps using Git submodules, but this just moves the redundancy elsewhere.<\/p>\n<p>GitOps is still a young concept, and there aren\u2019t established patterns for its implementation. Without a reference architecture, you\u2019ll need to experiment independently. This adds further to the list of unknowns for organizations assessing the model\u2019s suitability.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>Automating Continuous Delivery in Containers with CodeBuild, ECR, and CodeDeploy<\/em><\/strong><\/p>\n<h2 id=\"summary\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>GitOps is an approach to managing IT infrastructure that uses a Git repository as the source of truth. You write declarative configuration files that describe the resources that you want to be provisioned. An automated system takes those files and uses them to evolve the state of your infrastructure.<\/p>\n<p>As a concept, GitOps makes a lot of sense. It reduces the gap between dev and ops teams by unifying the workflow. You get greater visibility into your infrastructure and the ability to version and audit changes.<\/p>\n<p>Yet GitOps remains challenging to implement in many cases. It requires organizational buy-in, acceptance of some inherent inefficiencies, and a commitment to resolve technical issues that you might not necessarily foresee. Organizations that go all-in on GitOps can expect to see stronger consistency and standardization. But for many others, the benefits provided aren\u2019t yet a sufficient incentive to throw away the CLI commands in a sysadmin\u2019s terminal.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/11472\/what-is-gitops-and-why-does-it-matter\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#What Is \u201cGitOps\u201d and Why Does It Matter? \u2013 CloudSavvy IT&#8221; Shutterstock\/Postmodern Studio GitOps is an approach to infrastructure that takes the best practices of software development and applies them to IT systems. GitOps builds upon the Infrastructure as Code model to create an automated infrastructure model that\u2019s collaborative and versioned like your code. A&#8230;<\/p>\n","protected":false},"author":1,"featured_media":263138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/05\/c4e389f1.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-263137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/263137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=263137"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/263137\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/263138"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=263137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=263137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=263137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}