Zero Downtime Deployment

Samkit Shah
3 min readJun 29, 2020

Software availability is one of the important criteria considered for the success of any software. It is important to make sure your business is not impacted due to software deployment activity. Achieving the highest software availability is possible in many ways.

A new release of software should not bring down the system. To achieve a zero downtime deployment, the software should be built considering the factors that do not demand any downtime.

Everything is automated. Right from the uploading part till deploying.

I’ve created a Dockerfile in which following software is installed: So basically in this Dockerfile , you’ll get jenkins pre-installed plus root permission.

You can directly pull this dockerfile which I’ve created from Docker hub :

Link

After the completion of this Dockerfile we have to create an image for this using docker command : docker build -t jenkins:v1 .

You can then launch or run the container with that Dockerfile image using command : docker run -dit -p 1111:8080 — name jenkins jenkins:v1 & using port number 1111 you can access your jenkins portal and log in to the account.

Overview of the list of jobs

JOB1(Git Pull):

As soon as a Developer pushes the code in the GitHub Jenkins automatically comes to know that code has been uploaded and saves all the file in one folder.

JOB2(Code Detection):

This job automatically interprets whether the code is written in HTML or PHP and launches the container.

JOB3(Testing):

This code checks if the website has been deployed or not. If deployed this job sends a message to the admin that it was successful.

JOB4:

This jobs monitors the container if the container is running or not , if not it will launch the container again so that our clients get no downtime.

If everything works perfectly we can see build pipeline:

And Finally deployed..

This is by default webpage of httpd image and its working perfectly.

Thanks for reading.
Lets connect on Linkedln: Link

--

--

Samkit Shah
Samkit Shah

Written by Samkit Shah

Machine Learning | Deep Learning | DevOps | MLOps | Cloud Computing | BigData

No responses yet