NM DEVOPS RECORD final year
NM DEVOPS RECORD final year
8
Exp no: 1 Introduction to Agile Methodology
Date:
AIM:
The aim is to understand the fundamentals of Agile methodology, including its values,
principles, and frameworks, and to compare it with traditional software development models.
SOFTWARE REQUIREMENTS:
No specific software tools are required, as this experiment is theoretical.
Access to course materials on the Infosys Springboard program.
Optionally, Agile practice tools like Jira or Trello may be used for demonstration
purposes if available.
PROCEDURE:
1. Course Introduction
o The course outline was reviewed to understand the topics covered on Agile
methodology and software engineering basics.
o The educators in the course videos were introduced, with their areas of expertise
and teaching approaches noted.
PAGE NO:
2. Software Engineering Basics
o The Need for Software Engineering was studied to understand the purpose and
activities involved in creating reliable software.
o The concept of a software crisis was examined, which led to the development of
software engineering.
o Various traditional SDLC (Software Development Life Cycle) models were
reviewed, and the roles involved in a software team were discussed.
PAGE NO:
4. Agile Manifesto
o The reasons for the rise of the Agile approach in IT were explored, with emphasis
on its four core values and 12 guiding principles.
o Understanding was reinforced through a quiz on Values and Principles of Agility.
5. Agile Frameworks
o Several Agile frameworks, including Scrum and Kanban, were studied to
understand how Agile can be adapted to various project needs.
o FAQs on Agile methods were reviewed, providing insights on applying each
framework based on different project requirements.
6. Traditional vs Agile
o A comparison between traditional SDLC methods and Agile was conducted,
focusing on how Agile evolved and the flexibility it offers, especially for rapid
delivery.
PAGE NO:
7. Gamification of Scrum and Kanban Activities
o Practical demonstrations of Agile principles were observed through activities
such as the Agility in Sprints - Airplane Activity and Kanban Coin Activity.
8. Summary
o A concluding quiz and assessment were completed to validate the understanding
of Agile methodology concepts.
THEORY AND APPLICATION:
Agile methodology is a software development approach that emphasizes flexibility,
customer collaboration, and incremental delivery. Instead of following rigid planning,
Agile prioritizes responding to changes, allowing software to be produced more quickly and
to adapt to client needs. The Agile Manifesto introduced four values: prioritizing individuals
and interactions over processes and tools, working software over comprehensive
documentation, customer collaboration over contract negotiation, and adapting to change
over following a strict plan.
In practical application, Agile frameworks such as Scrum and Kanban are widely utilized.
Scrum operates with iterative sprints, each delivering a potentially shippable product
increment. Kanban, on the other hand, visualizes work and manages flow by limiting work-
in-progress, promoting continuous improvement.
RESULT:
Thus the understand the fundamentals of Agile methodology, including its values, principles,
and frameworks, and to compare it with traditional software development models verified
successfully
PAGE NO:
Exp no: 2 Continuous Integration and Continuous Delivery
Date:
AIM:
The aim is to understand the principles of Continuous Integration and Continuous Delivery
(CI/CD) in DevOps, including the technology, people, and process aspects, along withpractical
implementation using Java and an open-source tool stack.
SOFTWARE REQUIREMENTS:
Java Development Kit (JDK)
Git for version control
SonarQube for static code analysis
JUnit for unit testing and code coverage
Maven for build automation
Docker for containerization
A CI/CD tool (e.g., Jenkins)
PROCEDURE:
1. Prelude
o Pre-requisites for the course were reviewed, including the background
knowledge required.
o The learning outcomes were noted, providing an overview of what would be
achieved in this course.
o A case study was introduced, which would be referenced throughout the course
to contextualize DevOps concepts.
PAGE NO:
2. Fundamentals of DevOps
o Definitions of DevOps were explored, including popular industry perspectives
on the concept.
o A quiz was completed to evaluate understanding of DevOps fundamentals.
PAGE NO:
o Various tool stacks and their implementation in DevOps were studied.
o The orchestration steps involved in Continuous Integration and Continuous
Delivery were examined, followed by a quiz on CI/CD concepts.
o People and process aspects were discussed, focusing on the roles and
responsibilities of team members in a DevOps environment.
PAGE NO:
o The process of continuous delivery and deployment to staging and production
environments was explored.
o Containerization was explained to demonstrate its role in hassle-free deployment
across multiple environments.
o The concept of gating in a CI/CD pipeline was introduced, describing types and
methods of gating conditions.
PAGE NO:
6. Practice Exercises
o Practice exercises were provided as a guide, with step-by-step instructions for
constructing an automated continuous integration pipeline.
o The course concluded with a self-assessment to evaluate the understanding of
continuous integration and delivery concepts in DevOps.
RESULT:
Thus the understand the principles of Continuous Integration and Continuous Delivery (CI/CD) in
DevOps, including the technology, people, and process aspects, along withpracticalimplementation
using Java and an open-source tool stack verified successfully.
PAGE NO:
Exp no: 3 Building of CI-CD Pipelines in Jenkins
Date:
AIM:
The aim of this experiment is to build an understanding of Continuous Integration and
Continuous Deployment (CI/CD) pipelines using Jenkins, along with their benefits and
application in DevOps.
SOFTWARE REQUIREMENTS:
Jenkins
PROCEDURE:
Step 1: Login into your Jenkins account as shown below.
Step 2. Once logged in, the user will be redirected to the Jenkins console, here’s the
reference for the same.
Step 3:
To create a new project, select the option available in the Dashboard which is “New
Item” Refer to the image provided below:
PAGE NO:
Step 4:
Now a list of options will be visible on the screen, along with a field to name the pipeline.
Add a suitable name and select the “Pipeline” option to proceed. Refer to this screenshot.
Step 5:
Once redirected, the configuration page will appear. This is the most important page as here
all the details will be filled in. At first, there is the General section where the user can add a
description based on the project for which the pipeline has to be created. And establish the
PAGE NO:
connection to compute from where the pipeline will access the project. Refer to the
screenshot to understand better.
Step 6:
Now comes the second section, i.e. “Build triggers”. Here, we need to specify the branch and
repository and give the credentials too. And add additional behaviours if required so far.
Refer to the screenshot to have a better understanding.
Step 7:
The next section is “Advanced Project Options”, as the name suggests it is related to thespecial
pipelines only, simpler projects do not require any specifications in this section. Please refer to
the screenshot given below for the same.
PAGE NO:
Step 8:
This is the last section i.e. “Pipeline”. Here the user specifies from where the scripts will be
imported including the path to the file, repository, credentials, etc. Refer to the screenshot
attached below for reference.
Sample Pipeline script To Deploy the Web Application Into The Tomcat Server
node
{
//Mention the tools which have been configured
PAGE NO:
// Mention how to trigger the Pipeline and how many Builds must be there and so on
properties([buildDiscarder(logRotator(artifactDaysToKeepStr:
'', artifactNumToKeepStr: '5', daysToKeepStr: '
', numToKeepStr: '5')), pipelineTriggers([pollSCM('* * * * *')])])
stage('checkout code'){
git branch: 'development', credentialsId: '*******', url: '********'
}
stage('build'){
sh "${mavenhome}/bin/mvn clean package"
}
stage('execute sonarqube package'){
sh "${mavenhome}/bin/mvn clean sonar:sonar"
}
stage('upload buildartifact'){
sh "${mavenhome}/bin/mvn clean deploy"
}
stage('tomcat'){
sshagent(['myuser']) {
sh "scp -o StrictHostKeyChecking=no target
/maven-web-application.war ec2-user@myuser:/opt/apache-tomcat-9.0.64/webapps/
}
}
PAGE NO:
Step 9:
After writing the pipeline is done click on save it will be directly redirected to the Dashboard
of the project there we can use, the “Build Now” option to run the pipeline and check if it is
successful or not, by using stage view or console output.
We can see the outcome of the pipeline in the stage view where as shown in the image
below.
PAGE NO:
And we can also see the console output where we can see logs of each and every step which
is performed.
Click on the console output to see the logs of each and every stage that is performed by using
the pipeline.
PAGE NO:
Scroll down to the end of the console output there we can see the status of the pipeline if it
is “Finished: success” The pipeline which we have written was a success. If it marks as a
fail we see the logs in the console we can find the reason why the stage was getting failed.
THEORY AND APPLICATION:
DevOps professionals rely on pipelines to automate stages such as building, testing, and
deploying applications. Manually handling these tasks via a user interface consumes
significant time and can impact productivity. By using CI/CD pipeline scripts, teams can
automate these processes, boosting productivity, minimizing errors, and enhancing delivery
speed. CI/CD pipelines help to deliver high-quality applications efficiently to end users.
What is a CI/CD Pipeline?
A CI/CD pipeline, short for Continuous Integration / Continuous Deployment, is a
structured, automated process that enables seamless integration and deployment of code
changes. In a CI/CD pipeline, multiple stages are linked to create a processing system where
each stage receives input, processes it based on predefined rules, and passes it on to the next
stage. This linear flow, in which each stage depends on the successful completionof the
previous stage, ensures stability and efficiency in application delivery. A typical CI/CD
pipeline includes steps like testing code, building the application, pushing to a repository, and
deploying to a server.
Each step occurs sequentially, and if any stage fails, subsequent steps halt until the error is
resolved, ensuring quality is maintained at every stage. The Devops Engineering – Planning
to Production course is a valuable resource, offering real-world examples and best practices
for setting up and optimizing CI/CD pipelines using Jenkins.
PAGE NO:
What is Continuous Integration (CI)?
Continuous Integration (CI) is the practice of automatically building and testing code
whenever changes are pushed to a repository, such as GitHub or GitLab. This automation
ensures that code remains functional and meets standards before being merged into a shared
repository, allowing for rapid detection of issues and increased development speed.
Continuous Delivery
Continuous Delivery enables teams to deliver builds into production with minimal human
intervention. Every build that passes all automated tests can be deployed into production with
just a single click, allowing for a rapid and efficient release process while maintaining high
quality.
RESULT:
Thus the experiment is to build an understanding of Continuous Integration andContinuous
Deployment (CI/CD) pipelines using Jenkins, along with their benefits and application in
DevOps verified successfully.
PAGE NO:
Exp no: 4 Installation of Jenkins
Date:
AIM:
To successfully install Jenkins, a popular open-source automation server, to facilitate
continuous integration and continuous deployment (CI/CD) processes.
SOFTWARE REQUIREMENTS:
Java: Jenkins requires Java to run. Ensure you have Java Development Kit (JDK)
version 8 or higher installed.
Web Browser: A modern web browser for accessing the Jenkins web interface.
Operating System: Jenkins can be installed on various operating systems including
Windows, macOS, and Linux.
Minimum Hardware Requirements: RAM: 256 MB (1 GB recommended for better
performance).Disk Space: 1 GB (10 GB recommended for Docker
installations).Recommended Hardware Configuration: RAM: 4 GB or more, Disk Space:
50 GB or more
PROCEDURE FOR INSTALLATION:
Step 1: Setup wizard
On opening the Windows Installer, an Installation Setup Wizard appears, Click Next on
the Setup Wizard to start your installation.
PAGE NO:
Step 2: Select destination folder
Select the destination folder to store your Jenkins Installation and click Next to continue.
PAGE NO:
Step 4: Port selection
Specify the port on which Jenkins will be running, Test Port button to validate whether the
specified port if free on your machine or not. Consequently, if the port is free, it will show a
green tick mark as shown below, then click on Next.
PAGE NO:
Step 6: Custom setup
Select other services that need to be installed with Jenkins and click on Next.
PAGE NO:
Step 8: Finish Jenkins installation
Once the installation completes, click on Finish to complete the installation.
Jenkins will be installed as a Windows Service. You can validate this by browsing
the services section, as shown below:
PAGE NO:
This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize
it with plugins and create the first administrator user through which you can continue
accessing Jenkins.
Unlocking Jenkins
When you first access a new Jenkins controller, you are asked to unlock it using an
automatically-generated password.
Step 1
Browse to http://localhost:8080 (or whichever port you configured for Jenkins when
installing it) and wait until the Unlock Jenkins page appears.
Step 2
The initial Administrator password should be found under the Jenkins installation path (set
at Step 2 in Jenkins Installation).
For default installation location to C:\Program Files\Jenkins, a file
called initialAdminPassword can be found under C:\Program Files\Jenkins\secrets.
However, If a custom path for Jenkins installation was selected, then you should check that
location for initialAdminPassword file.
PAGE NO:
Step 3
Open the highlighted file and copy the content of the initialAdminPassword file.
Step 4
On the Unlock Jenkins page, paste this password into the Administrator password field
and click Continue.
Notes:
You can also access Jenkins logs in the jenkins.err.log file in your Jenkins directory
specified during the installation.
The Jenkins log file is another location (in the Jenkins home directory) where the
initial password can also be obtained.
PAGE NO:
This password must be entered in the setup wizard on new Jenkins installations before you can
access Jenkins’s main UI. This password also serves as the default administrator account’s
password (with username "admin") if you happen to skip the subsequent user- creation step in
the setup wizard.
DASHBOARD OF JENKINS:
RESULT:
Thus the install Jenkins, a popular open-source automation server, to facilitatecontinuous
integration and continuous deployment (CI/CD) processes verified successfully.
PAGE NO:
Exp no: 5 Installation of SonarQube
Date:
AIM:
To successfully install SonarQube, an open-source platform for continuous inspection of code
quality, enabling teams to manage code quality and security in their software development
projects.
SOFTWARE REQUIREMENTS:
Java JDK: SonarQube requires Java 11 or later. Ensure that JDK is installed and
configured properly.
Database: SonarQube requires a database to store analysis results. Supported
databases include:
PostgreSQL (recommended)
MySQL
Oracle
Microsoft SQL Server
Web Browser: A modern web browser for accessing the SonarQube web interface.
Minimum Hardware Requirements
RAM: 2 GB (4 GB recommended for better performance).
Disk Space: 1 GB (more depending on the size of the projects).
Recommended Hardware Configuration
RAM: 8 GB or more.
Disk Space: 20 GB or more.
Step 1: Download and Install Oracle Java 17
Before installing SonarQube, ensure you have Java installed. Follow these steps:
1. Download Oracle Java 17 from Oracle’s website.
2. Run the downloaded installer and follow the installation wizard.
3. Set the JAVA_HOME environment variable to C:\Program Files\Java\jdk-17\bin.
Step 2: Download and Install SonarQube
PAGE NO:
Now, let’s install SonarQube:
1. Download the SonarQube zip file from SonarSource.
2. Extract the contents of the zip file to C:\sonarqube-10.4.1.88267.
3. Set the SONAR_JAVA_PATH environment variable using CMD:
set "SONAR_JAVA_PATH=C:\Program Files\Java\jdk-17\bin\java.exe"
PAGE NO:
C:\sonar-scanner-5.0.1.3006-windows\bin\sonar-scanner.bat -
D"sonar.projectKey=myproject" -D"sonar.sources=." -
D"sonar.host.url=http://localhost:9000" -D"sonar.login=<your_token_here>"
Replace myproject with your project key and <your_token_here> with your generated token
from SonarQube.
Step 7: Create and Analyze a Project in SonarQube
1. Log in to SonarQube dashboard.
2. Navigate to Projects tab > Create Project.
PAGE NO:
Theory and Application
Theory: SonarQube is a tool that enables developers to continuously inspect thequality
of code. It provides reports on code smells, bugs, vulnerabilities, and coverage metrics,
helping teams maintain high code quality.
Application: It is widely used in software development environments to integrate quality
checks into the CI/CD pipeline. SonarQube can analyze multiple programming
languages and integrates with various CI tools like Jenkins, GitLab CI, and more.
RESULT:
Thus the install SonarQube, an open-source platform for continuous inspection of codequality,
enabling teams to manage code quality and security in their software development projects
verified successfully.
PAGE NO:
Exp no: 6 Installation of Eclipse IDE
Date:
AIM:
To successfully install Eclipse IDE, a popular open-source integrated development
environment (IDE) used for Java development and other programming languages.
SOFTWARE REQUIREMENTS:
Prerequisites
Java Development Kit (JDK): Eclipse requires Java to run. Ensure you have JDK
version 11 or higher installed.
Operating System: Eclipse can be installed on various operating systems including
Windows, macOS, and Linux.
Minimum Hardware Requirements
RAM: 4 GB (8 GB recommended for better performance).
Disk Space: 1 GB (more depending on the number of plugins and projects).
Recommended Hardware Configuration
RAM: 8 GB or more.
Disk Space: 5 GB or more.
PROCEDURE:
5 Steps to Install Eclipse
PAGE NO:
security warning to run this file. If the Eclipse Foundation is the Publisher, you are good to
select Run.
For Mac and Linux users, you will still need to unzip the download to create the Installer.
Start the Installer once it is available.
PAGE NO:
4. Select your installation folder
Specify the folder where you want Eclipse to be installed. The default folder will be in your
user directory. Select the ‘Install’ button to begin the installation.
5. Launch Eclipse
Once the installation is complete you can now launch Eclipse. The Eclipse Installer has
done it's work.
PAGE NO:
Theory and Application
Theory: Eclipse IDE is a powerful tool that provides a comprehensive environment
for software development. It supports multiple programming languages through
plugins and offers features like code completion, debugging, and version control
integration.
Application: Eclipse is widely used in the industry for Java development, but it also
supports other languages such as C/C++, PHP, and Python through various plugins.
It is especially popular for developing enterprise applications, Android apps, and web
applications.
RESULT:
Thus the install Eclipse IDE, a popular open-source integrated developmentenvironment (IDE)
used for Java development and other programming languages verified successfully.
PAGE NO:
Exp no: 7 Calculator App in Java using Eclipse IDE
Date:
AIM:
To create a simple calculator application in Eclipse using Java Swing, capable of performing
basic arithmetic operations (addition, subtraction, multiplication, and division).
SOFTWARE REQUIREMENTS:
Java Development Kit (JDK)
Eclipse IDE
Java Swing Library
PROCEDURE:
1. Setup and Configuration:
o Open Eclipse IDE and create a new Java Project.
o Name the project as desired (e.g., "CalculatorApp") and set up the workspace.
o Inside the project, create a new Java class named Calculator.
PAGE NO:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
3. Initialize Components:
PAGE NO:
5. Add Components to Frame:
o Add the panel containing number and operation buttons to the frame.
o Set the frame’s properties (size, visibility, layout) and make it visible for
interaction.
6. Run and Test:
o Compile and run the program in Eclipse.
o Test each function to ensure buttons respond correctly and calculations are accurate.
PAGE NO:
2. User Interface Elements:
o Display Field: A non-editable JTextField to show the current input and
calculation results.
o Number and Operation Buttons: Buttons are created for numbers (0-9) and
basic arithmetic operations (+, -, *, /), alongside buttons for decimal input (.),
equals (=), clear (C), delete (Del), and negation ((-)).
o Event Handling: Implements ActionListener to handle button clicks, capture
inputs, and perform calculations based on the selected operation.
RESULT:
Thus the simple calculator application in Eclipse using Java Swing, capable of performing
basic arithmetic operations (addition, subtraction, multiplication, and division) verified
successfully.
PAGE NO: