deploying to production 50+ times a day - calgary agile users group 2015

48
DEPLOYING TO PRODUCTION 50+ TIMES A DAY 1 Stuart Charlton

Upload: stuart-charlton

Post on 10-Aug-2015

112 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

DEPLOYING TO PRODUCTION 50+

TIMES A DAY

1

Stuart Charlton

Page 2: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

SOFTWARE IS EATING THE WORLD

2

Page 3: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

AMAZON.COM FACTS• ~ $90 Billion annual revenue

• May 2011 Stats

• Mean time between deployments: 11.6s

• Max deployments in a single hour: 1,079

• Mean hosts receiving a deploy: 10,000

• Max hosts receiving a deploy: 30,000

3

Page 4: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

WALMART FACTS

• $480 billion annual revenue

• @WalmartLabs is the SF Bay Area Software Company driving R&D

• 100,000 core OpenStack cloud cluster

• Many open source projects

4

Page 5: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

SOFTWARE IS CHANGING INDUSTRIES

5

$3.5B valuation Financial Services

$3.5B valuation Travel & Hospitality

$19.5B valuation Transportation

$3.2B Acquisition by Google Home Automation

$20B valuation Entertainment

$26B Evaluation Automotive

Page 6: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

EVERY COMPANY NEEDS TO BUILD GREAT

SOFTWARE

6

Francisco Gonzalez, CEO

“Banks need to take on Amazon and Google or die. The shift to digital requires a complete overhaul of banks technology…it is a matter of survival.”

Page 7: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

WHAT MAKES THESE COMPANIES TICK?

7

CLOUD PLATFORM

AGILE

Page 8: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

NEW KNOWLEDGE CHANGES THE COURSE

OF HISTORY• Better Technology

• Better Tactics

• Better Strategy

8

Page 9: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

TAKING AGILE & LEAN THINKING

END-TO-END

9

$Busin

ess

Devel

opm

ent

QA

Ope

ratio

nsAn

alytic

sMission: Deliver Value

Page 10: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

TAKING AGILE & LEAN THINKING

END-TO-END

10

$Busin

ess

Devel

opm

ent

QA

Ope

ratio

nsAn

alytic

sTimeline: Months

Page 11: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

ELIMINATE WASTE: WAITING,

WORK IN PROGRESS

11

$Busin

ess

Devel

opm

ent

& Q

A

Ope

ratio

nsAn

alytic

sTimeline: Weeks-Months

Page 12: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

ELIMINATE WASTE: HAND-OFFS,

“NOT MY PROBLEM”

12

$Busin

ess

Devel

oper

s & Q

A

&Ope

rato

rs

Analy

tics

Timeline: Days-Weeks

Page 13: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

BUILDING A DEVOPS CULTURE

• Professional movement

• Sharing culture (end-to-end value)

• “You build it, you run it”

• Anti-fragile, continuous improvement

• Automation and metrics driven

13

Page 14: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

THE BEGINNING: 2001

14

No Smart Phones

But most software ships on CDs

People are excited about the internet

No Cloud Computing

Page 15: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

2001

15

Companies like Google and Amazon were inventing new ways of computing

to solve problems no one had ever dealt with before

Page 16: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

AUTOMATION ENABLES PRODUCTIVITY &

QUALITY

16

Page 17: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

EVERYBODY WANTS TO GO FAST

17

Page 18: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

BUT GOING FAST IS NOT ENOUGH

18

have to go safe

Page 19: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

“OPERATIONS IS THE

19

Page 20: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

PLATFORMS, ARCHITECTURES &

PROCESSES PROTECT US

20

Page 21: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

MONOLITHIC ARCHITECTURE

21

Relational Database

Data Access

Service

HTML JavaScript MVC

Service

Monolithic ApplicationBrowser

Page 22: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

MONOLITHIC ARCHITECTURES

• Modularity Dependent Upon Language / Frameworks

• Change Cycles Tightly Coupled

• Inefficient Scaling

• Can Be Intimidating to New Developers

• Obstacle to Scaling Development

• Requires Long-Term Commitment to Technical Stack 22

Page 23: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

MICROSERVICES

23

…HTTP

HTTP

HTTP

HTTP

HTTP

HTTP

AMQPAMQP

Relational DB

Key/Value Store

Graph DB

Page 24: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

MICROSERVICES• Services Oriented Architecture AND Services-

Oriented Delivery

• Modularity Based on Component Services

• Enable Frequent Deploys

• Efficient Scaling

• Individual Components Less Intimidating to New Developers

• Enables Scaling of Development 24

Page 25: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

CONWAY’S LAW

25

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

organization's communication structure.

Melvyn Conway, 1967

http://martinfowler.com/articles/microservices.html#OrganizedAroundBusinessCapabilities

Page 26: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

SPAN SILOS WITH MICROSERVICES

26

Data Access

Service

HTML JavaScript MVC

Service

UI S

pecialists

Middlew

are S

pecialists

DB

As

Business C

apability

Business C

apability

Business C

apability

Siloed Functional Teams

http://martinfowler.com/articles/microservices.html#OrganizedAroundBusinessCapabilities

Siloed Application Architectures

Cross- functional Teams

Microservice Architectures

Page 27: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

PARTITIONING

• By Noun (e.g. product info service)

• By Verb (e.g. shipping service)

• Single Responsibility Principle(http://programmer.97things.oreilly.com/wiki/index.php/The_Single_Responsibility_Principle)

27

Page 28: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

YOU MUST BE THIS TALL •RAPID PROVISIONING

•BASIC MONITORING

•RAPID APPLICATION DEPLOYMENT

•DEVOPS CULTURE

28

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

https://www.flickr.com/photos/gusset/3723961589

Page 29: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

IT’S GONNA TAKE A PLATFORM…

29

Page 30: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

PLATFORM CAPABILITIES

• Environment Provisioning

• On-Demand/Automatic Scaling

• Failover/Resilience

• Routing/Load Balancing

• Data Service Operations

• Monitoring 30

•Distributed/Versioned Config • Service Registration/Discovery • Routing/Load Balancing • Service Integration • Fault Tolerance • Asynchronous Messaging

Page 31: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

OPEN PLATFORMS

• Cloud Foundry

• Kubernetes

• Docker

• Mesosphere

31

Page 32: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Life as an Operator

Developer Operator

32

Page 33: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Deploy to dev

33

Page 34: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Install services (db, messaging, hadoop, …)

Deploy to dev

34

Page 35: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Install services (db, messaging, hadoop, …)

Setup load-balancing, SSL termination and dynamic routing

Deploy to dev

35

Page 36: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Setup load-balancing, SSL termination and dynamic routing

Setup / config High Availability

Deploy to dev

Install services (db, messaging, hadoop, …)

36

Page 37: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Setup load-balancing, SSL termination and dynamic routing

Setup / config High Availability

Setup APM

Deploy to dev

Install services (db, messaging, hadoop, …)

37

Page 38: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Setup load-balancing, SSL termination and dynamic routing

Setup / config High Availability

Setup APM

Setup log streaming

Deploy to dev

Install services (db, messaging, hadoop, …)

38

Page 39: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Setup load-balancing, SSL termination and dynamic routing

Setup / config High Availability

Setup APM

Setup log streaming

Deploy to dev

App Deployed

Install services (db, messaging, hadoop, …)

39

Page 40: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Install services (db, messaging, hadoop, …)

Setup load-balancing and dynamic routing

Setup / config High Availability

Setup APM

Setup log streaming

Deploy to dev

Deploy to Test

Deploy to QA

Promote to production

Scale up

Update app

Scale down

Redeploy

Unbind service

Bind service

Restart server

Change route

Scale Platform

Create service

Delete App

Blue-green deployment

Check logsEscale memory

Update app server

Change JDK

Upgrade app

40

Page 41: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Install runtime and container

Install services (db, messaging, hadoop, …)

Setup load-balancing and dynamic routing

Setup / config High Availability

Setup APM

Setup log streaming

Deploy to dev

Deploy to Test

Deploy to QA

Promote to production

Scale up

Update app

Scale down

Redeploy

Unbind service

Bind service

Restart server

Change route

Scale Platform

Create service

Delete App

Blue-green deployment

Check logsEscale memory

Update app server

Change JDK

Upgrade app

41

Page 42: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Deploy to dev

Life as a Developer or Operator with a Platform

42

Page 43: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

Deploy to dev

> cf pushCloud

ControllerHealth

Manager

NATS (message bus)

RouterApp Deployed

Using a Platform

43

Page 44: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

WHAT MAKES THESE COMPANIES TICK?

44

CLOUD PLATFORM

AGILE

Page 45: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

AGILE

• Taken truly end-to-end

• Collaborative QA+Operations with Dev

• Continuous Delivery

• Adopting a DevOps Culture

• Adopting Automation at Scale, Responsibly

45

Page 46: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

PLATFORM

• Conway’s Law: Team = Product

• Microservices

• Adopting an Open Platform to Get Started

46

Page 47: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

GET THE BOOKS

47

Page 48: Deploying to Production 50+ Times a Day - Calgary Agile Users Group 2015

WITH THANKS

48

This presentation includes content by:

Andrew Clay Shafer Matt Stine Fred Melo

+ many others @ Pivotal