DevOps Project

Mukul Jeveriya
3 min readMay 7, 2020

Fully automation web application deployment using Jenkins,Docker and GitHub.

INTRODUCTION:-

Our aim is to provide a fully functional platform to our web developer so they just write code in their workspace like git and as they commit the code all functioning happen automatically from uploading code on GitHub to hosting the web via Jenkins using Docker httpd container.

Steps which i used:-

1-I am creating a local workspace on windows with name project.

2-Then i make that folder repository.

3-I am creating one more branch for 2nd developer i am giving name this branch dev1 and master branch already created on master branch assuming head developer work.

4-The head developer create a code and testing team approval it,The web is launched using httpd server in Docker container with name masterdocker.

5-If developer-1 create a good code so developer-1 have access of dev1 repository developer-1 will commit here and further all step going to be automatic like master branch.

6-For this, make to fully automation i created a bash script .so after commit the code uploaded on GitHub from GitHub Jenkins will processing further, everything gonna be automatic.

Bash script for post-commit

Code running after commit via any one of developers

CREATING JOBS:-

Creating jobs on Jenkins to handle further process after getting that something push on GitHub via developers end.Jenkins run the job.I created 3 jobs, job1 for master branch,job2 for dev1 branch or testing,job3 for manually run the job by after testing.

job1:-

job1 run via Jenkins if any changes done in master branch or testing team run job3 after testing dev1 branch code manually.

configuration of job1

job2:-

in this job developers code exist for running and testing team.testing team check the site and then they take a decision what further do.This job run by Jenkins if any changes Jenkins see in dev1 branch.this job run in another container of docker and testing team examine this website and then take further decision.

configuration for job2

job3:-

Now if testing team pass the dev1 branch code then this job run manually by testing team.in this job,dev1 branch code merge with master branch and then run job1 to update website.as the job done new website launch.

Few screenshot off sites and work

Initially look of website(1111 port for my master branch).

first look

Developer-1 create the website but rejected via testing team so no merging of code in master branch still website look like same as it is before.(2222 port for dev1 branch i.e testing website).

trying to create a good website via developer-1

Developer-1 again create the code for website this time testing team allow and host their new website.

testing website
after merging the code the website look.

A brief steps what i do in whole process:-

steps

--

--