Lakshya Dewani
4 min readJun 30, 2020

--

MLOPS TASK 2
Under the guidance of VIMAL DAGA SIR,

MLOPS TASK2 [LinuxWorld Informatics Pvt Ltd]

Problem Statement:

1. Create container image that’s has Jenkins installed using docker file

2. When we launch this image, it should automatically starts Jenkins service in the container.

3. Create a job chain of job1, job2, job3 and job4 using build pipeline plugin in Jenkins

4. Job1 : Pull the Github repo automatically when some developers push repo to Github.

5. Job2 : By looking at the code or program file, Jenkins should automatically start the respective language interpreter install image container to deploy code ( eg. If code is of PHP, then Jenkins should start the container that has PHP already installed ).

6. Job3 : Test your app if it is working or not.

7. Job4 : if app is not working , then send email to developer with error messages.

8. Create One extra job job5 for monitor : If container where app is running. fails due to any reason then this job should automatically start the container again.

But before this we have to create or own image of jenkins where docker lauch it or if not launched it automatically run by jenkins job
where we disabled our firewall and start docker services as
#systemctl start docker

Then creating docker file for jenkins as :

then using this file run it as :

and start the images as:

then pull image to our requirement from docker or create our own image after running it in docker :

Now we create repo in github (centralized location) we create webhooks and our code will automatically move to jenkins jobs.

then using github we create our code in git as :
as:

then after committing the code we had previously made a job where the whole code is copied and using this we create other branches to run our code as :

Then after this our code is running using ip:1000 see our website is running

— — — — — — — — THANK YOU — — — — — — — —

--

--