Task 6 DevOpsAL

Task 6 DevOpsAL

TASK 6 OverView :

Perform the third task with the help of Jenkins coding file ( called as Jenkins file approach ) and perform the with following phases:

1. Create container image that’s has Jenkins installed using dockerfile Or You can use the Jenkins Server on RHEL 8/7

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

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

4. Job2 ( Seed Job ) : Pull the Github repo automatically when some developers push the repo to Github.

5. Further on jobs should be pipeline using written code using Groovy language by the developer

6. Job1 :  

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

  2. Expose your pod so that testing team could perform the testing on the pod

  3. Make the data to remain persistent using PVC ( If server collects some data like logs, other user information )

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

8. Job4: if app is not working, then send email to the developer with error messages and redeploy the application after code is being edited by the developer

---------------------------------------------------------------------------------------------------------------

My GitHub link : https://github.com/arshmishra007/task6-DevopsAL

Creating a Container Image which has Jenkins installed.

No alt text provided for this image

Here is the complete history of the docker image.

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

Now below is the code for creating a deployment file for Kubernetes for launching them and then expose them and we will also create a PVC (persistent volume claim) .

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

Now as mentioned above we will create a seed job for jenkins which will download the groovy file and perform the functionalities as mentioned above.

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

Then go to the build and select process job DSLs and the select look on file system and make it as *.groovy

Below is the code for the groovy file.

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

Here is the build pipeline view of the jobs created.

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







Aastha Saxena

Software Engineer | NodeJs | TypeScript | MySQL | MongoDB

4 年

Well done

Ayush Gupta

Probationary Officer at South Indian Bank | Finance Enthusiast ?? CPBFI-Bajaj Finserv | ?? Tableau ?? Devops Engineer ???? Management ?? Data Analytics ??

4 年

Well done ??????

Sandhya Singh

Quality Engineering Analyst at Accenture || 1xGCP || 3xAzure || 2?Trailhead Ranger || Harvard WeCode Scholar'22 || Mechanical Engg. Graduate'21 || vGHCI'20 Scholar

4 年

That's amazing ??

要查看或添加评论,请登录

Arsh Mishra的更多文章

社区洞察

其他会员也浏览了