DevOps Day-80: Project-1Deploy a Project Webapp Application with help of Jenkins Pipeline, GitHub and Docker

DevOps Day-80: Project-1Deploy a Project Webapp Application with help of Jenkins Pipeline, GitHub and Docker

Table of Contents:

Project Description

Creating AWS Instance

Configure Docker and Jenkins on the Server

Project Steps: Automating pipeline of a Webapp

Project Description:

The Project aims to automate the building,testing and deployment process of a web application using Jenkins and GitHub. The Jenkins pipeline will be triggered automatically by GitHub webhook integration when changes are made to the code repository. The pipeline will include stages such as building,testing and deploying the application,with notifications and alerts for failed builds or deployments.

Pre-requisties:

Creating AWS instance:

1- Navigate to the AWS Management console and provide the server name and choose the OS.

2- Select the instance type to configure the CPU and memory of the instance.


3- Choose the existing or create a VPC for the server.

4- Select the disk size for the server to be attached.

Configure Docker and Jenkins on the Server

1 Write all the commands to pre-install Docker and Jenkins on the server after its spin-up.

2 Now create the instance.

3 Log to the server and use systemctl command to check if docker is running.

4 Now,use systemctl command to check if Jenkins is running.

5 Open the port 8080 which is the default port to run Jenkins on the server.

6 Navigate to the URL https://<publicIP>:8080

Navigate to the path and paste the admin password for first-time login to the Jenkins server.

7 Install the Suggested plugin on the server.

8 You can change the UserID and Password.

9 Now,Jenkins is ready to use. We are finally landed on the dashboard of Jenkins.

Project steps: Automating pipeline of a Webapp

1 On the Jenkins home page select the New Item.

2 Write the Project name and select the free-style Project.

3 Navigate to GitHub and take the Project URL and provides in the Jenkins Configuration.

4 To configure automation of deployment we need to install the plugin on Jenkins.

5 Navigate to Manage Jenkins and go to plugin and the available plugins. Install the plugin now.

6 Navigate to GitHub and select Webhook. Use the below payload URL

https://<public-IP>:8080/github-webhook/

7 Generate the public key of the server.

8 Create the SSH Key in the GitHub and provide the public key of the server.

9 Now Generate the Personal access token of GitHub to connect GitHub to Jenkins.

10 Navigate to GitHub settings and create the token.

11 Add the Credentials to Jenkins to create the Key.

12 In the Branches to build provide the main branch. Make sure to check the branch where the project currently needs to be deployed.

13 As we have setup webhook previously,now select the webhook settings in the project configuration section in the Jenkins dashboard.

14 Select the execute shell in the build steps.

15 Build the image and create the container through docker on the Jenkins pipeline.

16 Now,build the project. Check the console output to view the status.

17 Navigate to the URL and check for the web-application.

Hope I helped you in understanding the concept in a better way!!

Happy Learning !!

SAMEER HASHIM : )

Ishmeet Singh

Frontend Developer?? || Growth expert ?? || Follow-> Devops related content?? || Helping Client's to Grow their Profile and Business?? || Feel Free to connect ??|| DM for Promotion ??

1 年

Congratulations on hitting Day 80! Excited to see how you leverage Jenkins and GitHub for seamless automation.Sameer Hashim

Sameer Hashim, this article on automating the deployment process using Jenkins and GitHub is so cool! Could you share how you first got interested in DevOps?

Priyanka kumari yadav

100k+ follower across all social media platforms |Youtube| AWS DevOps Engineer| Technical Writer | Freelancer |content creators | certified yoga instructor ??♀?|Helping Learning| Open for Collaboration??

1 年

Keep doing Sameer Hashim

Sameer Hashim

DevOps Engineer | 3k+ | Passionate about DevOps | Linux, AWS, Git, Docker, Jenkins, CI/CD, Kubernetes, Terraform, Ansible | Automating Workflows | #OpenToWork

1 年

#tws #devopsworld

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

Sameer Hashim的更多文章

  • DevOps Day 87: Argo CD

    DevOps Day 87: Argo CD

    Table of Contents: Challenges with CD into Kubernetes What is GitOps? What is Agro CD? Advantages of Agro CD? How does…

    2 条评论
  • DevOps Day-86: Project-7 Portfolio App

    DevOps Day-86: Project-7 Portfolio App

    Dear Learners in Today's article we will deploying a Portfolio app on AWS S3 Bucket using GitHub. Table of Contents:…

    1 条评论
  • DevOps Day 85: Project-6 Node JS App AWS ECS & ECR

    DevOps Day 85: Project-6 Node JS App AWS ECS & ECR

    In Today Article we will explain the Deploying a Node JS app with the help of AWS ECS Fargate and AWS ECR. Table of…

    11 条评论
  • DevOps Day 84: Project-5: Netflix Application

    DevOps Day 84: Project-5: Netflix Application

    Dear Learner's in today topic we will explain how to deploy a Netflix Web Application with the help of Kubernetes…

    1 条评论
  • DevOps Day 83: Project-4 Set up a Web-App using Docker Swarm

    DevOps Day 83: Project-4 Set up a Web-App using Docker Swarm

    In today Article we will how Explain how to deploy a web Application using Docker Swarm container Orchestration tool…

    12 条评论
  • DevOps Day 82: Project-3 hosting a static Website using an AWS S3 Bucket

    DevOps Day 82: Project-3 hosting a static Website using an AWS S3 Bucket

    In today's we will explore and one step forward hosting a static website using an AWS S3 bucket. Table of Contents:…

    5 条评论
  • DevOps Day-81: Project -2 Web-APP

    DevOps Day-81: Project -2 Web-APP

    In today's article we will explain the Project 2 Web-APP with the help of Jenkins Declarative Pipeline. Table of…

    9 条评论
  • Day 79 - Prometheus ??

    Day 79 - Prometheus ??

    Let's learn about the Prometheus. It's an open-source system for monitoring services and alerts based on a time series…

    8 条评论
  • DevOps (Day-78): Monitoring with Grafana Cloud

    DevOps (Day-78): Monitoring with Grafana Cloud

    Table of Contents: Pre-requisties Setup Grafana Monitoring for EC2 instance. Setup Grafana alert for AWS Billing…

    4 条评论
  • DevOps (Day-77): Grafana Cloud Alerting

    DevOps (Day-77): Grafana Cloud Alerting

    Table of Contents: Grafana Cloud Grafana Alerting Task-01 Setup Grafana Cloud Grafana Cloud: Grafana cloud, developed…

    5 条评论

社区洞察

其他会员也浏览了