SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Testing 12-Factor Cloud Apps
Phillip Marlow
October 2022
Approved for Public Release; Distribution Unlimited. Case Number 22-3215
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Too Long; Didn’t Listen
 The flexibility and elasticity of cloud services allows better and more automated
testing – if applications are designed to take advantage of it
 Designing applications and services for the cloud provides increased testability
and security
 This makes applications more resilient against technical and environmental
failures as well as attacks
 It also improves the organization’s ability to deliver on their mission
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
> iam list-user-tags
 Cloud Engineer:
Designed and built both AWS and Azure environments for
large teams
 Systems Engineer:
Focus on the overall system and process to deliver the system
 Developer:
10+ years
 DevOps Engineer:
Automating build, test, deployment, and monitoring
 Security Engineer:
GSE #263, SANS Master’s Degree
 Hacker:
Speaker at DEF CON Cloud Village
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Typical Application Promotion Process
Development.env Test.env Production.env
Application v1.0 Application v1.0
Application v1.0
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Application Development Process
Development Test Production
Application v1.0-
katherine
Application v1.0-jenny
Application v1.1
Application v1.0-
katherine
Application v1.0-jenny
Application v1.1 Application v1.1
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Mature Application Deployment Process
Development
Test
Production
Application v1.0-
katherine
Application v1.0-jenny
Application v1.1
Application v1.0-
katherine
Application v1.0-jenny
Application v1.1 –
instance 1
Application v1.1
Application v1.1 –
instance N
Test
App2 v2.1
App2 v2.1 App2 v2.1
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
The Big Problem
 Can multiple versions of an application be hosted in each environment?
 This design creates choke points on work at each environment
 Especially problematic for the test environment which may be shared by many users
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Designing for the Cloud is Better
 The Twelve-Factor App, developed by Adam
Wiggins & Heroku
 https://12factor.net/
Apps that:
 Use declarative formats for setup automation,
to minimize time and cost for new developers
joining the project;
 Have a clean contract with the underlying
operating system, offering maximum
portability between execution environments;
 Are suitable for deployment on modern cloud
platforms, obviating the need for servers and
systems administration;
 Minimize divergence between development
and production, enabling continuous
deployment for maximum agility;
 And can scale without significant changes to
tooling, architecture, or development
practices.
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Twelve-Factor Alternatives
 Microservices Reference Architecture from NGINX
 https://www.nginx.com/blog/introducing-the-nginx-microservices-
reference-architecture/
 Beyond the Twelve-Factor App by Kevin Hoffman
 https://www.oreilly.com/library/view/beyond-the-twelve-
factor/9781492042631/
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
I. Codebase
 Partially solves the big problem of multiple deploys in an environment
One codebase tracked in revision control, many deploys
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
II. Dependencies
 No reliance on dependencies installed in the deployment environment
makes it possible to scale the number of deployments and environments
as needed
Explicitly declare and isolate dependencies
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
III. Config
 Separating environment specific configuration allows consistent and
independent deployments
 It also ensures that no changes need to be made to the system between
environments, which could potentially compromise the integrity of
previously run tests
Store config in the environment
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
IV. Backing Services
 By treating backing services, such as databases or APIs, as attached
resources, we ensure the application is loosely coupled to those resources
 This enforcement of loose coupling of components makes testing those
components easier
 While this may increase the number of integration tests, this approach
ensures we have a thorough understanding of those integration points
making developing integration tests easier
Treat backing services as attached resources
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
V. Build, Release, Run
 Testing can be run more frequently when build is separated from run
 Ensures no code changes are possible at runtime, so earlier tests remain
valid in the production environment
Strictly separate build and run stages
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
X. Dev/Prod Parity
 Independent tests results are applicable to the final deployment
Keep development, staging, and production as similar as possible
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Wins
 Tests can be run simultaneously AND independently
 It’s easy to add another instance of an app or a whole environment
 Applications are designed for easy integration with other tools, including test
orchestrators and cloud security platforms
 Common operational patterns can be used to make the application more resilient
against a variety of failures and attacks
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
Phillip Marlow
@wolramp
linkedin.com/in/phillipmarlow
Thank You!
pmarlow@mitre.org
© 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.

Weitere ähnliche Inhalte

Ähnlich wie Testing 12-Factor Apps

A secure cloud service deployment framework for DevOps
A secure cloud service deployment framework for DevOpsA secure cloud service deployment framework for DevOps
A secure cloud service deployment framework for DevOps
nooriasukmaningtyas
 
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
Daniel Berg
 
Agile application delivery trio webinar
Agile application delivery trio webinarAgile application delivery trio webinar
Agile application delivery trio webinar
Skytap Cloud
 

Ähnlich wie Testing 12-Factor Apps (20)

Microservices
MicroservicesMicroservices
Microservices
 
Hacking DevOps
Hacking DevOpsHacking DevOps
Hacking DevOps
 
A secure cloud service deployment framework for DevOps
A secure cloud service deployment framework for DevOpsA secure cloud service deployment framework for DevOps
A secure cloud service deployment framework for DevOps
 
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAPSecuring Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
 
The new developer experience
The new developer experienceThe new developer experience
The new developer experience
 
Taming Cloud Sprawl - XConf Europe 2023 - Kief.pdf
Taming Cloud Sprawl - XConf Europe 2023 - Kief.pdfTaming Cloud Sprawl - XConf Europe 2023 - Kief.pdf
Taming Cloud Sprawl - XConf Europe 2023 - Kief.pdf
 
Accelarting Hybrid Cloud Adoption through Use Cases in vCloud Air
Accelarting Hybrid Cloud Adoption through Use Cases in vCloud AirAccelarting Hybrid Cloud Adoption through Use Cases in vCloud Air
Accelarting Hybrid Cloud Adoption through Use Cases in vCloud Air
 
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
 
Improving Software Delivery with DevOps & Software Defined Environments | The...
Improving Software Delivery with DevOps & Software Defined Environments | The...Improving Software Delivery with DevOps & Software Defined Environments | The...
Improving Software Delivery with DevOps & Software Defined Environments | The...
 
Agile application delivery trio webinar
Agile application delivery trio webinarAgile application delivery trio webinar
Agile application delivery trio webinar
 
Applying DevOps, PaaS and cloud for better citizen service outcomes - IBM Fe...
Applying DevOps, PaaS and cloud for better citizen service  outcomes - IBM Fe...Applying DevOps, PaaS and cloud for better citizen service  outcomes - IBM Fe...
Applying DevOps, PaaS and cloud for better citizen service outcomes - IBM Fe...
 
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
 
The Advent of Serverless Technologies
The Advent of Serverless TechnologiesThe Advent of Serverless Technologies
The Advent of Serverless Technologies
 
What is Cloud Testing Everything you need to know.pdf
What is Cloud Testing Everything you need to know.pdfWhat is Cloud Testing Everything you need to know.pdf
What is Cloud Testing Everything you need to know.pdf
 
Information on Cloud-native Applications
Information on Cloud-native ApplicationsInformation on Cloud-native Applications
Information on Cloud-native Applications
 
Exploring Cloud Native Architecture: Its Benefits And Key Components
Exploring Cloud Native Architecture: Its Benefits And Key ComponentsExploring Cloud Native Architecture: Its Benefits And Key Components
Exploring Cloud Native Architecture: Its Benefits And Key Components
 
Cloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key ComponentsCloud Native Architecture: Its Benefits and Key Components
Cloud Native Architecture: Its Benefits and Key Components
 
cloud value for application development
cloud value for application developmentcloud value for application development
cloud value for application development
 
Implementing Cloud-Based DevOps for Distributed Agile Projects
Implementing Cloud-Based DevOps for Distributed Agile ProjectsImplementing Cloud-Based DevOps for Distributed Agile Projects
Implementing Cloud-Based DevOps for Distributed Agile Projects
 
Modernize applications and reduce TCO with Windows containers on Azure Servic...
Modernize applications and reduce TCO with Windows containers on Azure Servic...Modernize applications and reduce TCO with Windows containers on Azure Servic...
Modernize applications and reduce TCO with Windows containers on Azure Servic...
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Testing 12-Factor Apps

  • 1. Testing 12-Factor Cloud Apps Phillip Marlow October 2022 Approved for Public Release; Distribution Unlimited. Case Number 22-3215 © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 2. Too Long; Didn’t Listen  The flexibility and elasticity of cloud services allows better and more automated testing – if applications are designed to take advantage of it  Designing applications and services for the cloud provides increased testability and security  This makes applications more resilient against technical and environmental failures as well as attacks  It also improves the organization’s ability to deliver on their mission © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 3. > iam list-user-tags  Cloud Engineer: Designed and built both AWS and Azure environments for large teams  Systems Engineer: Focus on the overall system and process to deliver the system  Developer: 10+ years  DevOps Engineer: Automating build, test, deployment, and monitoring  Security Engineer: GSE #263, SANS Master’s Degree  Hacker: Speaker at DEF CON Cloud Village © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 4. Typical Application Promotion Process Development.env Test.env Production.env Application v1.0 Application v1.0 Application v1.0 © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 5. Application Development Process Development Test Production Application v1.0- katherine Application v1.0-jenny Application v1.1 Application v1.0- katherine Application v1.0-jenny Application v1.1 Application v1.1 © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 6. Mature Application Deployment Process Development Test Production Application v1.0- katherine Application v1.0-jenny Application v1.1 Application v1.0- katherine Application v1.0-jenny Application v1.1 – instance 1 Application v1.1 Application v1.1 – instance N Test App2 v2.1 App2 v2.1 App2 v2.1 © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 7. The Big Problem  Can multiple versions of an application be hosted in each environment?  This design creates choke points on work at each environment  Especially problematic for the test environment which may be shared by many users © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 8. Designing for the Cloud is Better  The Twelve-Factor App, developed by Adam Wiggins & Heroku  https://12factor.net/ Apps that:  Use declarative formats for setup automation, to minimize time and cost for new developers joining the project;  Have a clean contract with the underlying operating system, offering maximum portability between execution environments;  Are suitable for deployment on modern cloud platforms, obviating the need for servers and systems administration;  Minimize divergence between development and production, enabling continuous deployment for maximum agility;  And can scale without significant changes to tooling, architecture, or development practices. © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 9. Twelve-Factor Alternatives  Microservices Reference Architecture from NGINX  https://www.nginx.com/blog/introducing-the-nginx-microservices- reference-architecture/  Beyond the Twelve-Factor App by Kevin Hoffman  https://www.oreilly.com/library/view/beyond-the-twelve- factor/9781492042631/ © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 10. I. Codebase  Partially solves the big problem of multiple deploys in an environment One codebase tracked in revision control, many deploys © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 11. II. Dependencies  No reliance on dependencies installed in the deployment environment makes it possible to scale the number of deployments and environments as needed Explicitly declare and isolate dependencies © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 12. III. Config  Separating environment specific configuration allows consistent and independent deployments  It also ensures that no changes need to be made to the system between environments, which could potentially compromise the integrity of previously run tests Store config in the environment © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 13. IV. Backing Services  By treating backing services, such as databases or APIs, as attached resources, we ensure the application is loosely coupled to those resources  This enforcement of loose coupling of components makes testing those components easier  While this may increase the number of integration tests, this approach ensures we have a thorough understanding of those integration points making developing integration tests easier Treat backing services as attached resources © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 14. V. Build, Release, Run  Testing can be run more frequently when build is separated from run  Ensures no code changes are possible at runtime, so earlier tests remain valid in the production environment Strictly separate build and run stages © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 15. X. Dev/Prod Parity  Independent tests results are applicable to the final deployment Keep development, staging, and production as similar as possible © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.
  • 16. Wins  Tests can be run simultaneously AND independently  It’s easy to add another instance of an app or a whole environment  Applications are designed for easy integration with other tools, including test orchestrators and cloud security platforms  Common operational patterns can be used to make the application more resilient against a variety of failures and attacks © 2022 THE MITRE CORPORATION. ALL RIGHTS RESERVED.