Exploring an Alternative to OpenShift /2
06.05.2024

In a previous post, I discussed an infrastructure based on Kubernetes designed to host an application with a microservices architecture, with a primary focus on automating the release of new code directly into the environment.
This infrastructure, initially designed for a client, was later implemented for another client's project with a series of enhancements. Specifically, we utilized RKE as the Kubernetes distribution for its ease of installation and seamless integration with Rancher. We also incorporated SonarQube to analyze the code before deployment and used Flyway to maintain the database in a controlled state during developments.
- RKE is a Kubernetes distribution that runs on Docker, addressing the complexity issues associated with Kubernetes installation. It provides a terminal-guided procedure to set up the necessary parameters and then proceeds with the installation of all required components without human intervention. At the end of the installation, with just a few additional commands, Rancher can be added inside RKE without requiring it to be a separate container (as was done in the initial version of this infrastructure).
- SonarQube was deployed as a microservice within the Kubernetes infrastructure and added as an analysis step at the beginning of the Jenkins pipeline. This way, all new code is automatically checked for Reliability, Maintainability, and Security issues. Additionally, tests are run on the Java code, and it is ensured that their coverage exceeds a defined percentage. In case of a negative analysis result, the deployment of the microservice is prevented, and the issues found are assigned to the person who developed the implicated code portion.
- Flyway was directly integrated into the Jenkins pipeline thanks to the dedicated plugin. The main difficulties arose from the lack of documentation for its use within pipelines and the configurations needed to migrate non-relational databases as well. Indeed, in our case, Flyway is used both to migrate a PostgreSQL database and to migrate a MongoDB database.
With the integration of these tools, our DevOps workflow has reached new heights, surpassing the capabilities of the initial infrastructure design. I warmly welcome suggestions for tools to enhance it further!