******** DevOps Task 4*******

******** DevOps Task 4*******

#Task Description

1. Create a container image that has Linux and other basic configuration required to run Slave for Jenkins. ( example here we require kubectl to be configured )

2. When we launch the job it should automatically start the job on slaves based on the label provided for the dynamic approach.

3. Create a job chain of job1 & job2 using the build pipeline plugin in Jenkins

4. Job1: Pull the Github repo automatically when some developers push the repo to Github and perform the following operations as

4.1 Create the new image dynamically for the application and copy the application code into that corresponding docker image

4.2 Push that image to the docker hub (Public repository) ( Github code contains the application code and Dockerfile to create a new image )

5. Job2 ( Should be run on the dynamic slave of Jenkins configured with Kubernetes kubectl command): Launch the application on the top of the Kubernetes cluster performing following operations:

5.1 If launching the first time then creates a deployment of the pod using the image created in the previous job. Else if deployment already exists then do a rollout of the existing pod making zero downtime for the user.

5.2 If Application created the first time, then Expose the application. Else don't expose it. 

So let's start:-

This is all the file which I used in for creating this task as shown below:-

No alt text provided for this image

config file for minikube client:-

No alt text provided for this image

Dockerfile file which used to create docker image:-

No alt text provided for this image

HTML web page which is used inside Docker image:-

No alt text provided for this image

kubect.repo file:-

No alt text provided for this image


job01 as shown below:-

No alt text provided for this image


No alt text provided for this image


No alt text provided for this image


No alt text provided for this image

Detailed output of job01 as shown below:-

No alt text provided for this image


No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Image successfully pushed on hub.docker.com as shown below:-

No alt text provided for this image

Cloud Configuration:-

No alt text provided for this image


No alt text provided for this image


No alt text provided for this image


No alt text provided for this image


No alt text provided for this image

job02 as shown below:-

No alt text provided for this image


No alt text provided for this image

We can also check from the command line, And here we also seen export pod:-

No alt text provided for this image

Finally, website build successfully as shown below:-

No alt text provided for this image


************************************THANKS******************************************

To view or add a comment, sign in

More articles by Arpit Sironiya

  • The Volkswagen Group builds an automated testing environment

    Overview The Volkswagen (VW) Group’s Electric Development department tests and enhances the technologies that support…

  • Cyber crime - Confusion Matrix

    A confusion matrix is a technique for summarizing the performance of a classification algorithm. Classification…

  • Machine Learning Behind Google Translate

    Google Translate has launched 10 years ago. During the initial days, Google Translate was launched with Phrase-Based…

  • Mask-RCNN IN SUPERVISE.LY

    About Supervisely Supervisely is a powerful platform for computer vision development, where individual researchers and…

  • MlOps And DevOps Common Task 2

    Task Description:- 1. Create container image that’s has Jenkins installed using Dockerfile 2.

  • MlOps And DevOps Task 1

    Task Overview: JOB#1 If Developer push to dev branch then Jenkins will fetch from dev and deploy on the dev-docker…

  • EKS Task

    NextCloud Running On Amazon EKS Using EFS Storage About EKS Amazon Elastic Kubernetes Service (Amazon EKS) is a fully…

    2 Comments
  • INTEGRATION_OF_MACHINE_LEARNING_WITH_DEVOPS TASK3

    In this article, I'm explaining my MLOPs project which trains and tweaks a CNN model for Cat and Dog prediction from…

    1 Comment

Others also viewed

Explore content categories