Solution:
Kubernetes clusters and CI/CD pipelines
The original deployment process in Slovensko.Digital was very simple and programmer-friendly – it consisted of uploading changes to a git repository. As we wanted to keep this process as simple as possible, we decided to build a Kubernetes cluster and deploy using CI/CD pipelines. While there is a Dokku scheduler for Kubernetes that would change nothing for programmers, it was limiting in several ways for our use case. So we turned to the capabilities of the Gitlab software.
In the new environment, the application automatically builds itself into a Docker container. After that, the application can be scanned for possible leakage of passwords and other sensitive data. The gitlab itself also acts as a private registry for the docker image. A Helm diagram is created for the docker image thanks to the pipeline, which describes the resources required for the application in a Kubernetes environment. New versions of applications are checked against the Helm. A new version is only deployed if it passes the health check. If there are problems that were not detected automatically, the application can be quickly rolled back to its original state.
The new solution includes not only a production environment, but also a test environment. The test environment allows the Slovensko.Digital team to properly test their application before deploying it into production. Database migrations are automatically triggered on each deployment, and let’s encrypt certificates are finally truly automatic in Kubernetes.
Thanks to Bonet Systems and Kubernetes, Slovensko.Digital now has the ability to quickly and easily add compute resources as needed. When resources need to be added, we simply add another Kubernetes node server – without any downtime or complex setup. The implemented solution has increased the availability of all Slovensko.Digital services. If a node server goes down (and downtime can never be completely avoided), the containers that were running on it are automatically started on the other servers in the cluster.