Devops for Developers

41
Devops for Developers How Dev can write applications ready for Ops Uwe Friedrichsen, codecentric AG, 2013-2014

description

Many developers think DevOps is nice and valuable but consider it a SEP (Somebody Else's Problem) - not because they do not care but simply because they do not know enough about Ops to relate it to their daily work. This presentation tries to fill the gap a bit, clarifies some common misunderstandings and explains the typical needs of an Ops admin. Then a set of design principles is shown that address the needs of an admin and help to build applications ready for Ops - because in the end it's all about production! As always lots of the information of this presentation is on the voice track but yet I think that you can find some helpful pointers in this deck.

Transcript of Devops for Developers

Page 1: Devops for Developers

Devops for Developers How Dev can write applications ready for Ops

Uwe Friedrichsen, codecentric AG, 2013-2014

Page 2: Devops for Developers

@ufried Uwe Friedrichsen | [email protected] | http://slideshare.net/ufried | http://ufried.tumblr.com

Page 3: Devops for Developers

DevOps

Page 4: Devops for Developers

DevOps DevQA DevPO DevRE

DevPM

DevDev DevDevPO

DevDevDev

Page 5: Devops for Developers

It‘s all about production!

Page 6: Devops for Developers

Operations Developers Point of View

Page 7: Devops for Developers

Admin Developers Point of View

Page 8: Devops for Developers

Admin Closer to Reality Point of View

Page 9: Devops for Developers

Top 5 Needs of an Admin 1.  Give me my peace and quiet!

2.  Don‘t make me think!

3.  Let me see that everything is fine!

4.  Show me the problem – now!

5.  Tell me what to do!

Page 10: Devops for Developers

Top 5 Needs of an Admin (translated) 1.  Give me my peace and quiet!

(The application should just run smoothly)

2.  Don‘t make me think! (Rollout, setup and operation of the application should be easy)

3.  Let me see that everything is fine! (The application should show its state)

4.  Show me the problem – now! (The application should provide concise error messages and enable easy root cause drilldown)

5.  Tell me what to do! (The application should be documented properly – including error handling instructions)

Page 11: Devops for Developers

Top 3 Dev Challenges 1.  Manageability

2.  Resilience

3.  Transparency

4.  Documentation

Page 12: Devops for Developers

11 Design Principles

for DevOps-ready Applications

•  Manageability (4)

•  Resilience (5)

•  Transparency (2)

Page 13: Devops for Developers

Manageability

Page 14: Devops for Developers

Deployment

(Manageability)

Page 15: Devops for Developers

•  One-click deployment

•  Preserve settings

•  Provide rollbacks (or roll-forward)

Page 16: Devops for Developers

Configuration

(Manageability)

Page 17: Devops for Developers

•  Avoid multiple configuration procedures

•  Define default value handling

•  Organize change traceability

•  Notification about new parameters

Page 18: Devops for Developers

Configuration Parameter Types

(Manageability)

Page 19: Devops for Developers

•  Context-related parameters Do not stage – managed by stage admin

•  Application-related parameters Must be staged – managed by application admin

•  Business-related parametersMust be staged – managed by business admin

Page 20: Devops for Developers

Backup

(Manageability)

Page 21: Devops for Developers

•  Think about backup purpose

•  Define backup strategy

•  Provide tooling

Page 22: Devops for Developers

Resilience

Page 23: Devops for Developers

Bulkheads

(Resilience)

Page 24: Devops for Developers

•  Divide system in failure units

•  Isolate failure units

•  Define fallback strategy

Page 25: Devops for Developers

Redundancy

(Resilience)

Page 26: Devops for Developers

•  Elaborate use caseMinimize MTTR / scale transactions / handle response errors / …

•  Define routing & balancing strategy Round robin / master-slave / fan-out & quickest one wins / …

•  Consider admin involvementAutomatic vs. manual / notification – monitoring / …

Page 27: Devops for Developers

Loose Coupling

(Resilience)

Page 28: Devops for Developers

•  Isolate failure units (complements bulkheads)

•  Go asynchronous wherever possible

•  Use timeouts & circuit breakers

•  Make actions idempotent

Page 29: Devops for Developers

Fallbacks

(Resilience)

Page 30: Devops for Developers

•  What will you do if a request fails?

•  Consider failure handling from the very beginning

•  Supplement with general failure handling strategies

Page 31: Devops for Developers

Scalability

(Resilience)

Page 32: Devops for Developers

•  Define scaling strategy

•  Think full stack

•  Apply D-I-D rule

•  Design for elasticity

Page 33: Devops for Developers

Transparency

Page 34: Devops for Developers

Monitoring

(Transparency)

Page 35: Devops for Developers

•  Think about required metrics

•  Design hook or event mechanism

•  Plan for changing metrics

•  Consider event sourcing

Page 36: Devops for Developers

Logging

(Transparency)

Page 37: Devops for Developers

•  Consider log message structureAll required information / machine readable / human readable

•  Define logging policy Debug and less: developers perspective / Info and more: operations perspective

Page 38: Devops for Developers

11 Design Principles •  Manageability

•  Deployment •  Configuration •  Configuration Parameter Types •  Backup

•  Resilience •  Bulkheads •  Redundancy •  Loose Coupling •  Fallbacks •  Scalability

•  Transparency •  Monitoring •  Logging

Page 39: Devops for Developers

Wrap-up •  Dev often does not know Ops •  Know the needs of an admin •  Face the challenges for a developer •  Apply the design principles

… and then you‘re ready for DevOps

Page 40: Devops for Developers

@ufried Uwe Friedrichsen | [email protected] | http://slideshare.net/ufried | http://ufried.tumblr.com

Page 41: Devops for Developers