SlideShare a Scribd company logo
Laptop Devops
Daniel Lockman - Marcos Mercuri
Putting Modern Infrastructure Automation to Work for Local
Development
Who are you, folks?
Daniel Lockman
Lead developer at TW, started in NY.
Interests include fullstack dev, DevOps, and
data processing/engineering
Marcos Mercuri
Sr Software developer at TW. Been learning
how to make good software for more than
10 years, and still learning.
Why local development and
testing?
THE WHY THE HOW
THE WHAT
NOW
Featuring our friend the dev
workstation
How do these patterns fit
into the modern software
lifecycle?
What’s this all about?
But what’s the problem?
Your friendly neighborhood, the
test environment
Shared test environments have some significant problems in our experience:
● Contention over resources
● Difficulty of change attribution when things go wrong
● Special snowflake test environments
● “NOBODY TOUCH NOTHIN” syndrome
● The data... isn’t always the best
So…….. do it live?
Testing in production has a few clear advantages, and in certain cases can be a
simpler solution.
● You can be sure your code works against real external dependencies
● Doesn’t use additional test resources, less to maintain
● Works best for read-only dependencies
● Need to be very careful when manipulating data or environment for
testing purposes
Won’t be the focus of this presentation.
Why Local Development?
Wait! What is local development
exactly?
“The ability to develop software without external dependencies.”
● Not reliant on an internet connection
● Not reliant on software outside of the laptop
● Not sharing dependencies with other developers
● Ability to create meaningful business value without these dependencies
Some benefits
By writing code on my own computer and checking in “finished” work, I gain
some advantages.
● No internet needed!
● Independent sandboxed environment
● Can make potentially breaking changes without affecting others
● Full control of configuration
● Full access to debugging and logs without external noise
● See if my code actually works before committing to shared codebase
But aren’t some of these really testing…?
So what we really mean is testing
locally
Meaningful development locally means I need to confirm that my code actually
works:
● Calls external services correctly to orchestrate or for getting data
● Abides by contracts for services that depend on it
● Interacts correctly with tightly coupled infrastructure
○ Ex. Database, search, messaging middleware.
● Correctly handles reasonably prod-like test data or configuration
Principles of Local Development
ASAP + ASAP + ACAP
● As Soon As Possible
○ If I can test locally, I don’t need to wait to merge, deploy, etc
● As Sure As Possible
○ I can code on the airplane, and commit my changes, confident that it won’t break on
successive environments
● As Cheaply As Possible
○ I don't need extra environments
Shorten the feedback loop
But I have all these other tests!
Seems pointless...
● You still need to
○ Check it connects well with your infra
○ Connects well with the others dependencies in your machine
● Even with all your automated tests, there’s still room for manual testing
○ For exploratory testing
○ If you want to try some configurations tweaks
○ When a TDD test case is harder to write
There’s always going to be a scenario where you need to boot your service
So How Does This Work?
Introducing the “Developer
Workstation”
Setting up Our Own
Organization’s Services
The Problem
● Lots of different developer laptop environments
● Need to set things up consistently
● Lots of services and libraries that may conflict with local setup
Isolated Software Installs
● Vagrant
● Containers
○ We’re using docker, but there are other options
○ Will probably want some sort of orchestration to run these
common.yml
Dependencies on Infrastructure
Just Download Some Images?
● Often complicated setups or installation of 3rd party systems
● Configuration can widely change the behavior of the software
● Don’t want to write loads of custom scripts
More Hammers!
● Infrastructure Configuration/Orchestration Frameworks
○ Puppet / Chef / Ansible / Saltstack
● Fancier CI pipelines with image layers
Dependencies on External
Services
● How to deal with external dependencies
○ PACT for contract testing
○ Mountebank for stubbing over the wire
Example - Mountebank
How to manage my test data?
Features should be created with basic test datasets
● Flyway
○ Database schema versioning
○ Test data bootstrapping
Example - Flyway
Networking
Our Problems
● Local network environment can be very different than “real” environments
● Lots of services may have conflicting ports
● Orchestration heavy services may have lots of dependencies
○ Don’t want huge test configuration files
Our options
● Docker Networking (beware!)
○ More advanced with Kubernetes, Openshift, etc.
● Networking Middleware
○ Nginx, apache, consul
○ Bonus points if you’re already using it in production
● Full service discovery locally
● Hacking it together
○ This can get complicated quickly
○ Generally need custom scripts for each new service
Guidelines for Using this Magic
What do I want to test locally?
● End-to-end core business logic of service
● Interaction with tightly coupled dependencies
○ Database
○ Messaging system
● Contracts with other services or 3rd parties
● UI
● Bug reproduction
● Exploratory testing
What do I NOT want to test
locally?
● Don’t test performance
○ Too many things different from prod-like environment
● Don’t test the platform
● Depending on the size of your microservice architecture, you don’t want to
test all end-to-end features
Bringing it All Together
Local Development and CI/CD
Reinforce each other
● All services can be created and deployed programmatically
● Local development environment is a step away from creating CI
environments
● Investment in automation should be promoted upwards toward
production
○ Phoenixable environments and tracking of infrastructure changes is very important
for production
○ Test/local environments can be a special case of “real” environment infra-as-code
But do I even need CI anymore?
● YES
○ Local development is still only testing your changes
○ There will always be some things you can’t test locally
● BUT…
○ You can be a bit more liberal with your pipeline
○ Even with more overall steps, your pipeline will fail less frequently
■ Can focus on things that are harder to test locally
○ Average speed through the pipeline will increase
THANK YOU
For questions or suggestions:
Daniel Lockman - dlockman@thoughtworks.com
Marcos Mercuri - mmercuri@thoughtworks.com

More Related Content

What's hot

[QE 2015] Sam Elamin - Monoliths to microservices - a journey
[QE 2015] Sam Elamin - Monoliths to microservices - a journey[QE 2015] Sam Elamin - Monoliths to microservices - a journey
[QE 2015] Sam Elamin - Monoliths to microservices - a journey
Future Processing
 
MuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project VitaMuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project Vita
Pace Integration
 
The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014
Jeremy Schulman
 
SKS in git ops mode
SKS in git ops modeSKS in git ops mode
SKS in git ops mode
Raphaël PINSON
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
nklmish
 
The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018
Daniel Graversen
 
Continuous delivery journey at LesFurets.com
Continuous delivery journey at LesFurets.comContinuous delivery journey at LesFurets.com
Continuous delivery journey at LesFurets.com
Raphaël Brugier
 
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
Dakiry
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018
Gregory Taylor
 
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Gregory Taylor
 
Introduction to Lagom Framework
Introduction to Lagom FrameworkIntroduction to Lagom Framework
Introduction to Lagom Framework
Knoldus Inc.
 
What we do with Go
What we do with GoWhat we do with Go
What we do with Go
MarcelLanz
 
Everything as code
Everything as codeEverything as code
Everything as code
kloia
 
How Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice LandscapeHow Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice Landscape
Adam Arsenault
 
Why golang
Why golangWhy golang
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ IntegrationsMumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
Akshata Sawant
 
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
Codemotion
 
Hyperledger composer (from zero to hero )
Hyperledger composer  (from zero to hero )Hyperledger composer  (from zero to hero )
Hyperledger composer (from zero to hero )
EmanHerawy
 
Of Microservices and Microservices - Robert Munteanu
Of Microservices and Microservices -  Robert MunteanuOf Microservices and Microservices -  Robert Munteanu
Of Microservices and Microservices - Robert Munteanu
mfrancis
 

What's hot (20)

[QE 2015] Sam Elamin - Monoliths to microservices - a journey
[QE 2015] Sam Elamin - Monoliths to microservices - a journey[QE 2015] Sam Elamin - Monoliths to microservices - a journey
[QE 2015] Sam Elamin - Monoliths to microservices - a journey
 
MuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project VitaMuleSoft London Community September 2020 - Project Vita
MuleSoft London Community September 2020 - Project Vita
 
The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014The Rules of Network Automation - Interop/NYC 2014
The Rules of Network Automation - Interop/NYC 2014
 
SKS in git ops mode
SKS in git ops modeSKS in git ops mode
SKS in git ops mode
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018The current state of SAP Integration, SAPPHIRENOW 2018
The current state of SAP Integration, SAPPHIRENOW 2018
 
Continuous delivery journey at LesFurets.com
Continuous delivery journey at LesFurets.comContinuous delivery journey at LesFurets.com
Continuous delivery journey at LesFurets.com
 
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018
 
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
 
Introduction to Lagom Framework
Introduction to Lagom FrameworkIntroduction to Lagom Framework
Introduction to Lagom Framework
 
What we do with Go
What we do with GoWhat we do with Go
What we do with Go
 
Everything as code
Everything as codeEverything as code
Everything as code
 
How Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice LandscapeHow Hootsuite Manages Its Growing Microservice Landscape
How Hootsuite Manages Its Growing Microservice Landscape
 
Why golang
Why golangWhy golang
Why golang
 
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ IntegrationsMumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
Mumbai MuleSoft Meetup #19 - Anypoint monitoring and MQ Integrations
 
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
Democratizing Serverless: the New Open Source, Cloud Agnostic Functions Platf...
 
Hyperledger composer (from zero to hero )
Hyperledger composer  (from zero to hero )Hyperledger composer  (from zero to hero )
Hyperledger composer (from zero to hero )
 
Of Microservices and Microservices - Robert Munteanu
Of Microservices and Microservices -  Robert MunteanuOf Microservices and Microservices -  Robert Munteanu
Of Microservices and Microservices - Robert Munteanu
 
Tce automation-d4
Tce automation-d4Tce automation-d4
Tce automation-d4
 

Similar to Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Development - Marcos Mercuri & Daniel Lockman

Monitoring and automation
Monitoring and automationMonitoring and automation
Monitoring and automation
Ricardo Bánffy
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
Fwdays
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
Sigma Software
 
Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)
ncoghlan_dev
 
Path dependent-development (PyCon India)
Path dependent-development (PyCon India)Path dependent-development (PyCon India)
Path dependent-development (PyCon India)
ncoghlan_dev
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
Daniel Fahlke
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
VMware Tanzu
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
David Funaro
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
Yshay Yaacobi
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
Brett Child
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.
Kris Buytaert
 
Break Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus MerrellBreak Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus Merrell
Sauce Labs
 
Continuous integration (eng)
Continuous integration (eng)Continuous integration (eng)
Continuous integration (eng)
Anatoliy Okhotnikov
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
Dave Cross
 
Investing in a good software factory and automating the build process
Investing in a good software factory and automating the build processInvesting in a good software factory and automating the build process
Investing in a good software factory and automating the build process
Nicolas Mas
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Pôle Systematic Paris-Region
 
The Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingThe Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security Testing
Matt Tesauro
 
Serverless java
Serverless   javaServerless   java
Serverless java
Vishwas N
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
Lars Thorup
 

Similar to Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Development - Marcos Mercuri & Daniel Lockman (20)

Monitoring and automation
Monitoring and automationMonitoring and automation
Monitoring and automation
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)
 
Path dependent-development (PyCon India)
Path dependent-development (PyCon India)Path dependent-development (PyCon India)
Path dependent-development (PyCon India)
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Evolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand RaoEvolving to Cloud-Native - Anand Rao
Evolving to Cloud-Native - Anand Rao
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.
 
Break Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus MerrellBreak Up the Monolith- Testing Microservices by Marcus Merrell
Break Up the Monolith- Testing Microservices by Marcus Merrell
 
Continuous integration (eng)
Continuous integration (eng)Continuous integration (eng)
Continuous integration (eng)
 
The Professional Programmer
The Professional ProgrammerThe Professional Programmer
The Professional Programmer
 
Investing in a good software factory and automating the build process
Investing in a good software factory and automating the build processInvesting in a good software factory and automating the build process
Investing in a good software factory and automating the build process
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...
 
The Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security TestingThe Final Frontier, Automating Dynamic Security Testing
The Final Frontier, Automating Dynamic Security Testing
 
Serverless java
Serverless   javaServerless   java
Serverless java
 
High Performance Software Engineering Teams
High Performance Software Engineering TeamsHigh Performance Software Engineering Teams
High Performance Software Engineering Teams
 

More from Thoughtworks

Design System as a Product
Design System as a ProductDesign System as a Product
Design System as a Product
Thoughtworks
 
Designers, Developers & Dogs
Designers, Developers & DogsDesigners, Developers & Dogs
Designers, Developers & Dogs
Thoughtworks
 
Cloud-first for fast innovation
Cloud-first for fast innovationCloud-first for fast innovation
Cloud-first for fast innovation
Thoughtworks
 
More impact with flexible teams
More impact with flexible teamsMore impact with flexible teams
More impact with flexible teams
Thoughtworks
 
Culture of Innovation
Culture of InnovationCulture of Innovation
Culture of Innovation
Thoughtworks
 
Dual-Track Agile
Dual-Track AgileDual-Track Agile
Dual-Track Agile
Thoughtworks
 
Developer Experience
Developer ExperienceDeveloper Experience
Developer Experience
Thoughtworks
 
When we design together
When we design togetherWhen we design together
When we design together
Thoughtworks
 
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 cloud
Thoughtworks
 
Amazon's Culture of Innovation
Amazon's Culture of InnovationAmazon's Culture of Innovation
Amazon's Culture of Innovation
Thoughtworks
 
When in doubt, go live
When in doubt, go liveWhen in doubt, go live
When in doubt, go live
Thoughtworks
 
Don't cross the Rubicon
Don't cross the RubiconDon't cross the Rubicon
Don't cross the Rubicon
Thoughtworks
 
Error handling
Error handlingError handling
Error handling
Thoughtworks
 
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 security
Thoughtworks
 
Redefining the unit
Redefining the unitRedefining the unit
Redefining the unit
Thoughtworks
 
Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22Technology Radar Webinar UK - Vol. 22
Technology Radar Webinar UK - Vol. 22
Thoughtworks
 
A Tribute to Turing
A Tribute to TuringA Tribute to Turing
A Tribute to Turing
Thoughtworks
 
Rsa maths worked out
Rsa maths worked outRsa maths worked out
Rsa maths worked out
Thoughtworks
 

More from 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
 

Recently uploaded

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
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
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
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
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
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
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
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
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 

Recently uploaded (20)

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
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
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
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...
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
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
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
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 Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 

Laptop Devops: Putting Modern Infrastructure Automation to Work For Local Development - Marcos Mercuri & Daniel Lockman

  • 1. Laptop Devops Daniel Lockman - Marcos Mercuri Putting Modern Infrastructure Automation to Work for Local Development
  • 2. Who are you, folks? Daniel Lockman Lead developer at TW, started in NY. Interests include fullstack dev, DevOps, and data processing/engineering Marcos Mercuri Sr Software developer at TW. Been learning how to make good software for more than 10 years, and still learning.
  • 3. Why local development and testing? THE WHY THE HOW THE WHAT NOW Featuring our friend the dev workstation How do these patterns fit into the modern software lifecycle? What’s this all about?
  • 4. But what’s the problem?
  • 5. Your friendly neighborhood, the test environment Shared test environments have some significant problems in our experience: ● Contention over resources ● Difficulty of change attribution when things go wrong ● Special snowflake test environments ● “NOBODY TOUCH NOTHIN” syndrome ● The data... isn’t always the best
  • 6. So…….. do it live? Testing in production has a few clear advantages, and in certain cases can be a simpler solution. ● You can be sure your code works against real external dependencies ● Doesn’t use additional test resources, less to maintain ● Works best for read-only dependencies ● Need to be very careful when manipulating data or environment for testing purposes Won’t be the focus of this presentation.
  • 8. Wait! What is local development exactly? “The ability to develop software without external dependencies.” ● Not reliant on an internet connection ● Not reliant on software outside of the laptop ● Not sharing dependencies with other developers ● Ability to create meaningful business value without these dependencies
  • 9. Some benefits By writing code on my own computer and checking in “finished” work, I gain some advantages. ● No internet needed! ● Independent sandboxed environment ● Can make potentially breaking changes without affecting others ● Full control of configuration ● Full access to debugging and logs without external noise ● See if my code actually works before committing to shared codebase But aren’t some of these really testing…?
  • 10. So what we really mean is testing locally Meaningful development locally means I need to confirm that my code actually works: ● Calls external services correctly to orchestrate or for getting data ● Abides by contracts for services that depend on it ● Interacts correctly with tightly coupled infrastructure ○ Ex. Database, search, messaging middleware. ● Correctly handles reasonably prod-like test data or configuration
  • 11. Principles of Local Development
  • 12. ASAP + ASAP + ACAP ● As Soon As Possible ○ If I can test locally, I don’t need to wait to merge, deploy, etc ● As Sure As Possible ○ I can code on the airplane, and commit my changes, confident that it won’t break on successive environments ● As Cheaply As Possible ○ I don't need extra environments Shorten the feedback loop
  • 13. But I have all these other tests! Seems pointless... ● You still need to ○ Check it connects well with your infra ○ Connects well with the others dependencies in your machine ● Even with all your automated tests, there’s still room for manual testing ○ For exploratory testing ○ If you want to try some configurations tweaks ○ When a TDD test case is harder to write There’s always going to be a scenario where you need to boot your service
  • 14. So How Does This Work?
  • 16. Setting up Our Own Organization’s Services
  • 17. The Problem ● Lots of different developer laptop environments ● Need to set things up consistently ● Lots of services and libraries that may conflict with local setup
  • 18. Isolated Software Installs ● Vagrant ● Containers ○ We’re using docker, but there are other options ○ Will probably want some sort of orchestration to run these
  • 21. Just Download Some Images? ● Often complicated setups or installation of 3rd party systems ● Configuration can widely change the behavior of the software ● Don’t want to write loads of custom scripts
  • 22. More Hammers! ● Infrastructure Configuration/Orchestration Frameworks ○ Puppet / Chef / Ansible / Saltstack ● Fancier CI pipelines with image layers
  • 23.
  • 24.
  • 25. Dependencies on External Services ● How to deal with external dependencies ○ PACT for contract testing ○ Mountebank for stubbing over the wire
  • 27. How to manage my test data? Features should be created with basic test datasets ● Flyway ○ Database schema versioning ○ Test data bootstrapping
  • 30. Our Problems ● Local network environment can be very different than “real” environments ● Lots of services may have conflicting ports ● Orchestration heavy services may have lots of dependencies ○ Don’t want huge test configuration files
  • 31. Our options ● Docker Networking (beware!) ○ More advanced with Kubernetes, Openshift, etc. ● Networking Middleware ○ Nginx, apache, consul ○ Bonus points if you’re already using it in production ● Full service discovery locally ● Hacking it together ○ This can get complicated quickly ○ Generally need custom scripts for each new service
  • 32. Guidelines for Using this Magic
  • 33. What do I want to test locally? ● End-to-end core business logic of service ● Interaction with tightly coupled dependencies ○ Database ○ Messaging system ● Contracts with other services or 3rd parties ● UI ● Bug reproduction ● Exploratory testing
  • 34. What do I NOT want to test locally? ● Don’t test performance ○ Too many things different from prod-like environment ● Don’t test the platform ● Depending on the size of your microservice architecture, you don’t want to test all end-to-end features
  • 35. Bringing it All Together
  • 36. Local Development and CI/CD Reinforce each other ● All services can be created and deployed programmatically ● Local development environment is a step away from creating CI environments ● Investment in automation should be promoted upwards toward production ○ Phoenixable environments and tracking of infrastructure changes is very important for production ○ Test/local environments can be a special case of “real” environment infra-as-code
  • 37. But do I even need CI anymore? ● YES ○ Local development is still only testing your changes ○ There will always be some things you can’t test locally ● BUT… ○ You can be a bit more liberal with your pipeline ○ Even with more overall steps, your pipeline will fail less frequently ■ Can focus on things that are harder to test locally ○ Average speed through the pipeline will increase
  • 38. THANK YOU For questions or suggestions: Daniel Lockman - dlockman@thoughtworks.com Marcos Mercuri - mmercuri@thoughtworks.com