Slide 1

Slide 1 text

© Copyright 2014 Pivotal. All rights reserved. © Copyright 2015 Pivotal. All rights reserved. DevOps Best Practices You can’t do today’s job with yesterday’s tools and still be in business tomorrow 1 DevOps Singapore | July 2015 Sergiu Bodiu | Pivotal @dreamsergiu

Slide 2

Slide 2 text

© Copyright 2015 Pivotal. All rights reserved. 2 My Personal Journey meetup.com/singasug https://speakerdeck.com/sergiubodiu/devops-best-practices [email protected]

Slide 3

Slide 3 text

Hypothetical example from our daily life 3

Slide 4

Slide 4 text

Meet Henry (Business Owner) He needs an app built in the next 8 weeks He knows what the app should do He expects competitors to try to beat us to market 4

Slide 5

Slide 5 text

Meet Jane (App Architect) Jane is a little worried: Not everyone understands agile here Environment setup takes a long time 8 Weeks isn’t much time to release to prod (!) 5

Slide 6

Slide 6 text

What Could Get In Jane’s Way? 6

Slide 7

Slide 7 text

© Copyright 2015 Pivotal. All rights reserved. 7 The Innovation Gap in Traditional IT W eeks/M onths Developer Operator

Slide 8

Slide 8 text

Cycle Time How Long Does It Take To Deploy One Line Of Code To Production? 8

Slide 9

Slide 9 text

Silos … But We Follow ITIL! 9

Slide 10

Slide 10 text

Process You Need To Open A Ticket For That! 10

Slide 11

Slide 11 text

Feedback Loop Are We Building The Right Thing? 11

Slide 12

Slide 12 text

Change Production Breaks When Changes Are Made (!) … Right? 12

Slide 13

Slide 13 text

13 “Agile Infrastructure” - Andrew Clay Shafer and
 Patrick Debois Agile 2008 conference Use DevOps

Slide 14

Slide 14 text

DEV learn from OPS to think about Resources (CPU, RAM, Disk) Services (Start, Stop, Status) Dependencies (Start DB before App) Logfiles (Rotate, Remove) Disk Space Monitoring and Alarming 14

Slide 15

Slide 15 text

OPS learn from DEV to think about Incremental Improvement Infrastructure as Code Version Control System (git, mercurial…) Coding (OO, Functions, Libraries …) Code Quality (Static Analysis, Metrics Test Automation (Unit & Integration Tests) 15

Slide 16

Slide 16 text

DevOps do Test First Unit Tests Test the smallest possible components in an artifical environment. System Tests Test the entire application in a real(istic) environment together with other applications. 16

Slide 17

Slide 17 text

UNTESTED BROKEN 17

Slide 18

Slide 18 text

Jane Needs Some Help (This Seems Insurmountable) Strategies For Success 18

Slide 19

Slide 19 text

Strategies For Success Do Implement Continuous Integration 19

Slide 20

Slide 20 text

Strategies For Success Do Not Create Environment Specific Packages 20

Slide 21

Slide 21 text

Strategies For Success Do Externalize Environment Specific Configuration 21

Slide 22

Slide 22 text

Strategies For Success Do Automate Everything 22

Slide 23

Slide 23 text

Strategies For Success Do Not Assume Existing Processes Are Right (Engage In Continuous Improvement) 23 !

Slide 24

Slide 24 text

Strategies For Success Do Not Use A Different Process For Different Environments 24

Slide 25

Slide 25 text

Strategies For Success Do Recreate App Environments Frequently (Also Known As: Servers Are Not Puppies) 25

Slide 26

Slide 26 text

Strategies For Success Do Ensure Database Changes Are Automated 26

Slide 27

Slide 27 text

Strategies For Success Do Deploy Less More Frequently 27 " " " " " " " " " " " " " " " " " " v2.1 " " " " v2.1 " " " v2.3 " " " " " " " v2.2

Slide 28

Slide 28 text

Strategies For Success Do Automate All Testing Where Test Failures Would Prevent A Production Release From Occurring 28

Slide 29

Slide 29 text

Strategies For Success Do Try To Use Tools That Support The Process (But Don’t Get Stuck In Tool Selection Hell!) 29 g

Slide 30

Slide 30 text

App Developers Can Be More Successful When They Are Supported By Agile Infrastructure 30

Slide 31

Slide 31 text

© Copyright 2015 Pivotal. All rights reserved. 31 The Cloud Platform Evolution TRADITIONAL IAAS Virtualization Platform Operating System Data base Web Server Mess aging Your Application Code Physical Servers Data base Web Server Mess aging Your Application Code IAAS Your Application Code PAAS IAAS PAAS

Slide 32

Slide 32 text

A NEW PLATFORM FOR A NEW ERA @dreamsergiu

Slide 33

Slide 33 text

Cloud Foundry Helps Jane… 33

Slide 34

Slide 34 text

Cloud Foundry Helps Jane… Get A New App Environment In Seconds 34 in a

Slide 35

Slide 35 text

Cloud Foundry Helps Jane… Have Complete Consistency Between Environments 35

Slide 36

Slide 36 text

Cloud Foundry Helps Jane… Have A Consistent API To Automate Deployments 36

Slide 37

Slide 37 text

Cloud Foundry Helps Jane… Inject Environment Specific Configuration 37

Slide 38

Slide 38 text

Cloud Foundry Helps Jane… Inject External Dependencies 38

Slide 39

Slide 39 text

39 Promote Apps Through Environments With The Same Process # $ # $ # $ Cloud Foundry Helps Jane… %

Slide 40

Slide 40 text

Cloud Foundry Helps Jane… By Providing New Options: + Canary Deployment + Zero Downtime Deployment + A/B Testing + Scale Apps On-Demand + Autoscaling Apps 40

Slide 41

Slide 41 text

‹#› © Copyright 2015 Pivotal Software. All rights reserved. Component: is independently upgradeable and replaceable serves one purpose; Components are generally plugged into other technology systems.
 Monolith: a single deployable artifact that delivers system features and functions.
 Platform: a business system recognized by long- term organizational commitment, organized and operated as a composite of underlying Components, Apps and Services.

Slide 42

Slide 42 text

‹#› © Copyright 2015 Pivotal Software. All rights reserved. Service: a functional component that supports machine-to-machine communication over a network through a standard contract
 App: a composite of source code and components that provide a logical grouping of functionality. in a distributed manner to deliver logically distinct business functionality to a consumer. Microservices: single-purpose services that communicate over a network and aggregate

Slide 43

Slide 43 text

Where is the process broken 43 $ Business Development QA Operations Customer

Slide 44

Slide 44 text

What is Continuous Delivery? 44 $

Slide 45

Slide 45 text

Continuous Delivery To The Rescue! 45

Slide 46

Slide 46 text

Continuous Delivery != Continuous Deployment 46 twitter.com/ccaum/statuses/372620989257232384 “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.” Martin Fowler “Continuous Deployment means that every change goes through the pipeline and automatically gets put into production” Martin Fowler The Difference: Who Presses The Button For A Production Deployment?