0% found this document useful (0 votes)
16 views85 pages

DevOpsLabManual 241205 090053

The document outlines a certificate template for a B.Tech laboratory course and provides a comprehensive overview of the Software Development Life Cycle (SDLC), including its phases, methodologies, and the Agile approach. It discusses various SDLC models such as Waterfall, Lean, Spiral, and V-Model, highlighting their advantages and disadvantages. Additionally, it emphasizes the four values of the Agile Manifesto, which prioritize individuals, working software, customer collaboration, and responsiveness to change.
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)
16 views85 pages

DevOpsLabManual 241205 090053

The document outlines a certificate template for a B.Tech laboratory course and provides a comprehensive overview of the Software Development Life Cycle (SDLC), including its phases, methodologies, and the Agile approach. It discusses various SDLC models such as Waterfall, Lean, Spiral, and V-Model, highlighting their advantages and disadvantages. Additionally, it emphasizes the four values of the Agile Manifesto, which prioritize individuals, working software, customer collaboration, and responsiveness to change.
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/ 85

Regd. No.

CERTIFICATE

This is to certify that this is a bonafide work done by

Mr/Miss …….……………………..………………………………………… Bearing Roll

No .…………………………………of…………..….……B.Tech in……………Branch for

the ……………………………………. Laboratory Course …………….………………….

During the Academic Year 2024-2025.

No. of Experiments Recorded: ……………………

Marks Awarded: …………………………………………..

Signature of the Staff In-charge Signature of HOD

Date: ……………….. Date: ……………

Signatures:
1. Internal Examiner

2. External Examiner
1
INDEX
EXP. DATE Name Of The Experiment PAGE MARKS SIGN
NO NO
1.

2.

3.

4.

5.

6.

7.

8.

9.

2
10.

11.

12.

3
Exercise 1:
Reference course name :Software engineering and Agile software development
Get an understanding of the stages in the software development lifecycle, the process
models, values and principles of agility and the need for agile software development. This
will enable you to work in projects following an agile approach to software development.
Answer:

Phases of Software Development life cycle. Values and principles of agile software development.

What Is an SDLC?
A software development life cycle (SDLC) is a methodology followed to create high-quality software. By
adhering to a standard set of tools, processes, and duties, a software development team can build, design,
and develop products that meet or exceed their clients' expectations.

Phases of
the
Software

Development Life Cycle

SDLC processes generally number at 6 distinct stages: planning, analysis, designing, development and
testing, implementation, and maintenance. Each of them is briefly explained below.

1. Planning
The very first phase of the SDLC starts with requirement gathering. This is known as the planning stage. It
is the most important phase of the entire SDLC from the perspective of project managers and stakeholders.

The planning stage answers such questions as:


 How will the software be used?
 What data will serve as the input of the software?
 What will be the output of the software?
 Who is going to use the software?

1| P a g e
2. Analysis
Once all the requirements are known, it’s time to analyze them for feasibility and validity. The team
decides whether it will be possible to add the requirements to the software. After that, a Requirement
Specification document is designed. This serves as the guide for carrying out the next phase of the SDLC.

3. Designing
This stage includes the designing of requirements specified in the very first phase of the SDLC. In
addition to assisting in specifying hardware and system requirements, that stage also helps define the overall
software architecture.
The system design specifications prepared in the designing phase serve as the input for the next i.e.
fourth stage of the SDLC. During the designing phase, testers are required to form an apt testing strategy. It
contains what needs to be tested, and how it needs to be tested.

4. Development & Testing


Some development teams consider development and testing to fall under a single-phase, others
prefer to break it into two sub-phases. Irrespective of the choice a development team makes, the whole
process remains the same. It’s all a matter of preference. Once the system design documentation is
complete, the whole task is divided into modules or units. After that, the actual coding begins.
Because this phase includes coding, it is the most important phase of the SDLC for the developer
team. Moreover, this is the longest phase of the entire software development lifecycle. Once the code is
fully developed, testing is carried out against the requirements. Testing includes functional testing, such as
acceptance testing, integration testing, system testing, and unit testing, as well as non-functional testing.

5. Implementation
Also known as the deployment phase, the implementation phase occurs right after the successful
testing of the software product. It is focused on delivering the software to the end- user or installing it onto
the customer’s system(s).
The first thing that takes place once the product is delivered to the customer is beta testing. All bugs
and enhancements are then reported to the developer team working on the project. Once the changes are
complete, the final deployment takes place.

6. Maintenance
Finally, there’s the maintenance phase, which occurs over time after the product has been
released. This phase deals with dealing with problems experienced by the customers/end- users while using
the software.
Advantages and Disadvantages of SDLCs

2| P a g e
What is the best SDLC methodology?
There is no straight answer to this question, as the software life cycle model you choose will depend
on the size and scope of the software you are building, on top of other factors. The best SDLC methodology
will always come down to the requirements and project context.

There are also alternatives to the types of SDLC methodologies detailed further below. The most
popular one is the RAD or Rapid Application Development. RAD offers implementation of CASE tools,
joint application development, and prototyping. The advantages of RAD are active user involvement, a
faster approach, and reduced development cost.

The main SDLC models include:


 Waterfall: Follows a sequential model of phases, each of which has its own tasks and objectives
Clean room: A process model that removes defects before they cause serious issues
 Incremental: Requirements are divided into multiple standalone modules
 V-Model: Processes are executed sequentially in a V-shape (each step comes with its own
testing phase)
 Prototyping: A working replication of the product is used to evaluate developer proposals
 Big Bang: Requires very little planning and has no formal procedures; however, it's a high-
risk model
 Agile: Uses cyclical, iterative progression to produce working software
The last one on the list, Agile, is what we're focusing on today. You see, a traditional SDLC (like
Waterfall) front-loads the work – so if you require a large product, it can take a long time before the team
even builds a working prototype. Most software development startups don't have the financial means to wait
that long. Well-funded competitors could beat them to the market; so, to make processes more rapid without
compromising on quality, many development companies are embracing the Agile software development
lifecycle.
1. Waterfall model:
The waterfall model uses a sequential approach to building any software. Below is the phases waterfall
model as follows:

3| P a g e
The model has various phases starting with the Analysis phase. In this phase, you try to analyze the
requirements given by the clients
 In the Design phase, the analysis will be transformed into an ordered structure, i.e., you prepare a blueprint
of the software
 After completing the design phase, it’s time for developers to get their hands dirty by coding for the
application. This would be the source code, and you test it in the testing process. Different checks on the
application are performed, such as unit testing, integration testing, performance testing, etc
 In the Deployment phase, the tested application is deployed onto production servers
 Finally comes the Monitoring phase, wherein 60 percent of the entire effort is spent monitoring the
application’s performance

Let’s see its advantages and disadvantages


Advantages:
 Easyto use and simple to understand
 As it’s a top-down approach process, overlapping of the phases is avoided
 Suitable for small-projects
 Easytesting and analysis
Disadvantages:
 Changes to the product are complicated to draw while it is in the testing stage
 Not suitable for complex projects
 The end product is only available at the end of the cycle

To summarize, the Waterfall model was only acceptable for projects with stable specifications. By stable, I
mean that over time, requirements will not change. But this is an improbable thing in today’s world, as
specifications keep changing from time to time.
2. Lean Software Development Life Cycle
3. The Lean methodology takes inspiration from lean manufacturing practices and principles. Itfollows a set of
seven principles, which are:
 Eliminate waste
 Amplify/refine learning
 Decide as late as possible
 Deliver as fast as possible
 Empower the team
 Emphasize conceptual integrity
 See the whole/Operating from the top-level

In actuality, the Lean methodology is very much similar to the Agile methodology with some
noteworthy differences.
The most important distinction between the two SDLC methodologies lies in terms of
prioritizing customer satisfaction. The Agile model makes customer satisfaction a priority
from the very beginning. Consequently, the project teams involved respond instantly to
stakeholder feedback throughout the SDLC procedure.

On the other hand, Lean methodology gives the topmost priority to the elimination of waste.This is done in order to
create more overall value for the clients.

4| P a g e
Pros:
 Applicable across team boundaries, doing well to integrate teams and optimize collaboration. Thus, it
works well in line with the Agile and DevOps methodologies
 Facilitates delivering greater functionality in a shorter span of time
2. Lean Software Development Life Cycle.

The Lean methodology takes inspiration from lean manufacturing practices and principles. It
follows a set of seven principles, which are:
 Eliminate waste
 Amplify/refine learning
 Decide as late as possible
 Deliver as fast as possible
 Empower the team
 Emphasize conceptual integrity
 See the whole/Operating from the top-level

Project teams working on the Lean model aim at finding opportunities to cut waste at every
step of the SDLC process. Typically, this includes skipping unimportant meetings and
reducing documentation.

In actuality, the Lean methodology is very much similar to the Agile methodology with some
noteworthy differences.

The most important distinction between the two SDLC methodologies lies in terms of prioritizing customer
satisfaction. The Agile model makes customer satisfaction a priority from the very beginning. Consequently,
the project teams involved respond instantly to stakeholder feedback throughout the SDLC procedure.

On the other hand, Lean methodology gives the topmost priority to the elimination of waste. This is done in
order to create more overall value for the clients.

Pros:
 Applicable across team boundaries, doing well to integrate teams and optimize
collaboration. Thus, it works well in line with the Agile and DevOps methodologies

5| P a g e
 Facilitates delivering greater functionality in a shorter span of time, Easily scalable, making it an apt fit as
an alternative to contemporary SDLC methodologies designed for large, complex projects
 Empowers the project development team in terms of the decision-making process. As a result, it improves
motivation
 Saves cost and time by eliminating unessential activities

Cons:
 Demands excellent documentation, especially with respect to business requirements. Failing to do it might
result in underdeveloped or wrongly developed areas pertaining to insufficient documentation
 Heavily team dependent. This means it is essential to put together an experienced team with a high skill
level
 Relatively easy to lose focus

 Easily scalable, making it an apt fit as an alternative to contemporary SDLC


methodologies designed for large, complex projects
 Empowers the project development team in terms of the decision-making process. As
a result, it improves motivation
 Saves cost and time by eliminating unessential activities
Cons:
 Demands excellent documentation, especially with respect to business requirements.
Failing to do it might result in underdeveloped or wrongly developed areas pertaining
to insufficient documentation
 Heavily team dependent. This means it is essential to put together an experienced
team with a high skill level
 Relatively easy to lose focus

Spiral Software Development Life Cycle

7| P a g e
The Spiral methodology is considered one of the most flexible SDLC models. Typically adopted for full-
blown projects, the Spiral model lets development teams build a highly customized product.

Spiral methodology passes through four phases repeatedly until the project is completed. This allows for
following multiple rounds of product refinement. These four phases are planning, risk analysis, engineering,
and evaluation. Each iteration of the Spiral methodology begins with predicting potential risks and the best
wayto avoid or mitigate them.

Pros:
 Can accommodate new changes or functionality at later stages of development
 Cost estimation becomes as the prototype build is done in small increments
 Better risk management with repeated development
 Emphasizes customer feedback
 Faster development and systematic addition of features

Cons:
 Demands risk management expertise
 High risk of not meeting budget or schedule deadlines
 Impractical for small projects
 Much more documentation due to intermediate phases

V Model stands for Verification and Validation Model. Though inspired by the Waterfall model, where the
testing is done at the end of the project, it differs in that it introduces testing at every stage of development.

Similar to the Waterfall model, each next stage of the V model begins only when the previous one has been
completed.

Pros:
 Ability to avoid the downward flow of defects
 An apt fit for small projects with easily understandable requirements
 Higher chances of success
 Offers ease and simplicity
 Proactive tracking of potential defects
 Saves a lot of time as planning and designing related to testing is done before the
actual coding takes place

8| P a g e
Cons:
 Even more rigid than the Waterfall model
 No early prototype creation is possible as the software is developed during the implementation phase
 Requirement and test documents need to be updated if changes are made during the development

The Four Values of The Agile Manifesto

The Agile Manifesto is comprised of four foundational values and 12 supporting principles which lead the
Agile approach to software development. Each Agile methodology applies the four values in different ways,
but all of them rely on them to guide the development and delivery of high-quality, working software.

1. Individuals and Interactions Over Processes and Tools

The first value in the Agile Manifesto is “Individuals and interactions over processes and tools.” Valuing
people more highly than processes or tools is easy to understand because it is the people who respond to
business needs and drive the development process. If the process or the tools drive development, the team is
less responsive to change and less likely to meet customer needs. Communication is an example of the
difference between valuing individuals versus process. In the case of individuals, communication is fluid
and happens when a need arises. In the case of process, communication is scheduled and requires specific
content.

2. Working Software Over Comprehensive Documentation


Historically, enormous amounts of time were spent on documenting the product for development and
ultimate delivery. Technical specifications, technical requirements, technical prospectus, interface design
documents, test plans, documentation plans, and approvals required for each. The list was extensive and was
a cause for the long delays in development. Agile does not eliminate documentation, but it streamlines it in a
form that gives the developer what is needed to do the work without getting bogged down in minutiae. Agile
documents requirements as user stories, which are sufficient for a software developer to begin the task of
building a new function.The Agile Manifesto values documentation, but it values working software more.

3. Customer Collaboration Over Contract Negotiation


Negotiation is the period when the customer and the product manager work out the details of a delivery,
with points along the way where the details may be renegotiated. Collaboration is a different creature
entirely. With development models such as Waterfall, customers negotiate the requirements for the product,
often in great detail, prior to any work starting. This meant the customer was involved in the process of
development before development began and after it was completed, but not during the process. The Agile
Manifesto describes a customer who is engaged and collaborates throughout the development process,
making. This makes it far easier for development to meet their needs of the customer. Agile methods may
include the customer at intervals for periodic demos, but a project could just as easily have an end-user as a
daily part of the team and attending all meetings, ensuring the product meets the business needs of the
customer.

4. Responding to Change Over Following a Plan


Traditional software development regarded change as an expense, so it was to be avoided. The intention was
to develop detailed, elaborate plans, with a defined set of features and with everything, generally, having as
high a priority as everything else, and with a large number of many dependencies on delivering in a certain
order so that the team can work on the next piece of the puzzle.

9| P a g e
With Agile, the shortness of an iteration means priorities can be shifted from iteration to iteration and new
features can be added into the next iteration. Agile’s view is that changes always improve a project; changes
provide additional value.

Perhaps nothing illustrates Agile’s positive approach to change better than the concept of Method Tailoring,
defined in An Agile Information Systems Development Method in use as: “A process or capability in which
human agents determine a system development approach for a specific project situation through responsive
changes in, and dynamic interplays between contexts, intentions, and method fragments.” Agile
methodologies allow the Agile team to modify the process and make it fit the team rather than the other way
around.

The Twelve Agile Manifesto Principles


The Twelve Principles are the guiding principles for the methodologies that are included under the title “The
Agile Movement.” They describe a culture in which change is welcome, and the customer is the focus of the
work. They also demonstrate the movement’s intent as described by Alistair Cockburn, one of the
signatories to the Agile Manifesto, which is to bring development into alignment with business needs.

The twelve principles of agile development include:


1. Customer satisfaction through early and continuous software delivery – Customers are happier when they
receive working software at regular intervals, rather than waiting extended periods of time between releases.
2. Accommodate changing requirements throughout the development process – The ability to avoid delays
when a requirement or feature request changes.
3. Frequent delivery of working software – Scrum accommodates this principle since the team operates in
software sprints or iterations that ensure regular delivery of working software.
4. Collaboration between the business stakeholders and developers throughout the project – Better decisions
are made when the business and technical team are aligned.
5. Support, trust, and motivate the people involved – Motivated teams are more likely to deliver their best
work than unhappy teams.
6. Enable face-to-face interactions – Communication is more successful when development teams are co-
located.
7. Working software is the primary measure of progress – Delivering functional software to the customer is
the ultimate factor that measures progress.
8. Agile processes to support a consistent development pace – Teams establish a repeatable and
maintainable speed at which they can deliver working software, and theyrepeat it with each release.
9. Attention to technical detail and design enhances agility – The right skills and good design ensures the
team can maintain the pace, constantly improve the product, and sustain change.
10. Simplicity – Develop just enough to get the job done for right now.
11. Self-organizing teams encourage great architectures, requirements, and designs – Skilled and motivated
team members who have decision-making power, take ownership, communicate regularly with other team
members, and share ideas that deliver quality products.
12. Regular reflections on how to become more effective – Self-improvement, process improvement,
advancing skills, and techniques help team members work more efficiently.

The intention of Agile is to align development with business needs, and the success of Agile is apparent.
Agile projects are customer focused and encourage customer guidance and participation. As a result, Agile
has grown to be an overarching view of software development throughout the software industry and an
industryall by itself.

11 |
The Phases Of Agile Software Development Life Cycle & Workflow And Project Management

Project Management Phases


Regardless of the scope, any project should follow a sequence of actions to be controlled and managed.
According to the Project Management Institute (PMI), a typical project management process includes the
following phases:

1. initiation,
2. planning,
3. execution,
4. performance/monitoring, and
5. project close.

Used as a roadmap to accomplish specific tasks, these phases define the project management lifecycle.

Yet, this structure is too general. A project usually has a number of internal stages within each phase. They
can vary greatly depending on the scope of work, the team, the industry, and the project itself.

In attempts to find a universal approach to managing any project, humanity has developed a significant
number of PM techniques and methodologies.
Traditional Project Management Methodologies
Based on the above-described classic framework, traditional methodologies take a step-by-step approach to the
project execution. Thus, the project goes through the initiation, planning, execution, monitoring straight to its
closure in consecutive stages.
Often called linear, this approach includes a number of internal phases that are sequential and executed in
chronological order. Applied most commonly within the construction or manufacturing industry, where little
or no changes are required at every stage, traditional project management has found its application in
software engineering as well.
Known as the Waterfall model, it has been a dominant software development methodology since the early
1970s, when formally described by Winston W. Royce: “There are two essential steps common to all
computer program developments, regardless of size or complexity. There is first an analysis step, followed
second by a coding step … This sort of very simple implementation concept is in fact all that is required if
the effort is sufficiently small and if the final product is to be operated by those who built it – as is typically
done with computer programs for internal use

12 |
Exercise 2:
Reference course name: Development & Testing with Agile: Extreme
Programming: Get a working knowledge of using extreme automation through XP
programming practices of test first development, refactoring and automating test case
writing.
Solve the questions in the “Take test” module given in the reference course name to gauge
your understanding of the topic.
Answer:
What is Agile?
Agile Methodology involves continuous iteration of development and testing in the SDLC process. This
software development method emphasizes on iterative, incremental, and evolutionary development.
Agile development process breaks the product into smaller pieces and integrates them for final testing. It
can be implemented in many ways, including scrum, kanban, scrum, XP, etc.
Agile Vs. DevOpsStakeholders and communication chain in a typical IT process.

Agile addresses gaps in Customer and Developer communications

communications

14 |
KEY DIFFERENCE
 DevOps is a practice of bringing development and operations teams together whereas Agile is an
iterative approach that focuses on collaboration, customer feedback and small rapid releases.
 DevOps focuses on constant testing and delivery while the Agile process focuses on constant
changes.
 DevOps requires relatively a large team while Agile requires a small team.
 DevOps leverages both shifts left and right principles, on the other hand, Agile leverage shift-left
principle.
 The target area of Agile is Software development whereas the Target area of DevOps is to give end-
to-end business solutions and fast delivery.
 DevOps focuses more on operational and business readiness whereas Agile focuses on functional
and non-function readiness.

Difference Between Agile and DevOps


Parameter Agile DevOps

What is it? Agile refers to an iterative approachwhich focuses on


DevOps is considered a practice of
collaboration,customer feedback, and small, rapid bringing development and operations
releases. teams together.
Purpose Agile helps to manage complex projects. DevOps central concept is to manage
end-to-end engineering processes.
Task Agile process focusses on constant changes. DevOps focuses on constant testing and
delivery.
Implementation Agile method can be implemented within a range of The primary goal of DevOps is to focus
tactical frameworks like a sprint, safe and scrum. on collaboration, so it doesn’t have any
commonly accepted framework.
Team skill set Agile development emphasizes training DevOps divides and spreads the skill set
all team members to have a wide variety of similar between the development and operation
and equal skills. teams.
Team size Small Team is at the core of Agile. As smaller is the Relatively larger team size as it involves
team, the fewer people on it, the faster they can all the stack holders.
move.
Duration Agile development is managed in units of “sprints.” DevOps strives for deadlines and
This time is much less thana month for each sprint. benchmarks with major releases. The
ideal goal is to deliver code to
production DAILY or every few hours.
Feedback Feedback is given by the customer. Feedback comes from the internal team.
Target Areas Software Development End-to-end business solution and fast
delivery.
Shift-Left Leverage shift-left Leverage both shifts left and right.
Principles
Emphasis Agile emphasizes on software development DevOps is all about taking software
methodology for developing software. When the which is
software is developed and released, the ready for release and deploying it in a
agile team will not care what happens reliable and
to it. secure manner.
15 |
Exercise 3:
Module name : DevOps adoption in projects
https://infyspringboard.onwingspan.com/web/en/app/toc/lex_auth_01353898917192499226
9_shared/overview
https://infyspringboard.onwingspan.com/web/en/app/toc/lex_auth_01326770550901964855
0/overview
It is important to comprehend the need to automate the software development lifecycle
stages through DevOps. Gain an understanding of the capabilities required to implement
DevOps, continuous integration and continuous delivery practices.Solve the questions given
in Quiz1, Quiz2, Quiz 3

DevOps Architecture
Development and operations both play essential roles in order to deliver applications. The deployment
comprises analyzing the requirements, designing, developing software components or frameworks.

The operation consists of the administrative processes, services, and support for the software.
When both the development and operations are combined with collaborating,
architecture is the solution to fix the gap between deployment and operation terms; therefore,

DevOps architecture is used for the applications hosted on the cloud platform and large
Development is used in the DevOps architecture so that integration and delivery can be contiguous. When
thedevelopment and operations team works separately consuming to design, test, and deploy. And if the
terms are not in

18 |
1) Build
Without DevOps, the cost of the consumption of the resources was evalua ed based on the pre-
defined individual usage with fi x ed hardware allocation. And with DevOp s, the usage of cloud,
sharing of resources comes into the picture, and the build is dependent upon the user's need,
which is a mechanism to control the usage of resources or capacity.

2) Code
Many good practices such as Git enables the code to be used, which ensures writing the code for
business, helps to track changes, getting notified about the reason behind the difference in the
actual and the expected output, and if necessary reverting to the original code developed. The
code can be appropriately arranged in files, folders, etc. And they can be reused.

3) Test
The application will be ready for production after testing. In the case of manual testing, it
consumes more time in testing and moving the code to the output. The testing can be automated,
which decreases the time for testing so that the time to deploy the code to production can be
reduced as automating the running of the scripts will remove many manual steps.

4) Plan
DevOps use Agile methodology to plan the development. With the operations and development
team in sync, it helps in organizing the work to plan accordingly to increase productivity.

19 |
5) Monitor
Continuous monitoring is used to identify any risk of failure. Also, it helps in tracking the system
accurately so that the health of the application can be checked. The monitoring becomes more
comfortable with services where the log data may get monitored through many third-party tools
such as Splunk.

6) Deploy
Many systems can support the scheduler for automated deployment. The cloud management
platform enables users to capture accurate insights and view the optimization scenario, analytics
on trends by the deployment of dashboards.

7) Operate
DevOps changes the way traditional approach of developing and testing separately. The teams
operate in a collaborative way where both the teams actively participate throughout the service
lifecycle. The operation team interacts with developers, and they come up with a monitoring plan
which serves the IT and business requirements.

8) Release
Deployment to an environment can be done by automation. But when the deployment is made to
the production environment, it is done by manual triggering. Many processes involved in release
management commonly used to do the deployment in the production environment manually to
lessen the impact on the customers.
DevOps Lifecycle
DevOps defines an agile relationship between operations and Development. It is a process that is
practiced by the development team and operational engineers together from beginning to the final
stage of the product.

20 |
Learning DevOps is not complete without understanding the DevOps lifecycle phases. The DevOps
lifecycle includes seven phases as given below:

1) Continuous Development
This phase involves the planning and coding of the software. The vision of the project is decided during the
planning phase. And the developers begin developing the code for the application. There are no DevOps
tools that are required for planning, but there are several tools for maintaining the code.

2) Continuous Integration
This stage is the heart of the entire DevOps lifecycle. It is a software development practice in which the
developers require to commit changes to the source code more frequently. This may nbe on a daily or weekly
basis. Then every commit is built, and this allows early detection of problems if they are present. Building
s
code is not only involved compilation, but it also includes unit testing, integration testing, code
review, and packaging.The code supporting new functionality is continuously integrated
with the existing code.

22 |
In this phase, Docker Containers can be used for simulating the test environment.

Selenium does the automation testing, and TestNG generates the reports. This entire testing
phase can automate with the help of a Continuous Integration tool called Jenkins.

Automation testing saves a lot of time and effort for executing the tests instead of doing this
manually. Apart from that, report generation is a big plus. The task of evaluating the test cases
that failed in a test suite gets simpler. Also, we can schedule the execution of the test cases at
predefined times. After testing, the code is continuously integrated with the existing code.

3) Continuous Monitoring
DevOps process, where
Monitoring is a phase that involves all the operational factors of the entire
important information about the use of the software is recorded and carefully processed to find
out trends and identify problem areas. Usually, the monitoring is integrated within the operational
capabilities of the software application.

It may occur in the form of documentation files or maybe produce large-scale data about the
application parameters when it is in a continuous use position. The system errors such as server
not reachable, low memory, etc are resolved in this phase. It maintains the security and availability
of the service.

4) Continuous Feedback
The application development is consistently improved by analyzing the results from the operations
of the software. This is carried out by placing the critical phase of constant feedback between the
operations and the development of the next version of the current software application.

The continuity is the essential factor in the DevOps as it removes the unnecessary steps which are
required to take a software application from development, using it to find o ut its issues and then
producing a better version. It killss the efficiency that may be possible with t h e app and reduce the
number of interested customers.

5) Continuous Deployment
In this phase, the code is deployed to the production servers. Also, it is esse n tial to ensure that the
code is correctly used on all the servers.

23 |
The new code is deployed continuously, and configuration management tools play an essential
role in executing tasks frequently and quickly. Here are some popular tools which are used in this
phase, such as Chef, Puppet, Ansible, and SaltStack.
Containerization tools are also playing an essential role in the deployment
phase. Vagrant and Docker are popular tools that are used for this purpose. These tools help to
produce consistency across development, staging, testing, and production environment. They also
help in scaling up and scaling down instances softly.

Containerization tools help to maintain consistency across the environments where the application
is tested, developed, and deployed. There is no chance of errors or failure in the production
environment as they package and replicate the same dependencies and packages used in the
testing, development, and staging environment. It makes the application easy to run on different
computers.

6) Continuous Operations
All DevOps operations are based on the continuity with complete automation of the release
process and allow the organization to accelerate the overall time to market continuingly.

It is clear from the discussion that continuity is the critical factor in the DevOps in removing steps
that often distract the development, take it longer to detect issues and produce a better version of
the product after several months. With DevOps, we can make any software product more efficient
and increase the overall count of interested customers in your product.

DevOps tech:
Deployment automation is what enables you to deploy your software to testing and production
environments with the push of a button. Automation is essential to reduce the risk of production
deployments. It's also essential for providing fast feedback on the quality of your software by
allowing teams to do comprehensive testing as soon as possible after changes.

24 |
An automated deployment process has the following inputs:

 Packages created by the continuous integration (CI) process (these packages should be
deployable to any environment, including production).
 Scripts to configure the environment, deploy the packages, and perform a deployment test
(sometimes known as a smoke test).
 Environment-specific configuration information.

The scripts usually perform the following tasks:

 Prepare the target environment, perhaps by installing and configuring any necessary software, or
by starting up a virtual host from a pre-prepared image in a cloud provider such as Google
Cloud.
 Deploy the packages.
 Perform any deployment-related tasks such as running database migration scripts.
 Perform any required configuration.
 Perform a deployment test to make sure that any necessary external services are reachable, and
that the system is functioning.

How to implement deployment automation

When you design your automated deployment process, we recommend that you follow these
best practices:

 Use the same deployment process for every environment, including production. This rule
helps ensure that you test the deployment process many times before you use it to deploy to
production.
 Allow anyone with the necessary credentials to deploy any version of the artifact to any
environment on demand in a fully automated fashion. If you have to create a ticket and wait
for someone to prepare an environment, you don't have a fully automated deployment process.
 Use the same packages for every environment. This rule means that you should keep
environment-specific configuration separate from packages. That way, you know that the
packages you are deploying to production are the same ones that you tested.
 Make it possible to recreate the state of any environment from information stored in
version control. This rule helps ensure that deployments are repeatable, and that in the event of
a disaster recovery scenario, you can restore the state of production in a deterministic way.

Ideally, you have a tool that you can use autonomously to make deployments, that records
which builds are currently in each environment, and that records the output of the deployment
process for audit purposes. Many CI tools have such features.

25 |
DevOps Orchestration
 DevOps orchestration is the automation of numerous processes that run concurrently in order to
reduce production issues and time to market, while automation is the capacity to do a job or a
series of procedures to finish an individual task repeatedly.
 Many people believe that DevOps orchestration is just merging several jobs into a larger script,
but it is much more than that. DevOps orchestration services include such jobs into a process or
workflow, which may involve many automated tasks and stages, and resources to streamline the
entire workflow or process.
 Automation can be pretty complicated at scale, although it is usually focused on a particular
operation to fulfill a goal, such as a server deployment. When automation has reached its
limitations, that’s when orchestration comes into play.
Why Invest in DevOps Orchestration?
DevOps teams must navigate across departments, requiring a solution where their tools can also
be piloted smartly. This situation calls for DevOps orchestration solutions, which have the
ability to combine numerous automated elements from different DevOps toolkits.With DevOps
orchestration, teams can utilize their current in-use automation tools while beingable to engage
under an overarching umbrella designed to pull everything into a single workflow.

With DevOps orchestration, teams can utilize their current in-use automation tools while being
able to engage under an overarching umbrella designed to pull everything into a single
workflow.

26 |
1. Accelerate your automaot i n process
DevOps orchestration ensures seamless and quick delivery of new builds i nto production and
minimizes the effort spent on re etitive tasks. As a consequence, DevOps teams can focus on
p
more critical projects and decision-making rather than building pipelines.
o
1. Improve cross-team collaboration
Having a platform where all activities are consolidated and updated constantly boosts effective
communication between operation and development teams, with everyone in sync throughout all steps
2. Ensure higher release quality
DevOps orchestration lowers the chance of mistakes reaching the end-user by including quality
control activities such as approvals, scheduling, security testing, and automatic status reporting.
1. Reduce costs for IT infrastructure and human resources
DevOps orchestration lowers infrastructure investment costs and the number of IT employees
required. In the long run, firms can expand their cloud service footprint and be more flexible in
allocating business costs.
1. Build transparency across the SDLC
It isn’t easy to establish clarity and openness throughout a project when tasks and information
are siloed. DevOps orchestration is used to coordinate all tasks, centralize data related to all
operations, and provide updates and progress to key stakeholders throughout the development
lifecycle.
1. Boost the velocity of releases
DevOps orchestration entails considerable automation and the automated progression of
software through certain processes – such as testing – and on to the next stage of a release
pipeline. As DevOps orchestration removes the time spent waiting for another employee to
finish manual duties and send the program to the next step in the process, software reaches the
end-user faster, and wait time is diverted to the next project at hand. With a higher level of
automation, you can now develop more services and get them to market more quickly, resulting in
cost savings and revenue gains.
Real-life Applications of DevOps
1. Application of DevOps in the Online Financial Trading Company
The methodology in the process of testing, building, and development was automated in the
financial trading company. Using the DevOps, deployment was being done within 45 seconds.
These deployments used to take long nights and weekends for the employees. The time of the
overall process reduced and the interest of clients increased.
2. Use of DevOps in Network cycling
Deployment, testing and rapid designing became ten times faster. It became effortless for the
telco service provider to add patches of security every day, which used to be done only every
three months. Through deployment and design, the new version of network cycling was being
rolled out.
3. Application in Car Manufacturing Industries
Using DevOps, employees helped car manufacturers to catch the error while scaling the
production, which was not possible before.
4. Benefits to Airlines Industries
30 |
With the benefit of DevOps, United Airlines saved $500,000 by changing to continuous testing
standards. It also increased its coverage of code by 85%.
5. Application to GM Financial
Regression testing time was reduced by 93%, which in turn reduced the funding period of load
by five times.
6. Bug Reduction Benefit of DevOps
DevOps has reduced the bugs by up to 35% and in many cases of pre-production bugs up to
40%. By using DevOps, Rabobank was able to provide better quality applications for their
clients within less time because it massively reduced the time taken for regression testing.
7. Less Time for Integration
Key Bank used DevOps to reduce the time taken for the integration of security and compliance
into the process from 3 months to 1 week.
8. Decreased Computation Cost and Operation Time
By the use of DevOps, Computation time has been dramatically reduced. In many cases, it has
reduced the computing time from up to 60%. When the time taken to complete a task is
decreased, then the cost involved the process also decreases.
9. Faster Development of Software
The DevOps helps in the faster delivery of apps because it ensures speedier delivery.
10. Improvement in Team Collaboration
Transparency is required for better decision-making and works better efficiency of resources.
By using DevOps, teams can be more transparent in their work of developing applications and
software. There are many big tasks of a project which are broken down into many small tasks
that are allotted to different teams or people in the organisation.
11. Reliable Environments for Operations
DevOps provide a better environment that is more stable for the team to work together. The
people in the group can rely on the environment for all kinds of operations and tasks.
12. Early Defects Detection
In the environment of DevOps, the error and the defects can be known at a very first stage.
DevOps helps in the fast detection of defects.
13. Faster Correction
With the help of DevOps, All the defects are detected very early. Because of this, mistakes can
be corrected very fast. There is a lot of time which gets saved in this kind of DevOps
environment because the work is very fast, so the correction work is also completed very fast.
14. Continuous Operation of Monitoring, Testing, Deployment, and Release
There is a massive demand for software professionals to keep on delivering high-quality
applications and software. DevOps Developer salary is ever increasing in India. A software
development team is expected to develop the software application within a shorter time period
which can be launched into the market. The team of software is required to adopt a shorter
release cycle.
All of the requirements of delivering high-quality software, developing software applications in
less time frame. Also, a minimum period to launch the software applications and short release
cycles can only be fulfilled by the use of DevOps.
15. Increased Focus on Operations
31 |
Exercise 4:
https://infyspringboard.onwingspan.com/web/en/app/toc/lex_auth_01281262696086732810
122_shared/overview
Module name :Implementation of CICD with Java and open source stack
Configure the web application and Version control using Git using Git commands and version
control operations.
Answer:

Git Installation on Windows

Let us now look at the various steps in the Git installation on Windows.

Step 1:

Download the latest version of Git and choose the 64/32 bit version. After the file is

downloaded, install it in the system. Once installed, select Launch the Git Bash, then click on
finish. The Git Bash is now launched.

Step 2:

Check the Git version:

35 |
$ git --version

Step 3:

For any help, use the following command:

$ git help config

This command will lead you to a browser of config commands. Basically, the help the
command provides a manual from the help page for the command just following it (here, it's
config).

Another way to use the same command is as follows:

$ git config --help

Step 4:

Create a local directory using the following command:

$ mkdir test

$ cd test

Step 5:

The next step is to initialize the directory:

36 |
$ git init

Step 6:

Go to the folder where "test" is created and create a text document named "demo." Open
"demo" and put any content, like "Hello Simplilearn." Save and close the file.

Step 7:

Enter the Git bash interface and type in the following command to check the status:

$ git status

Step 8:

Add the "demo" to the current directory using the following command:

$ git add demo.txt

Step 9:

Next, make a commit using the following command:

$ git commit -m "committing a text file"

Step 10:

Link the Git to a Github Account:

37 |
$ git config --global user.username

Note: simplilearn-github is the username on the Github account.

Step 11:

Open your Github account and create a new repository with the name "test_demo" and click on
"Create repository." This is the remote repository. Next, copy the link of "test_demo."

Step 12:

Go back to Git bash and link the remote and local repository using the following command:

$ git remote add origin <link>

Here, <link> is the link copied in the previous step.

Step 13:

Push the local file onto the remote repository using the following command:

$ git push origin master

Step 14:

Move back to Github and click on "test_demo" and check if the local file "demo.txt" is pushed
to this repository.

Additional Customization Options

1. This option enables users to add extra elements such as symbolic links for command lines.
Nevertheless, one should always prefer default options for shortcuts or more.

38 |
2. There are some experimental options available such as pseudo control Support or Built in file
system monitor concerning your installed Git version.

How to Launch Git in Windows?


There are two methods to launch git in windows. One is launching git using a bash scripting
shell with the help of the command line and another is launching git using a graphical user
interface.

1. To launch git via bash scripting shell,


First, open the window and search for git bash and open it.
2. To launch git via graphical user interface(GUI), similarly, first open the window and search
for git GUI and click on the application icon and open it.

Configure GitHub Credentials


You can configure your local GitHub installation with credentials by using the following
commands. Also, don't forget to add your own GitHub credentials for username and email
address.

1. git config –global user.n


ame "github_username"
2. git config –global user.e
mail "email_address"

Clone a GitHub Repository

1. Initially you need to click the options repository on GitHub.


2. Then in the top right corner, click the option clone or download where a small drop-down
box will appear having a URL for cloning over HTTPS.
3. Then enter into your Powershell windows and write clone URL as:
git clone repository_url
4. On the other hand, you can clone a github repository with SSH URLs where first you need to
generate an SSH key pair on your windows workstation as well as need to assign a public key
to your GitHub account.

List Remote Repositories

39 |
1. Make a copy of the repository from GitHub for your working directory.

2. Ensure that the working directory should have the project name as
"cd git_project" and replace the project name from the downloaded repository.
3. If the above option doesn't work, you can list the content using "ls command" for the current
directory, especially to check your exact number of spellings.
4. Besides, you can list the remote repository in the sub-directory as "git remote -v".

Summary: Steps For Git Installation on Windows 10


1. Download and install Git
2. Git bash interface
3. Basic Git commands
4. Create a local repository
5. Connect to the remote repository
6. Push the file to GitHub

Step 1. Download the installer

Go to the Git For Windows website and click on the [Download] button to download and save
the installer. Once downloaded double-click on the .exe file to begin installation.

Step 2. License Information


To accept the License Agreement click

40 |
Step 3. Select Installation Folder
I recommend selecting a directory path with no spaces in the name, as in the illustration below

Step 4. Select componentes

42 |
Step 5. Select Start Menu Folder

Accept the suggested name and click [Next>]

Step 6. Choose Default Editor

This will determine which text editor will open to input commit notes and other text messages
interactively. Go for Nano if you are not familiar with more powerful editors like Vim

44 |
Step 7. Select Default Branch Name

Let Git decide and click [Next>]

Step 8. Adjust PATH Environment

Make sure you select “Use Git from Git Bash only”

46 |
Step 9. Select HTTPS transport

Specify the library to use for secure HTTP connections. Go for OpenSSL unless you have a
reason to do otherwise

Step 10. Configure Line Ending Conversions

47 |
Make sure you select “Checkout Windows-style, commit Unix-style line endings”
Step 11. Select Behaviour of Pull Command

Select Default

Go with the recommended choice

50 |
Step 13. Configure Extra Options
Leave unchecked and click [Next >]

Step 15. Progress Bar

Installation begins…

52 |
Step 16. Installation Complete

Click on [Finish]. Congratulations… job done!

54 |
Exercise 5:

Module Name: Implementation of CICD with Java and open source stack Configure a static
code analyzer which will perform static analysis of the web application code and identify the
coding practices that are not appropriate. Configure the profiles and dashboard of the static
code analysis tool.
https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=Implemen
tation%20of%20CICD%20with%20Java%20and%20open%20source%20stack&f=%7B%7
D
Exercise-5

SonarQube – Get Started with Static Code Analysis!


You are probably familiar with the term static code analysis, especially if you have a few years
of experience under your belt.

And if you re just getting started, let s go to the beginning:

Why is it so important?

Static analysis allows us to identify potential bugs, code smells and security vulnerability even
before our code goes into the production environment.

It allows us to fully enforce code quality practices across multiple teams and prevent possible
errors that might occur after the release.

Static analysis is an essential part of the product development process.

There are a lot of tools that can be leveraged for this purpose today. Some of the most popular
and widely used tools are Veracode and SonarQube. You can check out the pros and cons, as
well as user reviews for both tools here and decide which option better suits your needs.

In this blog, we ll explain how to set up SonarQube for .Net projects in Microsoft Windows
environment.
Basic configuration

As Java run-time is the main prerequisite, the first thing we need to do is to download and
install a Java Development Kit (JDK).

55 |
You can run the JDK without setting the JAVA_PATH environment variable, or you can
optionally set it so that you can conveniently run the JDK executable files
(javac.exe, java.exe, javadoc.exe) from any directory without having to type the full path of the
command. If you do not set the JAVA_PATH variable, you need to specify the full path to the
executable file every time you run it. If you are always looking for ways to make your workflow

more efficient, let s choose a more practical way so you don t have to this every time.

Next step is to downloadSonarQube server and extract it to a specified location e.g.


C:\sonarqube.

After this, navigate to the “conf” sub-folder and enter a path to java executable in a
wrapper.conf file

Now the only thing left is to run sonar server from the following path:
C:\sonarqube\bin\windows-x86 64

56 |
If everything goes well, you should get a message that the Sonar server is up and running:

Now, if you open http://localhost:9000/ address you ll see the home screen from which you can
log in and start exploring!

Although you ll have a fully functional static analysis tool at this point, keep in mind that
SonarQube uses an embedded database. What does this mean?
An embedded database is used for evaluation purposes only. The embedded database will
not scale, it will not support upgrading to newer versions of SonarQube, and there is no
support for migrating your data out of it into a different database engine.
Having this in mind, let s avoid the above-mentioned limitation and make our sonar more
maintainable!
Setting up the database
In order to avoid possible future roadblocks, we need to set up a database. We ll use MSSQL. If
you don t have it installed already, you can check the official site and download the edition that
meets your needs.

After successful installation, the first thing we need to do is create our database and set a
proper collation:

59 |
Don t forget: Collation MUST be case-sensitiv

e
(CS) and accent-sensitive (AS)
After the database has been successfully created, we need to create server login and a user:

61 |
Also, make sure the user has DbOwner role:
At this point, we are almost done with the database set up. But, before we can test everything from
SQL management studio we need to enable TCP/IP network protocol in the configurationmanager: as
well as the SQL server authentication mode:

64 |
If you followed all steps, you should be SonarQube configuration

When we open sonar properties file in “conf” sub-folder, we ll find configuration sections for
database, web server, SSO authentication, elastic search, logging and much more. In our case,
we are only interested in database configuration so let s do the following:
able to login to SonarQube database:

66 |
After we run StartSonar.bat file, SonarQube should be up and running!

Project analysis

The first thing we need to do is to create a new project:

Then we need to generate a token that will be used for login purpose and also to download sonar
scanner for the targeted framework:

Now add its path as well as an ms-build path to the environment path variable:

68 |
The only thing that s left to do now is to run given commands, one after another, from the root
level of your project:

That s it! Wait for a few minutes and the results will show up in the web portal. Just don t besurprised
if you get something like t

Conclusion
If you don t have static code analyzers already configured as a part of your CD/CI
pipeline, please do it because you ll definitely write cleaner, more maintainable and less
bug-prone code.

If you have, then you can still configure it on your local machine and run it whenever you want
and on every piece of code that you write.
his □

69 |
Exercise 6:
Module Name: Implementation of CICD with Java and open source stack
Write a build script to build the application using a build automation tool like Maven. Create
a folder structure that will run the build script and invoke the various software development
build stages. This script should invoke the static analysis tool and unit test cases and deploy
the application to a web application server like Tomcat.
https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=Imp
lementation%20of%20CICD%20with%20Java%20and%20open%20source%20stack
&f=%7B%7D
Exercise-6
What is a build tool?
The build tool is used to set up everything which is required to run your java code
independently. This can be applied to your entire java project. It generates source code,
compiling code, packaging code to a jar etc. Maven provides a common platform to perform
these activities which makes programmer’s life easier while handling the huge project.

Maven provides pom.xml which is the core of any project. This is the configuration file where
all required information’s are kept. Many of the IDEs (Integrated Development Environments)
are available which makes it easy to use. IDEs are available for tools like Eclipse, NetBeans,
IntelliJ etc.
Maven stores all project jars. Library jar is in a place called repository which could be a central,
local or remote repository. Maven downloads the dependency jar from a central repository.
Most of the commonly used libraries are available in http://repo1.maven.org/maven2/.
Downloaded libraries are stored in the local repository called m2. Maven uses the libraries
available in an m2 folder and if any new dependency added then maven downloads from the
central repository to local repository. If libraries are not available in the central repository then
maven looks for the remote repository. The user has to configure the remote repository
in pom.xml to download from the remote repository.
Below is the example of configuring a remote repository to pom.xml file. Provide id and
URL of the repository where libraries are stored.
<repositories>
<repository>
<id>libraryId</id>
<url>http://comanyrepositryId</url>
</repository>
</repositories>
General Phrases used in Maven:
 groupId: Generally groupId refers to domain id. For best practices company name is
used as groupId. It identifies the project uniquely.
 artifactId: It is basically the name of the Jar without version.
 version: This tag is used to create a version of the project.
 Local repository: Maven downloads all the required dependencies and stores in the local
70 |
repository called m2. More details regarding the same would be shared in the next topic.
Build Life Cycle:

Basic maven phases are used as below.

 clean: deletes all artifacts and targets which are created already.
 compile: used to compile the source code of the project.
 test: test the compiled code and these tests do not require to be packaged or deployed.
 package: package is used to convert your project into a jar or war etc.

 install: install the package into the local repository for use of another project.
Maven Setup:
Step 1: To setup Maven, download the maven’s latest version form Apache depending upon
different OS.
Step 2: Unzip the folder and save it on the local disk.
Step 3: Create environment variable for MAVEN_HOME. Follow the below step:
Navigate to System Properties ->Advanced System Settings>Environment Variable ->System
Variable ->New ->Add path of Maven folder

71 |
Step 4: Edit path variable and provide the bin folder path.

Step 5: Now verify the maven installation using command prompt and don’t forget to setup
JAVA_HOME
Use mvn –version to verify maven version and output comes like below.

Install maven IDE in Eclipse:


Maven provides IDE to integrate with eclipse. I am using eclipse Juno here.

Navigate to Help->Eclipse Marketplace-> Search maven ->Maven Integration for Eclipse -


>INSTALL

73 |
After installation, you have to restart eclipse.

Then right-click on pom.xml and verify all the options are available like below.

Create Maven project:


Step 1: Navigate to File- new-others-Maven-Maven Project-Click Next

74 |
Step 3: Provide Group Id and Artifact Id.You can change the version of Jar as per your wish.
Here I am using the default name. Click Finish

h.

Step 4: After finish, you will find the project structure is created like below. pom.xml is created
which is used to download all dependencies.

pom.xml file looks like below:


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSche
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.softwaretestinghelp.test</groupId>
<artifactId>com.softwaretestinghelp.selenium</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
Step 5: Add dependencies for Selenium.
All selenium Maven artifacts are available in below central repository

75 |
http://repo1.maven.org/maven2/org/seleniumhq/selenium/
Add following dependencies in pom.xml for selenium
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.41.0</version>
</dependency>
Similarly, following is the dependency for Junit :

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
If you want to add other third-party jars then add those dependencies in pom.xml
Step 6: Final pom.xml will be like below:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSche
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.softwaretestinghelp.test</groupId> <artifactId>com.softwaretestinghelp.selenium</arti
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.41.0</version>
</dependency>
</dependencies>
</project>
Step 7: Maven will download all the dependency jars into the local repository called .m2.
M2 folder is basically inside Users->username->m2

All the jars will be placed in a folder called repository which is inside .m2 folder. Maven will
create separate folders for the different version and different group id.

77 |
Step 8: If an m2 folder does not populate in Maven dependencies, then you can populate those
jars manually.
– Eclipse Windows ->Preference
– Navigate Java->Build Path->Classpath Variables

– Click New Button ->Define M2_REPO and provide the path of the m2 folder.

Step 9: Upon successful setup, you will find Maven Dependencies folder like below which will
have the required dependency jar for the project

78 |
Build the Project:
The project can be built by both using IDE and command prompt.

Using IDE you have to right click on POM-Run As-Maven Build

Enter goals like clean install etc. and click Run.


Same can be done using a command prompt. Navigate to project folder where pom.xml lies.
And use below commands to clean, compile and install
For clean: mvn clean
For compile: mvn compile
For Install: mvn install

Below is the info which is displayed when you clean any project and shows “BUILD
SUCCESS”.

[INFO] Scanning for projects...


[INFO]
[INFO]
[INFO] Building com.softwaretestinghelp.0.0.1-SNAPSHOT
[INFO]
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ com.softwaretestinghelp ---[INFO] Delet
[INFO]
[INFO] BUILD SUCCESS
[INFO]
[INFO] Total time: 0.702s
[INFO] Finished at: Sat May 24 18:58:22 IST 2014
[INFO] Final Memory: 2M/15M
[INFO]

79 |
Conclusion:
Maven simplifies the code handling and process of building the project. Most of the projects
follow maven structure.
Download all dependencies provided the dependencies are available in maven central
repository. If any of the dependency is not available in maven central repository then you have
to add repository path in pom.xml explicitly.

There are many other build tools available in like ant. But it is better to use maven while dealing
with different versions and different dependencies. Maven even can manage the dependencies
of dependencies. Other tools may not provide such flexibility like maven. Please post your
queries anything related to maven here.

Next Tutorial #25: In the upcoming tutorial, we would discuss continuous integration tool
known as Hudson. We would study about its importance, role and benefits into Test
Automation Framework. We would look at the Hudson straight from the beginning, from its
installation to its working.

80 |
Exercise-7

Windows

Table of Contents
 Prerequisites
 Installation steps using Windows MSI installer
 Silent Install with the MSI installers
 Post-installation setup wizard
\ o Unlocking Jenkins
o Customizing Jenkins with plugins
o Recommended hardware
Creating the first configuration
administrator user for a small team:
 Troubleshooting Windows installation
 4 GB+ of RAM
o Invalid service logon credentials
The simplest way to install Jenkins on Windows is to use the Jenkins Windows installer. That
program will install Jenkins as a service using a 64 bit JVM chosen by the user. Keep in mind
that to run Jenkins as a service, the account that runs Jenkins must have permission to login as a
service.

Prerequisites

Minimum hardware requirements:

 256 MB of RAM
 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a
Docker container)
 50 GB+ of drive space
Comprehensive hardware recommendations:

 Hardware: see the Hardware Recommendations page


Software requirements:

 Java: see the Java Requirements page


 Web browser: see the Web Browser Compatibility page
 For Windows operating system: Windows Support Policy
 For Linux operating system: Linux Support Policy
Step 1: Setup wizard
On opening the Windows Installer, an Installation Setup Wizard appears, Click Next on
the Setup Wizard to start your installation.

81 |
Step 2: Select destination folder

Select the destination When Installing Jenkins, it is recommended to install and run Jenkins as an
independentwindows service using a local or domain user as it is much safer than running Jenkins
using LocalSystem(Win ows equivalent d of root) which will grant Jenkins full access to
your machine and services.
older to store your Jenkins Installation and click Next to continue.

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 your domain
credentials and click on Next.

Step 3: Service logon credentials

82 |
If you get Invalid Logon Error pop-up while trying to test your credentials, follow the s

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.

84 |
Step 5: Select Java home directory
The installation process checks for Java on your machine and prefills the dialog with the
Java home directory. If the needed Java version is not installed on your machine, you will
be prompted to install it.

Once your Java home director Step 6: Custom setup

Select other services that need to be installed with Jenkins and click on Next.y has been selected, click
on Next to continue.

85 |
Step 7: Install Jenkins
Click on the Install b Additionally, clicking on the Install button will show the progress bar of
installation, as shownbelow:

u
t
t
o
n

t
o

s
i

installation of Jenkins.

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:

87 |
See the upgrade steps when you upgrade to a new release.

Silent Install with the MSI installers


MSI installers can be installed via a silent method, which can show basic UI (/qb) or no UI at all
(/qn). The silent method does not prompt for user input so there are properties that you can pass
to the installer to set the specific values. A very basic command line is shown below for a silent
install.

msiexec.exe /i "path\to\jenkins.msi" /qn /norestart


This will use all of the default values for things that would normally be a prompt such as:

 Installation directory
 Service account username/password
 Java installation directory
 The port for Jenkins to listen on
Each of these things can be overridden by passing a NAME=VALUE property pair for what you
want to override:

90 |
Property Name Description
Path to the directory to install Jenkins. (Default: C:\Program
INSTALLDIR
Files\Jenkins)
PORT The port Jenkins will listen on. (Default: 8080)
The directory where java.exe can be found. (Default: The first Java
JAVA_HOME runtime found in the registry with Java 11 being higher priority than
Java 17)
The username that the service should run as. The account must have
SERVICE_USERNAME LogonAsService permissions. (Default: In silent mode, the
LOCALSYSTEM account)
The password for the SERVICE_USERNAME account. This should
SERVICE_PASSWORD only be provided if SERVICE_USERNAME is provided. (Default: In
silent mode, none for LOCALSYSTEM)
A more complex example, including the creation of a log file for the installation process is
shown below:

msiexec.exe /i "path\to\jenkins.msi" /qn /norestart INSTALLDIR="D:\Jenkins"


JAVA_HOME="C:\Program Files\SomeJava" PORT=80 /L*v "path\to\logfile.txt"
This would install Jenkins into D:\Jenkins, use the Java runtime from C:\Program
Files\SomeJava and Jenkins would be listening on port 80.

Post-installation setup wizard


After downloading, installing and running Jenkins, the post-installation setup wizard begins.

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 instance, 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.

91 |
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.

92 |
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

 After unlocking Jenkins, the Customize Jenkins page appears. Here you can install
any numberof useful plugins as part of your initial setup.
Click one of the two options shown:
 Install suggested plugins - to install the recommended set of plugins, which
are based onmost common use cases.
 Select plugins to install - to choose which set of plugins to initially
install. When youfirst access the plugin selection page, the suggested
plugins are selected by default.
If you are not sure what plugins you nd, choose Install suggested plugins.

93 |
The setup wizard shows the progression of Jenkins being configured and your chosen set of
Jenkins plugins being installed. This process may take a few minutes.

Creating the first administrator user


Finally, after customizing Jenkins with plugins, Jenkins asks you to create your first
administrator user.
1. When the Create First Admin User page appears, specify the details for your
administrator user in the respective fields and click Save and Finish.
2. When the Jenkins is ready page appears, click Start using Jenkins.
Notes:
o This page may indicate Jenkins is almost ready! instead and if so, click Restart.

o If the page does not automatically refresh after a minute, use your web browser to
refresh the page manually.
3. If required, log in to Jenkins with the credentials of the user you just created and you are
ready to start using Jenkins!
Troubleshooting Windows installation
Invalid service logon credentials
When installing a service to run under a domain user account, the account must have the right to

logon as a service. This logon permission applies strictly to the local computer and must be
granted in the Local Security Policy.
Perform the following steps below to edit the Local Security Policy of the computer you want to
define the ‘logon as a service’ permission:
1. Logon to the computer with administrative privileges.
2. Open the Administrative Tools and open the Local Security Policy
3. Expand Local Policy and click on User Rights Assignment
4. In the right pane, right-click Log on as a service and select properties.
5. Click on the Add User or Group… button to add the new user.
6. In the Select Users or Groups dialogue, find the user you wish to enter and click OK
7. Click OK in the Log on as a service Properties to save changes.
After completing the steps above, try logging in again with the added user.
94 |
Exercise 8:

Module name: Implementation of CICD with Java and open source stack
Configure the Jenkins pipeline to call the build script jobs and configure to run it whenever
there is a change made to an application in the version control system. Make a change to the
background color of the landing page of the web application and check if the configured
pipeline runs.
https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=Configure
%20the%20Jenkins%20pipeline%20to%20call%20the%20build%20script%20jobs%20and
%20configure%20to%20run%20it%20whenever%20there%20is%20a%20change%20made
%20to%20an%20application%20in%20the%20version%20control%20system.%20Make%2
0a%20change%20to%20the%20background%20color%20of%20the%20landing%20page%
20of%20the%20web%20application%20and%20check%20if%20the%20configured%20pip
eline%20runs.&f=%7B%7D

Exercise 9:
Module name: Implementation of CICD with Java and open source stack
Create a pipeline view of the Jenkins pipeline used in Exercise 8. Configure it with user
defined messages.
https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=Create%2
0a%20pipeline%20view%20of%20the%20Jenkins%20pipeline%20used%20in%20Exercise
%208.%20Configure%20it%20with%20user%20defined%20messages.&f=%7B%7D

Windows

Table of Contents
 Prerequisites
 Installation steps using Windows MSI installer
 Silent Install with the MSI installers
 Post-installation setup wizard
o Unlocking Jenkins
o Customizing Jenkins with plugins

o Creating the first administrator user


 Troubleshooting Windows installation
o Invalid service logon credentials

96 |
The simplest way to install Jenkins on Windows is to use the Jenkins Windows installer. That
program will install Jenkins as a service using a 64 bit JVM chosen by the user. Keep in mind
that to run Jenkins as a service, the account that runs Jenkins must have permission to login as a
service.

Prerequisites

Minimum hardware requirements:

 256 MB of RAM
 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a
Docker container)
Recommended hardware configuration for a small team:

 4 GB+ of RAM
 50 GB+ of drive space
Comprehensive hardware recommendations:

 Hardware: see the Hardware Recommendations page


Software requirements:

 Java: see the Java Requirements page


 Web browser: see the Web Browser Compatibility page
 For Windows operating system: Windows Support Policy
 For Linux operating system: Linux Support Policy
Step 1: Setup wizard
On opening the Windows Installer, an Installation Setup Wizard appears, Click Next on
the Setup Wizard to start your installation.

97 |
Step 2: Select destination folder
Select the destination folder to store your Jenkins Installation and click Next to continue.

Step 3: Service logon credentials


When Installing Jenkins, it is recommended to install and run Jenkins as an independent
windows service using a local or domain user as it is much safer than running Jenkins
using LocalSystem(Win owsd equivalent of root) which will grant Jenkins full access to
your machine and services.

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 your domain
credentials and click on Next.

98 |
If you get Invalid Logon Error pop-up while trying to test your credentials, follow the steps

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.

Step 5: Select Java home directory


The installation process checks for Java on your machine and prefills the dialog with the
Java home directory. If the needed Java version is not installed on your machine, you will
be prompted to install it.
Once your Java home directory has been selected, click on Next to continue.

100
Step 6: Custom setup
Select other services that need to be installed with Jenkins and click on Next.

Step 7: Install Jenkins


Click on the Install button to start the installation of Jenkins.

Additionally, clicking on the Install button will show the progress bar of installation, as
shownbelow:

103
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:

See the upgrade steps when you upgrade to a new release

Silent Install with the MSI installers


MSI installers can be installed via a silent method, which can show basic UI (/qb) or no UI at all
(/qn). The silent method does not prompt for user input so there are properties that you can pass
to the installer to set the specific values. A very basic command line is shown below for a silent
install.

104
A more complex example, including the creation of a log file for the installation process is
shown below:
msiexec.exe /i "path\to\jenkins.msi" /qn /norestart
This will use all of the default values for things that would normally be a prompt such as:

 Installation directory
 Service account username/password
 Java installation directory
 The port for Jenkins to listen on
Each of these things can be overridden by passing a NAME=VALUE property pair for what you
Want to override:

Property Name Description

INSTALLDIR Path to the directory to install Jenkins. (Default: C:\Program


Files\Jenkins)
PORT The port Jenkins will listen on. (Default: 8080)
The directory where java.exe can be found. (Default: The first Java
JAVA_HOME runtime found in the registry with Java 11 being higher priority than
Java 17)
The username that the service should run as. The account must have
SERVICE_USERNAME LogonAsService permissions. (Default: In silent mode, the
LOCALSYSTEM account)
The password for the SERVICE_USERNAME account. This should
SERVICE_PASSWORD only be provided if SERVICE_USERNAME is provided. (Default: In
silent mode, none for LOCALSYSTEM)

msiexec.exe /i "path\to\jenkins.msi" /qn /norestart INSTALLDIR="D:\Jenkins"


JAVA_HOME="C:\Program Files\SomeJava" PORT=80 /L*v "path\to\logfile.txt"
This would install Jenkins into D:\Jenkins, use the Java runtime from C:\Program
Files\SomeJava and Jenkins would be listening on port 80.

Post-installation setup wizard


After downloading, installing and running Jenkins, the post-installation setup wizard begins.
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 instance, 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.

108 |
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.

109 |
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.

110 |
Customizing Jenkins with plugins
After unlocking Jenkins, the Customize Jenkins page appears. Here you can install any number
of useful plugins as part of your initial setup.

Click one of the two options shown:

 Install suggested plugins - to install the recommended set of plugins, which are based on
most common use cases.
 Select plugins to install - to choose which set of plugins to initially install. When you
first access the plugin selection page, the suggested plugins are selected by default.
If you are not sure what plugins you need, choose Install suggested plugins. You can install

(or remove) additional Jenkins plugins at a later point in time via the

Manage Jenkins > Manage Plugins page in Jenkins.

The setup wizard shows the progression of Jenkins being configured and your chosen set of
Jenkins plugins being installed. This process may take a few minutes.

Creating the first administrator user


Finally, after customizing Jenkins with plugins, Jenkins asks you to create your first
administrator user.

4. When the Create First Admin User page appears, specify the details for your
administrator user in the respective fields and click Save and Finish.

5. When the Jenkins is ready page appears, click Start using Jenkins.
Notes:
o This page may indicate Jenkins is almost ready! instead and if so, click Restart.
o If the page does not automatically refresh after a minute, use your web browser to
refresh the page manually.
6. If required, log in to Jenkins with the credentials of the user you just created and you are
ready to start using Jenkins!

Troubleshooting Windows installation


Invalid service logon credentials

111 |
When installing a service to run under a domain user account, the account must have the right to
logon as a service. This logon permission applies strictly to the local computer and must be
granted in the Local Security Policy.

Perform the following steps below to edit the Local Security Policy of the computer you want to
define the ‘logon as a service’ permission:

8. Logon to the computer with administrative privileges.


9. Open the Administrative Tools and open the Local Security Policy
10. Expand Local Policy and click on User Rights Assignment
11. In the right pane, right-click Log on as a service and select properties.
12. Click on the Add User or Group… button to add the new user.
13. In the Select Users or Groups dialogue, find the user you wish to enter and click OK
14. Click OK in the Log on as a service Properties to save changes.
After completing the steps above, try logging in again with the added user.

112 |
Exercise 10 :
Module name: Implementation of CICD with Java and open source stack
In the configured Jenkins pipeline created in Exercise 8 and 9, implement quality gates for
static analysis of code.

https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=%20Imple
mentation%20of%20CICD%20with%20Java%20and%20open%20source%20stack%20In%
20the%20configured%20Jenkins%20pipeline%20created%20in%20Exercise%208%20and
%209,%20implement%20quality%20gates%20for%20static%20analysis%20of%20code.&f
=%7B%7D

Exercise 11:
Module name :Implementation of CICD with Java and open source stack
In the configured Jenkins pipeline created in Exercise 8 and 9, implement quality gates for
static unit testing.

https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=Implemen
tation%20of%20CICD%20with%20Java%20and%20open%20source%20stack%20In%20th
e%20configured%20Jenkins%20pipeline%20created%20in%20Exercise%208%20and%209
,%20implement%20quality%20gates%20for%20static%20unit%20testing.&f=%7B%7D

Exercise 12:
Module name :Course end assessment
In the configured Jenkins pipeline created in Exercise 8 and 9, implement quality gates for
code coverage.
https://infyspringboard.onwingspan.com/web/en/app/search/learning?lang=en&q=In%20the
%20configured%20Jenkins%20pipeline%20created%20in%20Exercise%208%20and%209,
%20implement%20quality%20gates%20for%20code%20coverage.&f=%7B%7D

105 |

Page
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Software Engineering and Agile software development


on July 26, 2024

Issued on: Friday, July 26, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Development & Testing with Agile: Extreme Programming


on July 31, 2024

Issued on: Wednesday, August 7, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Continuous Integration and Delivery - DevOps


on August 7, 2024

Issued on: Wednesday, August 7, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Continuous Integration and Delivery - DevOps


on August 7, 2024

Issued on: Wednesday, August 7, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Tomcat Server Administration


on September 18, 2024

Issued on: Wednesday, September 18, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

DevOps Pipelines: Configuring a GCP Pipeline


on September 25, 2024

Issued on: Tuesday, October 22, 2024


To verify, scan the QR code at https://verify.onwingspan.com
The certificate is awarded to

Manideep Juvvala
for successfully completing the course

Configuring a Messaging Platform: Transport Pipeline


on October 16, 2024

Issued on: Tuesday, October 22, 2024


To verify, scan the QR code at https://verify.onwingspan.com

You might also like