TESTING & DEPLOYING MICROSERVICES
Sam Newman Flowcon, September 2014
1
TESTING & DEPLOYING MICROSERVICES Sam Newman Flowcon, - - PowerPoint PPT Presentation
TESTING & DEPLOYING MICROSERVICES Sam Newman Flowcon, September 2014 1 Shipping Returns Customer Service Invoicing Accounts Inventory @ fl owconsf @samnewman Focused around a business domain Shipping Returns Customer Service
Sam Newman Flowcon, September 2014
1@samnewman @flowconsf
Accounts Returns Invoicing Shipping Inventory Customer Service
@samnewman @flowconsf
Accounts Returns Invoicing Shipping Inventory Customer Service
Focused around a business domain
@samnewman @flowconsf
Accounts Returns Invoicing Shipping Inventory Customer Service
Focused around a business domain Technology Agnostic API
@samnewman @flowconsf
Accounts Returns Invoicing Shipping Inventory Customer Service
Focused around a business domain Technology Agnostic API Small
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf Host Service
@samnewman @flowconsf Host Service Host Service Service Service Service
VS
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About
VS
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision
VS
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects
VS
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects
VS
Enforces Interdependence
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects Lower host-management overhead
VS
Enforces Interdependence
@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects Cheaper! Lower host-management overhead
VS
Enforces Interdependence
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf
Virtualisation Platforms
@samnewman @flowconsf
VMWare Virtualisation Platforms
@samnewman @flowconsf
VMWare AWS Digital Ocean Virtualisation Platforms
@samnewman @flowconsf
Step 0: Provision Host
@samnewman @flowconsf
Step 0: Provision Host Step 1: Configure Host
@samnewman @flowconsf
Step 0: Provision Host Step 2: Install Service Step 1: Configure Host
@samnewman @flowconsf
Step 0: Provision Host Step 2: Install Service Step 1: Configure Host
@samnewman @flowconsf
@samnewman @flowconsf Ansible Puppet Chef
@samnewman @flowconsf Ansible Puppet Chef
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic Feedback Can Suffer
@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic Feedback Can Suffer Cycle Time
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf Machine Base OS Hypervisor VM OS Apps VM OS Apps VM OS Apps
@samnewman @flowconsf Machine Base OS Hypervisor VM OS Apps VM OS Apps VM OS Apps
Expensive!
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf
DOCKER
@samnewman @flowconsf
DOCKER
Machine
@samnewman @flowconsf
DOCKER
Machine Base OS
@samnewman @flowconsf
DOCKER
Machine Base OS Docker
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps Apps
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps Apps Apps
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps Apps Apps Docker Image Registry
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps Apps Apps Docker Image Registry
@samnewman @flowconsf
DOCKER
Machine Base OS Docker Apps Apps Apps Docker Image Registry
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf
Semi-permanent Servers
@samnewman @flowconsf
Semi-permanent Servers Image-based Deployments
@samnewman @flowconsf
Semi-permanent Servers Image-based Deployments Docker
@samnewman @flowconsf
@samnewman @flowconsf The Monolith DB
@samnewman @flowconsf The Monolith DB
@samnewman @flowconsf The Monolith DB
@samnewman @flowconsf The Monolith DB
@samnewman @flowconsf
Inventory Accounts Returns Invoicing Shipping Customer Service
@samnewman @flowconsf
Inventory Accounts Returns Invoicing Shipping Customer Service Inventory
@samnewman @flowconsf
Inventory Accounts Returns Invoicing Shipping Customer Service Inventory
@samnewman @flowconsf
Inventory Accounts
Mountebank http://www.mbtest.org
@samnewman @flowconsf
Inventory Accounts Stub
Mountebank http://www.mbtest.org
@samnewman @flowconsf
Shipping Inventory Accounts Returns Invoicing Customer Service
@samnewman @flowconsf
Shipping Inventory Accounts Returns Invoicing Customer Service
@samnewman @flowconsf
Shipping Inventory Accounts Returns Invoicing Customer Service
@samnewman @flowconsf
Shipping Inventory Accounts Returns Invoicing Customer Service
@samnewman @flowconsf
Shipping Inventory Accounts Returns Invoicing Customer Service
@samnewman @flowconsf
@samnewman @flowconsf
Browsers
@samnewman @flowconsf
Timing Browsers
@samnewman @flowconsf
Provisioning of Environments Timing Browsers
@samnewman @flowconsf
Provisioning of Environments Networks Timing Browsers
@samnewman @flowconsf
Deployment Provisioning of Environments Networks Timing Browsers
@samnewman @flowconsf
Deployment Provisioning of Environments Networks Timing Browsers Diagnosis
@samnewman @flowconsf
Shipping Inventory
CONSUMER-DRIVEN CONTRACTS
@samnewman @flowconsf Expectations
Shipping Inventory
CONSUMER-DRIVEN CONTRACTS
@samnewman @flowconsf Expectations
Shipping Inventory
CONSUMER-DRIVEN CONTRACTS
@samnewman @flowconsf Expectations
Prod
Shipping Inventory
CONSUMER-DRIVEN CONTRACTS
@samnewman @flowconsf Expectations
Prod
Shipping Inventory
CONSUMER-DRIVEN CONTRACTS
@samnewman @flowconsf
@samnewman @flowconsf
https://github.com/realestate-com-au/pact
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf
Testing
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests Production
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests Production
Monitoring & Alerting
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests Production
Monitoring & Alerting
Testers
@samnewman @flowconsf
Testing
S/M Tests Build Large Tests Production
Monitoring & Alerting
Testers Operations
@samnewman @flowconsf
Monitoring & Alerting
@samnewman @flowconsf
Prod Prod Prod Prod
@samnewman @flowconsf
Prod Prod Prod Prod QA
@samnewman @flowconsf
Monitoring & Alerting Testing
@samnewman @flowconsf
Monitoring & Alerting Testing
@samnewman @flowconsf
Monitoring & Alerting Testing
@samnewman @flowconsf
Monitoring & Alerting Testing
@samnewman @flowconsf
@samnewman @flowconsf
@samnewman @flowconsf
SEMANTIC MONITORING
@samnewman @flowconsf
https://www.flickr.com/photos/robdray/3138644233
@samnewman @flowconsf
Testing Deployment
@samnewman @flowconsf
Testing Deployment One-server per host
@samnewman @flowconsf
Testing Deployment One-server per host Image/docker based artefacts
@samnewman @flowconsf
Testing Deployment One-server per host Immutable Servers Image/docker based artefacts
@samnewman @flowconsf
Testing Pre-Release Validation
Consumer-driven Contracts Single-server Tests Journey Tests
Deployment One-server per host Immutable Servers Image/docker based artefacts
@samnewman @flowconsf
Testing Post-Release Validation
Semantic Monitoring
Pre-Release Validation
Consumer-driven Contracts Single-server Tests Journey Tests
Deployment One-server per host Immutable Servers Image/docker based artefacts
Sam Newman
DESIGNING FINE-GRAINED SYSTEMS
Any questions: @samnewman snewman@thoughtworks.com