104
©LeanAgileMachine Creative Commons Licence Continuous Deployment The writing is on the wall John Stevenson Lean Agile Machine

Continuous delivery - JAX London 2011

Embed Size (px)

DESCRIPTION

An overview of the many issues involved in continuous delivery along w

Citation preview

Page 1: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Continuous Deployment

The writing is on the wall

John StevensonLean Agile Machine

Page 2: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Who is John Stevenson● Lean agile coach

Kanban, system thinking, ToC. ● Atlassian ambassador in UK

Growing communities around JIRA...● Community geek

London Java, Graduate Devs, London Scala, London Clojurians, etc.

● Dabbles with

Page 3: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

My Journey

● Started with RUP, UML & XP● Fell for Behaviour Driven

Development & kanban● Learn about a lot of Value &

Systems thinking● Coached teams & individuals● Sharing experiences with

community

Page 4: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

So what is Continuous Deployment ?

Page 5: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

...its incredibly hard

Page 6: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

...even if you are...

Page 7: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

...hard plus infinity for everyone else

Page 8: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Continuous deployment example:

Page 9: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 10: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Typically:

25 deploys per day

per developer

Page 11: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Forward culture

Page 12: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

So why go for continuous

deployment?

Page 13: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 14: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 15: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 16: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 17: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

http://blog.thehigheredcio.com/2011/08/31/efficiency-vs-effectiveness/

Page 18: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Understanding the business

Table stakes / foundations

SpoilersDifferentiators

Accelerators

Page 19: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 20: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Benefits

Page 21: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Where to get started ??

Page 22: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Is your team / company ready ?

A case study in pain and dissapointment!

Page 23: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Change can be expensive

Page 24: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

A long journey of discovery

Page 25: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Involving the whole business

Page 26: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Understanding of Value

Page 27: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

The right motivation

Page 28: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

What is the goal?

Page 29: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Where to start ??

Page 30: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Visualise how you do IT...

Page 31: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Kanban – a wall of Facts

Page 32: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Let the board show issues...

V1.0.1, V1.0.2, V1.0.3, V1.0.4,

Build 1209Build 1221Build 1301

Page 33: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Value stream mapping

The (often wide) path to getting things done

Activities that get things done effectively

Page 34: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Software development

Page 35: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Software development

Page 36: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 37: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Include the whole process...

Strategy to shiped

Budgeting

Business sign off

Deployment dry run

Page 38: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Improve the foundations

Page 39: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Monitoring your servers

● Nagios / NagVis● The Dude● Microsoft Operations Manager● Outsource IT...

Page 40: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 41: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 42: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 43: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 44: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 45: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Sever Provisioning

Page 46: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Its all virtual these days...

Page 47: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 48: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Virtual Machines

Automate provisioning

Manage sys-admin tasks remotely

Spin up instances into the cloud Using public cloud when your private cloud is maxed out

Off the shelf pre-configured servers

Page 49: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Managing VM's is easy

Page 50: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Automating Virtual Machines

Page 51: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Vagrant – simple to use

● Requirements Ruby Virtualbox Chef / Puppet for other VM systems

Page 52: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Consistent environments

Page 53: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Automated server managementPuppet / Chef / Rex

Page 54: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Disaster recovery for learning

Page 55: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Change freezes

The period of time when the most of the changes happen

When lots of patches are done !

A good time to learn what is important !

Page 56: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Deployment Strategies

Page 57: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

If it hurts, do it more often

Page 58: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Segmented deploys

Different customers / different expectations

Page 59: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Timely deployments

Cost of delay ?

When is the software valuable ?

Page 60: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Smaller deployments

Page 61: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Visualise deployment strategies??

Page 62: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Managing your code

Page 63: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

It compiles, ship it!!

Compile

Ship It

Page 64: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Automated builds

Design around common patterns for building

Should have valuable reason for doing something different

SBT

Page 65: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany.app</groupId>

<artifactId>my-app</artifactId> <packaging>jar</packaging>

<version>1.0-SNAPSHOT</version>

<name>Maven Quick Start Archetype</name> <url>http://maven.apache.org</url>

<dependencies>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>4.8.2</version>

<scope>test</scope>

</dependency> </dependencies>

</project>

Simple Maven config

Page 66: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Local repositories

Nexus

Artefactory

DVCS

Page 67: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Build tools – continuous feedback

Maven 3 Shell

Simple Build Tool

~Tests

Page 68: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Coding fast feedback

JavaScript

Page 69: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Testable code

● TDD / BDD helped devs have a better appreciation of code that is more testable

● Faster feedback gave devs (and team) better understanding of what is needed

● Resolve issues quickly, prevent many from happening at all

Page 70: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Behaviour Driven Developent

Page 71: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Deployable software

● Automated server builds● Automated deployment scripts / tools● Automated tests / specifications● Effective business review

● Faster feedback● Resolve issues quickly● Deploy when valuable

Page 72: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Distributed Versioning

● Smaller repositories Per component / module Simpler architecture

● Manage branching easier with pull requests A pull system is more effective than central push

● Different repos for different purposes Repo for deployment, trunk, CI server

Page 73: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 74: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Git Workflow

Page 75: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Git architecure (logical)

Page 76: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 77: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Change-set history

Page 78: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 79: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Code reviews

DVCS push requests

Page 80: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Central or

Distributed Version control

Page 81: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Centralised team

Page 82: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Centralised issues

Fear of breaking the build

unnecessary branching

delayed commits

Off-line support?

Any redundancy in versioning server?

Page 83: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Managed Distributed team

Page 84: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Continuous Integration

What

When

How long

Run specifications / unit tests

Reports

Actions to initiate

Page 85: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

CI Server basics

Page 86: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

BOfH CI Server

Kicks out checked in code if it fails

Wires up build bunnies to stop you hiding from broken builds

Wall of shame for breaking builds

Top ten worst programmers

Page 87: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 88: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 89: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

CI Server lights

Page 90: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Ultimate Wallboards

Page 91: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Issue ticker

Stream of issues flowing

Highlight new features, overdue items, critical issues, time related news, etc

Page 92: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Page 93: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

UltimateWallboard.com

Page 94: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

More than compiling code...

conf/tomcat-users.xml<user username=”bamboo” password=”bamboo” roles=”manager-script,manager-gui”/>

Page 95: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

One click deploy

Page 96: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Architect for deployment

Modular systems

Simple interfaces

Supported by acceptance tests (specifications)

Automate low value tasks

Page 97: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Final thoughts

Page 98: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Predictability / Cadence

Smaller tasks

Understanding you capacity

Page 99: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Communicate effectively

Page 100: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Feedback

Page 101: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

How will you make a change ?

● Automated deployments● Distributed version control● Refactoring architecture, design & code● Modularity in design● Migrating from technical debt

● Shouting...

Page 102: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Benefits

Page 103: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Thank you

Page 104: Continuous delivery - JAX London 2011

©LeanAgileMachineCreative Commons Licence

Feedback & Refs

@JR0cket

[email protected]

Please note: Very few bulletpoints were hurt during the making of this presentation