0% found this document useful (0 votes)
39 views52 pages

Jenkins

Jenkins is an open-source automation server used for building, testing, and deploying software, primarily supporting Continuous Integration (CI) and Continuous Deployment (CD) processes. It requires a machine with Java and Docker installed, along with specific hardware requirements, and can be installed via native packages or standalone. The architecture consists of a central controller that manages tasks and agents that execute jobs remotely, enhancing performance and security.

Uploaded by

Sowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views52 pages

Jenkins

Jenkins is an open-source automation server used for building, testing, and deploying software, primarily supporting Continuous Integration (CI) and Continuous Deployment (CD) processes. It requires a machine with Java and Docker installed, along with specific hardware requirements, and can be installed via native packages or standalone. The architecture consists of a central controller that manages tasks and agents that execute jobs remotely, enhancing performance and security.

Uploaded by

Sowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

JENKINS

Prepared by
Dr.M.Sathyakala
AP/IT
GCE,ERODE.
Jenkins-What is

• Jenkins is a self-contained, open source automation


server which can be used to automate all sorts of tasks
related to building, testing, and delivering or deploying
software.
• is an open source Continuous Integration tool written
in Java

19-03-2024 ref:https://www.jenkins.io/doc/pipeline/tour/getting-started/ 2
Jenkins –Installation-Requirements

Jenkins can be installed - native system packages,


Docker,

or run standalone by any machine with a Java Runtime


Environment (JRE) installed.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 3
ng-started/
Jenkins –Installation-Requirements
• A machine with:
• 256 MB of RAM, although more than 2 GB is recommended
• 10 GB of drive space (for Jenkins and your Docker image)
• The following software installed:
• Java 11, 17, or 21
• Docker

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 4
ng-started/
Download Docker Desktop

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 5
ng-started/
Docker Desktop on WSL 2
1. Download docker installer
2. Double-click Docker Desktop Installer.exe to run the
installer.
3. By default, Docker Desktop is installed at C:\Program
Files\Docker\Docker.
4. Search for Docker, and select Docker Desktop in the
search results.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 6
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 7
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 8
ng-started/
Jenkin Installation Steps
• Install Java
• Install git
• Setup a github account

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 9
ng-started/
Download Jenkins
• download either an LTS release or a weekly release of
the Windows installer.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 10
ng-started/
Jenkins Installation Steps
• On opening the Windows Installer, an Installation Setup
Wizard appears, Click Next on the Setup Wizard to start
the installation.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 11
ng-started/
Jenkins Installation Steps
• Select the destination folder to store your Jenkins
Installation and click Next to continue.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 12
ng-started/
Jenkins Installation Steps
• Select the destination folder to store your Jenkins
Installation and click Next to continue.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 13
ng-started/
Jenkins Installation Steps
• recommended to install and run Jenkins as an
independent windows service using a local or domain
user
• running Jenkins using LocalSystem(Windows equivalent
of root) grants Jenkins full access to the machine and
services – not safe
• To run Jenkins service using a local or domain user,
specify the domain user name and password with which
you want to run Jenkins,
• click on Test Credentials to test - domain credentials --
- click on Next.
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 14
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 15
ng-started/
• On failure of Test credentials follow the link below
• Jenkins\How To Enable Group Policy Editor (gpedit.msc)
In Windows 10 Home.html

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 16
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 17
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 18
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 19
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 20
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 21
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 22
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 23
ng-started/
Offline Jenkins
• Download generic java package war then extract it

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 24
ng-started/
Check Jenkin Installation
• Type http://localhost:8080 in web browser the
following window will appear

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 25
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 26
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 27
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 28
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 29
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 30
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 31
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 32
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 33
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 34
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 35
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 36
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 37
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 38
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 39
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 40
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 41
ng-started/
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 42
ng-started/
Jenkins - Introduction
• Jenkins is a popular open-source automation server used primarily for
Continuous Integration (CI) and Continuous Deployment (CD)
processes in software development.
• Continuous Integration (CI) - In software engineering, continuous
integration (CI) is the practice of merging all developers' working
copies to a shared mainline several times a day.
• Continuous delivery is an extension of continuous
integration since it automatically deploys all code
changes to a testing and/or production environment
after the build stage.
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 43
ng-started/
Jenkins - Introduction
• Continuous deployment - every change that passes all
stages of production pipeline is released to customers
without human intervention.
• In simple continuous integration is part of both
continuous delivery and continuous deployment.
• And continuous deployment is like continuous delivery,
except that releases happen automatically.
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 44
ng-started/
Jenkins Architecture

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 45
ng-started/
Jenkin Architecture

• Architecture of Jenkin is designed to automate several


process of SDLC.

JENKINS

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 46
ng-started/
Jenkin Architecture – controller agent

• Controller – central hub which manages and


coordinates – all the automation tasks

• Runs on servlet container like tomcat

• Responsible for handling request from users and


executing build job.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 47
ng-started/
Jenkin Architecture – controller agent

• Controller orchestrates the schedule for build and


monitors the health of the build environment.

• enables collaboration and transparency throughout the


software development lifecycle.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 48
ng-started/
Jenkin Architecture – controller‘s work

• Handles scheduling build job

• Dispatching builds to slaves – Can configure project to


always execute on the particular slave or particular type
of slave or to next available slave

• Monitoring slaves

• Recording and presenting the build results


ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 49
ng-started/
Jenkin Architecture – Agent
• Agent – executes job remotely and report back to jenkins
server on completion

• Responsible for the build and deployment tasks

• These tasks are distributed across several physical


machines or virtual environments.

• Thus it reduces build time and enhances overall system


performances
ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 50
ng-started/
Jenkin Architecture – Agent

• Agent – any machine that run java

• Agent is a machine that is either virtualized or


raspberry pi or container that connects to the Jenkins
controller and executes task as directed by the
controller.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 51
ng-started/
Jenkin Architecture – Agent

• Agent improve performances and enhances security.

• Jenkins agents can be launched in physical machines,


virtual machines, Kubernetes clusters, and with Docker
images.

ref:https://www.jenkins.io/doc/pipeline/tour/getti
19-03-2024 52
ng-started/

You might also like