adventures in a microservice world at rea group

84
Adventures in a micro-services world May 2014

Upload: evanbottcher

Post on 05-Sep-2014

384 views

Category:

Software


0 download

DESCRIPTION

Presented by Andy Trigg (REA) and Evan Bottcher (ThoughtWorks) at Yow! West conference May 2014.

TRANSCRIPT

Page 1: Adventures in a Microservice world at REA Group

Adventures in a micro-services world

May 2014

Page 2: Adventures in a Microservice world at REA Group

Evan Bottcher @evanbottcher

Andy Trigg @gigantiqandy

Page 3: Adventures in a Microservice world at REA Group

Microservices?

Page 4: Adventures in a Microservice world at REA Group

TriassicPeriod

JurassicPeriod

CretaceousPeriod

Mesozoic Era

Page 5: Adventures in a Microservice world at REA Group
Page 7: Adventures in a Microservice world at REA Group
Page 14: Adventures in a Microservice world at REA Group

Micro-services

Page 15: Adventures in a Microservice world at REA Group

‘Triassic Period’

(source: flickr.com)

Page 16: Adventures in a Microservice world at REA Group

2 services deployed. (3 months+)

Page 17: Adventures in a Microservice world at REA Group

#noops

Page 19: Adventures in a Microservice world at REA Group
Page 20: Adventures in a Microservice world at REA Group

Create a safe environment(as simple and as hard as that)

Page 21: Adventures in a Microservice world at REA Group

Netscaler configs. Firewall rules. Name all the things consistently.

Configured package repository. Cron jobs. Service healthcheck

Run the specs. Run code hygiene. Keep all the gems up to date.

Configure monitoring. Enable NRPE. Configure apache.

Build an RPM. Configure dependencies. Ruby version. Configure

Passenger configs. Logrotate. Splunk forwarder. Logger

Create users. Configure NewRelic. Load rake tasks. Load

Connect to a database. Make connection pooling work.

Externalise configuration. Run database migrations. Chkconfigs.

Page 22: Adventures in a Microservice world at REA Group

(source: flickr.com)

#devops

Page 23: Adventures in a Microservice world at REA Group

If you build it, you support it

Page 24: Adventures in a Microservice world at REA Group

‘Jurassic Period’

(source: wikipedia.org)

Page 25: Adventures in a Microservice world at REA Group

5-10 services. (2 weeks each)

Page 27: Adventures in a Microservice world at REA Group

‘Stencil’ (Service Template)

Page 28: Adventures in a Microservice world at REA Group

Stencil

Page 29: Adventures in a Microservice world at REA Group

Stencil ServiceClone

Page 30: Adventures in a Microservice world at REA Group

Stencil Service

Service

Service

Service

Service

Service

Page 31: Adventures in a Microservice world at REA Group

Stencil Service

Service

Service

Service

Service

Service

Page 32: Adventures in a Microservice world at REA Group

Stencil Service

Service

Service

Service

Service

Service

Patch

Page 33: Adventures in a Microservice world at REA Group

Stencil Service

Service

Service

Service

Service

Service

Page 34: Adventures in a Microservice world at REA Group

Stencil Service

Service

Service

Service

Service

Service

Notify

Page 35: Adventures in a Microservice world at REA Group

Harvest a service template(but don’t start by writing one)

Page 36: Adventures in a Microservice world at REA Group

Sharing things is hard

Page 37: Adventures in a Microservice world at REA Group

Service

Page 38: Adventures in a Microservice world at REA Group

Service Service

Page 39: Adventures in a Microservice world at REA Group

Service Service Service

Page 40: Adventures in a Microservice world at REA Group

Service Service Service

Library

Page 41: Adventures in a Microservice world at REA Group

Service Service Service

Library

ServiceService

Page 42: Adventures in a Microservice world at REA Group

Service Service Service

Library

ServiceService

Service Service Service ServiceService

Service Service Service ServiceService

Service Service Service ServiceService

Page 43: Adventures in a Microservice world at REA Group

Service Service Service

Library

ServiceService

Service Service Service ServiceService

Service Service Service ServiceService

Service Service Service ServiceService

Page 44: Adventures in a Microservice world at REA Group

Be cautious about shared stuff

(copy/paste may not be wrong)

Page 45: Adventures in a Microservice world at REA Group
Page 46: Adventures in a Microservice world at REA Group
Page 47: Adventures in a Microservice world at REA Group

End to end testing is a scam

Page 48: Adventures in a Microservice world at REA Group
Page 49: Adventures in a Microservice world at REA Group

Fast feedback in isolation

Page 50: Adventures in a Microservice world at REA Group

Fast feedback in isolation+

Early detection

Page 51: Adventures in a Microservice world at REA Group

Fast feedback in isolation+

Early detection+

Rapid recovery

Page 52: Adventures in a Microservice world at REA Group

Evaluate the cost-benefit of your tests(particularly slow integration tests)

Page 53: Adventures in a Microservice world at REA Group

Cretaceous Period (Now)

(source: wikimedia.org)

Page 54: Adventures in a Microservice world at REA Group

50+ services. (2 hours each)

Page 55: Adventures in a Microservice world at REA Group

Example

Page 56: Adventures in a Microservice world at REA Group

Condor

Page 57: Adventures in a Microservice world at REA Group

CondorCustomerAcceptance

Page 58: Adventures in a Microservice world at REA Group

CondorCustomerAcceptance

AcceptedContracts Adapter

Page 59: Adventures in a Microservice world at REA Group

CondorCustomerAcceptance

AcceptedContracts Adapter

Contracts

Page 60: Adventures in a Microservice world at REA Group

CondorCustomerAcceptance

AcceptedContracts Adapter

Contracts CDM

Page 61: Adventures in a Microservice world at REA Group

CondorCustomerAcceptance

AcceptedContracts Adapter

Contracts CDM

Contract Proposals

Pricing

Account Manager

Assignments Separate codebases Independently deployed

Page 62: Adventures in a Microservice world at REA Group
Page 63: Adventures in a Microservice world at REA Group
Page 64: Adventures in a Microservice world at REA Group
Page 65: Adventures in a Microservice world at REA Group

Custodianship

Page 66: Adventures in a Microservice world at REA Group

Custodianship

Architectural Direction

Knowledge Transfer

Long Term Asset Health

Support

Page 67: Adventures in a Microservice world at REA Group

Establish Service Custodianship*

(*Only do it better!)

Page 68: Adventures in a Microservice world at REA Group
Page 69: Adventures in a Microservice world at REA Group
Page 70: Adventures in a Microservice world at REA Group

Be cautious about shared stuff (take 2)

Page 71: Adventures in a Microservice world at REA Group

Delivery Engineering

“We are done when there is a consistent approach that allows users a clear set of options to deploy or change the TMI in a monitored, secure.

We aim to remove hurdles that slow our pace of change and ensure the whole team has the knowledge to responsibly operate the system.!This will take as long as it should.” - Hydra’s Vision

Page 72: Adventures in a Microservice world at REA Group

Establish a Delivery Engineering capability

Page 73: Adventures in a Microservice world at REA Group

What is still in progress?

Page 74: Adventures in a Microservice world at REA Group

(source: wikipedia.org)

What does the future hold?

Page 75: Adventures in a Microservice world at REA Group

What have we learnt?

Page 76: Adventures in a Microservice world at REA Group
Page 77: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

Page 78: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

Page 79: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

Page 80: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

• Harvest a service template (or multiple)

Page 81: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

• Harvest a service template (or multiple)

• Evaluate the cost-benefit of your automated tests

Page 82: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

• Harvest a service template (or multiple)

• Evaluate the cost-benefit of your automated tests

• Production is the best test environment

Page 83: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

• Harvest a service template (or multiple)

• Evaluate the cost-benefit of your automated tests

• Production is the best test environment

• Establish service custodianship

Page 84: Adventures in a Microservice world at REA Group

• Create a safe(-ish) isolated environment

• If you build it, you support it

• Be cautious about shared stuff

• Harvest a service template (or multiple)

• Evaluate the cost-benefit of your automated tests

• Production is the best test environment

• Establish service custodianship

• ‘Delivery Engineering’ is a thing