channelstream: the challenges of continuously delivering

Post on 05-Dec-2014

715 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

The Challenge of Continuously Delivering

Julian Fitzell, CincomESUG, EdinburghAugust 24, 2011

Image © Petr Vins: http://www.sxc.hu/photo/1054507

ChannelStream

Document Output Management

Control

Enrichment

OMR

Marketing

Barcode Datamatrix

Output

Why?

• Postal contract savings

• Saves licking envelopes

• Personalization and cross-marketing

• Avoid IT/supplier for customization

• Enhance legacy output

ChallengesImage © Tim Regan: http://www.flickr.com/photos/dumbledad/3225255407/

Slow development

Manual process

Test environment not

easily reproducible

External dependencies

fragile

Test data unversioned

Configuration files unversioned

False positives

Unclear separation between

unit/functionalTests not always run

Tests not always updated

Building images slow +

error-prone

Tests slow/hard to run

Infrequent integration

One developer integrating

Reduced confidence from automated tests

STRESS!

+Frequent releases

Integration is risky/hard

Difficulty tracking versions

So...

• Make building images easier

• Make running tests easier

• Make integration easier

Jez Humble, http://continuousdelivery.com/2010/08/continuous-delivery-vs-continuous-deployment/

con·tin·u·ous de·liv·er·y• putting the release schedule in the

hands of the business• ensuring your software is always

production ready throughout its entire lifecycle

• making any build potentially releasable to users at the touch of a button

Goals

• Reduce cycle time between an idea and its availability to users

• Deliver high-quality software reliably and efficiently

Frequent, automated releases:

• Decrease stress• Eliminate errors and improve

auditability• Make feedback more immediate• Protect against reliance on individual

expertise• Reduce wasted time on repetitive tasks

Make releases boring

• Automate (almost) everything

• Version everything

• Deploy everywhere the same way

• If it hurts, do it more often

• Everyone is responsible for delivery

Development+

Integration

Problems

• Contention over “head”

• One person doing most of the integration

• Delayed integration => harder integration

• Poor visibility of changes

• Hard to predict/analyze failure

Integration

Issue tracker + emailIntegration

Task/merge toolsIntegration

Integrate often

• Hide functionality (feature toggles)

• Incremental, releasable changes

• “Branch by abstraction” for large-scale changes

• Use components to decouple parts

Integration

Image © Lars Sundstrom: http://www.sxc.hu/photo/1082530

Remaining Issues

• Restructurings can still be tricky when branches are outstanding

• “Integration token” still just informal conversation

Integration

Building

Problems

• Manual builds on developer machines

• Wasted developer time

• “Here, take my image”

• Taking shortcuts

• “Works on my machine”

Building

Helper scripts + docsBuilding

Fully automated scripts

Builder

-filein foo-wrapper.ws

foo.ws

foo-wrapper.ws

Target

Building

Builds run (at least)dailyBuilding

Archive built imagesBuilding

Image © 2009 by Urbancode

Run automatically on ALL code changes

Avoid versioning split between SVN + Store

Rationalize build/version numbering

!"#$%&'()*+,%&-+.+/011+23&45(+67)%3)+8359)+:00+.+;4)7)4$%(*+<=5'+11>>?+.+@A+/>:-B?B-C000++.+DDD-3"#$%&'()-&'E+.+F+/00C+#G+!"#$%&'()+

&'EE'%H4$&)+)%'3I=+9=$9+"'445%I+59+'39+%'+4'%I)"+")J35")K+9=)+)LL'"9+9'+J3$45LG+59+$K+!"#$"%-+M$K5&+;,+5K+%'D+)$KG+)%'3I=+9'+#)+$%+!"&%'(%)*$&%+4)7)4+$&95759G-+

!"#$%#&'()*+,$-.#&'()/+01#&')2&%)3+,-41#&')N59=+'3"+E'()4+'L+E$93"59G+5%+H4$&)+D)+$")+")$(G+9'+$((")KK+'3"+9'H5&K+5%+2%9)"H"5K)+;'%95%3'3K+,%9)I"$95'%A+M354(5%I*+O)H4'G5%I*+P)K95%I+$%(+Q)H'"95%I-+P=)K)+9'H5&K+&'7)"+9=)+)KK)%95$4+)4)E)%9K+'L+9=)+)%(R9'R)%(+M354(+S5L)&G&4)*+9=)+T'3"%)G+L"'E+K'3"&)+&'()+9'+K'L9D$")+5%+H"'(3&95'%-+

!"#$%#&')U$"()%R7$"5)9G*+()7)4'H)"R&)%9"5&+;,+5K+$#'39+L$K9+L))(#$&V+L"'E+#354(5%I+9=)+K'L9D$")-+N=)%+;,+E))9K+)%9)"H"5K)+&'%&)"%K*+#354(+E$%$I)E)%9*+()H)%()%&5)K+#)9D))%+H"'T)&9K*+$%(+$+&'%9"'4+'7)"+9=)+#354(+H"'&)KK+#)&'E)+&"595&$4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problems• Tests took up to 16 hours to run

• Test environment hard to create

• Failing tests sometimes pass when re-run

• Not everyone could run tests or be sure of results

• High cost of test maintenance

• Sometimes quicker to test manually than fix the test environment

Testing

Done

• Optimize tests (now run in ~ 2 hours)

• Separate unit/regression from functional/integration tests

• Store test data in a central location

Testing

Run tests automaticallyTesting

Image © 2009 by Urbancode

Run regression and smoke tests as part of build and notify of errors by email

Run functional tests after build

Version control test data

Automate creation of testing environment!"#$%&'()*+,%&-+.+/011+23&45(+67)%3)+8359)+:00+.+;4)7)4$%(*+<=5'+11>>?+.+@A+/>:-B?B-C000++.+DDD-3"#$%&'()-&'E+.+F+/00C+#G+!"#$%&'()+

H)$EI+$9+9=)+!"#$"%+4)7)4+J"$&95&)+&'%95%3'3I+()J4'GE)%9*+$39'E$95&$44G+()J4'G5%K+9'+J"'(3&95'%+D59='39+$%G+E$%3$4+5%9)"7)%95'%A+6+#354(+5I+&")$9)(+9=)%+$39'E$95&$44G+()J4'G)(+9="'3K=+9=)+9)I95%K+)%75"'%E)%9I-+6I+59+E'7)I+9="'3K=+9=)+J5J)45%)*+9=)+#354(+5I+I3#L)&9)(+9'+$39'E$9)(+9)I95%K+$9+)7)"G+I9$K)*+$%(+'%&)+59+=$I+J$II)(+$44+9=)+$JJ"'J"5$9)+M3$459G+K$9)I*+59+5I+5EE)(5$9)4G+()J4'G)(+9'+J"'(3&95'%-+8'E)+I)"5'3I+('9N&'E+$JJ45&$95'%I+")4)$I)+&=$%K)I+D59=5%+$%+='3"+'O+59+")$&=5%K+I'3"&)+&'%9"'4-+<#75'3I4G*+9=)+$39'E$9)(+9)I95%K+E3I9+#)+7)"G+E$93")*+$4'%K+D59=+"'44N#$&P+$%(+$JJ45&$95'%+E'%59'"5%K-++Q39+5%+$+O$I9NJ$&)(+)%75"'%E)%9*+)R9")E)4G+O$I9+()J4'GE)%9I+'O+%)D+O3%&95'%$459G+$")+$+P)G+&'EJ)95957)+$(7$%9$K)*+$%(+E595K$9)+9=)+"5IP+'O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9'+$39'E$9)(+9)I95%K-+

H'+")$&=+9=)+-(./+%+4)7)4+'O+E$93"59G*+9=)")+I='34(+#)+$+I)9+'O+O$I9+9)I9I+9=$9+$")+"3%+D59=+)7)"G+#354(-+H=)I)+9)I9I+J"'75()+9=)+9)$E+&'%O5()%&)+9=$9+9=)+$JJ45&$95'%+D544+#$I5&$44G+D'"P+75"93$44G+$44+'O+9=)+95E)-+

Image © 2009 by Urbancode

Testing

Releasing

Problems

• One person is:

• best person for build

• best person for integration

(so, one can delay the other)

• Forced to branch when close to release

Releasing

Done

• Helper scripts

Releasing

Image © 2009 by Urbancode

Fully automate runtime image build

Automate installer creation

Automate installation into test environments

Changelog generation

!"#$%&'()*+,%&-+.+/011+23&45(+67)%3)+8359)+:00+.+;4)7)4$%(*+<=5'+11>>?+.+@A+/>:-B?B-C000++.+DDD-3"#$%&'()-&'E+.+F+/00C+#G+!"#$%&'()+

H"'75(5%I+45994)+$JJ3"$%&)+9=$9+$+J3&&)JJK34+()H4'GE)%9+5%+'%)+)%75"'%E)%9+5%(5&$9)J+9=$9+9=)+()H4'GE)%9+D544+#)+J3&&)JJK34+5%+9=)+%)L9+)%75"'%E)%9-+

+

+

6+9)$E+9=$9+=$J+E'7)(+$D$G+K"'E+$+K344G+E$%3$4+H"'&)JJ+9'+3J5%I+$+%3E#)"+'K+=)4H)"+J&"5H9J*+'"+$+K344G+J&"5H9)(+H"'&)JJ*+=$J+E$()+5EH'"9$%9+5EH"'7)E)%9J-+6&"'JJ+9=)+5%(3J9"G*+E'J9+9)$EJ+=$7)+J'E)+=)4H)"+J&"5H9J+#39+K$44+J='"9+'K+K344G+J&"5H9)(+()H4'GE)%9J+ +)JH)&5$44G+9'+&'%9"'44)(+)%75"'%E)%9J-+

!"#$%&$'()#$+9)$EJ+$")+I''(+$9+()H4'G5%I+K'"+9)J95%I+H3"H'J)J-+M=)G+D544+=$7)+H39+9=)5"+K344G+J&"5H9)(+()H4'GE)%9J+#)=5%(+9''45%I+9=$9+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'GJ+9'+H"'(3&95'%+'%+5%9)"%$4+5%K"$J9"3&93")+J='34(+&'%J5()"+9$"I)95%I+9=)+*'+)",$'+4)7)4A+=$75%I+$+&'%J5J9)%9+()H4'GE)%9+H"'&)JJ+$&"'JJ+$44+)%75"'%E)%9J+("$E$95&$44G+")(3&)J+9=)+45O)45=''(+'K+4$J9NE5%39)+K$543")J+D=)%+E'75%I+9'+H"'(3&95'%-+*'+)",$'+9)$EJ+$")+$4J'+&=$"$&9)"5R)(+#G+K344G+$39'E$9)(+()H4'GE)%9J+9'+J'E)+9)J95%I+)%75"'%E)%9J+#$J)(+H$JJ5%I+V3$459G+I$9)J-+W'"+)L$EH4)*+$%+$HH"'7$4+K"'E+$+9)J9+E$%$I)"+J9$I)J+$+#354(+9'+#)+$39'E$95&$44G+5%J9$44)(+5%+9=)+J9")JJN9)J9+)%75"'%E)%9-+

Releasing

CINCOM and the Quadrant Logo are registered trademarks of Cincom Systems, Inc.All other trademarks belong to their respective companies.

© 2011 Cincom Systems, Inc.All rights reserved

Julian Fitzelljfitzell@cincom.com

Twitter: @jfitzell

top related