GithubHelp home page GithubHelp logo

selmaguedidi / pgdo_proj3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vdharmaraj/pgdo_proj3

0.0 0.0 0.0 2.21 MB

Build a Docker Jenkins Pipeline to Implement CI/CD Workflow

Java 61.31% HTML 25.95% Dockerfile 12.74%

pgdo_proj3's Introduction

PGDO_Proj3

Project: Build a Docker Jenkins Pipeline to Implement CI/CD Workflow


Objective:

Demonstrate the continuous integration and delivery by building a Docker Jenkins Pipeline.

Solution build should demonstrate below capabilities:


• Availability of the application and its versions in the GitHub
• Track their versions every time a code is committed to the repository
• Create a Docker Jenkins Pipeline that will create a Docker image from the Dockerfile and host it on Docker Hub
• It should also pull the Docker image and run it as a Docker container
• Build the Docker Jenkins Pipeline to demonstrate the continuous integration and continuous delivery workflow

Project goal

is to deliver the software product frequently to the production with high-end quality.

Tools required:

Docker, Docker Hub, GitHub, Git, Linux (Ubuntu), Jenkins

Project Expected Result:

Jenkins pipeline with stages as shown below, demonstrating the Springboot application build and deployment process automated with Docker and Jenkins with 'Pipeline as a Code' approach
[pipeline output image](https://github.com/vdharmaraj/PGDO_Proj3/blob/681fdb351bdec410700e161758e2cacc4ccc9bed/Documentation/Jenkins_pipeline_result.JPG?raw=true)

Project Documentation

Click [here](https://github.com/vdharmaraj/PGDO_Proj3/blob/681fdb351bdec410700e161758e2cacc4ccc9bed/Documentation/PG%20DO%20-%20DevOps%20Certification%20Training_Project-3_Vignesh_Dharmaraj.pdf) to access the project documentation I have created to submit for my DevOps PG certification program requirements

Solution overview:

1) On a Linux (ubantu) machine, we are installing and configuring jenkins server.
2) In the jenkins server we are creating the pipeline based project (with the Jenkinsfile available in this repo as source)
3) First Stage in the pipeline is to pull the latest springboot application (index.html) changes from SCM (Git-Hub) 4) Next stage in the pipeline is to create a build using maven tool and the pom.xml file available in the code repository
5) Next stage in the pipeline will create docker image based on the standard java container with our jar executable created as a result of the build process in the previous step (Dockerfile available in the repo is responsible to create this image)
6) Next stage in the pipleline will push the lastest doker image created in the previous stage to the Docker Hub (remote image repository)
7) Next stage in the pipeline will remove any existing containers of our application
8) Next stage in the pipeline will start new container with the latest image (including our latest changes of springboot application) pulled from docker hub
9) Next stage in the pipeline will remove any old images in our linux machine

Mandatory changes to be made in Jenkinsfile when you want to use this project

  1. Its mandatory to change the Docker Hub Account ID after this Repo is forked/cloned by an other person
    def dockerhubaccountid = "vikidvg"

  2. To push image to remote repository , in your jenkins server you have to create the global credentials similar to the 'dockerHub' (credential ID)

      docker.withRegistry('', 'dockerHub') {
          dockerImage.push("${env.BUILD_NUMBER}")
          dockerImage.push("latest")
         }
    
  3. Update your Forked/cloned Repo URL in the stage('Clone Repo')

pgdo_proj3's People

Contributors

vdharmaraj avatar selmaguedidi 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.