SlideShare una empresa de Scribd logo
1 de 66
CHARLES KORN
Software Developer
@charleskorn #EvolutionTW #ThoughtWorks
BUILD AND TESTING
ENVIRONMENTS AS
CODE
…because life’s too short not to
Dollars and Sense, Inc.
International transfers
service
Postgres
database
Exchange rate service
Development environment
Build environment
Build tools
Libraries
RuntimesCode
IDE / text editor
Version control tool
Build environment
Development environment
Build environment Testing environment(s)
THE STATUS QUO
International
transfers service
Data store
Exchange rate
service
Data store
Kafka
CAD
CHF
EUR
GBP
SEK
USD
AUD
WHAT’S WRONG WITH THE STATUS QUO?
Build environments
(In)consistency
Onboarding time
Average onboarding time: 2 hours to 2 weeks
Cost of change
No isolation
Overhead
Team autonomy
(or lack thereof)
Test environments
Flakiness
84% of new test failures at Google are due to flakiness
It’s painful
It’s painful
…which leads to further pain
Inconsistent
High onboarding time
High cost of change
No isolation
High overhead
Lack of team autonomy
Flakiness
It’s painful
Debugging and cycle times
THE IDEA
Build environment
Your computer or a CI agent Build container
Build tools
Libraries
Runtimes
Code directoryCode directory
IDE / text editor
Version control tool
Consistency
Lightweight
Quick onboarding time
30 minutes and 4 seconds from bare metal to running app
Quick setup time
Low cost of change
batect
build and test environments as code tool
DEMO
Test environment
International transfers
service
Postgres
database
Exchange rate service
Unit
Integration
Journey
International transfers
service
Postgres
database
Exchange rate service
International transfers
service
Postgres
database
Exchange rate service
Test driver
Reduced flakiness
Local environment
Integration and journey testing on CI
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
International transfers
service
Postgres
database
Exchange rate service
Test driver
batect
build and test environments as code tool
“What about Docker Compose?”
DEMO
(with apologies to the Beatles)
Path to production
BUT…
IDE integration
Inconsistent
High onboarding time
High cost of change
No isolation
High overhead
Lack of team autonomy
Flakiness
It’s painful
Debugging and cycle times
Consistent
Quick onboarding time
Low cost of change
Isolated
Low overhead
Enables team autonomy
Reduces flakiness
Quick and easy
Easy debugging and short cycle times
Inconsistent
High onboarding time
High cost of change
No isolation
High overhead
Lack of team autonomy
Flakiness
It’s painful
Debugging and cycle times
SO NOW WHAT?
Start small, work incrementally
International transfers
service
Postgres
database
Exchange rate service
International transfers
service
Postgres
database
Exchange rate service
Test driver
github.com/charleskorn/batect
github.com/charleskorn/batect-sample-java
github.com/charleskorn/batect-sample-ruby
THANK YOU

Más contenido relacionado

La actualidad más candente

Deploying systems using AWS DevOps tools
Deploying systems using AWS DevOps toolsDeploying systems using AWS DevOps tools
Deploying systems using AWS DevOps toolsMassTLC
 
Automating secure server baselines with Chef
Automating secure server baselines with ChefAutomating secure server baselines with Chef
Automating secure server baselines with ChefChef Software, Inc.
 
Building A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersBuilding A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersAmazon Web Services
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Amazon Web Services
 
AWS Kochi User Group Presentation
AWS  Kochi User Group PresentationAWS  Kochi User Group Presentation
AWS Kochi User Group PresentationVarun Manik
 
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...Amazon Web Services
 
Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020Varun Manik
 
Deployment Pipeline for databases (Azure SQL Database, SQL Server)
Deployment Pipeline for databases (Azure SQL Database, SQL Server)Deployment Pipeline for databases (Azure SQL Database, SQL Server)
Deployment Pipeline for databases (Azure SQL Database, SQL Server)Eduardo Piairo
 

La actualidad más candente (9)

Deploying systems using AWS DevOps tools
Deploying systems using AWS DevOps toolsDeploying systems using AWS DevOps tools
Deploying systems using AWS DevOps tools
 
Automating secure server baselines with Chef
Automating secure server baselines with ChefAutomating secure server baselines with Chef
Automating secure server baselines with Chef
 
Building A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to ContainersBuilding A CICD Pipeline for Deploying to Containers
Building A CICD Pipeline for Deploying to Containers
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
AWS Kochi User Group Presentation
AWS  Kochi User Group PresentationAWS  Kochi User Group Presentation
AWS Kochi User Group Presentation
 
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
(SPOT302) Under the Covers of AWS: Core Distributed Systems Primitives That P...
 
Event driven infrastructure
Event driven infrastructureEvent driven infrastructure
Event driven infrastructure
 
Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020Aws User Group Singapore Presentation Oct-21-2020
Aws User Group Singapore Presentation Oct-21-2020
 
Deployment Pipeline for databases (Azure SQL Database, SQL Server)
Deployment Pipeline for databases (Azure SQL Database, SQL Server)Deployment Pipeline for databases (Azure SQL Database, SQL Server)
Deployment Pipeline for databases (Azure SQL Database, SQL Server)
 

Similar a Charles Korn- Build & Testing Environments as Code: Because Life's Too Short Not To (Evolution)

DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DevOps Enterprise Summmit
 
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...Gene Kim
 
Docker-native Automated Delivery w/ Caylent
Docker-native Automated Delivery w/ CaylentDocker-native Automated Delivery w/ Caylent
Docker-native Automated Delivery w/ CaylentJP La Torre
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestroKyle Hailey
 
Rapidly Deploy Enterprise Cloud Sandboxes
Rapidly Deploy Enterprise Cloud SandboxesRapidly Deploy Enterprise Cloud Sandboxes
Rapidly Deploy Enterprise Cloud SandboxesElastra
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything ChefMandi Walls
 
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S... Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...Skytap Cloud
 
Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool sangam biradar
 
Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)Pascal Dufour
 
Succesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetSuccesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetHarald Rietman
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBUniFabric
 
Database Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangDatabase Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangRed Gate Software
 
Working on a Skyscraper in the Early Years of the XX Century
Working on a Skyscraper in the Early Years of the XX CenturyWorking on a Skyscraper in the Early Years of the XX Century
Working on a Skyscraper in the Early Years of the XX CenturyMiguel Ferreira
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateChef
 
Azure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarAzure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarCambay Digital
 
Kevin Slade - CV
Kevin Slade - CVKevin Slade - CV
Kevin Slade - CVKevin Slade
 
Let's banish "it works on my machine"
Let's banish "it works on my machine"Let's banish "it works on my machine"
Let's banish "it works on my machine"Stephanie Locke
 

Similar a Charles Korn- Build & Testing Environments as Code: Because Life's Too Short Not To (Evolution) (20)

DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
 
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
 
Docker-native Automated Delivery w/ Caylent
Docker-native Automated Delivery w/ CaylentDocker-native Automated Delivery w/ Caylent
Docker-native Automated Delivery w/ Caylent
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
 
Rapidly Deploy Enterprise Cloud Sandboxes
Rapidly Deploy Enterprise Cloud SandboxesRapidly Deploy Enterprise Cloud Sandboxes
Rapidly Deploy Enterprise Cloud Sandboxes
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
 
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S... Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 
Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool Terrascan - Cloud Native Security Tool
Terrascan - Cloud Native Security Tool
 
Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)
 
Succesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetSuccesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnet
 
manage databases like codebases
manage databases like codebasesmanage databases like codebases
manage databases like codebases
 
SOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DBSOUG_Deployment__Automation_DB
SOUG_Deployment__Automation_DB
 
Database Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest HwangDatabase Build and Release - SQL In The City - Ernest Hwang
Database Build and Release - SQL In The City - Ernest Hwang
 
Working on a Skyscraper in the Early Years of the XX Century
Working on a Skyscraper in the Early Years of the XX CenturyWorking on a Skyscraper in the Early Years of the XX Century
Working on a Skyscraper in the Early Years of the XX Century
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef Automate
 
Azure DevOps Best Practices Webinar
Azure DevOps Best Practices WebinarAzure DevOps Best Practices Webinar
Azure DevOps Best Practices Webinar
 
Kevin Slade - CV
Kevin Slade - CVKevin Slade - CV
Kevin Slade - CV
 
Let's banish "it works on my machine"
Let's banish "it works on my machine"Let's banish "it works on my machine"
Let's banish "it works on my machine"
 

Más de Thoughtworks

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a ProductThoughtworks
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & DogsThoughtworks
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovationThoughtworks
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teamsThoughtworks
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of InnovationThoughtworks
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer ExperienceThoughtworks
 
When we design together
When we design togetherWhen we design together
When we design togetherThoughtworks
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)Thoughtworks
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloudThoughtworks
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of InnovationThoughtworks
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go liveThoughtworks
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the RubiconThoughtworks
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!Thoughtworks
 
Docker container security
Docker container securityDocker container security
Docker container securityThoughtworks
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unitThoughtworks
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Thoughtworks
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to TuringThoughtworks
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked outThoughtworks
 

Más de Thoughtworks (20)

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovation
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
 
When we design together
When we design togetherWhen we design together
When we design together
 
Hardware is hard(er)
Hardware is hard(er)Hardware is hard(er)
Hardware is hard(er)
 
Customer-centric innovation enabled by cloud
 Customer-centric innovation enabled by cloud Customer-centric innovation enabled by cloud
Customer-centric innovation enabled by cloud
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go live
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the Rubicon
 
Error handling
Error handlingError handling
Error handling
 
Your test coverage is a lie!
Your test coverage is a lie!Your test coverage is a lie!
Your test coverage is a lie!
 
Docker container security
Docker container securityDocker container security
Docker container security
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unit
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
 

Último

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Charles Korn- Build & Testing Environments as Code: Because Life's Too Short Not To (Evolution)

Notas del editor

  1. CLICKER ON Thank you for coming Introduce myself A technique I’ve been using for nearly two years A side project of mine for last ~year Using containers for your development environment I’ve used this in the past - apps and libraries Scala backend, Android app, Ruby app, Rust app, Golang, Java, Lambda… Used it at my last two clients Technique makes developer experience much better SLOW DOWN
  2. Let’s pretend: Dollars and Sense Development team for international transfers system (explain what that is) Customers want to be able to transfer money from one country to another Might involve a currency conversion as well
  3. We’re responsible for everything in orange Service in Java Postgres database Consumers make calls to our service to make transfers Depend on exchange rate service in grey Communicate over HTTP Fairly common microservices style architecture Two questions I want to answer today: How do we take code and produce an executable artifact from it? How do we test that artifact before it goes into production? SLOW DOWN
  4. This is where the development environment comes in Two main parts Build environment Tools and configuration needed to build, unit test and package your application
  5. Build environment Compilers Build tools Testing tools ...whatever is needed to go from source code to a unit tested artifact potentially ready for deployment In our example: Java code to JAR Deliberately exclude IDEs etc - part of the development environment, not part of the build environment
  6. Testing environment External dependencies for integration tests etc. eg. databases, queues, caches, other services etc. Might use fakes for some things and actual code for other components Might have multiple configurations (eg. integration testing might have a different configuration compared to journey testing) In our example: service needs database and exchange rate service Our example is pretty simple, but this can quickly become quite complex
  7. How is this normally handled?
  8. Install all the things Most common way Install everything locally Our example: JVM, build tools, Postgres etc. Install dependencies locally Configure locally Usually done manually Ditto for colleagues Ditto for CI agents Ditto for test environments
  9. Development VM Ideally scripted, installs and configures everything automatically Vagrant is popular for this SLOW DOWN
  10. Shared test / integration environments (explain what that is - where we can run the application in a production-like environment for testing with external dependencies) (explain example - advance three times) Real running software All dependencies Representative data Usually built and used by multiple teams (each of the different colours)
  11. (audience participation) Who uses these techniques? (follow up) What are some of the issues you run into? What are the problems with these approaches?
  12. For build environments, there are a number of issues SLOW DOWN
  13. Inconsistency Very easy to get into an inconsistent or undesired state “Configuration drift” Nothing guarantees that your setup is the same as your colleagues’ Even if scripted: nothing stops you from changing stuff Ditto for you compared with CI Less of an issue for Vagrant, but can still drift Impact? Means you might have problems executing particular tasks - just doesn’t work Might have small issues that are difficult to identify and diagnose
  14. Onboarding time New developer joins our team at Dollars and Sense, how long does it take for them to be productive? (advance) Survey: anywhere between 2 hours and 2 weeks Not documented: cue days / weeks of trying to piece everything together Documented but not scripted: documentation probably not up-to-date or incomplete Even if it is scripted or perfectly documented, can take a while
  15. Cost of change Version updates Configuration changes New tools or components Especially hard if setup isn’t scripted - explain why (have to communicate, manually do stuff etc.) Even if scripted, nothing compels you to update your local configuration once it changes, you have to be disciplined, still have to communicate with team Even Vagrant won’t automatically update your environment SLOW DOWN
  16. No isolation All installed tools and configuration apply globally to your machine Some tools are better at this than others (eg. Ruby with RVM, Node / NVM) Even if things are meant to support side-by-side installation, nothing guarantees this Build up cruft over time Working on multiple projects with conflicting requirements becomes painful
  17. Overhead Not an issue for local installation VMs are very heavyweight Use lots of disk space, memory Therefore difficult to run multiple projects at once Because of this, most of the time VMs are not used on CI Go back to all the issues with the ‘install all the things’ approach And now have two ways of managing environments
  18. Team autonomy Development environment affects team autonomy Development environment influences tools, languages, components used Teams need to be able to pick the things that make sense for them and their situation One particular way this manifests itself (esp. in large organisations): CI Ideally you’d have team-specific CI instances, but that doesn’t always happen Often have shared infrastructure End up in one of two situations: All projects constrained to use the same thing No autonomy Projects have specialised CI agents within shared infrastructure Leading to an explosion of different configurations (can be difficult to manage) Or tension encouraging teams to not stray from the beaten path - reduces autonomy
  19. Similar issues for test environments Won’t repeat them all, just important ones
  20. Flakiness Fun fact: 84% of new test failures at Google are due to flakiness Leads to alarm fatigue, ignoring failing tests One of the biggest causes of flaky tests: environmental issues like inconsistency Survey: every response mentioned flakiness of some sort as a contributor to test failures - none mentioned logic issues Source: https://testing.googleblog.com/2016/05/flaky-tests-at-google-and-how-we.html
  21. It’s painful Setting up dependencies (eg. data stores, other services etc.) is a pain Have to do this on each developer machine Have to do this on CI agents potentially As system evolves, have to keep these in sync, update and maintain them As system grows, more dependencies = more pain Survey: some teams spent up to a person-week maintaining environments every month SLOW DOWN
  22. Because this is so painful, often share test environments other teams to reduce effort of maintaining them Which makes everything harder Have to coordinate across teams when making changes …or teams just change things + break stuff for other teams Have to find a setup that works for all teams, rather than being optimised for your team All these teams are responsible for the environment, which means no team is responsible for the environment, leads to it not being looked after
  23. Debugging in test environment This setup makes debugging things harder as well Generally really difficult to spin up the test environment locally Survey: over 50% couldn’t run integration / journey / functional tests locally but wanted to …so you have to debug issues in a shared environment Bad if this environment is shared by your team, even worse if it’s shared by multiple teams Your debugging impacts other people’s work and vice versa Also: cycle time is too long (code change to running in environment takes minutes to hours)
  24. Not a big fan Inconsistent High onboarding time High cost of change No isolation High overhead Lack of team autonomy Flakiness It’s painful Debugging and cycle times
  25. The idea How can we use containerisation to make this much better? SLOW DOWN
  26. Let’s start with the build environment
  27. The idea (explain what’s in the diagram) Picture will be familiar to people who’ve used Docker for build environments before Every time we run a command, we start a new container just for that command, then tear it down afterwards (link to following slides) What are the benefits of this particular approach?
  28. Consistency Can guarantee the same result everywhere - your machine, colleagues’ and CI No configuration drift Due to ephemeral nature Any changes you make are lost as soon as the container stops at the end of the command Because you get a new container every time, you use the currently checked out configuration every time Always have a repeatable, known, clean environment
  29. Lightweight Nature of containers means that it’s very lightweight No overhead of running a whole VM No whole new OS to run or store on disk Makes it very fast to start and run Makes it possible to work on multiple projects at once eg. library and application, backend and frontend No issues running on CI - no resource contention
  30. Isolated Nature of containers Everything is in its own isolated universe Not affected by things outside the container Things outside the container aren’t affected by it -> Can work on multiple projects in parallel safely and easily
  31. Quick to onboard new team members All you need is Docker and your version control tool (eg. Git) Everything else is automatic Talked about two hours to two weeks earlier… (advance) 30m 4s to go from bare metal to build and tests running (20m OS install and VM extensions, ~4m 30s for Docker and Git, ~5m 30s to run everything for the first time) Mauro anecdote - meaningful commit by lunch
  32. Doesn’t come at a cost of setup time Quick to set up for the first time - use existing Docker images or easily build your own
  33. Low cost of change When I say change: mean new tool, new version, new configuration Existing image or Dockerfile defines the build environment Tools Configuration So any time we want to make changes, we just change image or update the Dockerfile Because configuration lives alongside code, it’s versioned alongside the code As soon as we commit, everyone gets the change Next time someone runs a command, they pick up the new environment If we need to go back in history, environment changes too
  34. batect Technique I’ve been using for a while Managing all of this is non-trivial Tried a number of tools over a number of different projects No good tools out there None quite felt right Will talk about one tool in a bit Doing this in a performant way is non-trivial Dealing with proxies is non-trivial Dealing with file permissions issues with Docker on Linux is non-trivial Making sure everything is cleaned up afterwards is non-trivial Creating a good developer experience + good ease of use is tricky Built the tool I’d want to use
  35. That’s the build environment, let’s talk about test environments Technique’s and batect’s strength All of the benefits from before transfer across Consistency Isolation Quick onboarding Low cost of change No longer need a person-week a month
  36. How do we test our service when it’s running with its dependencies? (reiterate parts of the app)
  37. Generally have two kinds of tests: Different people have different terminology Integration tests with individual components (individual classes tested against fake downstream services + real DB) Journey tests that test all parts in end-to-end scenarios from the outside (spin up service against fake services + DB) If you have a UI, might call this functional testing
  38. If we wanted to run those kinds of tests, could we apply some of the principles we used for the build environment? Goal: frictionless development experience
  39. Yes - we can run our service and its dependencies as containers as well (advance animation) And we can run our tests from a container too In this example, we actually reuse our build container with Gradle and JUnit for this, but this could be anything you want If we were building something with a UI, could use headless Chrome + Selenium here Thanks to Docker, can start all of these things quickly, run the tests, then tear everything down (link to following slides) What does this give us? SLOW DOWN
  40. Reduced flakiness Everyone runs the same thing, so flakiness is reduced And if you run into a flaky test, it’s easier to debug, because you can run exactly the same thing locally batect helps you wait until components are ready before starting the tests eg. wait for database to start before starting service -> no flakiness there PENG anecdote: zero flaky tests Matt anecdote: running through this presentation, said ‘reduced’ wasn’t strong enough
  41. Local environment Can spin everything up locally Can reliably run integration and journey testing locally Some situations where that’s not necessarily something you need Can easily do exploratory testing locally Can easily debug things locally with a short cycle time
  42. Integration and journey testing on CI Can now really easily and reliably run integration and journey tests on CI
  43. We have a few containers to manage, and coordinating this gets tricky Let’s take journey testing as an example
  44. First we need to build our app before we start anything
  45. Some images have to be built, others have to be pulled
  46. We also want to make sure we start things in the right order
  47. First, downstream service and database
  48. Then, once they’re ready, start the service
  49. Then, once the service is ready, run the tests (advance) We can also use Docker’s networking features to run this in an isolated network No issues with port conflicts Easy way to address each container within the network
  50. …batect takes care of all of this for you Makes it really easy to define environments like this Really easy to define different configurations for different use cases Integration test Journey test Maybe also want an exploratory manual testing config with fake services …whatever you want Most importantly: can run the exact same thing locally, on your colleague’s machines or on CI, all using the same configuration
  51. What about Docker Compose? #1 question I get Used it in the past for this technique Biggest issue: not designed with this use case in mind With Docker Compose, need some non-trivial script to achieve what we want 170 lines Its strength: standing up a stack But we want: pull together different components in different combinations quickly and temporarily batect makes it easy and natural batect is also significantly faster due to parallelisation On average, 2-3 seconds faster than Docker Compose - 6-14% improvement on total execution time
  52. Spoke earlier about the issues with CI agents - either shared but constrained to same versions or specialised for each team’s requirements With this approach: just need Docker on every CI agent Easy (and safe) to share agents between teams: Agents are all the same Teams can use whatever tools they want, with whatever configuration they want Makes it easy to scale CI resources up and down as needed Just add more of the same when needed, remove them when they’re idle
  53. Path to production Focused on developers so far But all of this is for nothing if we don’t get it into prod and in front of users Can reuse Docker image we use to run the app locally - build it once, test it and push it Nice connection if you’re using Docker all the way through to prod Of course, this technique is more broadly applicable - can use with Lambda, Android etc.
  54. but… Not perfect, there are some gotchas
  55. IDE integration Bit of a pain - most tools expect things to be installed locally eg. IntelliJ expects you to be targeting a locally installed JVM Could use Docker integration in some IDEs (eg. RubyMine, PyCharm) End up having to install some things locally
  56. iOS and OS X apps Need Xcode Can’t run OS X in Docker container, so can’t run Xcode in a container Can still use this technique to create environment around the app eg. backend services an app communicates with Works well for Android apps though
  57. To summarise, we go from… (advance)
  58. …to this Inconsistent -> consistent High onboarding time -> quick onboarding: first meaningful commit by lunch High cost of change -> low cost of change No isolation -> isolated: work on multiple projects in parallel High overhead -> low overhead Lack of team autonomy -> enables it Flakiness -> less flakiness It’s painful -> quick and easy Debugging and cycle times -> easy debugging and short cycle times
  59. Now that I’ve teased you with what’s possible, how can you get started / adopt this for an existing project?
  60. My suggestion Start small, work incrementally Focus on low-hanging fruit Build environment usually makes sense as a first step Be able to run build, unit tests, linting etc.
  61. Then start to look at integration testing, one dependency at a time Focus on areas with biggest bang for buck - eg. flakiest dependency
  62. Then, once you have those components set up, it’s easy to move to journey testing, exploratory testing setup etc
  63. Will send slides around Code up on GitHub now Thank you for coming Questions (or come and chat afterwards)