project-01
Table of contents
No headings in the article.
Build CI / CD Pipeline using Jenkins and deploy the real world Web Application in AWS Cloud
Goals: CI/CD Pipelines will help you learn server automation, continuous integration, building pipelines, configuration of tools, automated testing, code quality improvement, and distributed systems in Jenkins through intensive, handson practical assignments.
Technologies Used:-
Jenkins
Groovy
AWS Cloud
Git
Docker
Steps:
Create jenkins file using our in-house code repo [should be cloned from git/bitbucket]
Create Docker file in the same repository
Build-Docker image with tagging as build version, unit test cases should pass if any for the code
The Image should be available in ECR with build version as TAG
The Docker Image should be deployed to EC2 Machine
The EC2 Machine Need to open specific Inbound Port and restrict Access only for admin user to login
Jenkins Jobs should do validation and display successful message
Report should be sent to e-mail and it should contain status of each JOB
Creating Two instances one for Jenkin master and one for deploying.
git log histroy
Github repo
In jenkins create job .
Paste the url of github in git and github project blank
restict the project to run in particular node
Github integerate with jenkins and and click right to github hook trigger for GITSCM polling for the automatic build if any changes made commit to the github
in Build step take excute shell and add the following command to to run the container.
sudo docker rm -f $(sudo docker ps -a -q)
sudo docker build /home/ubuntu/jenkins/workspace/project01 -t website
sudo docker run -it -d --name c1 -p 80:80 website
In post-build action take the Email Notification put your recepctive email.
The build result
Email result which was sent by jenkis
Running website