0% found this document useful (0 votes)
10 views

Module 3 - Jenkins

Uploaded by

Jeff Deep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Module 3 - Jenkins

Uploaded by

Jeff Deep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Continuous Integration [ Jenkins ]

AGENDA
Introduction to Continuous Integration

What is Jenkins?

Installing Jenkins

Jenkins Architecture

Jenkins Integration with DevOps tools

Understanding CI/CD Pipelines

Creating an End-to-end Automated CI/CD Pipeline


WHAT IS
CONTINUOUS
INTEGRATION?

© Copyright. All Rights Reserved.


WHAT IS CONTINUOUS INTEGRATION?

The process of having shorter release cycles (sometimes, several times a day), i.e., creating small
features and integrating them to the source code and employing automated build and test processes
for quicker feedback is called Continuous Integration.

Continuous
Integration
Developer Version
Control
System

Testing Production
Feedback Server Server

© Copyright. All Rights Reserved.


ADVANTAGES OF CONTINUOUS INTEGRATION

Frequent Commits, hence small feature release

Automated Build andTesting

Instant feedback to the developer

Low risk and faster delivery

© Copyright. All Rights Reserved.


WHAT IS
JENKINS?

© Copyright. All Rights Reserved.


What is Jenkins?

Jenkins is an open-source automation server written in Java. Jenkins helps to automate the non-
human part of the software development process, with continuous integration and facilitating
technical aspects of continuous delivery.

© Copyright. All Rights Reserved.


FEATURES OF JENKINS

Adoption: Jenkins is extremely popular among the open-source


community; hence, there are more than 147,000 active installations
throughout the world and 1 million people are using it.

Plugins Support: With an extremely active open-source community,


Jenkins has around 1000 plugins that allow it to integrate with most of the
development, testing and deployment tools.

© Copyright. All Rights Reserved.


ADVANTAGES OF JENKINS

Before Jenkins After Jenkins

Locating and fixing bugs in the event of build Smaller and automated continuous build and
and test failure was difficult and time testing make the task accurate and faster.
consuming.

Developers have to just commit the code to the


Tests were triggered manually.
remote repository, build, test and deployment
happen automatically.

No central place for triggering jobs on remote All builds or tests on multiple remote systems
systems. can be controlled from oneplace.

© Copyright. All Rights Reserved.


INSTALLING
JENKINS

© Copyright. All Rights Reserved.


INSTALLING JENKINS ON AWS

1. Launch an AWS Instance

2. Connect through SSH

3. Execute the following commands:

Jenkins Installation:
$> sudo apt-getupdate
$> sudo apt installopenjdk-8-jdk
$> wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
$> sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/>
/etc/apt/sources.list.d/jenkins.list'
$> sudo aptupdate
$> sudo apt installjenkins

© Copyright. All Rights Reserved.


JENKINS
ARCHITECTURE

© Copyright. All Rights Reserved.


JENKINS ARCHITECTURE

DevOps Tools

Plugins

© Copyright. All Rights Reserved.


JENKINS ARCHITECTURE

Jenkins
Master

Testing Server Production Server


© Copyright. All Rights Reserved.
JENKINS
INTEGRATION WITH
DEVOPS TOOLS

© Copyright. All Rights Reserved.


JENKINS INTEGRATION WITH DEVOPS TOOLS

Jenkins

Git Docker Selenium

© Copyright. All Rights Reserved.


JENKINS INTEGRATION WITH DEVOPS TOOLS

Copy a Git repository to the slave’s filesystem from Jenkins master


Git

Docker

Selenium

© Copyright. All Rights Reserved.


JENKINS INTEGRATION WITH DEVOPS TOOLS

Containerize the website in the previous step to a Docker


Git
Container using Jenkins

Docker

Selenium

© Copyright. All Rights Reserved.


JENKINS INTEGRATION WITH DEVOPS TOOLS

Create a test case for the website in the previous step and execute
Git
the test on the slave using Jenkins

Docker

Selenium

© Copyright. All Rights Reserved.


UNDERSTANDING
CI/CD PIPELINES

© Copyright. All Rights Reserved.


WHAT ARE CI/CD PIPELINES?

CI/CD Pipelines, i.e., Continuous Integration, Continuous Delivery and Deployment pipelines, are a way of
running Jenkins jobs in a sequence, which resembles a pipeline view.

Finished Application

© Copyright. All Rights Reserved.


WHAT ARE CI/CD PIPELINES?

CI/CD Pipelines, i.e., Continuous Integration, Continuous Delivery and Deployment pipelines, are a way of
running Jenkins jobs in a sequence, which resembles a pipeline view.

For Example:

Git-Job Build-Website Test-Website

Downloads Git Code Containerizes the Validates the


GitHub
to Repository Git Code into Website
Apache Container

© Copyright. All Rights Reserved.


CREATING AUTOMATED
CI/CD PIPELINE

© Copyright. All Rights Reserved.


CREATING AN AUTOMATED CI/CD PIPELINE

1. Initiate a Git Webhook for the Jenkin’s git-job repository

2. Trigger the jobs after the completion of previous jobs with the following map: Git-Job → Build-Website → Website-
Test

3. Install the plugin for the pipeline view

4. Make changes to the website and commit the job to see the changes

© Copyright. All Rights Reserved.


© Copyright. All Rights Reserved.

You might also like