continuous delivery of microservices ken mugrage - @kmugrage

39
CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

Upload: roxanne-robbins

Post on 19-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY OF MICROSERVICES

Ken Mugrage - @kmugrage

Page 2: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

AGENDA

Introduction

Definitions

Anti-Patterns

Cultural Considerations

Technical Considerations

Testing

Deployment Patterns2

Page 3: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

AMBITIOUS MISSIONSNEED DISRUPTIVE THINKING

3

Page 4: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

DEFINITIONS

4

Page 5: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

MICROSERVICE

Small Autonomous servicesthat work together modeled around a business domain

5

Independently Releasable

Newman, Sam (2015) Building Microservices O’Reilly

Page 6: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS INTEGRATION

Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.

6

http://martinfowler.com/articles/continuousIntegration.html Originally published 10 September 2000

Page 7: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

DEVOPS

DevOps (a clipped compound of "development" and "operations") is a culture, movement or practice that emphasizes the collaboration and communication of both software developers and other information-technology (IT) professionals while automating the process of software delivery and infrastructure changes.[1][2] It aims at establishing a culture and environment where building, testing, and releasing software, can happen rapidly, frequently, and more reliably.

7

https://en.wikipedia.org/wiki/DevOps

http://www.jedi.be/blog/2010/02/12/what-is-this-devops-thing-anyway/

Page 8: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY

Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.

8

Humble, Jez – Farley, David (2010) Continuous Delivery Addison Wesley

Page 9: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY

9

Delivery Team

CommitBuild and Unit Tests

Automated Acceptance

User Acceptance

Deploy

http://continuousdelivery.com/2010/02/continuous-delivery/

Page 10: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

WHAT CD LOOKS LIKE

10

Page 11: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY

You’re doing Continuous Delivery when:

Your software is deployable throughout its lifecycle

Your team prioritizes keeping the software deployable over working on new features

Anybody can get fast, automated feedback on the production readiness of their systems and time somebody makes a change to them

You can perform push-button deployments of any version of the software to any environment on demand

11

Page 12: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY ANTI-PATTERNS

12

Page 13: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

THE REALLY COMPLICATED MONOLITH

13

Newman, Sam (2015) Building Microservices O’Reilly

Page 14: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

DEPLOYING EVERYTHING AT ONCE

14

Page 15: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

REQUIRING SPECIFIC VERSIONS

15

Service 1

Service 2

Service 3

Page 16: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

REQUIRING SPECIFIC VERSIONS

16

Service 1

Service 2

Service 3

Page 17: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CULTURAL CONSIDERATIONS(Spoiler: This is the hardest part)

17

Page 18: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONWAY’S LAW

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

18

http://www.melconway.com/Home/Conways_Law.html

Page 19: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

DEVOPS

19

Page 20: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

TECHNICAL CONSIDERATIONS

20

Page 21: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

ARCHITECTURE

Loose coupling

A change to one service should not require a change to another

High cohesion

Related behavior sits together, unrelated behavior sits elsewhere

21

Page 22: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

INTEGRATION

Avoid breaking changes

Keep your APIs technology agnostic

Make your service simple for consumers

Hide internal implementation detail

22

Page 23: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

IF YOU REALLY NEED A BREAKING CHANGE

We really want to avoid forcing consumers to upgrade in lock step

23

Newman, Sam (2015) Building Microservices O’Reilly

Page 24: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

Getting integration right is the single most important aspect of the technology associated with microservices in my opinion.

Newman, Sam (2015-02-02). Building Microservices.

24

Page 25: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS INTEGRATION

25

Newman, Sam (2015) Building Microservices O’Reilly

Page 26: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS INTEGRATION

26

Newman, Sam (2015) Building Microservices O’Reilly

Page 27: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

BUILD CONSIDERATIONS

A thing gets built exactly once

One host / one service

Consider OS specific deployment packages

Consider building the entire host

27

Page 28: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY

Use fan in / fan out to build confidence

28

Page 29: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CONTINUOUS DELIVERY – THE GOAL

29

Page 30: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

TESTING

30

Page 31: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

TESTING

If you’re doing a lot of manual testing, stop here and address that first

Unit tests

Service tests

A smarter stub service - http://www.mbtest.org/

31

Page 32: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

NONFUNCTIONAL TESTING

32

Page 33: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CROSS FUNCTIONAL TESTING

Performance

Security

Individual services have individual expectations

33

Page 34: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

DEPLOYMENT PATTERNS

34

Page 35: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

BLUE / GREEN DEPLOYMENT

35

http://martinfowler.com/bliki/BlueGreenDeployment.html

Page 36: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

CANARY RELEASE

36

Page 37: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

FURTHER READING

Page 38: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

SUMMARY

The ability to deploy independently is vital

The culture is the hardest part

One service / one host helps find issues

Purpose built tools help the journey

38

Page 39: CONTINUOUS DELIVERY OF MICROSERVICES Ken Mugrage - @kmugrage

THANK YOUhttp://www.thoughtworks.com/go

http://www.go.cd/@goforcd

@kmugrage

http://www.thoughtworks.com/gohttp://www.go.cd/

@goforcd@kmugrage