Git Product home page Git Product logo

capstone_devops_app_depl's Introduction

Capstone Project

  • Name : Vijay.B
  • Batch : DO8WD-E

Containerizing applications

Note : Due to the application's lack of support for the latest Node.js version, I've chosen to utilize Node.js 14

  • Using a Dockerfile, the application was built on a Node.js base image, and the artifacts were then copied to an Nginx image for web access.
  • A Docker-compose file has been created to manage and run the built application.

Scripting

  • Bash script was created to automate the build and run processes using Dockerfile and Docker-compose files.

Version Control

  • Branch named 'dev' was created in Github repository using Git.
    git branch dev

Screenshot dev branch

  • The application code has been pushed to the 'dev' branch.

Screenshot push code

  • A .gitignore file has been created to avoid pushing unnecessary files.
  • A .dockerignore file has been created to avoid pushing unnecessary files while dockerizing.

Docker Hub

  • Repository named 'dev' and 'prod' was created in docker hub with public and private access, respectively.

Screenshot docker repo

  • Docker Hub with image

Screenshot docker hub Screenshot dockerhub2

Pipeline using jenkins

  • Installation of jenkins.

    Prerequisites:

    • Jenkins requires Java to run.
      sudo apt install openjdk-21-jdk

    Install Jenkins:

    • Execute the following commands in the terminal to install Jenkins.
      sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
      https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
      echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
      https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
      /etc/apt/sources.list.d/jenkins.list > /dev/null
      sudo apt-get update
      sudo apt-get install jenkins

    Start Jenkins:

    • Execute the following command in the terminal to start Jenkins.
      sudo systemctl start jenkins

    Access Jenkins:

    • Once Jenkins is started, open a web browser and navigate to http://localhost:8080 (replace localhost with the IP address or hostname of the server)

    Note port 8080 should be allowed in security group for jenkins system. Login Page:

    • Screenshot jenkins login

    Create a Multibranch pipeline:

    • Screenshot multibranch project

    Auto Build Trigger:

    Note MultiBranch Action Triggers Plugin is required.

    • Screenshot webhook setting 1
    • Screenshot webconfig in github

    Jenkins Pipeline

    • Using a Jenkinsfile, stages were created for building, pushing, and deploying on an EC2 node.
    • Screenshot pipeline

EC2 Instance

EC2 console

  • Screenshot ec2

Security group

  • Screenshot SG inbond

Adding an EC2 instance as a node in Jenkins.

  • Screenshot node added

Monitoring:

Screenshot grafana Email Notification Configured Screenshot grafana email notification

Deployed site page

Screenshot output

capstone_devops_app_depl's People

Contributors

vjyguvi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.