Devops-UNIT 2
Devops-UNIT 2
2
Please read this disclaimer before proceeding:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document through
email in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or
copy through e-mail. Please notify the sender immediately by e-mail if you have
received this document by mistake and delete this document from your system. If
you are not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is
strictly prohibited.
3
20IT911
DEVOPS
Date : 07-08-2023
4
1.TABLE OF CONTENTS
SLIDE
S.NO. CONTENTS
NO.
1 CONTENTS
2 COURSE OBJECTIVES
5
Table of Contents SLIDE
S.NO. CONTENTS
NO.
21 ASSIGNMENT 2- UNIT 2
27 ASSESSMENT SCHEDULE
6
2. COURSE OBJECTIVES
OBJECTIVES:
Understand the concepts of DevOps and the issues it resolves
Learn the DevOps tools set
Learn to Develop automation using Maven
Understand Continuous Delivery and Continuous Deployment
Understand Docker Containerization
7
3. PRE REQUISITES
PRE-REQUISITE CHART
Data Structures
Software Engineering
20IT911
DevOps
Machine Learning
Cloud Computing
8
4. DEVOPS SYLLABUS LTPC
3003
OBJECTIVES:
Understand the concepts of DevOps and the issues it resolves
Learn the DevOps tools set
Learn to Develop automation using Maven
Understand Continuous Delivery and Continuous Deployment
Understand Docker Containerization
9
4. SOFTWARE ENGINEERING SYLLABUS LTPC
3003
UNIT IV DEPLOYMENT AND MONITORING - DOCKER 6+6
Sonar Qube integration with Project and Jenkins - Jenkins - Setup and
Configuration, Jobs - Continuous Integration, Continuous Delivery and
Continuous Deployment Configuration
TOTAL: 60 PERIODS
10
5.COURSE OUTCOME
Cognitive/
Affective Expected
Course
Course Outcome Statement Level of the Level of
Code
Course Attainment
Outcome
Course Outcome Statements in Cognitive Domain
Understand the concept of DevOps Apply
C305.1 60%
Architecture K3
Apply the DevOps Tools in real Analyse
C305.2 60%
time applications K4
Build Maven with Unit, Integration Understand
C305.3 60%
and Performance Testing K2
Apply
C305.4 Deploy and monitor using Docker 60%
K3
Analyse
C305.5 Deploy and monitor using Jenkins 60%
K4
Develop project schedule, identify Apply
C305.6 60%
project costs and efforts required K3
Course Outcome Statements in Affective domain
11
6.CO-PO/PSO MAPPING
P P P P P P P P P P P P PS PS PS
Course O O O O O O O O O O O O O O O
Outcomes 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
(Cos)
K3
K K A
K4 K5 /K A2 A3 A3 A3 A3 A2 K3 K3 K3
3 5 3
5
K
C305.1 3 2 1 1 3 3 3 3 3
3
K
C305.2 3 3 2 2 3 3 3 3 3
4
K
C305.3 2 1 2 3 3 3
2
5
K
C305.4 3 2 1 1 3 3 3 3 3
3
K
C305.5 3 3 2 2 3 3 3 3 3
4
K
C305.6 3 2 1 1 3 3 2 2 2
3
A
C305.7 3
2
A
C305.8 2 2 2 3
2
A
C305.9 3 3 3 3 3
3
C305 3 3 2 2 3 1 1 1 3 3 3 3 3 3 3
12
UNIT 2
13
LECTURE PLAN – UNIT II
1.3 CONFIGURATION,
1 CO1 K2 MD1
PARENT/CHILD
3
14
LECTURE PLAN – UNIT I
15
ACTIVITY BASED LEARNING – UNIT I
16
ACTIVITY BASED LEARNING – UNIT II
QUIZ- LINK
Unit II:
https://quizizz.com/admin/quiz/60ad9fa17c1b23001b0688bc/devops?fro
mSearch=true&source=null
https://quizizz.com/admin/quiz/6417c38f432a57002135873c/devops?fro
mSearch=true&source=null
17
Test Yourself
a. Spiral model.
b. Waterfall model.
c. Prototyping model
18
UNIT 2
TOOLS SET
Maven Build Management
In case of multiple development teams environment, Maven can set-up the way to
work as per standards in a very short time. As most of the project setups are
simple and reusable, Maven makes life of developer easy while creating reports,
checks, build and testing automation setups.
Builds
Documentation
Reporting
Dependencies
SCMs
Releases
Distribution
Mailing list
19
Maven Evolution
Apache group then developed Maven which can build multiple projects together,
publish projects information, deploy projects, share JARs across several projects
and help in collaboration of teams.
Maven project structure and contents are declared in an xml file, pom.xml,
referred as Project Object Model (POM), which is the fundamental unit of the
entire Maven system.
Maven's Objectives
20
Convention over Configuration
Maven uses Convention over Configuration, which means developers are not required
to create build process themselves.
Developers do not have to mention each and every configuration detail. Maven provides
sensible default behavior for projects. When a Maven project is created, Maven creates
default project structure. Developer is only required to place files accordingly and he/she
need not to define any configuration in pom.xml.
As an example, following table shows the default values for project source code files,
resource files and other configurations. Assuming, ${basedir} denotes the project
location −
Item Default
Resources ${basedir}/src/main/resources
Tests ${basedir}/src/test
In order to build the project, Maven provides developers with options to mention life-
cycle goals and project dependencies (that rely on Maven plugin capabilities and on its
default conventions). Much of the project management and build related tasks are
maintained by Maven plugins.
21
Developers can build any given Maven project without the need to
understand how the individual plugins work. We will discuss Maven
Plugins in detail in the later chapters.
Features of Maven
Simple project setup that follows best practices.
Consistent usage across all projects.
Dependency management including automatic updating.
A large and growing repository of libraries.
Extensible, with the ability to easily write plugins in Java or
scripting languages.
Instant access to new features with little or no extra configuration.
Model-based builds − Maven is able to build any number of
projects into predefined output types such as jar, war, metadata.
Coherent site of project information − Using the same metadata as
per the build process, maven is able to generate a website and a
PDF including complete documentation.
Release management and distribution publication − Without
additional configuration, maven will integrate with your source
control system such as CVS and manages the release of a project.
Backward Compatibility − You can easily port the multiple modules
of a project into Maven 3 from older versions of Maven. It can
support the older versions also.
Automatic parent versioning − No need to specify the parent in
the sub module for maintenance.
Parallel builds − It analyzes the project dependency graph and
enables you to build schedule modules in parallel. Using this, you
can achieve the performance improvements of 20-50%.
Better Error and Integrity Reporting − Maven improved error
reporting, and it provides you with a link to the Maven wiki page
where you will get full description of the error.
22
POM stands for Project Object Model. It is fundamental unit of work in
Maven. It is an XML file that resides in the base directory of the project
as pom.xml.
The POM contains information about the project and various
configuration detail used by Maven to build the project(s).
POM also contains the goals and plugins. While executing a task or goal,
Maven looks for the POM in the current directory. It reads the POM,
gets the needed configuration information, and then executes the goal.
Some of the configurations that can be specified in the POM are
following −
project dependencies
plugins
goals
build profiles
project version
developers
mailing list
Before creating a POM, we should first decide the
project group (groupId), its name (artifactId) and its version as these
attributes help in uniquely identifying the project in repository.
POM Example
<project xmlns = "http://maven.apache.org/POM/4.0.0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.companyname.project-group</groupId>
<artifactId>project</artifactId>
<version>1.0</version>
</project>
23
What is Build Lifecycle?
A Build Lifecycle is a well-defined sequence of phases, which
define the order in which the goals are to be executed. Here
phase represents a stage in life cycle. As an example, a
typical Maven Build Lifecycle consists of the following
sequence of phases.
24
When Maven starts building a project, it steps through a defined sequence of
phases and executes goals, which are registered with each phase.
clean
default(or build)
site
A goal represents a specific task which contributes to the building and managing
of a project. It may be bound to zero or more build phases. A goal not bound to
any build phase could be executed outside of the build lifecycle by direct
invocation.
The order of execution depends on the order in which the goal(s) and the build
phase(s) are invoked. For example, consider the command below.
The clean and package arguments are build phases while
the dependency:copy-dependencies is a goal.
Here the clean phase will be executed first, followed by the dependency:copy-
dependencies goal, and finally package phase will be executed.
Clean Lifecycle
When we execute mvn post-clean command, Maven invokes the clean lifecycle
consisting of the following phases.
pre-clean
clean
post-clean
25
<project xmlns = "http://maven.apache.org/POM/4.0.0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.companyname.projectgroup</groupId>
<artifactId>project</artifactId>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>id.pre-clean</id>
<phase>pre-clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>pre-clean phase</echo>
</tasks>
</configuration>
</execution>
26
<execution>
<id>id.clean</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>clean phase</echo>
</tasks>
</configuration>
</execution>
<execution>
<id>id.post-clean</id>
<phase>post-clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>post-clean phase</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
27
Now open command console, go to the folder containing pom.xml
and execute the following mvn command.
C:\MVN\project>mvn post-clean
Maven will start processing and displaying all the phases of clean
life cycle.
28
Sr.No. Lifecycle Phase & Description
1 validate
Validates whether project is correct and all necessary information is available to complete
the build process.
2 initialize
Initializes build state, for example set properties.
3 generate-sources
Generate any source code to be included in compilation phase.
4 process-sources
Process the source code, for example, filter any value.
5 generate-resources
Generate resources to be included in the package.
6 process-resources
Copy and process the resources into the destination directory, ready for packaging phase.
7 compile
Compile the source code of the project.
8 process-classes
Post-process the generated files from compilation, for example to do bytecode
enhancement/optimization on Java classes.
9 generate-test-sources
Generate any test source code to be included in compilation phase.
10 process-test-sources
Process the test source code, for example, filter any values.
11 test-compile
Compile the test source code into the test destination directory.
29
12 process-test-classes
Process the generated files from test code file compilation.
13 test
Run tests using a suitable unit testing framework (Junit is one).
14 prepare-package
Perform any operations necessary to prepare a package before the actual packaging.
15 package
Take the compiled code and package it in its distributable format, such as a JAR,
WAR, or EAR file.
16 pre-integration-test
Perform actions required before integration tests are executed. For example, setting
up the required environment.
17 integration-test
Process and deploy the package if necessary into an environment where integration
tests can be run.
18 post-integration-test
Perform actions required after integration tests have been executed. For example,
cleaning up the environment.
19 verify
Run any check-ups to verify the package is valid and meets quality criteria.
20 install
Install the package into the local repository, which can be used as a dependency in
other projects locally.
21 deploy
Copies the final package to the remote repository for sharing with other developers
and projects.
30
Maven Installation Steps
Step 1 - Verify Java Installation in Your Machine
First of all, open the console and execute a java command based on
the operating system you are working on.
OS Task Command
OS Output
31
If you do not have Java installed on your system, then download the Java Software
Development Kit (SDK) from the following link http://www.oracle.com. We are
assuming Java 11.0.11 as the installed version for this tutorial.
Set the JAVA_HOME environment variable to point to the base directory location
where Java is installed on your machine. For example.
OS Output
OS Output
32
Verify Java installation using the command java -version as
explained above.
Step 3 - Download Maven Archive
Download Maven 3.8.4
from https://maven.apache.org/download.cgi
OS Archive name
Windows apache-maven-3.8.4-bin.zip
Linux apache-maven-3.8.4-bin.tar.gz
Mac apache-maven-3.8.4-bin.tar.gz
Linux /usr/local/apache-maven
Mac /usr/local/apache-maven
33
Step 6 - Add Maven bin Directory Location to System Path
Now append M2 variable to System Path.
OS Output
34
Finally, verify the output of the below commands, which should be
as follows
OS Task Command
35
Maven Plugins
Maven is actually a plugin execution framework where every task is
actually done by plugins. Maven Plugins are generally used to −
create jar file
create war file
compile code files
unit testing of code
create project documentation
create project reports
A plugin generally provides a set of goals, which can be executed
using the following syntax −
mvn [plugin-name]:[goal-name]
For example, a Java project can be compiled with the maven-
compiler-plugin's compile-goal by running the following command.
mvn compiler:compile
Plugin Types
Maven provided the following two types of Plugins −
1 Build plugins
They execute during the build process and should be configured in the <build/>
element of pom.xml.
2 Reporting plugins
They execute during the site generation process and they should be configured in
the <reporting/> element of the pom.xml.
36
What is Nagios?
Based on the parameters and thresholds defined, Nagios can send out
alerts if critical levels are reached. These notifications can be sent through
email and text messages. An authorization system enables administrators to
restrict access.
37
Nagios plugins
Nagios can also run remote scripts and plugins using the Nagios Remote Plugin
Executor (NRPE) agent. NRPE enables remote monitoring of system metrics such
as system load, memory and disk use. It consists of the check_nrpe plugin, which
is stored on the local monitoring machine, and NRDP, which runs on the remote
machine. Nagios uses a plugin to consolidate data from the NRPE agent before it
goes to the management server for processing. NRPE can also communicate with
Windows agents to monitor Windows machines
Nagios supports plugins that are stand-alone add-ons and extensions so users can
define targets and which target parameters to monitor. Nagios plugins process
command-line arguments and communicate commands with Nagios Core.
There are around 50 plugins developed and maintained by Nagios, while there are
over 3,000 from the community. These plugins are categorized into lists including
hardware, software, cloud, OSes, security, log files and network connections. As
an example, when used in conjunction with environmental-sensing systems, a
Nagios plugin can share data on environmental variables, such as temperature,
humidity or barometric pressure.
Nagios tools
Nagios has proven popular among small and large businesses, as well as internet
service providers, educational institutions, government agencies, healthcare
institutions, manufacturing companies and financial institutions.
Users can choose among free and paid options, depending on the needed
services and support.
38
Nagios Core
The service that was originally known as Nagios is now referred to as
Nagios Core. Core is freely available as an open source monitoring
software for IT systems, networks and infrastructure. Core contains a
wide array of infrastructure monitoring through allowing plugins to
extend its monitoring capabilities. It is the base for paid Nagios
monitoring systems.
Nagios XI
Nagios XI is an extended interface of Nagios Core, intended as the
enterprise-level version of the monitoring tool. XI acts as monitoring
software, configuration manager and toolkit. While Nagios Core is free,
XI must be purchased from Nagios Enterprises. Atop the same features
as Core, XI adds preconfigured virtual machines (VMs), a web
configuration user interface, performance graphing, a mobile
application, dashboards, scheduled reporting and technical support
through email.
39
Nagios Log Server is a log monitoring and management tool that enables
an organization to view, sort and configure logs from its IT infrastructure,
including Windows event logs. Log Server can analyze, collect and store
logged data based on custom and preassigned specifications. Administrators
can set alerts to notify Log Server users when there is a potential threat or
malfunction on a monitored asset. For example, an alert goes out to the
Microsoft Exchange administrator when there are three failed login attempts
to Exchange Server, meaning there could be an unwarranted person trying
to guess the password to the system.
Nagios Network Analyzer tracks network traffic and bandwidth use. Network
Analyzer can resolve network outages, abnormalities and security threats.
Features include automated security alerts, customizable application
monitoring, integration with Nagios IX and a bandwidth use calculator.
40
Nagios competitors
Zenoss
Zabbix
Zabbix is an open source monitoring tool for Linux, Unix and Windows OSes that
relies on agents to collect monitoring data. It can also use common protocols for
agentless operation. The technology monitors physical and cloud assets, VMs,
services and applications. Zabbix is evolving for cloud deployment, as well as on
premises.
Microsoft SCOM
Microsoft SCOM enables users to configure, manage and monitor devices and
applications via the same console. SCOM tracks server hardware, system services,
OSes, hypervisors and applications. SCOM, like Nagios, relies on agents or
agentless-based monitoring for its data collection, and supports plugins.
SolarWinds
41
Git & GitHub
Git
Whether or not you've worked with version control before, there are a few things
you should know before getting started with Git:
Git stores changes in SHA hashes, which work by compressing text files. That
makes Git a very good version control system (VCS) for software programming,
but not so good for binary files like images or videos.
Git repositories can be connected, so you can work on one locally on your own
machine, and connect it to a shared repository. This way, you
can push and pull changes to a repository and easily collaborate with others
Version control is very important - without it, you risk losing your work. With Git,
you can make a "commit", or a save point, as often as you'd like. You can also go
back to previous commits. This takes the pressure off of you while you're
working. Commit often and commit early, and you'll never have that gut sinking
feeling of overwriting or losing changes.
There are many version control systems out there - but Git has some major
advantages
42
Install Git Using GitHub Desktop
Installing GitHub Desktop will also install the latest version of Git if you don't already have
it. With GitHub Desktop, you get a command line version of Git with a robust GUI.
Regardless of if you have Git installed or not, GitHub Desktop offers a simple
collaboration tool for Git.
Navigate to the latest Git for Windows installer and download the latest version.
Once the installer has started, follow the instructions as provided in the Git Setup wizard
screen until the installation is complete.
Open the windows command prompt (or Git Bash if you selected not to use the
standard Git Windows Command Prompt during the Git installation).
Note: git-scm is a popular and recommended resource for downloading Git for Windows.
The advantage of downloading Git from git-scm is that your download automatically
starts with the latest version of Git included with the recommended command prompt, Git
Bash .
Git init
git init git init turns any directory into a Git repository.
git init is one way to start a new project with Git. To start a repository, use either git
init or git clone - not both.
To initialize a repository, Git creates a hidden directory called .git. That directory stores
all of the objects and refs that Git uses and creates as a part of your project's history.
This hidden .git directory is what separates a regular directory from a Git repository.
43
How to Use git init
git init <directory>: Transform a directory in the current path into a Git repository
git init --bare: Create a new bare repository (a repository to be used as a remote
repository only, that won't contain active development)
Starting a new project can be confusing. Sometimes, it's unclear if you should
use git init, git clone, or both.
Your project may already exist locally, but it doesn't have Git yet. git init is
probably the right choice for you. This is only run once, even if other collaborators
share the project.
Once you have initialized the repository, create a remote repository somewhere
like GitHub.com.
Then, add the remote URL to your local git repository with git remote add origin
<URL>. This stores the remote URL under a more human-friendly name, origin.
Shape your history into at least one commit by using git add to stage the existing
files, and git commit to make the snapshot.
Once you have at least one commit, you can push to the remote and set up the
tracking relationship for good with git push -u origin master.
44
git clone: The Remote Already Exists
If you create a remote repository first with the intent of moving your project to it
later, you may have a few other steps to follow. If there are no commits in the
remote repository, you can follow the steps above for git init. If there are commits
and files in the remote repository but you would still like it to contain your project
files, git clone that repository. Then, move the project's files into that cloned
repository. git add, git commit, and git push to create a history that makes sense
for the beginning of your project. Then, your team can interact with the
repository without git init again.
The default behavior of git init is to transform the current directory into a Git
repository. For an existing project to become a Git repository, navigate into the
targeted root directory. Then, run git init.
Or, you can create a new repository in a directory in your current path. Use git init
<directory> and specify which directory to turn into a Git repository.
45
Git Clone
Git Clone
The git clone command is used to create a copy of a specific repository or branch
within a repository.
The ability to work with the entire repository means that all developers can work
more freely. Without being limited by which files you can work on, you can work
on a feature branch to make changes safely. Then, you can:
later use git push to share your branch with the remote repository
46
How to Use git clone
git clone [url]: Clone (download) a repository that already exists on GitHub, including all
of the files, branches, and commits.
git clone --mirror: Clone a repository but without the ability to edit any of the files. This
includes the refs, or branches. You may want to use this if you are trying to create a
secondary copy of a repository on a separate remote and you want to match all of the
branches. This may occur during configuration using a new remote for your Git hosting,
or when using Git during automated testing.
git clone --sparse: Instead of populating the working directory with all of the files in the
current commit recursively, only populate the files present in the root directory. This
could help with performance when cloning large repositories with many directories and
sub-directories.
Git Add
The git add command adds new or changed files in your working directory to the Git
staging area.
git add is an important command - without it, no git commit would ever do anything.
Sometimes, git add can have a reputation for being an unnecessary step in development.
But in reality, git add is an important and powerful tool. git add allows you to shape
history without changing how you work.
git add README.mdAs you're working, you change and save a file, or multiple files. Then,
before you commit, you must git add. This step allows you to choose what you are going
to commit. Commits should be logical, atomic units of change - but not everyone works
that way. Maybe you are making changes to files that aren't logical or atomic units of
change. git add allows you to systematically shape your commits and your history
anyway
47
What Does Git Add Do?
git add [filename] selects that file, and moves it to the staging area,
marking it for inclusion in the next commit. You can select all files,
a directory, specific files, or even specific parts of a file for staging
and commit.
This means if you git add a deleted file the deletion is staged for
commit. The language of "add" when you're actually "deleting" can
be confusing. If you think or use git stage in place of git add, the
reality of what is happening may be more clear.
git add and git commit go together hand in hand. They don't work
when they aren't used together. And, they both work best when
used thinking of their joint functionality.
How to Use git add
Common usages and options for git add
git add <path>: Stage a specific directory or file
git add .: Stage all files (that are not listed in the .gitignore) in the
entire repository
git add -p: Interactively stage hunks of changes
48
Git Commit
Git Commit
git commit creates a commit, which is like a snapshot of your repository. These commits are
snapshots of your entire repository at specific times. You should make new commits often, based
around logical units of change. Over time, commits should tell a story of the history of your
repository and how it came to be the way that it currently is. Commits include lots of metadata in
addition to the contents and message, like the author, timestamp, and more.
Commits are the building blocks of "save points" within Git's version control.
git commit -m "update the README.md with link to contributing guide" Commits shape history
By using commits, you're able to craft history intentionally and safely. You can make commits to
different branches, and specify exactly what changes you want to include. Commits are created on
the branch that you're currently checked out to (wherever HEAD is pointing) so it's always a good
idea to run git status before making a commit, to check that you're checked-out to the branch that
you intend to be. Before you commit, you will need to stage any new changes that you'd like to
include in the commit using git add [file].
Commits are lightweight SHA hashes, objects within Git. As long as you're working with text files,
you won't need to worry about how many files you have, how big they are, or how many commits
you make. Git can handle it!
Commits have two phases to help you craft commits properly. Commits should be logical, atomic
units of change that represent a specific idea. But, not all humans work that way. You may get
carried away and end up solving two or three problems before you remember to commit! That's
OK - Git can handle that. Once you're ready to craft your commits, you'll use git add
<FILENAME> to specify the files that you'd like to "stage" for commit. Without adding any files,
the command git commit won't work. Git only looks to the staging area to find out what to
commit. Staging, or adding, files, is possible through the command line, and also possible with
most Git interfaces like GitHub Desktop by selecting the lines or files that you'd like to stage.
You can also use a handy command, git add -p, to walk through the changes and separate them
out, even if they're in the same file.
49
Continuous learning:
Git Tutorial
https://www.youtube.com/watch?v=tRZGeaHPoaw
50
ASSIGNMENT – UNIT 2
51
PART A- UNIT-2
Nagios
OpenNMS
Splunk
Icinga 2
Plugins are the central feature of Maven that allow for the reuse of common
build logic across multiple projects. They do this by executing an action (i.e.
creating a WAR file or compiling unit tests) in the context of a project's
description - the Project Object Model (POM).
pom. xml is used to define dependency which is used to package the jar.
POM stands for project object model.
52
PART A- UNIT-2
4. Define Version control
5. What are the advantages of using version control and code review tools in
DevOps workflows?
Advantages of Version Control:
1. Collaboration
2. Traceability
3. Branching and Parallel Development
4.Conflict Resolution
5. Rollback and Recovery
6. Automated Testing and Deployment
7. Code Reviews
1.Code Quality
2.Bug Detection
3.Knowledge Sharing
4. Consistency
5.Compliance
6. Collaboration
7.Integration
53
6. Name three important DevOps KPIs?
54
PART B- UNIT 2
1. Explain in detail about Maven Build Management with examples. (K2), CO2
2. What is Git bisect? How can you use it to determine the source of a (regression)
bug? s(K3),CO2
3. How does Nagios help in the continuous monitoring of systems, applications, and
services?),CO1
4. Explain the operation of Github Merge, Pull request , Push request , Local and
Remote Repository with example),CO1
55
SUPPORTIVE ONLINE COURSES – UNIT 2
https://swayam.gov.in/explorer?searchText=software+engineering
https://www.coursera.org/learn/software-processes
https://www.coursera.org/specializations/software-development-
lifecycle
https://www.coursera.org/learn/software-design-development-
life-cycle
56
REAL TIME APPLICATION- UNIT I
As per the KPMG Survey, on average, about 70 % of all IT-related projects fail to
meet their objectives, and one of the main reason is the selection of the wrong
software development process/model.
Just selecting a model that suits your criteria can avoid these problems.
For example, if requirements are all clear and written down, you might have to
choose a different model if requirements are not clear and constant changes are
expected.
Waterfall
Probably the oldest and most straightforward SDLC (software development life
cycle) development model, Waterfall follows a sequential model (like a waterfall)
with requirements analysis, design, coding, testing and implementation in such a
manner that the development does not move to next phase until the previous
phase is completed. That is why it is called the linear sequential software
development life cycle.
Iterative
Repetition is the keyword for the iterative model. Instead of having clear and
known requirements or waiting for them, a team starts development on the
known features, tests and then evaluate further requirements, develops, tests and
so on until the whole thing is done.
Agile
Agile, the most widely used software development methodology is Agile, has
become the industry standard, be it software development, App development or
Game development.
57
CONTENT BEYOND SYLLABUS – UNIT I
ProWorkflow
Jira
58
ASSESSMENT SCHEDULE
Name of the
S.NO Start Date End Date Portion
Assessment
59
PRESCRIBED TEXT BOOKS AND REFERENCE BOOKS
REFERENCES:
60
MINI PROJECT SUGGESTIONS
Develop a Sample Spring Boot Project with following aspects
REST API End Points
Ex Funds Transfer Service
Query Fund Transfer Status
Junit Test Cases
Selenium Test Cases
DockerFile
Scripts for Docker Image and Container Cleanup / Creation
Maven Pom file with Docker integrations
Software Installation: -
Java 8
Maven Latest
VS Code / Eclipse STS
Jenkins
SonarQube
Docker and Kubernetes
Git Client
Nagios Network Mentoring Tool
Reference https://docs.semaphoreci.com/examples/java-spring-
continuous-integration/
61
Exercise 1:
Install Jenkins
Configure Jenkins for Maven, Java, GitHub,SonarQube and
SonarScanner
Setup Continuous Integration on Jenkins for the above said project
and show case the build stability in the form of
Build Stability
Test Case Success / Regression
Code Quality Check using SonarQube
Points to be observed: -
Build Stability
Finger Prints
Test Case Results
Workspace
Application Logs
Jenkins Pre / Post Actions
Email Notifications
Sonar Qube Report Analysis
62
Exercise 2:
Install Groovy
Create a Pipelines in Jenkins which will perform following steps
Configure Java/Maven/Private Repo
Git Clone of the above said project
Maven Build
Maven Test
Sonar Scanner (if quality if OK then proceed, else exit with error message)
Repo Setup and Install Libraries in the Repo
Docker Clean Containers
Docker Clean Images
Docker Build
Docker Run Container
Points to be observed: -
Build Stability
Finger Prints
Test Case Results
Workspace
Application Logs
Jenkins Pre / Post Actions
Email Notifications
Sonar Qube Report Analysis
Time Taken for each Steps
Process Refinement
63
MINI PROJECT SUGGESTIONS
Problem Statement:
It needs to maintain the record of all the students and staff of an Institution.
View Results
Generate Reports:
64
MINI PROJECT SUGGESTIONS
2. Quiz System
Problem Statement:
Registration/SignIn
65
MINI PROJECT SUGGESTIONS
Problem Statement:
It needs to maintain the record of all the train details, station details and
passenger details of a particular train.
Registration/SignIn
Book Tickets
Cancel Tickets
Payment
66
MINI PROJECT SUGGESTIONS
4.Expert System
Problem Statement:
It needs to maintain the record of all the symptoms and its prescribed medicines.
Registration/SignIn
67
MINI PROJECT SUGGESTIONS
Problem Statement:
It needs to maintain the record of all the courses, seats available, course
instructors and duration.
Generate Reports:
68
MINI PROJECT SUGGESTIONS
Problem Statement:
Generate Reports:
69
Thank you
Disclaimer:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document through
email in error, please notify the system manager. This document contains proprietary
information and is intended only to the respective group / learning community as
intended. If you are not the addressee you should not disseminate, distribute or
copy through e-mail. Please notify the sender immediately by e-mail if you have
received this document by mistake and delete this document from your system. If
you are not the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is
strictly prohibited.
70