JENKINS CASE STUDY ON PREPLY !!
What is Jenkins?
Jenkins is an open source Continuous Integration server capable of orchestrating a chain of actions that help to achieve the Continuous Integration process (and not only) in an automated fashion.
Jenkins is free and is entirely written in Java. Jenkins is a widely used application around the world that has around 300k installations and growing day by day.
It is a server-based application and requires a web server like Apache Tomcat. The reason Jenkins became so popular is that of its monitoring of repeated tasks which arise during the development of a project. For example, if your team is developing a project, Jenkins will continuously test your project builds and show you the errors in early stages of your development.
By using Jenkins, software companies can accelerate their software development process, as Jenkins can automate build and test at a rapid rate. Jenkins supports the complete development lifecycle of software from building, testing, documenting the software, deploying and other stages of a software development lifecycle.
Jenkin History :
- Kohsuke Kawaguchi, a Java developer, working at SUN Microsystems, was tired of building the code and fixing errors repetitively. In 2004, created an automation server called Hudson that automates build and test task.
- In 2011, Oracle who owned Sun Microsystems had a dispute with Hudson open source community, so they forked Hudson and renamed it as Jenkins.
- Both Hudson and Jenkins continued to operate independently. But in short span of time, Jenkins acquired a lot of projects and contributors while Hudson remained with only 32 projects. With time, Jenkins became more popular, and Hudson is not maintained anymore.
What is Continuous Integration?
In Continuous Integration after a code commit, the software is built and tested immediately. In a large project with many developers, commits are made many times during a day. With each commit code is built and tested. If the test is passed, build is tested for deployment. If deployment is a success, the code is pushed to production. This commit, build, test, and deploy is a continuous process and hence the name continuous integration/deployment.
A Continuous Integration Pipeline is a powerful instrument that consists of a set of tools designed to host, monitor, compile and test code, or code changes, like:
- Continuous Integration Server (Jenkins, Bamboo, Cruise Control, TeamCity, and others)
- Source Control Tool (e.g., CVS, SVN, GIT, Mercurial, Perforce, ClearCase and others)
- Build tool (Make, ANT, Maven, Ivy, Gradle, and others)
- Automation testing framework (Selenium, Appium, Test Complete, UFT, and others)
Real-world case study of Continuous Integration :
I am sure all of you aware of old phone Nokia. Nokia used to implement a procedure called nightly build. After multiple commits from diverse developers during the day, the software built every night. Since the software was built only once in a day, it’s a huge pain to isolate, identify, and fix the errors in a large code base.
Later, they adopted Continuous Integration approach. The software was built and tested as soon as a developer committed code. If any error is detected, the respective developer can quickly fix the defect.
Jenkins Plugins :
By default, Jenkins comes with a limited set of features. If you want to integrate your Jenkins installation with version control tools like Git, then you need to install plugins related to Git. In fact, for integration with tools like Maven, Amazon EC2, you need to install respective plugins in your Jenkins.
Top 5 Jenkins plugins :
Advantages of using Jenkins :
- Jenkins is being managed by the community which is very open. Every month, they hold public meetings and take inputs from the public for the development of Jenkins project.
- So far around 280 tickets are closed, and the project publishes stable release every three months.
- As technology grows, so does Jenkins. So far Jenkins has around 320 plugins published in its plugins database. With plugins, Jenkins becomes even more powerful and feature rich.
- Jenkins also supports cloud-based architecture so that you can deploy Jenkins in cloud-based platforms.
- The reason why Jenkins became popular is that it was created by a developer for developers.
Disadvantages of using Jenkins :
Though Jenkins is a very powerful tool, it has its flaws.
- Its interface is out dated and not user friendly compared to current UI trends.
- Though Jenkins is loved by many developers, it’s not that easy to maintain it because Jenkins runs on a server and requires some skills as server administrator to monitor its activity.
- One of the reasons why many people don’t implement Jenkins is due to its difficulty in installing and configuring Jenkins.
- Continuous integrations regularly break due to some small setting changes. Continuous integration will be paused and therefore requires some developer attention.
Jenkins Case Study: Preply
Overview of Preply :
- Online platform for independent tutors
- Teach any language
- Choose from 100 subjects overall, including university prep, hobbies, or art.
- Set your own schedule, no minimum hours required
- Set your own hourly rate
- No teaching certificate or degree required
- No mandatory teaching props or backdrops needed
Powering Preply’s online education platform with CI/CD :
From day one, Preply has focused on innovative learning. Their online educational platform makes it easy for over 100,000 students to find private language tutors based on their profiles.
With over 25,000 tutors to choose from, Preply leverages proprietary ranking algorithms — machine learning for recommendations and classifications of tutors based on student profiles — to ensure the perfect tutor/student match. Even during the Pokemon craze, Preply quickly spun up the ability for tutors to get in the game and make learning fun with Pokemon Go tutors. This created a brand new marketplace for players desiring help learning to play the game.
It’s no wonder; their development and operations organizations are equally cutting edge, especially when it comes to building a CI/CD platform. Preply’s DevOps team developed a platform that can scale as quickly as the software their team innovates: from expediting multiple language processing to supporting online tutors from over 185 countries to launching hundreds of releases per day to keep up with demand.
CHALLENGES FACED BY THE PREPLY :
Preply’s technology team is continuously creating new product features and experiments for rapid product A/B testing, so speed-to-market is critical. So how to maintain their ‘everything as code’ mantra and how to eliminate manual intervention
A flexible and scalable CI/CD pipeline that enables their team to introduce and accelerate the deployment of new builds without jeopardizing the entire service.
“Having a more stable environment frees up developers to run more experiments. The faster you can get the desired outcome, the faster you validate your hypothesis. Stable deployment means that your work no longer blocks development processes for other product teams, and you can deploy independently.”
Another ‘must-have’ plugin for Preply was one that allowed them to store configurations in a human-readable text format. The CI/CD makes use of the Amazon EC2 Plugin for bootstrapping agents on AWS. Its configuration can also be managed with this plugin. A matrix-based authorization allows them to manage users’ permissions from code. With this implementation, Preply’s platform team explains, they have a flow for testing Jenkins changes locally, so they can find and fix bugs before they surface in production. And while setting up a reproducible Jenkins configuration process was paramount in building their CI/CD, creating the job configuration was equally essential.
More importantly, with a few code changes and by enhancing the plugin architecture of their existing Jenkins instance, Preply’s DevOps team was able to fully automate their CI/CD process for all projects.
“The plugins allow us to configure jobs in a human-readable text format (YAML or JSON). And it’s really comfortable to manage jobs with SCM.” Amet said.
By eliminating manual processes with Jenkins, development became easier and freed this global online education company to focus on innovative services for both their students and tutors around the globe.
Diagram of the new Preply’s Jenkins architecture :
- Daily release rate increased from 1 to 40 and continue growing
- Rollback time decreased from 45 minutes to 60–120 seconds
- Deployment time reduced from 90 to 5–40 minutes (depending on service)
- Vastly improved conversion and user experience