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:
Phases of DevOps
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.
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
Then install the suggested plugins
Then after making the admin user Jenkins is ready
Here's the Dashboard of Jenkins
Then on GitHub an index.html file is created and added webhook for triggering every change
领英推荐
Made ssh connection among all the servers with root account and for doing the integration Jenkins need plugin. We installed Publish Over SSH plugin
Because of this plugin, we are able to specify Jenkins and Ansible server with root user and password
Created new item with Freestyle project
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
Then run the playbook in Ansible after build
We can see the output page on the Web-Server
Then the Developer made changes in the index.html file and commit, push on GitHub
After pushing, build is automatically start triggering and complete the whole process
Now finally, we can see the modified output page on the Web-Server
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.
Thanks for reading!!
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
Linux Administrator
3 年Inspiring