TASK 1 - DevOps

TASK 1 - DevOps


Problem Statement :

JOB 1: If Developer push to dev branch then Jenkins will fetch from dev and deploy on dev-docker environment.

JOB 2 : If Developer push to master branch then Jenkins will fetch from master and deploy on master-docker environment. Both dev-docker and master-docker environment are on 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





Technologies used:-

  • Git and GitHub
  • Docker
  • Jenkins



Step 1: Developer commits the code

No alt text provided for this image


Step 2: Create a hook to push

No alt text provided for this image


No alt text provided for this image

Fig: Inside post-commit file (used ngrok for tunneling the network)


So, after this when ever the Developer will commit the code then “post-commit” will directly push the code to GitHub and after that the Jenkins will start their Job or their Build Pipeline.


Job 1:

No alt text provided for this image

Fig: Pulling from Dev1 node


No alt text provided for this image

Fig: Used Authentication Token for trigger


No alt text provided for this image

Fig: Copying the Dev1 content in web folder


Job 2:

No alt text provided for this image

Fig: Pulling from master node


No alt text provided for this image

Fig: Job2 will trigger only after Job1 runs fine


No alt text provided for this image

Fig: Copying the Master content in web folder


Job 3:


No alt text provided for this image

Fig: Job3 will trigger only after Job2 runs fine

No alt text provided for this image

Fig: Giving credentials to login into GitHub


No alt text provided for this image

Fig: Merging the Dev1 branch to Master branch


Build Pipeline of the Task

No alt text provided for this image

Fig: All Jobs run successfully


No alt text provided for this image

Fig: Final Webpage



GitHub Repo :



In the end I would like to thank Vimal Daga Sir for this task and all the knowledge he shared with us. He is the reason I am capable of create such a great project by our own .


Thank you Everyone For Reading !

 

To view or add a comment, sign in

More articles by Anurag Prasad

  • Creating AWS EKS Cluster using eksctl and launching pods

    Task Description :- Implementing EKS Cluster with different AWS Services Like EC2 , EFS, ELB and EBS. Creating Fargate…

    4 Comments
  • Task2 (MLOps)

    Problem Statement : 1. Create a container image that’s has Jenkins installed using Dockerfile.

  • CONTAINERIZATION-Launching OS in a single click

    PROBLEM STATEMENT : Create container image that has Python3 and Keras or numpy installed using dockerfile. When we…

Others also viewed

Explore content categories