Touhib Majeed
4 min readJul 28, 2020

--

Integration of Jenkins, Docker and Git -Task 1 MLOPS

touhib majeed

In this article, we will discuss the steps for integrating three of the demanded technologies together by using Github. These can be joined together for working by using the Github repository system. Git is a technology that is used to create local repositories which then can be uploaded to Git hub. Jenkins is another tool that is used as an automation tool to automate the whole process like launching docker images, executing code, etc from the repositories.

What is Jenkins?
Jenkins is an open-source automation tool written in Java with plugins built for Continuous Integration purposes. Jenkins is used to building and testing your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by integrating with a large number of testing and deployment technologies.
Problem Statement :
JOB 1: If Developer push to dev branch then Jenkins will fetch from dev and deploy on the dev-docker environment.
JOB 2: If Developer push to master branch then Jenkins will fetch from master and deploy on the master-docker environment. Both dev-docker and master-docker environments are in different docker containers.
JOB 3: Manually the QA team will check (test) for the website running in the dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2

First Step
Create a local repository[here gitdir] using Git. In our repository here, a file is created by the name “Index.html” and then is added to the required area by using git add cmd so that Git can track the file when needed. Then the code is pushed to the remote repository and all happens in master branch

Then we have to perform the same function through the dev branch.

Second Step
In this step, Firstly, we have to stepup jenkins for we have to install Jenkins in our redhat Linux for this we have to use the command yum install Jenkins and to start jenkins we require one more software i.e Java and to install java in our redhat use yum install java . After all this we have to start jenkins by using command systemctl start jenkins . After this set up have we have to add our git repository in jenkins for this we require Github plugins.

JOB -1

Developer push to dev branch then Jenkins will fetch from dev and deploy on the dev-docker environment.

After writing this above script in the execute shell we have to click on apply and then we have to save over task and this will redirect to the home page of Jenkins.

JOB -2

If Developer push to master branch then Jenkins will fetch from master and deploy on the master-docker environment. Both dev-docker and master-docker environments are in different docker containers

Job -3

Manually the QA team will check (test) for the website running in dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger #job 2

So, this is how we can perform this integration task of Docker, Jenkins, and GitHub.

Hence, with this I successfully complete the Task1 of my MLOps training under my mentor the World Record Holder “Mr. Vimal Daga” without whom I would have never thought of taking my step in the field of DevOps.

#righteducation #rightmentor #linuxworldindia #worldrecordholder #vimaldaga #mlops

--

--

Touhib Majeed
0 Followers

Creative and people-oriented Computer Scientist with extensive project management experience.