GitOps - A Practical Implementation
Introduction
In the first chapter of our series, we provided a high-level overview of the current Kubernetes and GitOps landscape. In the following article, we introduced the key tools we use at DGITAL to implement effective GitOps workflows. Now, in this final installment, we would like to present a detailed case study that brings everything together, with real-world examples and code to demonstrate the technologies in action.
Our example project
We created a relatively simple project consisting of three Node.js microservices, organized into a single monorepo. The services are deployed to a Kubernetes cluster hosted on AWS using Elastic Kubernetes Service (EKS).
Managing applications in a monorepo can be challenging, so we needed to use specialized build tools and build a custom solution on top of them.
The repository follows a Gitflow-like methodology with multiple environments, in our article we demonstrate both automatic and manual deployments strategies based on the needs of the given environment.
The desired deployment workflow
Our goal was to come up wit ha solution that checks the state of the relevant environment before each deployment and only deploy the changed services. Furthermore, we want to keep the old versions of the services and incrementally increase traffic to the new versions.
With this workflow, we can ensure that users are gradually directed to the new versions. If something goes wrong, they can be routed back to the old versions without downtime. Additionally, this process can be achieved without consuming excessive resources.
If you are interested in the complete solution and the used tooling, please fill out the form below and download the complete whitepaper.
