Building a managed Jenkins service for UT Austin: A case study with KubePlus

Introduction:

CloudARK
4 min readJun 3, 2023

KubePlus is a recognized solution in the community to build multi-instance SaaS / managed service for any application packaged as a Helm chart. This blog post explores the case study where a Managed Jenkins Service was built using KubePlus for a class at UT Austin. The solution is compared with the traditional VM-based approach and hosted Jenkins SaaS solutions, showcasing the advantages and unique features offered by KubePlus.

The Need for a Managed Jenkins Service:

A class of 60 students learning CI/CD practices at UT Austin needed 60 instances of Jenkins in order to explore continuous integration and continuous delivery for an application. In the past, these students were asked to install their own Jenkins instance on a separate VM as a part of the instructions for the project. However, it was taking too many cycles for students to install and manage these Jenkins instances. The alternative of leveraging SaaS services such as CircleCI / CloudBees was considered, however, the requirement of the instruction team was the ability to have privileged access to all Jenkins instances for evaluation purposes and installing the select plugins, and this was not easy to accomplish with hosted SaaS services. So building a managed Jenkins service with this instruction team being the provider of the service was the way to go.

Introduction to KubePlus:

KubePlus offers a turn-key solution to building a managed service for any containerized application packaged as a Helm chart. It uses multi-instance multi-tenancy as an architecture pattern in which a dedicated instance of an application is provided per tenant. KubePlus offers seamless deployment of application instances with appropriate isolation and security on a single or multiple Kubernetes clusters; along with an intuitive centralized dashboard for troubleshooting and monitoring of instances.

The alternative approach of building a DIY managed service is very time-consuming requiring a lot of manual steps and still lacks the ability to monitor your managed service instances from a central location.

Designing the Managed Jenkins service:

  • Two single-node GKE clusters with e2-standard-32 machine types.

We decided to use two GKE clusters as the infrastructure for this managed service. One cluster ran 40 Jenkins instances and the other ran 20 instances.

  • Bitnami Helm chart for Jenkins

We used Bitnami Helm chart for Jenkins as the starting point. We built a custom Jenkins image starting from the public Bitnami Jenkins image. This custom image included the gcloud CLI since the target of the CI/CD experiment was to deploy a containerized application on students’ individual GKE clusters.

  • Making service accessible to tenants

We used the NodePort Service type with a separate port for each Jenkins instance. This made each Jenkins instance URL unique. Students accessed their Jenkins instance directly from their URL. We used this method as the requirement to keep this managed service running was for the short term (1.5 months). In other scenarios, where the managed services run for longer durations, we advise using the LoadBalancer Service type on the cloud.

  • KubePlus

KubePlus took the customized Jenkins Helm chart and allowed the easy deployment of 60 Jenkins instances across two clusters with the ability to manage and monitor them from a dashboard. Behind the scenes, KubePlus created a Kubernetes CRD (Jenkins) to represent the Jenkins Helm chart as-a-service on each cluster.

Achieving Multi-Tenancy:

The Kubernetes CRD representing the Helm chart, in this case, Jenkins, is used for provisioning Jenkins instances on the clusters. KubePlus isolates each Jenkins instance in a separate Namespace. It adds a safety perimeter around such Namespaces using Kubernetes Network Policies and non-shared persistent volumes ensuring that each application instance is appropriately isolated from other instances.

Demo:

Here is the demo video of all 60 Jenkins instances being managed from the KubePlus SaaS Manager UI — https://youtu.be/M8jWxc_t9iQ

Benefits and Lessons Learned:

The adoption KubePlus brought various benefits to the overall solution including scalability, resource utilization, and cost efficiency; however, the most important benefits have been enhanced control over the environments and the fastest time to market. The overall solution was ready for consumption in less than a week’s time.

Conclusion:

The case study highlights how KubePlus can expedite the delivery of a managed service or B2B SaaS for any containerized application. If you are interested in building a similar managed service for your cloud-native application, do get in touch here.

www.cloudark.io

--

--