SlideShare a Scribd company logo
Architecting for the Cloud
Len and Matt Bass
Build/Test
Overview
• What is the problem?
• Deployment pipeline
• Integration testing
• Staging
Goal of Developers
• Get code into production with minimum errors and
maximum speed
• In this lecture we are concerned with
– Errors caused by working in a team
– Errors caused by having multiple versions of a system
simultaneously
– Automating the testing process
• Errors equate to delays since it takes time to fix them.
• Between team coordination is another source of
delays. We have already seen a coordination-free
architectural style.
Errors caused by working in a team
• Consider the following scenarios
– A team member suddenly leaves.
– One team member overwrites the code of
another team member
– Code written by one team member must be
integrated with code written by another
• Preventing these errors is the purpose of a
configuration management tool.
Errors caused by having multiple
versions of a system simultaneously
• Consider the following scenarios
– A version of the system is in production and a new
version is being tested
– A problem develops in the production version and
• The problem can be fixed without affecting either the
production version or any development versions
– Two different members of the team are working
on different versions of the system
• Preventing these errors is the purpose of a
version control system
Branches
• Version control systems
– Contain a main “trunk”
– Support the creation of branches for particular sets of
modifications.
• Branches allow for independent evolution of different
streams of work.
– Might have production version, version being UAT tested,
version with new features, version with bug fix being tested
• Once a branch has been released into production, it should
be merged back into the trunk
– May be time consuming depending on how trunk has evolved
since the creation of the branch (delay).
• Best practice is to restrict the number of branches.
Overview
• What is the problem?
• Deployment pipeline
• Integration testing
• Staging
The Deployment Pipeline
Version control and configuration management are combined into a
continuous integration server.
• Build and integration tests are performed as a portion of
continuous integration
• User Acceptance Testing and performance testing are performed as
the last stage before deploying to production. We will call these
steps staging.
• A developer commits to a branch and the remainder of the
deployment pipeline is for that branch.
Environments
• Before we worry about delivery,
we need to worry about the
steps preceding it.
• An environment is a set of
software running on a collection
of virtual machines with defined
external connections.
– Entry is always through a load
balancer
– External references are through
URLs
An environment
Changing environments
• Changing the external
connections changes
the behavior of the
system.
• The difference
between using a
production database
and a test database is
the URL of the
database.
Production Database Test Database
• Developer tests locally and commits latest version of their module to version
control system
• Build is triggered that draws latest version of each module used from version
control system
• If build is successful a machine image is stored in the build environment.
• If build unsuccessful, a message is sent to the development team.
• If developer’s module does not compile then not only that build will break but
builds by any team member whose module depends on the newly committed
module will also break. (delay)
What happens when a developer
commits a change to a branch?
Build environment
Success
Failure
Pre-committests(local)
VersionControlSystemPre-committests(local)
...
CompileandBuild
Commit
Overview
• What is the problem?
• Deployment pipeline
• Integration testing
• Staging
Integration Tests
• If the newly committed module
does not pass testing then testing
any commit by other team
members will also fail.
• Continuous integration servers can
be used to test a build prior to
committing.
• Fixing a broken build or broken
integration test is high priority.
• Tests can use copy of production
environment for services not a
portion of newly built process.
• URLs used to specify location of
services
– build environment
– copy of production environment Build
Environment
Test Harness
Test Input
Test output
Copy of
Production
Environment
Managing the database for integration
testing
• Integration testing will read and write a
database.
• Use a separate test database to prevent
impacting the production database
• The test database is preloaded with test data.
• Executing the tests will produce writes to the
database.
• Check the state of the database as a portion of
verifying the tests.
Complications with test database
• The initial state of the database may not be the
same from one test sequence to another because
tests write to the database
• Reinitialize every time a test sequence is run
• The sequence of tests is important. Some tests
may be dependent on the results of other tests
• Create account must be done before
• Add money to account
• The correctness of the database after tests are
run must be tested by a special utility designed
for that purpose.
Feature Toggles (switches/flags)
• A feature toggle is an alternative to creating a new
branch
• If “toggle is on” then
execute new code
else execute old code
• Widely used in internet companies such as Facebook,
Google, Netflix.
• Requires feature toggle manager to coordinate the
setting of global values for feature toggles.
– Archaius is open source system released by Netflix that,
among other things, acts as a feature toggle manager.
Pluses and Minuses of Feature Toggles
• Pluses
– Allows uncompleted code to be checked in. Toggle feature
off and it will not be executed during test and, hence, will
not break the build
– Allows for flexible deployment process. We will see this
later.
• Minuses
– Clutters code.
– Misuse of feature toggle can have serious consequences.
Knight Capital lost (US) $440 Million in 45 minutes partially
as a result of a repurposed feature toggle.
• Best practice: Remove feature toggles once the code
has been committed to production.
Overview
• What is the problem?
• Deployment pipeline
• Integration testing
• Staging
Staging Testing
• After successful integration
testing
• Machine image does not
change from successful
integration testing
• Mirror input from
production system to
create an input stream for
performance testing
• Production system input
stream will not test new
features. Additional tests
are required for new
features. Staging
Environment
Production
Environment
Staging Testing Database
• Make copy of production database.
– Assumes reasonable size production database
– Some cloud vendors make hourly back ups of
production database, can use one of these as test.
• Ensure writes to database do not affect
production database
• After test completes you will need to check
test database for correctness.
Where do tests come from?
• Test Driven Development advocates writing
tests before developing a feature.
– Results in a collection of tests
• Regression tests – past problems with the
system result in a collection of test cases
• Edge/boundary cases – how well are edge
cases handled?
• Error cases – what happens when erroneous
input occurs?
Additional tests
• Static analyzers
– Analyze code for known problems. E.g. SQL
injection, buffer overflow
– Detect some problems at code level with
modularity
• Dynamic analyzers
– Mainly for security
– Penetration testing. Looks for back door ways into
a system.
Continuous Deployment/Delivery
• Continuous deployment and continuous delivery are
two terms meaning almost the same thing.
• Both terms imply automated movement between
stages of the deployment pipeline.
• Continuous delivery: a developer’s commit triggers a
sequence that automatically results either in failure to
pass tests or in a machine image prepared for
production, i.e. in UAT environment.
• Continuous deployment: a developer’s commit triggers
a sequence that automatically results either in failure
to pass tests or in a machine image being placed into
production, i.e. moved from UAT into production.
Continuous Delivery
• Not all organizations can adopt continuous delivery.
– Banks, for example, require that a human certify any release
– A human examines the output of the AUT/Performance testing
to ensure compliance with various financial regulations
• Continuous delivery assumes a good test suite.
• Some organizations will use continuous delivery with quick
roll backs in case of errors (live testing).
• Continuous delivery
– Virtues – reduces manual intervention and speeds up the
delivery process.
– Drawbacks - implies adherence to a number of constraints that
we will discuss.
Configuration Parameters
• All external references from the environment are specified by URLs
– These constitute the difference between operating in a build
environment, the UAT environment, or the production
environment
• URLs for the different environments can be specified in a database.
• Other configuration parameters can also be specified in the database.
These may vary based on environment or circumstances. E.g.
– Feature toggle values
– Maximum number of virtual machines in autoscaling group.
• At start up, the system is informed of the location of its configuration
parameters, it reads them in, and uses them to perform its duties.
Tools and Scripts
• Specialized tools exist for the different stages
of the deployment pipeline
– Continuous integration tools
– Environment specification and migration tools
• Programs for these tools are called “scripts”
• One (and only one) script should exist that
invokes a system and tells it where to find its
environmental parameters.
Traceability
• Everything to goes into a component in
production should be traceable
– What version of which modules are included in the
component
– What version of the database is being accessed
– What version of dependent systems are being used
– What configuration parameters were set
– What script was used to build the environment and
place the system into production.
– What values of the features toggles were used.
– …
Achieving traceability
• All of the information could be available from a version
control system
• This requires that everything be version controlled –
code, scripts, and dependent systems.
• During operational problems, there is a tendency to
modify the production system via the console. This is
not traceable.
• Best practice is to lock down the environment creation
and modification process to authorized users and
require everyone to go through the process of
modifying a script and checking it in before using it.
Architectural implications of build and
test
• Use feature toggles
• Interact with external world only through
URLs
• Small modules are easier to test.
Summary
• The deployment pipeline describes the steps and the processes to
move code from development to production
– Build
– Staging
– Production
• Associating an environment with each step and restricting
interaction from within the environment to outside the
environment to URLs allows simpler movement through the steps
• Continuous deployment has movement through all of the steps
automated
• Everything should be configuration controlled and access to the
production system should be restricted to configuration controlled
items.

More Related Content

What's hot

Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
Naga Mallala
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
lethibichhoa
 
Jmeter Tester Certification
Jmeter Tester CertificationJmeter Tester Certification
Jmeter Tester Certification
Vskills
 
QSpiders - Introduction to JMeter
QSpiders - Introduction to JMeterQSpiders - Introduction to JMeter
QSpiders - Introduction to JMeter
Qspiders - Software Testing Training Institute
 
Software testing strategies And its types
Software testing  strategies And its typesSoftware testing  strategies And its types
Software testing strategies And its types
MITULJAMANG
 
Performance Testing Overview
Performance Testing OverviewPerformance Testing Overview
Performance Testing Overview
James Venetsanakos
 
API automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CIAPI automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CI
Mykola Kovsh
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
Apica
 
Using JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance TestingUsing JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance Testing
XBOSoft
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
Raluca Suditu
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
Preeti Mishra
 
Load Runner
Load RunnerLoad Runner
Load Runner
Shama Ahsan
 
Performance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingPerformance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity Testing
Akshay Patole
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with Jmeter
Prashanth Kumar
 
Lec25
Lec25Lec25
N-version programming
N-version programmingN-version programming
N-version programming
shabnam0102
 
Software testing and analysis
Software testing and analysisSoftware testing and analysis
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
Tharinda Liyanage
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
jvSlideshare
 
Good vs power automation frameworks
Good vs power automation frameworksGood vs power automation frameworks
Good vs power automation frameworks
Kumar Swamy Dontamsetti
 

What's hot (20)

Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Jmeter Tester Certification
Jmeter Tester CertificationJmeter Tester Certification
Jmeter Tester Certification
 
QSpiders - Introduction to JMeter
QSpiders - Introduction to JMeterQSpiders - Introduction to JMeter
QSpiders - Introduction to JMeter
 
Software testing strategies And its types
Software testing  strategies And its typesSoftware testing  strategies And its types
Software testing strategies And its types
 
Performance Testing Overview
Performance Testing OverviewPerformance Testing Overview
Performance Testing Overview
 
API automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CIAPI automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CI
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
 
Using JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance TestingUsing JMeter and Google Analytics for Software Performance Testing
Using JMeter and Google Analytics for Software Performance Testing
 
Test case management with MTM 2013
Test case management with MTM 2013Test case management with MTM 2013
Test case management with MTM 2013
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
 
Load Runner
Load RunnerLoad Runner
Load Runner
 
Performance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity TestingPerformance Testing using Jmeter and Capacity Testing
Performance Testing using Jmeter and Capacity Testing
 
Performance testing with Jmeter
Performance testing with JmeterPerformance testing with Jmeter
Performance testing with Jmeter
 
Lec25
Lec25Lec25
Lec25
 
N-version programming
N-version programmingN-version programming
N-version programming
 
Software testing and analysis
Software testing and analysisSoftware testing and analysis
Software testing and analysis
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
Good vs power automation frameworks
Good vs power automation frameworksGood vs power automation frameworks
Good vs power automation frameworks
 

Similar to Architecting for the cloud storage build test

Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
Eklove Mohan
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
Divya Tiwari
 
Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy Way
Jordi Pradel
 
Module V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdfModule V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdf
adhithanr
 
Software testing
Software testingSoftware testing
Software testing
Preeti Mishra
 
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific LanguageImproving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Dr. Spock
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
Alex Pop
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
Aviran Mordo
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
Shelley Lambert
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing Frameworks
Moataz Nabil
 
Next-gen Automation Framework
Next-gen Automation FrameworkNext-gen Automation Framework
Next-gen Automation Framework
Kumar Swamy Dontamsetti
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
XPDays
 
Managing Updates with System Center Configuration Manager 2012
Managing Updates with System Center Configuration Manager 2012Managing Updates with System Center Configuration Manager 2012
Managing Updates with System Center Configuration Manager 2012
JasonCondo
 
sst ppt.pptx
sst ppt.pptxsst ppt.pptx
sst ppt.pptx
PRIANKA R
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
Radiant Minds
 
39.Testing-Part3.ppt
39.Testing-Part3.ppt39.Testing-Part3.ppt
39.Testing-Part3.ppt
SapnaRastogi3
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
MusTufa Nullwala
 
SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
MinsasWorld
 
software Engineering process
software Engineering processsoftware Engineering process
software Engineering process
Raheel Aslam
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
Eklove Mohan
 

Similar to Architecting for the cloud storage build test (20)

Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Testing strategies part -1
Testing strategies part -1Testing strategies part -1
Testing strategies part -1
 
Agile Software Testing the Agilogy Way
Agile Software Testing the Agilogy WayAgile Software Testing the Agilogy Way
Agile Software Testing the Agilogy Way
 
Module V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdfModule V - Software Testing Strategies.pdf
Module V - Software Testing Strategies.pdf
 
Software testing
Software testingSoftware testing
Software testing
 
Improving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific LanguageImproving Batch-Process Testing Techniques with a Domain-Specific Language
Improving Batch-Process Testing Techniques with a Domain-Specific Language
 
Automated testing overview
Automated testing overviewAutomated testing overview
Automated testing overview
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
 
Testing Frameworks
Testing FrameworksTesting Frameworks
Testing Frameworks
 
Next-gen Automation Framework
Next-gen Automation FrameworkNext-gen Automation Framework
Next-gen Automation Framework
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Managing Updates with System Center Configuration Manager 2012
Managing Updates with System Center Configuration Manager 2012Managing Updates with System Center Configuration Manager 2012
Managing Updates with System Center Configuration Manager 2012
 
sst ppt.pptx
sst ppt.pptxsst ppt.pptx
sst ppt.pptx
 
Pm 6 testing
Pm 6 testingPm 6 testing
Pm 6 testing
 
39.Testing-Part3.ppt
39.Testing-Part3.ppt39.Testing-Part3.ppt
39.Testing-Part3.ppt
 
Testing throughout the software life cycle
Testing throughout the software life cycleTesting throughout the software life cycle
Testing throughout the software life cycle
 
SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
 
software Engineering process
software Engineering processsoftware Engineering process
software Engineering process
 
Preparing for DevOps
Preparing for DevOpsPreparing for DevOps
Preparing for DevOps
 

More from Len Bass

Devops syllabus
Devops syllabusDevops syllabus
Devops syllabus
Len Bass
 
DevOps Syllabus summer 2020
DevOps Syllabus summer 2020DevOps Syllabus summer 2020
DevOps Syllabus summer 2020
Len Bass
 
11 secure development
11  secure development 11  secure development
11 secure development
Len Bass
 
10 disaster recovery
10 disaster recovery  10 disaster recovery
10 disaster recovery
Len Bass
 
9 postproduction
9 postproduction 9 postproduction
9 postproduction
Len Bass
 
8 pipeline
8 pipeline 8 pipeline
8 pipeline
Len Bass
 
7 configuration management
7 configuration management 7 configuration management
7 configuration management
Len Bass
 
6 microservice architecture
6 microservice architecture6 microservice architecture
6 microservice architecture
Len Bass
 
5 infrastructure security
5 infrastructure security5 infrastructure security
5 infrastructure security
Len Bass
 
4 container management
4  container management4  container management
4 container management
Len Bass
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud
Len Bass
 
1 virtual machines
1 virtual machines1 virtual machines
1 virtual machines
Len Bass
 
2 networking
2 networking2 networking
2 networking
Len Bass
 
Quantum talk
Quantum talkQuantum talk
Quantum talk
Len Bass
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
Len Bass
 
Experience in teaching devops
Experience in teaching devopsExperience in teaching devops
Experience in teaching devops
Len Bass
 
Understanding blockchains
Understanding blockchainsUnderstanding blockchains
Understanding blockchains
Len Bass
 
What is a blockchain
What is a blockchainWhat is a blockchain
What is a blockchain
Len Bass
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systems
Len Bass
 
My first deployment pipeline
My first deployment pipelineMy first deployment pipeline
My first deployment pipeline
Len Bass
 

More from Len Bass (20)

Devops syllabus
Devops syllabusDevops syllabus
Devops syllabus
 
DevOps Syllabus summer 2020
DevOps Syllabus summer 2020DevOps Syllabus summer 2020
DevOps Syllabus summer 2020
 
11 secure development
11  secure development 11  secure development
11 secure development
 
10 disaster recovery
10 disaster recovery  10 disaster recovery
10 disaster recovery
 
9 postproduction
9 postproduction 9 postproduction
9 postproduction
 
8 pipeline
8 pipeline 8 pipeline
8 pipeline
 
7 configuration management
7 configuration management 7 configuration management
7 configuration management
 
6 microservice architecture
6 microservice architecture6 microservice architecture
6 microservice architecture
 
5 infrastructure security
5 infrastructure security5 infrastructure security
5 infrastructure security
 
4 container management
4  container management4  container management
4 container management
 
3 the cloud
3 the cloud 3 the cloud
3 the cloud
 
1 virtual machines
1 virtual machines1 virtual machines
1 virtual machines
 
2 networking
2 networking2 networking
2 networking
 
Quantum talk
Quantum talkQuantum talk
Quantum talk
 
Icsa2018 blockchain tutorial
Icsa2018 blockchain tutorialIcsa2018 blockchain tutorial
Icsa2018 blockchain tutorial
 
Experience in teaching devops
Experience in teaching devopsExperience in teaching devops
Experience in teaching devops
 
Understanding blockchains
Understanding blockchainsUnderstanding blockchains
Understanding blockchains
 
What is a blockchain
What is a blockchainWhat is a blockchain
What is a blockchain
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systems
 
My first deployment pipeline
My first deployment pipelineMy first deployment pipeline
My first deployment pipeline
 

Recently uploaded

Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 

Recently uploaded (20)

Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 

Architecting for the cloud storage build test

  • 1. Architecting for the Cloud Len and Matt Bass Build/Test
  • 2. Overview • What is the problem? • Deployment pipeline • Integration testing • Staging
  • 3. Goal of Developers • Get code into production with minimum errors and maximum speed • In this lecture we are concerned with – Errors caused by working in a team – Errors caused by having multiple versions of a system simultaneously – Automating the testing process • Errors equate to delays since it takes time to fix them. • Between team coordination is another source of delays. We have already seen a coordination-free architectural style.
  • 4. Errors caused by working in a team • Consider the following scenarios – A team member suddenly leaves. – One team member overwrites the code of another team member – Code written by one team member must be integrated with code written by another • Preventing these errors is the purpose of a configuration management tool.
  • 5. Errors caused by having multiple versions of a system simultaneously • Consider the following scenarios – A version of the system is in production and a new version is being tested – A problem develops in the production version and • The problem can be fixed without affecting either the production version or any development versions – Two different members of the team are working on different versions of the system • Preventing these errors is the purpose of a version control system
  • 6. Branches • Version control systems – Contain a main “trunk” – Support the creation of branches for particular sets of modifications. • Branches allow for independent evolution of different streams of work. – Might have production version, version being UAT tested, version with new features, version with bug fix being tested • Once a branch has been released into production, it should be merged back into the trunk – May be time consuming depending on how trunk has evolved since the creation of the branch (delay). • Best practice is to restrict the number of branches.
  • 7. Overview • What is the problem? • Deployment pipeline • Integration testing • Staging
  • 8. The Deployment Pipeline Version control and configuration management are combined into a continuous integration server. • Build and integration tests are performed as a portion of continuous integration • User Acceptance Testing and performance testing are performed as the last stage before deploying to production. We will call these steps staging. • A developer commits to a branch and the remainder of the deployment pipeline is for that branch.
  • 9. Environments • Before we worry about delivery, we need to worry about the steps preceding it. • An environment is a set of software running on a collection of virtual machines with defined external connections. – Entry is always through a load balancer – External references are through URLs An environment
  • 10. Changing environments • Changing the external connections changes the behavior of the system. • The difference between using a production database and a test database is the URL of the database. Production Database Test Database
  • 11. • Developer tests locally and commits latest version of their module to version control system • Build is triggered that draws latest version of each module used from version control system • If build is successful a machine image is stored in the build environment. • If build unsuccessful, a message is sent to the development team. • If developer’s module does not compile then not only that build will break but builds by any team member whose module depends on the newly committed module will also break. (delay) What happens when a developer commits a change to a branch? Build environment Success Failure Pre-committests(local) VersionControlSystemPre-committests(local) ... CompileandBuild Commit
  • 12. Overview • What is the problem? • Deployment pipeline • Integration testing • Staging
  • 13. Integration Tests • If the newly committed module does not pass testing then testing any commit by other team members will also fail. • Continuous integration servers can be used to test a build prior to committing. • Fixing a broken build or broken integration test is high priority. • Tests can use copy of production environment for services not a portion of newly built process. • URLs used to specify location of services – build environment – copy of production environment Build Environment Test Harness Test Input Test output Copy of Production Environment
  • 14. Managing the database for integration testing • Integration testing will read and write a database. • Use a separate test database to prevent impacting the production database • The test database is preloaded with test data. • Executing the tests will produce writes to the database. • Check the state of the database as a portion of verifying the tests.
  • 15. Complications with test database • The initial state of the database may not be the same from one test sequence to another because tests write to the database • Reinitialize every time a test sequence is run • The sequence of tests is important. Some tests may be dependent on the results of other tests • Create account must be done before • Add money to account • The correctness of the database after tests are run must be tested by a special utility designed for that purpose.
  • 16. Feature Toggles (switches/flags) • A feature toggle is an alternative to creating a new branch • If “toggle is on” then execute new code else execute old code • Widely used in internet companies such as Facebook, Google, Netflix. • Requires feature toggle manager to coordinate the setting of global values for feature toggles. – Archaius is open source system released by Netflix that, among other things, acts as a feature toggle manager.
  • 17. Pluses and Minuses of Feature Toggles • Pluses – Allows uncompleted code to be checked in. Toggle feature off and it will not be executed during test and, hence, will not break the build – Allows for flexible deployment process. We will see this later. • Minuses – Clutters code. – Misuse of feature toggle can have serious consequences. Knight Capital lost (US) $440 Million in 45 minutes partially as a result of a repurposed feature toggle. • Best practice: Remove feature toggles once the code has been committed to production.
  • 18. Overview • What is the problem? • Deployment pipeline • Integration testing • Staging
  • 19. Staging Testing • After successful integration testing • Machine image does not change from successful integration testing • Mirror input from production system to create an input stream for performance testing • Production system input stream will not test new features. Additional tests are required for new features. Staging Environment Production Environment
  • 20. Staging Testing Database • Make copy of production database. – Assumes reasonable size production database – Some cloud vendors make hourly back ups of production database, can use one of these as test. • Ensure writes to database do not affect production database • After test completes you will need to check test database for correctness.
  • 21. Where do tests come from? • Test Driven Development advocates writing tests before developing a feature. – Results in a collection of tests • Regression tests – past problems with the system result in a collection of test cases • Edge/boundary cases – how well are edge cases handled? • Error cases – what happens when erroneous input occurs?
  • 22. Additional tests • Static analyzers – Analyze code for known problems. E.g. SQL injection, buffer overflow – Detect some problems at code level with modularity • Dynamic analyzers – Mainly for security – Penetration testing. Looks for back door ways into a system.
  • 23. Continuous Deployment/Delivery • Continuous deployment and continuous delivery are two terms meaning almost the same thing. • Both terms imply automated movement between stages of the deployment pipeline. • Continuous delivery: a developer’s commit triggers a sequence that automatically results either in failure to pass tests or in a machine image prepared for production, i.e. in UAT environment. • Continuous deployment: a developer’s commit triggers a sequence that automatically results either in failure to pass tests or in a machine image being placed into production, i.e. moved from UAT into production.
  • 24. Continuous Delivery • Not all organizations can adopt continuous delivery. – Banks, for example, require that a human certify any release – A human examines the output of the AUT/Performance testing to ensure compliance with various financial regulations • Continuous delivery assumes a good test suite. • Some organizations will use continuous delivery with quick roll backs in case of errors (live testing). • Continuous delivery – Virtues – reduces manual intervention and speeds up the delivery process. – Drawbacks - implies adherence to a number of constraints that we will discuss.
  • 25. Configuration Parameters • All external references from the environment are specified by URLs – These constitute the difference between operating in a build environment, the UAT environment, or the production environment • URLs for the different environments can be specified in a database. • Other configuration parameters can also be specified in the database. These may vary based on environment or circumstances. E.g. – Feature toggle values – Maximum number of virtual machines in autoscaling group. • At start up, the system is informed of the location of its configuration parameters, it reads them in, and uses them to perform its duties.
  • 26. Tools and Scripts • Specialized tools exist for the different stages of the deployment pipeline – Continuous integration tools – Environment specification and migration tools • Programs for these tools are called “scripts” • One (and only one) script should exist that invokes a system and tells it where to find its environmental parameters.
  • 27. Traceability • Everything to goes into a component in production should be traceable – What version of which modules are included in the component – What version of the database is being accessed – What version of dependent systems are being used – What configuration parameters were set – What script was used to build the environment and place the system into production. – What values of the features toggles were used. – …
  • 28. Achieving traceability • All of the information could be available from a version control system • This requires that everything be version controlled – code, scripts, and dependent systems. • During operational problems, there is a tendency to modify the production system via the console. This is not traceable. • Best practice is to lock down the environment creation and modification process to authorized users and require everyone to go through the process of modifying a script and checking it in before using it.
  • 29. Architectural implications of build and test • Use feature toggles • Interact with external world only through URLs • Small modules are easier to test.
  • 30. Summary • The deployment pipeline describes the steps and the processes to move code from development to production – Build – Staging – Production • Associating an environment with each step and restricting interaction from within the environment to outside the environment to URLs allows simpler movement through the steps • Continuous deployment has movement through all of the steps automated • Everything should be configuration controlled and access to the production system should be restricted to configuration controlled items.