Deploy Web Application with CI/CD Process

Deploy Web Application with CI/CD Process

Statement: Integration of Ansible(Configuration tool), GitHub(Source Control Management tool), Jenkins(Integration tool) together over AWS (Cloud Environment) and trigger every change through these tools. This is the DevOps process which is fully automatic.

Overview

What is DevOps?

DevOps, a combination of Development and Operations. It’s nothing but a culture to promote process collaboratively by increasing the speed of applications and services delivery that allows organizations to serve their customers within side the better way. DevOps is the process of calibration of IT and development operations to ameliorate the communication.

Problems before DevOps?

Operation and development teams were working in an isolated environment. Testing and Deployment activities mostly were performed in an isolated manner after design-build step, and they took more time than actual project completion time. Team members usually spend a large amount of time in deploying, testing, designing, and building the projects Operations and coding teams generally had different timelines and did not have proper synchronization that results in further delay.

Benefits of DevOps

DevOps allows Agile Development Teams to implement Continuous Integration and Continuous Delivery. This helps them to launch products faster into the market. This is due the following reasons:

  1. Rapid Delivery: Increase the frequency and pace of releases so you can innovate and improve your product faster.
  2. Reliability: Ensure the quality of application updates and infrastructure changes so you can deliver reliably.
  3. Improved Collaboration: Build more effective teams under a DevOps cultural model, which increases ownership and accountability.
  4. Predictability: lower failure rate of new releases.
  5. Reproducibility: Version everything so that earlier version can be restored anytime.
  6. Maintainability: Recovery on new release, crashing or disabling the current system.
  7. Greater Quality: Incorporates infrastructure issues.
  8. Reduced Risk: Incorporates security aspects in the software delivery lifecycle.

Phases of DevOps

  1. Continuous Development
  2. Continuous Integration
  3. Continuous Testing
  4. Continuous Deployment
  5. Continuous Monitoring

One should have knowledge of these tools for doing this project. Now for creating the scenario, I have created four EC2 instances with different names.

No alt text provided for this image

In the Developer instance, developer will do the changes in the source code which will trigger to GitHub. Then in the Jenkins-Server, Jenkins is there and integrate GitHub with it then from it, Jenkins will run the playbook in the Ansible-Server. After successfully running the playbook, we will see the modified page in the Web-Server every time when Developer make changes.

Firstly, we setup Jenkins in the Jenkins-Server. We installed java and Jenkins and start , enable Jenkins. We can see the Unlock Page of Jenkins

No alt text provided for this image

Then install the suggested plugins

No alt text provided for this image

Then after making the admin user Jenkins is ready

No alt text provided for this image

Here's the Dashboard of Jenkins

No alt text provided for this image

Then on GitHub an index.html file is created and added webhook for triggering every change

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

Made ssh connection among all the servers with root account and for doing the integration Jenkins need plugin. We installed Publish Over SSH plugin

No alt text provided for this image

Because of this plugin, we are able to specify Jenkins and Ansible server with root user and password

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

Created new item with Freestyle project

No alt text provided for this image

Pasted the GitHub repository link into the Source Code Management and checked the hook trigger for every change then, execute the build command with ssh to sync the index.html file from Jenkins to Ansible

No alt text provided for this image

Then run the playbook in Ansible after build

No alt text provided for this image


We can see the output page on the Web-Server

No alt text provided for this image

Then the Developer made changes in the index.html file and commit, push on GitHub

No alt text provided for this image

After pushing, build is automatically start triggering and complete the whole process

No alt text provided for this image

Now finally, we can see the modified output page on the Web-Server

No alt text provided for this image

Now whenever the developer make any change in the file, it will automatically update in the Web-Server.

As I did this project on AWS cloud so I had to terminate all the instances but you can still see the GitHub repository.

https://github.com/Tavishi123-singh/DevOps-Project1

Thanks for reading!!

Shivani Gadekar - Jagtap

Platform Engineer | Azure | Linux| SRE |CI /CD |Shell Scripting | Ansible | Kubernetes| SRE |Devops |

2 年

Hey Tavishi Singh , It is really a very precise article on Jenkins. Can we connect on LinkedIn .Will discuss and take valuable insights from you . Thanks

回复
Tabis Ahmad

Linux Administrator

3 年

Inspiring

回复

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

Tavishi Singh的更多文章

社区洞察

其他会员也浏览了