TESTING & DEPLOYING MICROSERVICES Sam Newman Flowcon, - - PowerPoint PPT Presentation

testing deploying microservices
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

TESTING & DEPLOYING MICROSERVICES

Sam Newman Flowcon, September 2014

1
slide-2
SLIDE 2

@samnewman @flowconsf

Accounts Returns Invoicing Shipping Inventory Customer Service

slide-3
SLIDE 3

@samnewman @flowconsf

Accounts Returns Invoicing Shipping Inventory Customer Service

Focused around a business domain

slide-4
SLIDE 4

@samnewman @flowconsf

Accounts Returns Invoicing Shipping Inventory Customer Service

Focused around a business domain Technology Agnostic API

slide-5
SLIDE 5

@samnewman @flowconsf

Accounts Returns Invoicing Shipping Inventory Customer Service

Focused around a business domain Technology Agnostic API Small

slide-6
SLIDE 6

@samnewman @flowconsf

Independently Releasable

slide-7
SLIDE 7

@samnewman @flowconsf

Testing Deployment

slide-8
SLIDE 8

@samnewman @flowconsf Host Service

slide-9
SLIDE 9

@samnewman @flowconsf Host Service Host Service Service Service Service

VS

slide-10
SLIDE 10

@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About

VS

slide-11
SLIDE 11

@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision

VS

slide-12
SLIDE 12

@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects

VS

slide-13
SLIDE 13

@samnewman @flowconsf Host Service Host Service Service Service Service Much Easier To Reason About Easier To Provision Fewer Side-effects

VS

Enforces Interdependence

slide-14
SLIDE 14

@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

slide-15
SLIDE 15

@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

slide-16
SLIDE 16

@samnewman @flowconsf

Reducing Host Management Overhead?

slide-17
SLIDE 17

@samnewman @flowconsf

API-driven Host Provisioning

slide-18
SLIDE 18

@samnewman @flowconsf

Virtualisation Platforms

slide-19
SLIDE 19

@samnewman @flowconsf

VMWare Virtualisation Platforms

slide-20
SLIDE 20

@samnewman @flowconsf

VMWare AWS Digital Ocean Virtualisation Platforms

slide-21
SLIDE 21

@samnewman @flowconsf

Step 0: Provision Host

slide-22
SLIDE 22

@samnewman @flowconsf

Step 0: Provision Host Step 1: Configure Host

slide-23
SLIDE 23

@samnewman @flowconsf

Step 0: Provision Host Step 2: Install Service Step 1: Configure Host

slide-24
SLIDE 24

@samnewman @flowconsf

Step 0: Provision Host Step 2: Install Service Step 1: Configure Host

slide-25
SLIDE 25

@samnewman @flowconsf

slide-26
SLIDE 26

@samnewman @flowconsf Ansible Puppet Chef

slide-27
SLIDE 27

@samnewman @flowconsf Ansible Puppet Chef

slide-28
SLIDE 28

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare

slide-29
SLIDE 29

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant

slide-30
SLIDE 30

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers

slide-31
SLIDE 31

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up

slide-32
SLIDE 32

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic

slide-33
SLIDE 33

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic Feedback Can Suffer

slide-34
SLIDE 34

@samnewman @flowconsf Ansible Puppet Chef AWS Digital Ocean OpenStack VMWare Vagrant Immutable Servers Fast Spin-up Provider Agnostic Feedback Can Suffer Cycle Time

slide-35
SLIDE 35

@samnewman @flowconsf

Immutable Servers

slide-36
SLIDE 36

@samnewman @flowconsf

Cost?

slide-37
SLIDE 37

@samnewman @flowconsf Machine Base OS Hypervisor VM OS Apps VM OS Apps VM OS Apps

slide-38
SLIDE 38

@samnewman @flowconsf Machine Base OS Hypervisor VM OS Apps VM OS Apps VM OS Apps

Expensive!

slide-39
SLIDE 39

@samnewman @flowconsf

slide-40
SLIDE 40

@samnewman @flowconsf

slide-41
SLIDE 41

@samnewman @flowconsf

DOCKER

slide-42
SLIDE 42

@samnewman @flowconsf

DOCKER

Machine

slide-43
SLIDE 43

@samnewman @flowconsf

DOCKER

Machine Base OS

slide-44
SLIDE 44

@samnewman @flowconsf

DOCKER

Machine Base OS Docker

slide-45
SLIDE 45

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps

slide-46
SLIDE 46

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps Apps

slide-47
SLIDE 47

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps Apps Apps

slide-48
SLIDE 48

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps Apps Apps Docker Image Registry

slide-49
SLIDE 49

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps Apps Apps Docker Image Registry

slide-50
SLIDE 50

@samnewman @flowconsf

DOCKER

Machine Base OS Docker Apps Apps Apps Docker Image Registry

slide-51
SLIDE 51

@samnewman @flowconsf

slide-52
SLIDE 52

@samnewman @flowconsf

slide-53
SLIDE 53

@samnewman @flowconsf

Semi-permanent Servers

slide-54
SLIDE 54

@samnewman @flowconsf

Semi-permanent Servers Image-based Deployments

slide-55
SLIDE 55

@samnewman @flowconsf

Semi-permanent Servers Image-based Deployments Docker

slide-56
SLIDE 56

@samnewman @flowconsf

Testing

slide-57
SLIDE 57

@samnewman @flowconsf The Monolith DB

slide-58
SLIDE 58

@samnewman @flowconsf The Monolith DB

slide-59
SLIDE 59

@samnewman @flowconsf The Monolith DB

slide-60
SLIDE 60

@samnewman @flowconsf The Monolith DB

slide-61
SLIDE 61

@samnewman @flowconsf

Inventory Accounts Returns Invoicing Shipping Customer Service

slide-62
SLIDE 62

@samnewman @flowconsf

Inventory Accounts Returns Invoicing Shipping Customer Service Inventory

slide-63
SLIDE 63

@samnewman @flowconsf

Inventory Accounts Returns Invoicing Shipping Customer Service Inventory

slide-64
SLIDE 64

@samnewman @flowconsf

Inventory Accounts

Mountebank http://www.mbtest.org

slide-65
SLIDE 65

@samnewman @flowconsf

Inventory Accounts Stub

Mountebank http://www.mbtest.org

slide-66
SLIDE 66

@samnewman @flowconsf

Shipping Inventory Accounts Returns Invoicing Customer Service

slide-67
SLIDE 67

@samnewman @flowconsf

Shipping Inventory Accounts Returns Invoicing Customer Service

slide-68
SLIDE 68

@samnewman @flowconsf

Shipping Inventory Accounts Returns Invoicing Customer Service

slide-69
SLIDE 69

@samnewman @flowconsf

Shipping Inventory Accounts Returns Invoicing Customer Service

slide-70
SLIDE 70

@samnewman @flowconsf

Shipping Inventory Accounts Returns Invoicing Customer Service

slide-71
SLIDE 71

@samnewman @flowconsf

slide-72
SLIDE 72

@samnewman @flowconsf

Browsers

slide-73
SLIDE 73

@samnewman @flowconsf

Timing Browsers

slide-74
SLIDE 74

@samnewman @flowconsf

Provisioning of Environments Timing Browsers

slide-75
SLIDE 75

@samnewman @flowconsf

Provisioning of Environments Networks Timing Browsers

slide-76
SLIDE 76

@samnewman @flowconsf

Deployment Provisioning of Environments Networks Timing Browsers

slide-77
SLIDE 77

@samnewman @flowconsf

Deployment Provisioning of Environments Networks Timing Browsers Diagnosis

slide-78
SLIDE 78

@samnewman @flowconsf

Shipping Inventory

CONSUMER-DRIVEN CONTRACTS

slide-79
SLIDE 79

@samnewman @flowconsf Expectations

Shipping Inventory

CONSUMER-DRIVEN CONTRACTS

slide-80
SLIDE 80

@samnewman @flowconsf Expectations

Shipping Inventory

CONSUMER-DRIVEN CONTRACTS

slide-81
SLIDE 81

@samnewman @flowconsf Expectations

Prod

Shipping Inventory

CONSUMER-DRIVEN CONTRACTS

slide-82
SLIDE 82

@samnewman @flowconsf Expectations

Prod

Shipping Inventory

CONSUMER-DRIVEN CONTRACTS

slide-83
SLIDE 83

@samnewman @flowconsf

slide-84
SLIDE 84

@samnewman @flowconsf

https://github.com/realestate-com-au/pact

slide-85
SLIDE 85

@samnewman @flowconsf

No Integration Tests?

slide-86
SLIDE 86

@samnewman @flowconsf

Journeys

slide-87
SLIDE 87

@samnewman @flowconsf

Testing

slide-88
SLIDE 88

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests

slide-89
SLIDE 89

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests

slide-90
SLIDE 90

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests Production

slide-91
SLIDE 91

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests Production

Monitoring & Alerting

slide-92
SLIDE 92

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests Production

Monitoring & Alerting

Testers

slide-93
SLIDE 93

@samnewman @flowconsf

Testing

S/M Tests Build Large Tests Production

Monitoring & Alerting

Testers Operations

slide-94
SLIDE 94

@samnewman @flowconsf

Monitoring & Alerting

Testing

slide-95
SLIDE 95

@samnewman @flowconsf

Prod Prod Prod Prod

slide-96
SLIDE 96

@samnewman @flowconsf

Prod Prod Prod Prod QA

slide-97
SLIDE 97

@samnewman @flowconsf

Monitoring & Alerting Testing

slide-98
SLIDE 98

@samnewman @flowconsf

Monitoring & Alerting Testing

slide-99
SLIDE 99

@samnewman @flowconsf

Monitoring & Alerting Testing

slide-100
SLIDE 100

@samnewman @flowconsf

Monitoring & Alerting Testing

slide-101
SLIDE 101

@samnewman @flowconsf

slide-102
SLIDE 102

@samnewman @flowconsf

slide-103
SLIDE 103

@samnewman @flowconsf

SEMANTIC MONITORING

slide-104
SLIDE 104

@samnewman @flowconsf

https://www.flickr.com/photos/robdray/3138644233

slide-105
SLIDE 105

@samnewman @flowconsf

Testing Deployment

slide-106
SLIDE 106

@samnewman @flowconsf

Testing Deployment One-server per host

slide-107
SLIDE 107

@samnewman @flowconsf

Testing Deployment One-server per host Image/docker based artefacts

slide-108
SLIDE 108

@samnewman @flowconsf

Testing Deployment One-server per host Immutable Servers Image/docker based artefacts

slide-109
SLIDE 109

@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

slide-110
SLIDE 110

@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

slide-111
SLIDE 111 37

Sam Newman

Building Microservices

DESIGNING FINE-GRAINED SYSTEMS

slide-112
SLIDE 112

Any questions: @samnewman snewman@thoughtworks.com

THANKS!