Pages

Friday, May 7, 2021

Jenkins - Container Model vs Traditional Model

As a part of onboarding Jenkins as our Automation Server, we did a analysis on how to run the Jenkins. We did research on whether Jenkins should run in a container or as a traditional deployment model. Below are the few points we identified.


Containers deployment

Traditional Deployment

Installation Or Provisioning

Fast


Package is already available as a Container Image which helps in Installing Jenkins faster


Slow


Package needs to be installed manually or by automation 

Cluster Implementation

Available


Multiple Jenkins Master Containers can be combined by mounting a Single EBS volume to all Jenkins Containers. The EBS volume will have all the details of the Jenkins including jobs, Credentials etc. 

Not Available


On a Traditional deployment, Multiple Jenkins masters cannot be combined. Multiple Ec2 Instances with Jenkins Servers can be connected with a single EBS volume but will have latency.


Jenkins is a File Based Server which means for all operations jenkins will talk to the underlying disk for jenkins files.

Resource Utilization

High



Jenkins in Docker utilizes resources of the Host machine based on what we provide to the jenkins container. Better utilization of resources is achieved on a per Host basis as multiple builds are running via containers or jenkins slaves.

Average



The resource utilization is average since Jenkins master will be running on a Machine and slaves will be the one running the builds and test cases.

Network

Good


Since Jenkins is running in the standalone instance, the network performance will be very good. The communication happens directly 

Average


In the case of Jenkins containers, the network performance is average because we have a docker bridge network in between which will take the request first before moving it to the Jenkins container. 

I/O 

Average


Since the Jenkins container uses a shared storage mechanism like Efs and Ebs, I/O operations can be slow. Throughput issues might occur

Good


Since the Host contains the jenkins files, access to them will be straightforward and the performance will be high

High Availability

Good


HA is by default provided with containers. Using various metrics, we can tell the container runtime to start another similar container to share load.


Since the Containers share the same Volume for data, the volume will be mounted to the ner containers that are started 

Bad


Since the Jenkins servers will be running on Ec2 instances with their own disk, creating a new jenkins server in a different Ec2 instance and attaching to the existing jenkins Cluster is not possible.


Attaching a single Volume for multiple Jenkins servers in separate Ec2 instances does not provide better performance

Portability

High


Since Jenkins run on a Docker container, the containers are portable to run on other instances


Less


Since Jenkins is running inside a Ec2 instance, the portability requires a lot of work with downtime

Cost

Less


Since we are running containers on lesser number of Ec2 instances, the cost will be very lesser

High


Since the Jenkins server will be running on a Separate Ec2 instance, the price will be more when compared with Containers.

Configuration

High


Since Jenkins will be installed in container, a Custom docker image need to be created , configured will all necessary plugins and then managed for every jenkins version



Less


Jenkins server on a Ec2 Instance can be upgraded from the console itself. We don't need any pre-configured packages. We just need to download the war file and deploy

Load Sharing

High


Since we are running Jenkins inside a container, we can have multiple jenkins containers that are shared with load using a load balancer configured. The request goes to the load balancer first and from there it can share the request to the jenkins servers at the backend. Since the Jenkins servers in container share the same Disk volume, all details will be available by default

Less


Since Jenkins cannot be combined as a cluster, we have to run multiple Jenkins servers in separate ec2 instances which a load balancer cannot be attached to.

Access Controls

Same


Access Control will be same for both container model and traditional models

Same


Access Control will be same for both container model and traditional models

No comments :

Post a Comment