Continuous delivery - JAX London 2011
-
Upload
john-stevenson -
Category
Technology
-
view
807 -
download
1
description
Transcript of Continuous delivery - JAX London 2011
©LeanAgileMachineCreative Commons Licence
Continuous Deployment
The writing is on the wall
John StevensonLean Agile Machine
©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
©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
©LeanAgileMachineCreative Commons Licence
So what is Continuous Deployment ?
©LeanAgileMachineCreative Commons Licence
...its incredibly hard
©LeanAgileMachineCreative Commons Licence
...even if you are...
©LeanAgileMachineCreative Commons Licence
...hard plus infinity for everyone else
©LeanAgileMachineCreative Commons Licence
Continuous deployment example:
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Typically:
25 deploys per day
per developer
©LeanAgileMachineCreative Commons Licence
Forward culture
©LeanAgileMachineCreative Commons Licence
So why go for continuous
deployment?
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
http://blog.thehigheredcio.com/2011/08/31/efficiency-vs-effectiveness/
©LeanAgileMachineCreative Commons Licence
Understanding the business
Table stakes / foundations
SpoilersDifferentiators
Accelerators
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Benefits
©LeanAgileMachineCreative Commons Licence
Where to get started ??
©LeanAgileMachineCreative Commons Licence
Is your team / company ready ?
A case study in pain and dissapointment!
©LeanAgileMachineCreative Commons Licence
Change can be expensive
©LeanAgileMachineCreative Commons Licence
A long journey of discovery
©LeanAgileMachineCreative Commons Licence
Involving the whole business
©LeanAgileMachineCreative Commons Licence
Understanding of Value
©LeanAgileMachineCreative Commons Licence
The right motivation
©LeanAgileMachineCreative Commons Licence
What is the goal?
©LeanAgileMachineCreative Commons Licence
Where to start ??
©LeanAgileMachineCreative Commons Licence
Visualise how you do IT...
©LeanAgileMachineCreative Commons Licence
Kanban – a wall of Facts
©LeanAgileMachineCreative Commons Licence
Let the board show issues...
V1.0.1, V1.0.2, V1.0.3, V1.0.4,
Build 1209Build 1221Build 1301
©LeanAgileMachineCreative Commons Licence
Value stream mapping
The (often wide) path to getting things done
Activities that get things done effectively
©LeanAgileMachineCreative Commons Licence
Software development
©LeanAgileMachineCreative Commons Licence
Software development
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Include the whole process...
Strategy to shiped
Budgeting
Business sign off
Deployment dry run
©LeanAgileMachineCreative Commons Licence
Improve the foundations
©LeanAgileMachineCreative Commons Licence
Monitoring your servers
● Nagios / NagVis● The Dude● Microsoft Operations Manager● Outsource IT...
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Sever Provisioning
©LeanAgileMachineCreative Commons Licence
Its all virtual these days...
©LeanAgileMachineCreative Commons Licence
©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
©LeanAgileMachineCreative Commons Licence
Managing VM's is easy
©LeanAgileMachineCreative Commons Licence
Automating Virtual Machines
©LeanAgileMachineCreative Commons Licence
Vagrant – simple to use
● Requirements Ruby Virtualbox Chef / Puppet for other VM systems
©LeanAgileMachineCreative Commons Licence
Consistent environments
©LeanAgileMachineCreative Commons Licence
Automated server managementPuppet / Chef / Rex
©LeanAgileMachineCreative Commons Licence
Disaster recovery for learning
©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 !
©LeanAgileMachineCreative Commons Licence
Deployment Strategies
©LeanAgileMachineCreative Commons Licence
If it hurts, do it more often
©LeanAgileMachineCreative Commons Licence
Segmented deploys
Different customers / different expectations
©LeanAgileMachineCreative Commons Licence
Timely deployments
Cost of delay ?
When is the software valuable ?
©LeanAgileMachineCreative Commons Licence
Smaller deployments
©LeanAgileMachineCreative Commons Licence
Visualise deployment strategies??
©LeanAgileMachineCreative Commons Licence
Managing your code
©LeanAgileMachineCreative Commons Licence
It compiles, ship it!!
Compile
Ship It
©LeanAgileMachineCreative Commons Licence
Automated builds
Design around common patterns for building
Should have valuable reason for doing something different
SBT
©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
©LeanAgileMachineCreative Commons Licence
Local repositories
Nexus
Artefactory
DVCS
©LeanAgileMachineCreative Commons Licence
Build tools – continuous feedback
Maven 3 Shell
Simple Build Tool
~Tests
©LeanAgileMachineCreative Commons Licence
Coding fast feedback
JavaScript
©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
●
©LeanAgileMachineCreative Commons Licence
Behaviour Driven Developent
©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
©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
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Git Workflow
©LeanAgileMachineCreative Commons Licence
Git architecure (logical)
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Change-set history
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
Code reviews
DVCS push requests
©LeanAgileMachineCreative Commons Licence
Central or
Distributed Version control
©LeanAgileMachineCreative Commons Licence
Centralised team
©LeanAgileMachineCreative Commons Licence
Centralised issues
Fear of breaking the build
unnecessary branching
delayed commits
Off-line support?
Any redundancy in versioning server?
©LeanAgileMachineCreative Commons Licence
Managed Distributed team
©LeanAgileMachineCreative Commons Licence
Continuous Integration
What
When
How long
Run specifications / unit tests
Reports
Actions to initiate
©LeanAgileMachineCreative Commons Licence
CI Server basics
©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
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
CI Server lights
©LeanAgileMachineCreative Commons Licence
Ultimate Wallboards
©LeanAgileMachineCreative Commons Licence
Issue ticker
Stream of issues flowing
Highlight new features, overdue items, critical issues, time related news, etc
©LeanAgileMachineCreative Commons Licence
©LeanAgileMachineCreative Commons Licence
UltimateWallboard.com
©LeanAgileMachineCreative Commons Licence
More than compiling code...
conf/tomcat-users.xml<user username=”bamboo” password=”bamboo” roles=”manager-script,manager-gui”/>
©LeanAgileMachineCreative Commons Licence
One click deploy
©LeanAgileMachineCreative Commons Licence
Architect for deployment
Modular systems
Simple interfaces
Supported by acceptance tests (specifications)
Automate low value tasks
©LeanAgileMachineCreative Commons Licence
Final thoughts
©LeanAgileMachineCreative Commons Licence
Predictability / Cadence
Smaller tasks
Understanding you capacity
©LeanAgileMachineCreative Commons Licence
Communicate effectively
©LeanAgileMachineCreative Commons Licence
Feedback
©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...
©LeanAgileMachineCreative Commons Licence
Benefits
©LeanAgileMachineCreative Commons Licence
Thank you
©LeanAgileMachineCreative Commons Licence
Feedback & Refs
@JR0cket
Please note: Very few bulletpoints were hurt during the making of this presentation