Asdm Complete
Asdm Complete
"
" "
" "
"
"
se
set
Contents
I. ÷:
§ Software Engineering " "" " "
§ Container Orchestration
-
÷÷::÷
Why should you bother about DevOps?
-
•
$
☐ 0
oooo
o
Software Engineering
Introduction
§ Software
§ Software is more than just a program code
§ A program is an executable code, which serves some computational purpose
§ Software is considered to be collection of executable programming code, associated libraries and
documentations
§ Software, when made for a specific requirement is called software product
§ Engineering
§ All about developing products using well defined principles, methods and procedures
What is Software Engineering?
system)
§ System Software
-
I 0s ,
device drivers ( closer to the
(closer to the )
user
§ Application Software
-
8 Calendar ,
Calculator
,
notepad
Matlab autocad
§ Engineering/Scientific Software 8 Catia ,
,
§ Embedded Software
§ AI Software
€001?
§ Legacy Software software
§ Web/Mobile Software 0
Why SE is important
="
§ Helps to build complex systems in timely manner
§ Ensures high quality of software
§ Imposes discipline to work
§ Minimizes software cost
§ Decreases time
Software Evolution
§ S-type (static-type)
§ Works strictly according to the pre-defined specifications and solutions
§ Solution and method to achieve it can be understood immediately before coding starts
§ Least subjected to the changes
§ E.g. Calculator program for mathematical computation
§ P-type (practical-type)
§ Software with a collection of different procedures
§ Is defined by exactly what procedures can do
§ The specification can be described and solutions are not obvious instantly
§ E.g. Gaming software
§ E-type (embedded-type)
§ Works closely as the requirement of real-world environment
§ Has a high degree of evolution as there are various changes in laws, taxes etc. in the real world
§ E.g. online trading software
E-Type software evolution laws
§ Continuing change
§ An E-type software system must continue to adapt to the real world changes, else it becomes progressively less useful
§ Increasing complexity
§ As software evolves, its complexity tends to increase unless work is done to maintain or reduce it
§ Conservation of familiarity
§ The familiarity with the software or the knowledge about how it was developed, why was it developed in that particular manner etc.
must be retained at any cost, to implement the changes in the system
§ Continuing growth
§ In order for an E-type system intended to resolve some business problem, its size of implementing the changes grows according
to the lifestyle changes of the business
§ Reducing quality
§ An E-type software system declines in quality unless rigorously maintained and adapted to a changing operational environment
§ Feedback systems
§ The E-type software systems constitute multi-loop, multi-level feedback systems and must be treated as such to be successfully
modified or improved.
§ Self-regulation
§ E-type system evolution processes are self-regulating with the distribution of product and process measures close to normal.
§ Organizational stability
§ The average effective global activity rate in an evolving E-type system is invariant over the lifetime of the product.
Software Paradigms
§ Refer to the methods and steps, which are taken while designing the software
§ There are many methods proposed and are in work today, but we need to see where in the software
engineering these paradigms stand
§ These can be combined into various categories, though each of them is contained in one another
§ Consists of
§ Requirement gathering
§ Software design Development
§ Programming
Programming
Designing
Characteristics of good software
÷-€=
§ A software product can be judged by what it offers and how well it can be used
§ Well-engineered and crafted software is expected to have the following characteristics
§ Operational
§ Transactional
§ Maintenance
Operational
§ This aspect is important when the software is moved from one platform to another
-
§ Can be measured on
§ Portability browsers
§ Interoperability I 0s
§ Reusability
§ Adaptability
Maintenance
§ Briefs about how well a software has the capabilities to maintain itself in the ever-changing
@
environment
=
§ Can be measured on
§ Modularity
§ Maintainability
§ Flexibility
§ =
Scalability 8 cloud / containerization
|→
vertical
→
horizontal
0
SDLC
Overview
::
§ Is a well-defined, structured sequence of stages in
software engineering to develop the intended SRs
⑥ Deployment
-
Planning and Requirement Analysis
⇐
§ It is performed by the senior members of the team with inputs from the customer, the
sales department, market surveys and domain experts in the industry
§ This information is then used to plan the basic project approach and to conduct
product feasibility study in the economical, operational and technical areas
§ Planning for the quality assurance requirements and identification of the risks
associated with the project is also done in the planning stage
§ The outcome of the technical feasibility study is to define the various technical
= approaches that can be followed to implement the project successfully with minimum
risks
§ ?¥÷;; } ÷:* }÷÷
m¥ae
÷÷÷|⑨F*--
.
-
MERM
/ mean / AMP .
/
→ user
ageless
→
Defining Requirements
§ Once the requirement analysis is done the next step is to clearly define and document the product
=#
requirements and get them approved from the customer or the market analysts
§ This is done through an SRS (Software Requirement Specification) document which consists of all
the product requirements to be designed and developed during the project life cycle
Designing the Product Architecture
§ SRS is the reference for product architects to come out with the best architecture for the product to be
developed
§ Based on the requirements specified in SRS, usually more than one design approach for the product
architecture is proposed and documented in a DDS - Design Document Specification
§ This DDS is reviewed by all the important stakeholders and based on various parameters as risk
assessment, product robustness, design modularity, budget and time constraints, the best design
approach is selected for the product
§ A design approach clearly defines all the architectural modules of the product along with its
communication and data flow representation with the external and third party modules (if any)
§ The internal design of all the modules of the proposed architecture should be clearly defined with the
=minutest of the details in DDS
Building or Developing the Product
É⇐=
§ In this stage of SDLC the actual development starts and the product is built
§ The programming code is generated as per DDS during this stage
§ If the design is performed in a detailed and organized manner, code generation can
be accomplished without much hassle
§ Developers must follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers, etc. are used to generate
the code
§ Different high level programming languages such as C, C++, Java, PHP etc. are
used for coding
§ The programming language is chosen with respect to the type of software being
developed
Testing the Product
§ This stage is usually a subset of all the stages as in the modern SDLC models
§ The testing activities are mostly involved in all the stages of SDLC
§ However, this stage refers to the testing only stage of the product where product defects are reported,
tracked, fixed and retested, until the product reaches the quality standards defined in the SRS
Deployment in the Market and Maintenance
-
§ Once the product is tested and ready to be deployed it is released formally in the
"i÷÷÷÷÷
appropriate market
§ Sometimes product deployment happens in stages as per the business strategy of
that organization
§ The product may first be released in a limited segment and tested in the real
business environment (UAT- User acceptance testing)
§ Then based on the feedback, the product may be released as it is or with suggested
enhancements in the targeting market segment
§ After the product is released in the market, its maintenance is done for the existing
customer base
SDLC Models
§ There are various software development life cycle models defined and designed which are followed
during the software development process
§ Also referred as Software Development Process Models
§ Models
§ Waterfall Model
§ Iterative Model
§ Spiral Model
§ V-Model
§ Big Bang Model
§ Agile Model
Waterfall Model
÷÷÷÷÷\*
§ Requirement
Specification →→
§ Design
§ Implementation
I -
category
-
Iterative Model
E- § implementation of a subset of the software requirements and iteratively enhances the evolving
versions until the full system is implemented
2mont@
e-commerce - - ✓
uI_backe^#
←
good
µ
,
- -
-
ord# →
✓ ✓ ✓
-
'
←
✓ -
product →
-
category
-
→
.
-
Agile Methodologies
-
Agile Methodologies
§ Agile model believes that every project needs to be handled differently and the existing methods need
to be tailored to best suit the project requirements
§ The tasks are divided to time boxes (small time frames) to deliver specific features for a release
§ Iterative approach is taken and working software build is delivered after each iteration
§ Each build is incremental in terms of features; the final build holds all the features required by the
customer
Spi
ltimeb.cn/euent--2weeks#-ssprint--
- "→↳É
Blogging
☐ sprints : 2 weeks
User
bacueno/n
:÷÷÷÷;÷÷
-
→
→
registration UI
registration
÷÷÷÷:÷÷÷→
-
→ login UI
€
-
login
table
µ
-
÷-
-
blogging .
create blog . . .
.
login
- - -
-
API
;
- *
delete blog login UI
-
-
r . . -
rating -
. . .
③ ;
I -
'
. :
1
Agile Manifesto
§ Scrum isn't a process, it's a framework that facilitates processes amongst other things
§ Is an agile way to manage a project
§ Management framework with far reaching abilities to control and manage the iterations and
increments in all project types
§ One of the implementations of agile methodology
§ Incremental builds are delivered to the customer in every two to three weeks time
§ Ideally used in the project where the requirement is rapidly changing
§ The framework is made up of a Scrum team, individual roles, events, artefacts, and rules
Scrum Principles
§ Our highest priority is to satisfy the customer through early and continuous delivery of valuable
software
§ Welcome changing requirements, even late in development
§ Deliver working software frequently, from a couple of weeks to a couple of months, with a preference
to the shorter timescale
§ Business people and developers must work together daily throughout the project
§ Build projects around motivated individuals
§ The most efficient and effective method of conveying information to and within a development team is
face-to-face conversation
d¥ndop
Scrum Principles
-
Scrum Pillars
#¥opsi-
☐+
All parts of the process should be transparent, open, and honest for everyone to see
Transparency
-
Everything that is worked on during a sprint can be inspected by the team to
=
make sure that it is achieving what it needs to.
Adaptation
Scrum Values
E-
Focus Focus on the sprint and its goal
Respect, for each other by helping people to learn the things that you're good at, and not judging the
Respect
things that others aren't good at
Be open and honest and let people know what you're struggling with challenges and problems that
Openness
are stopping you from achieving success
How scrum pillars help us?
Self-organization • This results in healthier shared ownership among the team members
• It is also an innovative and creative environment which is conducive to growth
• Emphasizes how to manage changes better and build products which satisfy customer needs
Iterative Development
• Defines the organization's responsibilities regarding iterative development
Scrum Roles
• Job to understand and engage with the stakeholders to understand what needs to be done and
-8 -
Product create that backlog
Owner • Also need to prioritize that backlog
• Helps the entire team achieve the scrum goals and work within scrum
Scrum • Support the product owner with their responsibilities in terms of managing the backlog as well as,
Master supporting the development team
• The people who are creating the product or service and delivering done increments at the end of
each sprint
I Dev Team
• Includes developers, tester, writers, graphics artists and others
Scrum Artefacts
→
8
pood → olp of process
tasks
all tasks / collection of
collection
of
stories selected for a sprint
Subtasks /
Scrum Events
• Collaborative events to demo what has been achieved and to help keep everyone who's
Sprint Review
⇐==
involved working together
• About continuous process and improvement and we need to take what we've learned into
Sprint Retrospective
the next sprint planning session
Sprint • It is really the beating heart of scrum and all the scrum events take place in it
Scrum Process
Agile vs traditional models
E-
at the start
2 Embracing change Change prevention
3 Deliver early, fail early Deliver at the end, fail at the end
4 Transparency Detailed planning, stagnant control
5 Inspect and adapt Meta solutions, tightly controlled procedures and final
answers
6 Self managed Command and control
7 Continual learning Learning is secondary to the pressure of delivery
Agile - Advantages
←
§ Very realistic approach to software development
§ Promotes teamwork and cross training
§ Functionality can be developed rapidly and demonstrated
E¥=
§ Resource requirements are minimum
§ Suitable for fixed or changing requirements
§ Delivers early partial working solutions
§ Good model for environments that change steadily
§ Minimal rules, documentation easily employed
§ Enables concurrent development and delivery within an overall planned context
§ Little or no planning required
§ Easy to manage
§ Gives flexibility to developers
Agile - Disadvantages
⇐
§ Depends heavily on customer interaction, so if customer is not clear, team can be driven in the wrong direction.
§ There is a very high individual dependency, since there is minimum documentation generated.
§ Transfer of technology to new team members may be quite challenging due to lack of documentation.
Scrum tools
÷
§ Jira – https://www.atlassian.com/software/jira/
§ Clarizen – https://www.clarizen.com/
§ GitScrum – https://site.gitscrum.com/
§ Vivify Scrum – https://www.vivifyscrum.com/
§ Yodiz – https://www.yodiz.com/
§ ScrumDo – https://www.scrumdo.com/
§ Quickscrum – https://www.quickscrum.com/
§ Manuscript – https://www.manuscript.com/
§ Scrumwise – https://www.scrumwise.com/
§ Axosoft – https://www.axosoft.com/
Agile Methodologies – Scrum Terminologies
§ Sprint: time-boxed event of 30 days, or less, that serves as a container for the other Scrum events
and activities.
§ Sprint Backlog: an overview of the development work to realize a Sprint’s goal, typically a forecast of
functionality and the work needed to deliver that functionality.
§ Sprint Goal: a short expression of the purpose of a Sprint, often a business problem that is
addressed
§ Sprint Retrospective: time-boxed event of 3 hours, or less, to end a Sprint to inspect the past Sprint
and plan for improvements
Agile Methodologies – Scrum Terminologies
§ Sprint Review: time-boxed event of 4 hours, or less, to conclude the development work of a Sprint
§ Stakeholder: a person external to the Scrum Team with a specific interest in and knowledge of a
product that is required for incremental discovery
§ Development Team: the role within a Scrum Team accountable for managing, organizing and doing
all development work
§ Daily Scrum: daily time-boxed event of 15 minutes for the Development Team to re-plan the next day
of development work during a Sprint
Source Code Management
÷-
I IF
I I
€: ④
←
(
i¥
cnet.IS
④
Version Control System
e-
*
§ Also known as revision control or source code control system
=
§ Is the management of documents (source code) m
go
§ Logical way to organize and control the revisions of source code
=-←-
§ Tracks and provides control over the changes made in the code
§ E.g.
§ CVS
§ SVN
÷÷÷÷÷÷÷÷÷
§ a
Git
§ Bazar
:
to do
① client-server →
e.eom①
① code version system (aus)
¥¥ 8¥ flu
¥÷÷÷÷÷÷÷÷÷i÷÷*
÷÷¥¥÷÷*←t ÷ ¥
② →
⇐
11¥ , } 2M 's
.
.
I ④
*
EE
a ..
,o←EI
em . .
.
7¥
:c cadent client
:::i÷ .
② Distributed Le
-
Fete.÷.¥÷÷!÷÷÷:÷
remote
① crit
.im .
/
µ
KMB
↳ versions user date
, ,
¥0 .
,¥ ¥¥
.
.
armes)
i÷÷÷÷÷÷÷÷÷÷÷÷¥÷a. Meet
÷÷÷÷÷÷÷÷÷ ↳ versions ,
user
.
,
date
VCS Types – Client-Server
e
§ Only one server maintains shared repository
§ Every developer sends the changes to the same repository
§ Disadvantages
§ not scalable ←
§ E.g.
§ Open source
§ CVS (Concurrent Version System)
÷
'
§ SVN (Subversion
§ Proprietary
§ AccuRev
§ Razor
§ TeamCity
§ Vault .
§ Visual SourceSafe
VCS Types – Distributed
-#
§ Takes peer-to-peer approach to version control
§ Synchronizes repositories by exchanging patches from peer to peer
§ There is no single server which maintains the code, rather user has a working copy and full change
-
-
-
history # ata
§ Disadvantages
WH A
§ Common operations like commit, version history etc. are faster because there is no need to communicate
with server
I-T-Fbran.ms#branT
-
§ Communication with server is necessary only when developer wants to share the changes with others
§ Allows private work, users don’t need to publish the changes for early drafts
§ Working copies function effectively as backups
§ Permits centralized control of the release version of code
Git
-
Overview
§ Distributed development
§#
Compatibility with existent systems and protocols →
http ) https
-9
§ No need of powerful hardware
§ Easier branching
§
Terminologies
§ Repository t .
version
§ Directory containing .git folder & time
gas
date
=
§ Object → author
?
§ Collection of key-value pairs → what changes
§ Clone operation not only checks out the working copy, but it also mirrors the complete repository
§ Users can perform many operations with this local repository
§ The only time networking gets involved is when the repository instances are being synchronized
Terminologies
remote local
§ Pull →
§ Pull operation copies the changes from a remote repository instance to a local
§ The pull operation is used for synchronization between two repository instances
local remote
§ Push →
§ Commits iii.
§ Commit holds the current state of the repository.
-
§ A commit is also named by SHA1 hash
§ A commit object as a=node of the linked list ←
§ Every commit object has a pointer to the parent commit object
§ From a givenI commit, you can traverse back by looking at the parent pointer to view the history of the
commit
-
§ Branches
§ Branches are used to create another line of development
§ By default, Git has a master branch
§ Usually, a branch is created to work on a new feature
§ Once the feature is completed, it is merged back with the master branch and we delete the branch
§ Every branch is referenced by HEAD, which points to the latest commit in the branch
§ Whenever you make a commit, HEAD is updated with the latest commit
Life Cycle
Installation and first time setup
§ Initialize a repository
> git init
§ Checking status
> git status
§ Checking logs
> git log
§ Checking difference
> git diff
§ Moving item
> git mv <source> <destination>
Basic Commands
§ Rename item
> git mv <old> <new>
§ Delete Item
> git rm <item>
§ Create a branch
> git branch <branch name>
§ Checkout a branch
> git checkout <branch name>
§ Merge a branch
> git merge <branch name>
§ Delete a branch
> git branch –d <branch name>
GitHub
Overview
⇐
§ Software →
to so m
= exe
teargas +
documentation
§ Software is more than just a program code
§ A program is an executable code, which serves some computational purpose
- -
-
a :*:
What is Software Engineering?
5--3
§ The process of developing a software product using software engineering principles and methods
Software
-
Evolution r
#2o
'
§ S-type (static-type)
§ Works strictly according to the pre-defined specifications and solutions
§ Solution and method to achieve it can be understood immediately before coding starts
§ Least subjected to the changes
F-
§ E.g. Calculator program for mathematical computation
§ P-type (practical-type) ¥I8
÷÷÷ ÷÷÷
- -
-⇐
§ Continuing change
§ An E-type software system must continue to adapt to the real world changes, else it becomes progressively less useful
§ Increasing complexity
§ As software evolves, its complexity tends to increase unless work is done to maintain or reduce it
§ Conservation of familiarity - documentation
j
§ The familiarity with the software or the knowledge about how it was developed, why was it developed in that particular manner etc.
must be retained at any cost, to implement the changes in the system
§ Continuing growth
§ In order for an E-type system intended to resolve some business problem, its size of implementing the changes grows according
to the lifestyle changes of the business
§ Reducing quality
-#
§ An E-type software system declines in quality unless rigorously maintained and adapted to a changing operational environment
§ Feedback systems ←
Agile
§ The E-type software systems constitute multi-loop, multi-level feedback systems and must be treated as such to be successfully
modified or improved.
§ Self-regulation
-
§ E-type system evolution processes are self-regulating with the distribution of product and process measures close to normal.
§ Organizational stability
-
§ The average effective global activity rate in an evolving E-type system is invariant over the lifetime of the product.
Software Paradigms
-
§ Refer to the methods and steps, which are taken while designing the software
#
§ There are many methods proposed and are in work today, but we need to see where in the software
engineering these paradigms stand
-__
§ These can be combined into various categories, though each of them is contained in one another
-
§ Consists of
§ Requirement gathering
EF
÷÷←÷÷÷÷i÷÷÷
§ Software design Development
EEE
←
§ Programming
.
"
Programming
E-
Designing
Characteristics of good software
÷
§ A software product can be judged by what it offers and how well it can be used
§ Well-engineered and crafted software is expected to have the following characteristics
§ Operational
EEE
§ Transactional
§ Maintenance
Operational
=
§ This tells us how well software works in operations
§ Can be measured on:
§
§
Budget
Usability
iEi
§ Efficiently
E-§
§
§
Correctness
Functionality
Dependability
§ Security
I § Safety
Transitional
§ This aspect is important when the software is moved from one platform to another
§ Can be measured on
§
÷
Portability
E-
§
§
§
Interoperability
Reusability
Adaptability ←
-
Maintenance
-
§ Briefs about how well a software has the capabilities to maintain itself in the ever-changing
environment
÷÷÷q
§ Can be measured on
§ Modularity
÷÷÷÷÷÷
§ Maintainability
§ Flexibility
§ Scalability
⇐
::
SDLC
Overview
I
Planning
§ Is a =
well-defined, structured sequence of stages in
software engineering to develop the intended Is
software product
④ ← Defining
§ Is a framework defining tasks performed at each
step in the software development process
← r Designing
=
§ Aims to produce a high-quality software that
§ meets or exceeds customer expectations g
§ F-
day:p:&
reaches completion within times and cost estimates ← - Building
§ Consists of detailed
#
plan (stages) of describing
how to develop, test, deploy and maintain the ✓Testing
package
well tested
←
f-
software product
- -
I
loud
✓ #
Deployment
¥¥
i÷ ¥÷ ¥÷ ÷ ÷ ÷:÷
client
organization
E.EE #
*
planning
←
::÷÷÷ .
3rbiiheeenoaiaenjii.is
17*7
-
1¥ FIFI
.
④ ¥④
⑤ Building
✓ Cdent )
Is programming language
→
EDE , compilers . - -
deployability
→ create a
manual
types
-13
Testing g- automated
( levels
methodologies
✓⑦ Deployment
→
package →
productionenvir-onmetl.cl )
Ud
Planning and Requirement Analysis
I f
¥
§ Planning for the quality assurance requirements and identification of the risks
associated with the project is also done in the planning stage
§ The outcome of the technical feasibility study is to define the various technical
#
approaches that can be followed to implement the project successfully with minimum
risks
-
Defining Requirements
§ Once the requirement analysis is done the next step is to clearly define and document the product
requirements and get them approved from the customer or the market analysts
§ This is done through an SRS (Software Requirement Specification) document which consists of all
the product requirements to be designed and developed during the project life cycle
→
I
Designing the Product Architecture
I
§ SRS is the reference for product architects to come out with the best architecture for the product to be
-
-
-
developed
§ Based on the requirements specified in SRS, usually more than one design approach for the product
#
architecture is proposed and documented in a DDS - Design Document Specification
§ This DDS is reviewed by all the important stakeholders and based on various parameters as risk
=_#--
assessment, product robustness, design modularity, budget and time constraints, the best design
approach is selected for the product
§ A design approach clearly defines all the architectural modules of the product along with its
- -
communication and data flow representation with the external and third party modules (if any)
⇐
§ The internal design of all the modules of the proposed architecture should be clearly defined with the
minutest of the details in DDS
-
Building or Developing the Product
2-
§ In this stage of SDLC the actual development starts and the product is built
#
§ The programming code is generated as per DDS during this stage
§ If the design is performed in a detailed and organized manner, code generation can
be accomplished without much hassle
#-
§ Developers must follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers, etc. are used to generate
the code
§ Different high level programming languages such as C, C++, Java, PHP etc. are
used for coding
-
- - -
-
§ The programming language is chosen with respect to the type of software being
developed -
-
Testing the Product SEE
←
(
§ This stage is usually a subset of all the stages as in the modern SDLC models
-
§ The testing activities are mostly involved in all7
the stages of SDLC
§ However, this stage refers to the testing only stage of the product where product defects are reported,
- -
#
tracked, fixed and retested, until the product reaches the quality standards defined in the SRS
F¥E÷÷÷ o .
Deployment in the Market and Maintenance
-
§ Once the product is tested and ready to be deployed it is released formally in the
--
appropriate market
-
¥-10
§ Sometimes product deployment happens in stages as per the business strategy of
that organization
§ The product may first be released in a limited segment and tested in the real
business environment (UAT- User acceptance testing)
§ Then based on the feedback, the product may be released as it is or with suggested
#-
enhancements in the targeting market segment
§ After the product is released in the market, its maintenance is done for the existing
customer base
SDLC Models
-
§ There are various software development life cycle models defined and designed which are followed
during the software development process
§ Also referred as Software Development Process Models
§ Models
§ Waterfall Model ayea€
¥
i÷÷÷÷÷÷
§ Iterative Model
§
§
Spiral Model
V-Model '
§
§
Big Bang Model
Agile Model ④
Waterfall Model
-
§ Requirement
Specification -
§ Design
§ Implementation -
t
§ Deployment -
§ Maintenance
.
Iterative Model
§ implementation of a subset of the software requirements and iteratively enhances the evolving
versions until the full system is implemented
Heronries
④
!@ ⑥ ⑥
Agile Methodologies
Agile Methodologies
§ Agile model believes that every project needs to be handled differently and the existing methods need
- -
-
§ Iterative approach is taken and working software build is delivered after each iteration
-
§ Each build is incremental in terms of features; the final build holds all the features required by the
IT #
customer
-
-
e.org
1¥
pf !¥÷tqi÷¥ → sprint
go
0
i÷#÷÷÷÷÷÷÷÷÷÷÷÷?¥÷:÷:÷
→
:
"
ooo
Agile Manifesto
⇐
§ Individuals and interactions
§ self-organization and motivation are important
§ Working software
§ Demo working software is considered the best means of communication with the customers to understand
their requirements, instead of just depending on documentations
§ Customer collaboration
§ continuous customer interaction is very important to get proper product requirements
§ Responding to change
§ focused on quick responses to change and continuous development
Agile Methodologies
I§
§
§
Adaptive Software Development
Feature Driven Development
Dynamic Systems Development Method (DSDM)
Agile Methodologies - Scrum
=
§ Management framework with far reaching abilities to control and manage the iterations and
-
#¥pe
§ One of the implementations of agile methodology
§ Incremental builds are delivered to the customer in every two to three weeks time
§ Ideally used in the project where the requirement is rapidly changing
Agile Methodologies – Scrum Terminologies
-
=
§ Scrum Master: the role within a Scrum Team accountable for guiding, coaching, teaching and
assisting a Scrum Team and its environments in a proper understanding and use of Scrum
§ Scrum Team: a self-organizing team consisting of a Product Owner, Development Team and Scrum
Master
§ Self-organization: the management principle that teams autonomously organize their work
Agile Methodologies – Scrum Terminologies
D
§ Sprint: time-boxed event of 30 days, or less, that serves as a container for the other Scrum events
- -
-
and activities.
=
§ Sprint Backlog: an overview of the development work to realize a Sprint’s goal, typically a forecast of
functionality and the work needed to deliver that functionality.
§-
Sprint Goal: a short expression of the purpose of a Sprint, often a business problem that is
addressed
§ Sprint Retrospective: time-boxed event of 3 hours, or less, to end a Sprint to inspect the past Sprint
I
- -
and plan for improvements -
-
Agile Methodologies – Scrum Terminologies
§ Sprint Review: time-boxed event of 4 hours, or less, to conclude the development work of a Sprint
- -
-
§ Stakeholder: a person external to the Scrum Team with a specific interest in and knowledge of a
product that is required for incremental discovery
§ Development Team: the role within a Scrum Team accountable for managing, organizing and doing
all development work
§ Daily Scrum: daily time-boxed event of 15 minutes for the Development Team to re-plan the next day
-
of development work during a Sprint -
Agile Methodologies – Scrum Principles
§ Self-organization
§ This results in healthier shared ownership among the team members.
§ It is also an innovative and creative environment which is conducive to growth.
§ Collaboration
§ Essential principle which focuses collaborative work
§ Time-boxing
§ Defines how time is a limiting constraint in Scrum method
§ Daily Sprint planning and Review Meetings
§ Iterative Development a-
§ Emphasizes how to manage changes better and build products which satisfy customer needs
§ Defines the organization's responsibilities regarding iterative development
Scrum Process
= ÷ ÷ f⇐ .
Scrum tools
-
§ Jira – https://www.atlassian.com/software/jira/
E
§ Clarizen – https://www.clarizen.com/
§ GitScrum – https://site.gitscrum.com/
§ Vivify Scrum – https://www.vivifyscrum.com/
I
§ Yodiz – https://www.yodiz.com/
§ ScrumDo – https://www.scrumdo.com/
§ Quickscrum – https://www.quickscrum.com/
§ Manuscript – https://www.manuscript.com/
§ Scrumwise – https://www.scrumwise.com/
§ Axosoft – https://www.axosoft.com/
Agile vs traditional models
§ process of evaluating a system or its component(s) with the intent to find whether it satisfies the
specified requirements or not
§ executing a system in order to identify any gaps, errors, or missing requirements in contrary to the
actual requirements
§ A process of analyzing a software item to detect the differences between existing and required
conditions (that is defects/errors/bugs) and to evaluate the features of the software item
§ Testing will be done by
§ Software Developer
=
§ Software Tester
§ Project Lead/Manager
§ End User
When to Start Testing?
§ During the requirement gathering phase, the analysis and verification of requirements are also
considered as testing
§ Reviewing the design in the design phase with the intent to improve the design is also considered as
testing
§ Testing performed by a developer on completion of the code is also categorized as testing
When to Stop Testing?
§ Testing Deadlines
÷(8
§ Completion of test case execution
§ Completion of functional and code coverage to a certain point
§ Bug rate falls below a certain level and no high-priority bugs are identified
§ Management decision
Verification vs Validation
§ Addresses the concern: "Are you building it § Addresses the concern: "Are you building the
right?” right thing?”
§ Ensures that the software system meets all § Ensures that the functionalities meet the
the functionality intended behaviour
§ Takes place first and includes the checking § Validation occurs after verification and mainly
for documentation, code involves the checking of the overall product
§ Done by developers § Done by testers
§ It has static activities, as it includes collecting § It has dynamic activities, as it includes executing
reviews, walkthroughs, and inspections to the software against the requirements
verify a software
§ It is a subjective process and involves subjective
§ It is an objective process and no subjective decisions on how well a software works
decision should be needed to verify a
software
Quality Assurance vs Quality Control
§ QA includes activities that ensure the § QC includes activities that ensure the verification
implementation of processes, procedures and of a developed software with respect to
standards in context to verification of developed documented requirements
software and intended requirements
§ Focuses on actual testing by executing the
§ Focuses on processes and procedures rather software with an aim to identify bug/defect
than conducting actual testing on the system through implementation of procedures and
§ Process-oriented activities process
§ Audit
§ It is a systematic process to determine how the actual testing process is conducted within an organization or
¥
a team
§ It is an independent examination of processes involved during the testing of a software
§ It is a review of documented processes that organizations implement and follow
§ Types: Legal Compliance Audit, Internal Audit, and System Audit
§ Inspection
§ Inspection is a formal evaluation technique in which software requirements, designs, or codes are examined
⇐ in detail
§ Conducted by a person or a group other than the author to detect faults, violations of development
standards, and other problems
automated .
[
selenium
.
( Jaua)
Types →
Test MG
C a
g
Cypress
-
-
→ Jest
( Javascript)
1 :
i.
Manual Testing
§ Manual testing includes testing a software manually, i.e., without using any automated tool or any
script
-
§ The tester takes over the role of an end-user and tests the software to identify any unexpected
behavior or bug
§ There are different stages for manual testing
§ unit testing
§ integration testing
§ system testing
§ user acceptance testing (UAT)
§ Testers use test plans, test cases, or test scenarios to test a software to ensure the completeness of
testing -
Automation Testing
h-I-cseeeni.ms
§ Tester writes scripts and uses another software to test the product
§ Involves automation of a manual process
§ Automation Testing is used to re-run the test scenarios that were performed manually, quickly, and
repeatedly
E-
§ Used to test
§ Regression
§ Performance
§ Stress point
§ It increases the test coverage, improves accuracy, and saves time and money in comparison to
-
manual testing
What to Automate?
¥
§ It is not possible to automate everything in a software
§ The areas at which a user can make transactions such as
§ the login form or registration forms
§ any area where large number of users can access the software simultaneously
§ all GUI items
§ connections with databases
§ field validations
When to Automate?
=
§ Create result reports
§ Identify any potential bug or performance issues
Software Testing Tools
avg.IE#ier
-
access
partial
inmost
to
"
"
✓ ✓
B1ack-B wniteb
-
-
cheapest
no
access
to
Methods y
-
-
costliest
fun access to
coded
internals / Rode
internal documents
Black-Box Testing
§ The technique of testing without having any knowledge of the interior workings of the application
§ The tester is oblivious to the system architecture and does not have access to the source code
§ Typically, while performing a black-box test, a tester will interact with the system's user interface by
providing inputs and examining outputs without knowing how and where the inputs are worked upon
§ Advantages
§ Well suited and efficient for large code segments
§ Code access is not required
§ Clearly separates user's perspective from the developer's perspective through visibly defined roles
§ Large numbers of moderately skilled testers can test the application with no knowledge of implementation,
programming language, or operating systems
§ Disadvantages
§ Limited coverage, since only a selected number of test scenarios is actually performed
§ Inefficient testing, due to the fact that the tester only has limited knowledge about an application
§ Blind coverage, since the tester cannot target specific code segments or errorprone areas
White-Box Testing
§ It is difficult to maintain white-box testing, as it requires specialized tools like code analyzers and debugging tools
-
Grey-Box Testing
§ A technique to test the application with having a limited knowledge of the internal workings of an
application
§ Unlike black-box testing, where the tester only tests the application's user interface; in grey-box
testing, the tester has access to design documents and the database
§ Advantages
§ Offers combined benefits of black-box and white-box testing wherever possible
§ Grey box testers don't rely on the source code; instead they rely on interface definition and functional
specifications
§ Based on the limited information available, a grey-box tester can design excellent test scenarios especially
around communication protocols and data type handling
§ The test is done from the point of view of the user and not the designer
§ Disadvantages
§ Since the access to source code is not available, the ability to go over the code and test coverage is limited
§ The tests can be redundant if the software designer has already run a test case
§ Testing every possible input stream is unrealistic because it would take an unreasonable amount of time;
←therefore, many program paths will go untested -
Black vs Grey vs White
Tytpesmet¥
✗
☒ Leue1S_
{
°
✓
& →
"""°
Éomate
/
:
i-
→ unit testing
→
integration testing
manuals system testing
→ Regression testing
. →
Alpha testing
↳ non -
functional ←
- -
µ
performance
→ security
→ usability
↳
portability
functional
fun
-
non
Levels
Functional Testing
§ This is a type of black-box testing that is based on the specifications of the software that is to be
tested
§ The application is tested by providing input and then the results are examined that need to conform to
the functionality it was intended for
§ Functional testing of a software is conducted on a complete, integrated system to evaluate the
system's compliance with its specified requirements
§ Includes
§ Unit Testing
÷:
§ Integration Testing
§ System Testing
§ Regression Testing
§ Acceptance Testing
§ Alpha Testing
§ Beta Testing
Functional Testing – Steps
: ÷÷.÷¥
§ The determination of the functionality that the intended application is meant to perform
§ The creation of test data based on the specifications of the application
§ The output based on the test data and the specifications of the application
§ The writing of test scenarios and the execution of test cases
§ The comparison of actual and expected results based on the executed test cases
¥
function add ( Pl ,
p 2) {
testee
=
:
email
"
: :
, .
g
invalid 0¥
] % →
expected
{ password
" "
testate
" :
email :
"
f- @ :
.
,
{ pl : 20
,
P2 : 20 ,
answer : Go } → + ve
P2 : 20 answer : so } → -
ve
f pl : 20 , ,
add [20,200)
Constans :| ⇐
actual result
UnitFunction
Testing = individual function testing
§ Is performed by developers before the setup is handed over to the testing team to formally execute
the test cases
§ Unit testing is performed by the respective developers on the individual units of source code assigned
areas
§ The developers use test data that is different from the test data of the quality assurance team
§ The goal of unit testing is to isolate each part of the program and show that individual parts are correct
in terms of requirements and functionality
§ Limitation
§ Testing cannot catch each and every bug in an application
§ It is impossible to evaluate every execution path in every software application
§ There is a limit to the number of scenarios and test data that a developer can use to verify a source code
§ After having exhausted all the options, there is no choice but to stop unit testing and merge the code
segment with other units
unitteting
*
Javascript
Java
:
:
Jasmin
Junit
,
§es+^%"/
e
* .net : Nonit
* python
:
Pyon .it
②
Integration Testing
-
§ Integration testing is defined as the testing of combined parts of an application to determine if they
function correctly
§ Integration testing can be done in two ways
§ Bottom-up integration testing
§ This testing begins with unit testing, followed by tests of progressively higher-level combinations of units
-
÷:* :¥÷:.
:¥÷
8fmbi.edu/pao-s
System Testing
§ Once all the components are integrated, the application as a whole is tested rigorously to see that it
¥¥_
meets the specified Quality Standards
§ This type of testing is performed by a specialized testing team
§ Importance
§ is the first step in the SDLC, where the application is tested as a whole
§ The application is tested thoroughly to verify that it meets the functional and technical
specifications
§ The application is tested in an environment that is very close to the production environment where
the application will be deployed
§ System testing enables us to test, verify, and validate both the business requirements as well as
the application architecture
. ÷☐÷..
'
j±÷j
÷:
1¥
£É '
(public )
☐ I ☒
¥83
use-82
AA environment
7
*¥÷
,
safari
( private )
→
Regression Testing
§ The intent of regression testing is to ensure that a change, such as a bug fix should not result in
another fault being uncovered in the application
§ Importance
§ Minimizes the gaps in testing when an application with changes made has to be tested
§ Testing the new changes to verify that the changes made did not affect any other area of the application
§ Test coverage is increased without compromising timelines
§ Increase speed to market the product
Acceptance Testing
§ The most important type of testing, as it is conducted by the Quality Assurance Team who will verify
whether the application meets the intended specifications and satisfies the client’s requirement
§ The QA team will have a set of pre-written scenarios and test cases that will be used to test the
application
§ Acceptance tests are not only intended to point out simple spelling mistakes, cosmetic errors, or
interface gaps, but also to point out any bugs in the application that will result in system crashes or
major errors in the application
§ By performing acceptance tests on an application, the testing team will reduce how the application will
perform in production.
§ There are also legal and contractual requirements for acceptance of the system.
Alpha Testing
§ This test is the first stage of testing and will be performed amongst the teams (developer and QA
€
teams)
§ Unit testing, integration testing and system testing when combined together is known as alpha testing
§ During this phase, the following aspects will be tested in the application
§ Spelling Mistakes
§ Broken Links
§ The Application will be tested on machines with the lowest specification to test loading times and any latency
=
problems -
-
Beta Testing ? Releasecandidatelre
→
§ This test is performed after alpha testing has been successfully performed
§ In beta testing, a sample of the intended audience tests the application
§ Beta testing is also known as pre-release testing
§ Beta test versions of software are ideally distributed to a wide audience on the Web, partly to give the
program a "real-world" test and partly to provide a preview of the next release
§ Users will install, run the application and send their feedback to the project team
§ Typographical errors, confusing application flow, and even crashes
§ Getting the feedback, the project team can fix the problems before releasing the software to the actual
users
§ The more issues you fix that solve real user problems, the higher the quality of your application will be
§ Having a higher-quality application when you release it to the general public will increase customer
satisfaction
Non-Functional Testing
÷=
§ Non-functional testing involves testing a software from the requirements which are nonfunctional in
nature but important such as performance, security, user interface, etc
§ Includes
§ Performance testing
§ Usability Testing
§ Security Testing
Performance Testing
§ It is mostly used to identify any bottlenecks or performance issues rather than finding bugs in a software
§ There are different causes that contribute in lowering the performance of a software
§ Network delay
§ Client-side processing
§ Database transaction processing
§ Load balancing between servers
§ Data rendering
§ Performance testing is considered as one of the important and mandatory testing type in terms of the
following aspects −
§ Speed (i.e. Response Time, data rendering and accessing)
§ Capacity
§ Stability
§ Scalability
§ Performance testing can be either qualitative or quantitative and can be divided into
§ Load testing
§ Stress testing
-
E.i.
1- ""
cpv - I 5- 2.4
⇐
GHz
µ
Threads
⇐
: 20
÷¥¥÷
sewer
500
6 7
175 aÑ
µ
.
'
cpu - it -
. so Threads -40
Cores 8
RAM-128GB.gg#
-
2000
9 ✗ CPU Xeon
µ threads =
-
2891112 too
RAM-2589-B-cores-28scala-b.ie
vertical
Hooizontasaing
"£hYAuy,e
¥÷÷F¥_
② E-X.tt#iHAP-roxy
ED
¥¥±¥
-
E¥ÉEE "
-
Diner
Load
17 7.5
. .
6
-
☐÷÷¥
Load Testing
←
§ It is a process of testing the behavior of a software by applying maximum load in terms of software
accessing and manipulating large input data
§ It can be done at both normal and peak load conditions
§ This type of testing identifies the maximum capacity of software and its behavior at peak time
=
§ Most of the time, load testing is performed with the help of automated tools such as Load Runner,
AppLoader etc
Stress Testing
§ Stress testing includes testing the behavior of a software under abnormal conditions
§ For example, it may include taking away some resources or applying a load beyond the actual load
⇐
limit
§ This testing can be performed by testing different scenarios such as
§ Shutdown or restart of network ports randomly
§ Turning the database on or off
§ Running different processes that consume resources such as CPU, memory, server, etc.
Usability Testing
§ Usability testing is a black-box technique and is used to identify any error(s) and improvements in the
software by observing the users through their usage and operation
§ Can be defined as
§ efficiency of use
§ learn-ability
§ memory-ability
§ errors/safety
§ Satisfaction
§ UI testing can be considered as a sub-part of usability testing.
Security Testing
§ Testing a software in order to identify any flaws and gaps from security and vulnerability point of view.
=
§ Involves
GEty÷8)
§
§
Confidentiality
¥
Integrity
§ Authentication
§ Availability |GEt1blogJ→ JWT
§ Authorization : Foot
§ Non-repudiation
I§ Input checking and validation g sac injection
✓§ SQL insertion attacks ¥ Helmet
-
Portability Testing
§ Portability testing includes testing a software with the aim to ensure its reusability and that it can be
E-
moved from another software as well
§ Following are the strategies that can be used for portability testing
§ Transferring an installed software from one computer to another.
§ Building executable to run the software on different platforms
=
§ Portability testing can be considered as one of the sub-parts of system testing
§ Computer hardware, operating systems, and browsers are the major focus of portability testing
-0
Selenium
Overview
§ Selenium is an open-source and a portable automated software testing tool for testing web application
§ It has capabilities to operate across different browsers and operating systems
§ Selenium is not just a single tool but a set of tools that helps testers to automate web-based
applications more efficiently
§ Tools
§ Selenium IDE
§ Selenium RC (Remote Control)
§ Selenium WebDriver
§ Selenium Grid
Advantages
¥
§ Selenium is an open-source tool
§ Can be extended for various technologies that expose DOM
§ Has capabilities to execute scripts across different browsers
§ Can execute scripts on various operating systems
§ Supports mobile devices
§ Executes tests within the browser, so focus is NOT required while script execution is in progress
-
¥
§ No feature such as Object Repository/Recovery Scenario
§ Cannot access controls within the browser
§ No default test report generation
§ For parameterization, users has to rely on the programming language
Locators
a-C-doeomm-i-m-t.gg
§ Element Locators help Selenium to identify the HTML element the command refers to
§ Types
§ identifier = id Select the element with the specified "id" attribute and if there is no match, select the first
÷
element whose @name attribute is id.
§ id = id Select the element with the specified "id" attribute.
§ name = name Select the first element with the specified "name" attribute
§ dom = javascriptExpression Selenium finds an element by evaluating the specified string that allows us to
traverse through the HTML Document Object Model using JavaScript. Users cannot return a value but can
evaluate as an expression in the block
§ xpath = xpathExpression Locate an element using an XPath expression.
§ link = textPattern Select the link element (within anchor tags) which contains text matching the specified
pattern
§ css = cssSelectorSyntax Select the element using css selector
WebDriver
I
←
§ Interacts directly with the browser and uses the browser's engine to control it
§ It is faster, as it interacts directly with the browser
§ It can support the headless execution
Login
F→E -
selenium
Browser
€
DevOps
Problems
#
§ Ensuring consistency, adaptability and scalability across environments is very difficult task
§ Environment dependencies makes the project behave differently in different environments
Solutions to the problem
§ Managing and tracking changes in the code is difficult: SCM tools ( git
g- ,
Cvs ,
SUN
,
Bazar )
-
§ Manual
-
testing and deployment of various components/modules takes a lot of time: Selenium
§ Ensuring consistency, adaptability and scalability across environments is very difficult task: Puppet
-
§ Environment dependencies makes the project behave differently in different environments: Docker
containerization
Overview
§ Before DevOps, the development and operation team worked in complete isolation
§ Testing and Deployment were isolated activities done after design-build. Hence they consumed more
time than actual build cycles.
§ Without using DevOps, team members are spending a large amount of their time in testing, deploying,
and designing instead of building the project.
§ Manual code deployment leads to human errors in production
§ Coding & operation teams have their separate timelines and are not in synch causing further delays
µ
Deueiopnent operations
①
managing
resources
① Develop / code
machines
testing
-
④
-
hllw
③ build
creating -
new.ie
ysae
→→Nod
→ ¥-5T -
④ →
mysal
→ 8-0
→
N;ode
3 's
coyto Js
: → -
-
What is DevOps ?
E-
§ DevOps is not a goal but a never-ending process of continuous improvement
§ It integrates Development and Operations teams
§ It improves collaboration and productivity by
§ Automating infrastructure
•
→deploymen+
§ Automating workflow
§ Continuously measuring application performance
m,
*
* culture
Common misunderstanding
=
§ DevOps is not a role, person or organization
§ DevOps is not a separate team
=
§ DevOps is not a product or a tool
§ DevOps is not just writing scripts or implementing tools
Reasons to use DevOps
=
§ Cost Efficiency: DevOps offers cost efficiency in the software development process which is always
an aspiration of IT companies' management
§ Breaks larger code base into small pieces: DevOps is based on the agile programming method.
Therefore, it allows breaking larger code bases into smaller and manageable chunks
DevOps Lifecycle
-#
e¥¥÷ task
management container aws / azure/ GCP
orchestration
"""
environment
-
building
-
Boies
-
→
f. ⇐
to Infrastructure
deployable
/ a↳m÷ns
package
☐
①
=
executable
-
→
aws-
-
te Ep
azure
→
→
unittesting -
O O -
-
Junit
-
Nun it
-
pyunit - ←
→ loadlstress =
=
#
-
stress Runner Fenian
- ↳ a. runner
DevOps Lifecycle - Plan
§ First stage of DevOps lifecycle where you plan, track, visualize and summarize your project before
-
§ Second stage where developer writes the code using favorite programming language
§ Coding Tools
§ IDEs: Eclipse, Visual Studio etc.
§ SCM: Git, Subversion, CVS etc.
§ Package management: npm etc.
DevOps Lifecycle•
-Build
=
§ Compiling the source code
§ Create deployable packages
§ Build tools
§ Maven
I
§ Gradle
§ Ant
libraries +
package
-
compiled code
DevOps Lifecycle - Test
IE
§ Process of executing automated tests
§ The goal here is to get the feedback about the changes as quickly as possible
§ Testing tools
§ JMeter
§ Selenium
§ JUnit
§ QUnit
§ NUnit
§ Appium
DevOps Lifecycle - Release
§ This phase helps to integrate code into a shared repository using which you can detect and locate
-
§ Manage and maintain development and deployment of software systems and server in any
computational environment
§ Deployment tools
§ Docker
§ Kubernetes
§ Virtual Machines
§ Configuration management tools
§ Puppet
§ Chef
§ Ansible
DevOps Lifecycle - Operate
=
§ This stage where the updated system gets operated
§ Operating Tools
§ Puppet
configuoationm#gement
g-
§ Chef
§ Ansible
DevOps Lifecycle - Monitor
§ It ensures that the application is performing as expected and the environment is stable
§ It quickly determines when a service is unavailable and understand the underlying causes
§ Monitoring tools
§ Nagios
§ Sensu
§ Splunk
§ DataDog
iii.
DevOps Terminologies
§ Continuous Development
§ Continuous Testing
§ Continuous Integration
§ Continuous Delivery
§ Continuous Deployment
§ Continuous Monitoring
88-88
Source Code Management
Why do we need Version Control System?
§ Many people’s version-control method of choice is to copy files into another directory
-
=
§ System that records changes to a file(s) over time so that you can recall specific versions later
-
§ It allows you
ÉF ÷☒
§ to revert files to a previous state
§ to revert the entire project to a previous state
§ to compare changes over time
§ to see who last modified something that might be causing a problem
§ to see who introduced an issue and when
§ Using a VCS also generally means that if you screw things up or lose files, you can easily recover
Local Version Control System
E-
under revision control Local Machine
§ One of the more popular VCS tools was a system called RCS
§ RCS works by keeping patch sets (that is, the differences Version database
between files) in a special format on disk
§ It can then re-create what any file looked like at any point in File Version 3
time by adding up all the patches
Version 2
Version 1
Centralized Version Control Systems code:4MB- metadata :
5009B€
¥=¥
,
a±÷☐
%de
-
f- -
: "" ☐
limits
dev ☐
users are limited
① no
q Computer A Computer B
failure
② single point of
Version 3 Version 3
Distributed Version Control Systems
"
§ Clients don’t just check out the latest snapshot of Server Machine
the files, rather they fully mirror the repository
§ Thus if any server dies, and these systems were Version database
collaborating via it, any of the client repositories Version 3 Version 2 Version 1
can be copied back up to the server to restore it
§ Every checkout is really a full backup of all the
data
§ Furthermore, many of these systems deal pretty
well with having several remote repositories they code :4r9B
0
simultaneously within the same project Computer A Computer B
✗ Version database
Version 3 Version 2 Version 1
Version database
Version 3 Version 2 Version 1
What is Git?
_
§ The major difference between Git and any other VCS is the
%
way Git thinks about its data File A ∆1
§ Unlike other VCS tools, Git uses snapshots and not the
8
differences File B
0
∆1 ∆2
§ Others think of the information they keep as a set of files and File C ∆1 ∆2
xn-ñe
the changes made to each file over time
§ Git thinks of its data more like a set of snapshots of a
miniature filesystem
a
§ Every time you commit, or save the state of your project in
Version 1 Version 2 Version 3 Version 4
Git, it basically takes a picture of what all your files look like
at that moment and stores a reference to that snapshot
File A → A1 A1 A1
§ To be efficient, if files have not changed, Git doesn’t store the
file again, just a link to the previous identical file it has File B B1 B2 B3
already stored
File C
= C1 C1 C2
0
Git
Overview
§ The Linux kernel is an open source software project of very large scope
-
§ From 1991–2002, changes to the software were passed around as patches and archived files
-
§ In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper
- -
§ In 2005, the relationship with BitKeeper broken down and tool’s free-of-charge status was revoked
- -
§ tool’s free-of-charge status was revoked (and in particular Linus Torvalds) to develop their own tool
- -
based on some of the lessons they learned while using BitKeeper
-
_
§ Simple design
§ Strong support for non-linear development (thousands of parallel branches)
§ Fully distributed
§ Able to handle large projects like the Linux kernel efficiently (speed and data size)
Characteristics
E-
§ Fast and small
§ Implicit backup
§ Security
§ No need of powerful hardware
§ Easier branching
Installation and first time setup
=
§ List the global settings
> git config --global --list
§ Initialize a repository
> git init
§ Checking status
> git status
§ Checking logs
> git log
§ Checking difference
> git diff
§ Moving item
> git mv <source> <destination>
Terminologies
§ Repository
§ Directory containing .git folder
§ Object
§ Collection of key-value pairs
§ Blobs (Binary Large Object)
§ Each version of a file is represented by blob
§ A blob holds the file data but doesn’t contain any metadata about the file
§ It is a binary file, and in Git database, it is named as SHA1 hash of that file
§ In Git, files are not addressed by names. Everything is content-addressed
§ Clone
§ Clone operation creates the instance of the repository
§ Clone operation not only checks out the working copy, but it also mirrors the complete repository
§ Users can perform many operations with this local repository
§ The only time networking gets involved is when the repository instances are being synchronized
Terminologies
§ Pull
§ Pull operation copies the changes from a remote repository instance to a local
§ The pull operation is used for synchronization between two repository instances
§ Push
§ Push operation copies changes from a local repository instance to a remote
§ This is used to store the changes permanently into the Git repository
§ HEAD
§ HEAD is a pointer, which always points to the latest commit in the branch
§ Whenever you make a commit, HEAD is updated with the latest commit
§ The heads of the branches are stored in .git/refs/heads/ directory
Terminologies
§ Commits
§ Commit holds the current state of the repository.
§ A commit is also named by SHA1 hash
§ A commit object as a node of the linked list
§ Every commit object has a pointer to the parent commit object
§ From a given commit, you can traverse back by looking at the parent pointer to view the history of the
commit
§ Branches
§ Branches are used to create another line of development
§ By default, Git has a master branch
§ Usually, a branch is created to work on a new feature
§ Once the feature is completed, it is merged back with the master branch and we delete the branch
§ Every branch is referenced by HEAD, which points to the latest commit in the branch
§ Whenever you make a commit, HEAD is updated with the latest commit
Life Cycle
Installation and first time setup
§ Initialize a repository
> git init
§ Checking status
> git status
§ Checking logs
> git log
§ Checking difference
> git diff
§ Moving item
> git mv <source> <destination>
Basic Commands
§ Rename item
> git mv <old> <new>
§ Delete Item
> git rm <item>
§ Create a branch
> git branch <branch name>
§ Checkout a branch
> git checkout <branch name>
§ Merge a branch
> git merge <branch name>
§ Delete a branch
> git branch –d <branch name>
GitHub
Overview
µ
IaaS
Pasos
µ
↳ SaaS
models
④ deployment
public
Is private Cloud Computing
/→ hybrid
→
-
public
=
① MySQL db
② backend ( express)
q
w
③
::÷::::÷:
_#
×
&
Ei¥i .
Computing Models
§ Desktop Computing
✓ ⇐
§ Client-Server Computing
✓ ←
§ Cluster Computing
✓ ←
§ Grid Computing
✓ ←
§ Cloud Computing
✓
-
←
destructing
'
-
n÷÷±ts ::÷÷
CASE ,
client - server computing
!?fg-E#I
E÷t
MI
EEE
?a
Cluster cons
a
: ÷¥÷÷÷÷÷
=
"
Diez
am
IF
T¥¥¥I±ne
client
*
Scaling problem 17.4 -5-8
.
vertical
→
scaling horizontal
→
scaling
→
seating Cluster
→
upgrade
Meon, gyration → scale
0£
→
create clones -
→
down
sealing → scale in
→ →
What is Cloud ?
§ The practice of using a network of remote servers hosted on the Internet to store, manage, and
a
process data, rather than a local server or a personal computer.
§ =
Is the delivery of on-demand computing resources – everything from data centers over the internet on
-
§ Cloud computing is an umbrella term used to refer to Internet based development and services
-
§ In addition, the platform provides on demand services, that are always on, anywhere, anytime and
-
any place. -
§ For a non-technical person it is the cloud where the user’s files/data is stored
#
)
§ Components
§ Servers (compute)
✓
provider
✓§ Security (
÷÷÷÷÷÷÷
region
§ WAN
I§ Storage ( auailabiy one
§ File Sharing
÷
Virtualization
-
§ Refers to the act of creating a virtual (rather than actual) version of something, including virtual
computer -
-
hardware platforms, storage devices, # and computer network resources
§ Types
§ Virtualization using VM
?
§ Type – I
§ Type – II
deer
§ Containerization
tape
-
III:c;
' a'
type.it v He's't:3:]
-47¥
.
hello class
,#¥
-
I
hello class
I
-
, guest os →
guest os →
/s¥¥ Tf .
Tt
.
It
.
est'÷÷÷¥÷÷ '
To::¥I i÷
÷ :
MIC
MIC
Gpu
gpu
→ "
s
÷
..
$. . .
hutto class
J#
.
, ,
E£#E£#E¥⇐ .
Virtualization
Cloud Computing Characteristics
-
§ On-demand self-service
-
③too@
§ A consumer can unilaterally provision computing capabilities, such as server time and network storage, as
needed automatically without requiring human interaction with each service provider
§ Broad network access
-
§ Capabilities are available over the network and accessed through standard mechanisms that promote use by
heterogeneous thin or thick client platforms
network etc
§ Resource pooling storage Compute
. .
.
.
→ , .
§ The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with
different physical and virtual resources dynamically assigned and reassigned according to consumer
demand
growing
§ Rapid elasticity → ↳ shrinking
§ Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly
outward and inward commensurate with demand
2 days
§ Measured service UM -
loh- AB
,
.
§ Resource usage can be monitored, controlled and reported, providing transparency for the provider and
consumer
Service Models
t.es# % %
*
Service Models
-
!
Google Apps,
Software Facebook, YouTube,
as a Service (SaaS) Applications / Software Dropbox, Google Photos
. =
Platform Amazon Simple DB, S3,
o
-
.
Data Center
operations
-
€
-
-
Hardware
Deployment models
§ Private Cloud
§=
Public Cloud
§ Hybrid Cloud
¥
.
-
t
-
-
E
-
Cloud Services
=
§ Application Integration
Advantages
=--_
§ Does not work well with low-speed connections
§ Features might be limited
§ Stored data might not be secure
§ Stored data can be lost
§ Each cloud systems uses different protocols and different APIs
Cloud Vendors
§ AWS →
§ Google Compute →
§ Azure →
§ Others
§ Rackspace
•
digital ocean
-
linode
'
hero Ku
Microservices
e-commerce
|
signing profile . . .
User : signup , ,
place
Order : listing
. . - .
,
-
,
product : CRUD
-
-
machine learning :-.
→
reports
-
: " "
retailers
.
:-.
.
- administrators : . . . . .
;
.
Techriologystak
-
Java
Boot
-
Spring
- REST
riysai
-
microseovice
H¥-mÉ÷É
scale
n .
É É É ⇐ ⇐
MySQL postage MongoDB oracle oracle
Overview
§ Distinctive method of developing software systems that tries to focus on building single-function
modules with well-defined interfaces and operations
§ Is an architectural style that structures an application as a collection of services that are
§ Highly maintainable and testable
§ Loosely coupled
§ Independently deployable
§ Organized around business capabilities
Benefits
@
Operating System
§ Each VM is a full machine running all the components,
including its own operating system, on top of the virtualized Hardware
hardware
h"TÉ¥ÉÉÉ
|hé# |sejs)
compile
/÷÷f
javac
f.
FE
.am, .mn
-
HAL : → Hardware Abstraction
Layer
↳ collection device drivers
← of
1. \
. . . .
g¥÷
②
. Container Runtime
Operating System
Hardware
Containerization
← E-
Pre-configured VMs are difficult to find and manage Pre-built containers are readily available
Can be easily moved to new OS Containers are destroyed and recreated
Creating VM takes longer time Containers can be created in seconds
Advantages
§ Portability
§ A container creates an executable package of software that is abstracted away from (not tied to or
dependent upon) the host operating system, and hence, is portable and able to run uniformly and
consistently across any platform or cloud
§ Agility
§ The open source Docker Engine for running containers started the industry standard for containers with
simple developer tools and a universal packaging approach that works on all operating systems
§ Speed
§ Containers are often referred to as “lightweight,”
§ Meaning they share the machine’s operating system (OS) kernel and are not bogged down with this extra
overhead
§ Fault isolation
§ Each containerized application is isolated and operates independently of others
§ The failure of one container does not affect the continued operation of any other containers
Advantages
§ Efficiency
=
§ Software running in containerized environments shares the machine’s OS kernel, and application layers
within a container can be shared across containers
§ Thus, containers are inherently smaller in capacity than a VM and require less start-up time
§ Ease of management
§ A container orchestration platform automates the installation, scaling, and management of containerized
workloads and services
§ Container orchestration platforms can ease management tasks such as scaling containerized apps, rolling
out new versions of apps, and providing monitoring, logging and debugging, among other functions
§ Security
§ The isolation of applications as containers inherently prevents the invasion of malicious code from affecting
other containers or the host system
§ Additionally, security permissions can be defined to automatically block unwanted components from entering
containers or limit communications with unnecessary resources
Popular container platforms
E
§ Docker
§ Windows Server
§ CoreOS rkt
②
Docker
Overview
{
② " " " ""
④ Expose a post
⑤ run the
app
image
Commands related to images
§ Delete an image
> docker image rm <image name>
Commands related to images
§ Tag an image
> docker image tag <image name> <tag>
E-
§ It is created using docker image
§ You can think of container as an object created by using class
§ It consists of
§ Your application code
§ Dependencies
§ Networking
§ Volumes
Commands related to containers
§ Stop a container
> docker container stop <container>
§ Remove a container
> docker container rm <container>
± ÷ a E☒-
container own →
÷÷÷÷:← - task
I
"*
docteerounimage>
↳ createsacontainere]
↳ job
starts the
attached
in mode -
attached
in
&
zde÷
task starts
foreground
captures
terminal
the
-
-
detached
container
in
-
trans
background
two
start
stopped
wogs
already
container
> date : . . . IST
ther
("
"" "" exec . . . .
"" * . ÷ .
IÉwding
µ:""g ¥÷F¥E÷¥
"
port
]
marine
'
fbe
i
.
.
.
"
Microservices
§ Distinctive method of developing software systems that tries to focus on building single-function
modules with well-defined interfaces and operations
§ Is an architectural style that structures an application as a collection of services that are
§ Highly maintainable and testable
§ Loosely coupled
§ Independently deployable
§ Organized around business capabilities
Docker Compose ima
containers
creating
=
creating
§ Run this command to download the current stable release of Docker Compose
[ ]
> sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-
$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
]
version: ‘3’
services:
web: docker -
""" 0*8^1
build: .
ports:
- “9090: 80”
Build and run the application
> docker -
compose build
YAML
Overview
9→fn_uisno+an
Features
§ Matches native data structures of agile methodology and its languages such as Perl, Python, PHP,
Ruby and JavaScript
§ YAML data is portable between programming languages
§ Includes data consistent data model
§ Easily readable by humans
§ Supports one-direction processing
§ Ease of implementation and usage
Basics
=
§ Comment starts with #
§ Comments must be separated from other tokens by whitespaces.
datatypes
a-
scaled
sequence
mapping
Scalars
=
§ E.g.
§ Integer
§ 20
§ 40
§ String
§ Steve
§ “Jobs”
§ ‘USA’
§ Float
§ 4.5
§ 1.23015e+3
Mapping
E-
§ Represents key-value pair
§ The value can be identified by using unique key
§ Key and value are separated by using colon (:)
§ E.g.
§ name: person1
§ address: “India”
§ phone: +9145434345
§ age: 40
§ hobbies:
§ - reading queue
§ - playing
Sequence
E.IT
§ Represents list of values
§ Must be written on separate lines using dash and space
§ Please note that space after dash is mandatory
§ E.g.
§ # pet animals
§ - cat
§ - dog
§ # programming languages
§ -C
§ - C++
§ - Java
Sequence
E
§ E.g.
§ products:
§ - title: product 1
§ price: 100
§ description: good product
§ - title: product 2
§ price: 300
§ description: useful product
Continuous Integration
Overview
←E
§ It is the process of automating the building and testing of code, each time developer commits changes
to the version control system
-
§t
The main aim of CI is to prevent manual integration problem
§ CI requires developers to have frequent builds
7-
§ The common practice is that whenever a code commit occurs, a build should be triggered
"
TM →
ba → ④ →
dep④
Importance
I
§ Improves the product quality by running the various unit test cases every time developer commits changes
§ Increase productivity
§ Automating build of code saves a lot of time, thereby increasing productivity
§ Developer can utilize the time more to develop the code
§ Reduces risk
-
00000
Jenkins Bamboo
TeamCity
GitLab CI Travis CI
Jenkins
Overview
§ Jenkins is a powerful application that allows continuous integration and continuous delivery of projects
- -
-
§ It is a free source that can handle any kind of build or continuous integration
#
- -
§ It was first started as project Hudson at Sun Microsystems in 2004 and was first released in Feb 2005
-
§ In 2011, Oracle created fork of Hudson as Jenkins, since when these two projects exist as two
independent projects
Why Jenkins?
=⇐÷÷:
§ It is fast and reliable
§ It has good OS support .
§ It supports scripted build
In
CI/CD Pipeline
F
*i⇐±
Continuous Delivery Pipeline
s -
U
Continuous Deployment Pipeline
are
f
y U U G automatic
Jenkins Projects
§ Freestyle
§ Used to build the project with any SCM and any build system
§ Pipeline
§ Suitable for building pipelines or organizing complex activities that do not easily fit in the free style
§ Multi configuration
§ Suitable for projects that need large number of different configurations
§ Folder
§ Used to create containers (folders) to organize the jobs
§ GitHub Organization
§ Used for GitHub projects
-0
What is Kubernetes ?
§ Portable, extensible, open-source platform for managing containerized workloads and services
←
§ Facilitates both declarative configuration and automation
§ It has a large, rapidly growing ecosystem
§ Kubernetes services, support, and tools are widely available
§ The name Kubernetes originates from Greek, meaning helmsman or pilot
§ Google open-sourced the Kubernetes project in 2014
Traditional Deployment
_
Operating System
Hardware
Container benefits
§ Increased ease and efficiency of container image creation compared to VM image use
§ Continuous development, integration, and deployment
§ Dev and Ops separation of concerns
§ Observability not only surfaces OS-level information and metrics, but also application health and other
signals
§ Cloud and OS distribution portability
§ Application-centric management:
§ Loosely coupled, distributed, elastic, liberated micro-services
§ Resource isolation: predictable application performance
What Kubernetes provide?
←
§ Storage orchestration
§ Kubernetes allows you to automatically mount a storage system of your choice, such as local storages,
public cloud providers, and more
- -
-
_☒Hki"eo
recreated
§ Self-healing
.
§ Kubernetes restarts containers that fail, replaces containers, kills containers that don’t respond to your user-
==
defined health check, and doesn’t advertise them to clients until they are ready to serve
§ Secret and configuration management
§ Kubernetes lets you store and manage sensitive information, such as passwords, OAuth tokens, and ssh
keys
§ You can deploy and update secrets and application configuration without rebuilding your container images,
and without exposing secrets in your stack configuration
What Kubernetes is not
worker + master
0
Master
0
Node
✓ kube-apiserver
✓
etcd kubelet ✓
✓ kube-scheduler kube-proxy -
✓ cloud-controller-manager
Master Components
§ Master components make global decisions about the and they detect and respond to cluster events
§ Master components can be run on any machine in the cluster
§ kube-apiserver
§ The API server is a component that exposes the Kubernetes API
§ The API server is the front end for the Kubernetes
-
§ etcd
§ Consistent and highly-available key value store used as Kubernetes’ backing store for all cluster data
§ kube-scheduler
§ Component on the master that watches newly created pods that have no node assigned, and selects a node
for them to run on
Master Components
§ kube-controller-manager
§ Component on the master that runs controllers
§ Logically, each controller is a separate process, but to reduce complexity, they are all compiled into a single
binary and run in a single process
§ Types
§ Node Controller: Responsible for noticing and responding when nodes go down.
§ Replication Controller: Responsible for maintaining the correct number of pods for every replication
controller object in the system
§ Endpoints Controller: Populates the Endpoints object (that is, joins Services & Pods)
§ Service Account & Token Controllers: Create default accounts and API access tokens for new
namespaces
§ cloud-controller-manager
§ Runs controllers that interact with the underlying cloud providers
§ The cloud-controller-manager binary is an alpha feature introduced in Kubernetes release 1.6
Node Components
-
work or + master
§ Node components run on every node, maintaining running pods and providing the Kubernetes runtime
- -
environment
§ kubelet
§ An agent that runs on each node in the cluster
§ It makes sure that containers are running in a pod
§ kube-proxy
§ Network proxy that runs on each node in your cluster, implementing part of the Kubernetes service concept
§ kube-proxy maintains network rules on nodes
§ These network rules allow network communication to your Pods from network sessions inside or outside of
your cluster
§ Container Runtime
§ The container runtime is the software that is responsible for running containers
§ Kubernetes supports several container runtimes: Docker, containerd, rktlet, cri-o etc.
Create Cluster
> sudo apt-get update && sudo apt-get install -y apt-transport-https curl
> curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
> cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/kubernetes-
xenial main EOF
> sudo apt-get update
> sudo apt-get install -y kubelet kubeadm kubectl
> sudo apt-mark hold kubelet kubeadm kubectl
Initialize Cluster Master Node
5 join join
4 POD Network
3 initialize
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: httpd
Service
10.100.2.45
Port TargetPort
Service
80
32000
80
10.30.4.6
NodePort
POD
Replication Controller
§ On-disk files in a Container are ephemeral, which presents some problems for non-trivial applications
when running in Containers
§ Problems
§ When a Container crashes, kubelet will restart it, but the files will be lost
§ When running Containers together in a Pod it is often necessary to share files between those Containers
§ The Kubernetes Volume abstraction solves both of these problems
§ A volume outlives any Containers that run within the Pod, and data is preserved across Container
restarts
Namespace
§ Namespaces are intended for use in environments with many users spread across multiple teams, or
projects
§ Namespaces provide a scope for names
§ Names of resources need to be unique within a namespace, but not across namespaces
§ Namespaces can not be nested inside one another and each Kubernetes resource can only be in one
namespace
§ Namespaces are a way to divide cluster resources between multiple users
Container Orchestration
µ
docker swarm
Overview
§ Container orchestration is all about managing the lifecycles of containers, especially in large, dynamic
environments
§ Software teams use container orchestration to control and automate many tasks
§ Provisioning and deployment of containers
§ Redundancy and availability of containers
§ Scaling up or removing containers to spread application load evenly across host infrastructure
§ Movement of containers from one host to another if there is a shortage of resources in a host, or if a host
dies
§ Allocation of resources between containers
§ External exposure of services running in a container with the outside world
§ Load balancing of service discovery between containers
§ Health monitoring of containers and hosts
§ Configuration of an application in relation to the containers running it
Orchestration Tools
§ Docker Swarm
É
§ Kubernetes
§ Mesos
§ Marathon
o
Docker Swarm
Overview
¥
§ It takes multiple Docker Engines running on different hosts and lets you use them together
§ The usage is simple: declare your applications as stacks of services, and let Docker handle the rest
§ Services can be anything from application instances to databases
0
ÉÉ
3
container
2
☒§ ←
Container
✓
'
✓
container
:÷÷÷÷
What is a swarm?
"""
"
desired
Count
1¥)
cluster ( swarm)
worker I worker 2
¥2
§ggmey µ gµymegn→,µg
Load
""
→Seo
Nodes
§ Service
§ A service is the definition of the tasks to execute on the manager or worker nodes
§ It is the central structure of the swarm system and the primary root of user interaction with the swarm
§ When you create a service, you specify which container image to use and which commands to execute
inside running containers
§ Task
§ A task carries a Docker container and the commands to run inside the container
§ It is the atomic scheduling unit of swarm
§ Manager nodes assign tasks to worker nodes according to the number of replicas set in the service scale
§ Once a task is assigned to a node, it cannot move to another node
§ It can only run on the assigned node or fail
Swarm Setup
§ Create swarm
=
> docker swarm init --advertise-addr <MANAGER-IP>
=
> docker swarm join-token worker
§ Deploy a service
> docker service create --replicas <no> --name <name> -p <ports> <image> <command>
§ Inspect service
> docker service inspect <service>
§ Scale service
> docker service scale <service>=<scale>
§ Update service
> docker service update --image <image> <service>
§ Delete service
> docker service rm <service>