Concepts
What is GitOps?
GitOps in its simplest form means operations via Git. This guide will explain further what it is and how it applies to Featurevisor projects.
Git
If you have ever worked on a software project, you are probably familiar with Git - a tool for tracking changes in source code. There are several Git hosting providers like GitHub and GitLab which you might have used already.
But what if we told you that Git could be used for much more than just that? Enter GitOps, a term that's gaining traction in the software engineering community.
GitOps
GitOps is like treating your infrastructure and operational tasks as if they were code. It builds on top of the principles of Infrastructure as Code (IaC).
Imagine that you have a recipe book (your Git repository) that contains all the instructions (code) for making a dish (your software).
Normally, chefs (developers) would update the recipe book and then cook the dish manually. But what if the kitchen could read the book and update the dish automatically every time the recipe changes?
That's essentially what GitOps does for software deployment and operations. It automates the process of applying changes to your infrastructure based on changes to a Git repository. This makes it easier to manage, track, and roll back changes, all while using familiar tools like Git.
Why should you care?
- Declarative: You define the desired state of your infrastructure in a Git repository in a highly readable format
- Transparency: All changes are tracked in Git, so you can easily see who made what change and when.
- Speed: Automation means faster deployments, which means you get features and fixes out to users more quickly.
- Collaboration: Because everything is stored in Git, team members can easily collaborate on changes through Pull Requests, which go via strict reviews and approval process.
- Consistency: Automation ensures that the steps are repeated exactly each time, reducing human error.
How does it affect Featurevisor?
Featurevisor is an open-source project that falls perfectly in line with the GitOps model. It manages your features which can be either on/off switches, variations for A/B testing, or even variables as remote configuration for specific functionalities in your software including their rollout rules.
These features are declared as individual files in a Git repository.
How does it work?
- Declare feature flags: Developers declare feature flags as files and store them in a Git repository.
- Review & approve: Any changes to feature flags must be submitted as Pull Requests in Git, allowing team members to review and approve changes.
- Automate with CI/CD: Featurevisor is tightly integrated with your preferred Continuous Integration/Continuous Deployment (CI/CD) pipeline. When a Pull Request is merged, the pipeline automatically deploys the new configurations.
You can find out more info about setting up custom deployment here.
Once deployed, all the applications that use Featurevisor SDKs will automatically fetch the latest feature flags and apply them to their respective environments.
Does it limit non-technical users?
As engineers, we might love the idea of managing all sorts of configuration in a Git repository because it fits our regular workflow without having to learn something new. But what about non-technical users like your Product Managers in a team?
If it comes to read-only operations, Featurevisor comes with a status site generator so that the current status of all your feature flags, their targeting conditions, and rollout rules can be easily viewed by anyone in your team and organization via a nice and usable website.
With Git hosting providers becoming more usable over time allowing changes to be made directly from your browser (like with GitHub), one does not have to be technically too advanced to find the YAML files in a Git repository to read and understand them. They can also send changes of their desired feature flags by updating or creating new files straight from the browser.
But this does come with an additional learning curve. The list below can help get up to speed with the basics of Git and GitHub:
Learning resources
Assuming you are using GitHub, you can refer to these resources to learn how to send changes to your Git repository directly from your browser:
- About branches
- Creating a branch
- Editing files
- Creating a Pull Request
- Requesting a review
- Comment on a Pull Request
- Merging a Pull Request
Conclusion
GitOps is a modern approach to software deployment and operations that leverages the power of Git. Featurevisor, with its GitOps model, provides a highly collaborative, transparent, and efficient way to manage feature flags in a software project. Whether you are a developer, an operations engineer, or a product manager, the GitOps methodology offers benefits that make your workflow smoother, more transparent, and more efficient.