continuous delivery story with fifa (wroc.net - 2012.12.11)
DESCRIPTION
Continuous Delivery is the process of having a shippable product after each check-in to the source control repository. Continuous Delivery is usually implemented as a natural improvement of a Continuous Integration process. This presentation highlights challenges and presents hints on how to start from a raw environment and incrementally build a successful deployment pipeline based on Team Foundation Server (TFS), providing substantial added-value for business. This presentation will describe the process of establishing Continuous Delivery in a project for FIFA. We describe the starting point, what we achieve in the first phases and what are the plans for further improvements in order to deliver high quality software in schedules defined by business needs – not by process and technology constraints. http://blog.m.jedynak.pl/2012/06/continuous-delivery-story-with-fifa.htmlTRANSCRIPT
![Page 1: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/1.jpg)
12.12.2012 © MAKING WAVES 1
Continuous delivery story with FIFA
Introducing best practices in legacy project
Mirosław Jedynak
Architect @ Making Waves
![Page 2: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/2.jpg)
Maslow’s hierarchy
12.12.2012 2
Self-esteem
Friends, family
Security of body,
employment
Breathing, food, sleep
Creativity
![Page 3: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/3.jpg)
Revisable
• Source control
• Revert, branch and merge
• No zip files/shared disk
12.12.2012 3
Revisable
PROPOSED BY SCOTT HANSELMAN
![Page 4: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/4.jpg)
Buildable & deployable
• Able to compile code
• Built automatically
• Deploy as easily as you can build it
12.12.2012 © MAKING WAVES 4
Buildable & deployable
Revisable
PROPOSED BY SCOTT HANSELMAN
![Page 5: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/5.jpg)
Maintainable
• Able to fix bugs
• Verify them
• Any tests at all?
12.12.2012 5
Maintainable
Buildable & deployable
Revisable
PROPOSED BY SCOTT HANSELMAN
![Page 6: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/6.jpg)
Refactorable
• Follow conventions
• Refactor without fear
• Automated unit tests
12.12.2012 6
Refactorable
Maintainable
Buildable & deployable
Revisable
PROPOSED BY SCOTT HANSELMAN
![Page 7: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/7.jpg)
Pride
• „It’s clear to me”
• „Ok, John was here”
12.12.2012 7
Refactorable
Maintainable
Buildable & deployable
Revisable
Pride
PROPOSED BY SCOTT HANSELMAN
![Page 8: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/8.jpg)
source: www.wesport.org.uk
![Page 9: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/9.jpg)
Day 0 Inherited project evaluation
![Page 10: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/10.jpg)
12.12.2012 © MAKING WAVES 11
Clever solutions
![Page 11: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/11.jpg)
12.12.2012 © MAKING WAVES 12
Code duplication
![Page 12: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/12.jpg)
Day 1 Transfer source control
![Page 13: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/13.jpg)
Revisable at FIFA
12.12.2012 © MAKING WAVES 14
• Multiple SVN repositories
– Code duplication between repositories
– Missing revisions
• Sometimes challenging to obtain code deployed to production
– Assemblies without clear source
– Not versioned
• Changes directly on production
– In markup (aspx)
– In assemblies
Refactorable
Maintainable
Buildable & deployable
Revisable
Pride
![Page 14: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/14.jpg)
Day 2 Automate build
![Page 15: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/15.jpg)
practice where team members integrate their work frequently, usually at least daily - leading to multiple integrations per day
Continuous Integration
![Page 16: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/16.jpg)
Single Source Repository
Automated Build
Self-testing
Easy to get the latest executable
![Page 17: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/17.jpg)
Day 3 Establish internal test environment
![Page 18: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/18.jpg)
• Manual test suite
– Army of testers
– Functionality exploration
– Regression
– Input for automation
Testing - inheritance
12.12.2012 © MAKING WAVES 21
![Page 19: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/19.jpg)
• Unit tests
– Hard to introduce
• Functional acceptance tests
– UI tests
– Fragile
• Smoke tests
– Useful when automating deployment
Testing - improvements
12.12.2012 © MAKING WAVES 22
![Page 20: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/20.jpg)
• Similar to production
– Operating system/IIS version
– Load balancer
• Isolated
• Mocked external systems
Testing environment
12.12.2012 © MAKING WAVES 23
![Page 21: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/21.jpg)
How long would it take in your organization to deploy a change that involves just a single line of code?
How long would it take to set up production environment when your data center blows up?
![Page 22: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/22.jpg)
Project goal:
shorten release cycle
![Page 23: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/23.jpg)
a set of practices and principles aimed at building, testing and releasing software faster and more frequently.
Continuous Delivery
![Page 24: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/24.jpg)
Last mile
12.12.2012 27
Last mile
UAT IT
![Page 25: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/25.jpg)
12.12.2012 © MAKING WAVES 28
Developer
Customer
IT
Customer
Focus of last 10 years Focus of continuous delivery
![Page 26: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/26.jpg)
12.12.2012 © MAKING WAVES 29
Principles behind the Agile Manifesto
http://agilemanifesto.org/principles.html
We follow these principles:
Our highest priority is to satisfy the customer
through early and continuous delivery
of valuable software.
Welcome changing requirements, even late in
development. Agile processes harness change for
the customer's competitive advantage.
Deliver working software frequently, from a
couple of weeks to a couple of months, with a
preference to the shorter timescale.
Business people and developers must work
together daily throughout the project.
Build projects around motivated individuals.
Give them the environment and support they need,
and trust them to get the job done.
The most efficient and effective method of
conveying information to and within a development
![Page 27: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/27.jpg)
Day 4 Convince customer – business value
![Page 28: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/28.jpg)
Business value
• Feedback from users
– Competitive advantage
– Fail fast and early
12.12.2012 © MAKING WAVES 31
![Page 29: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/29.jpg)
Ch
an
ge
Time
Business value
12.12.2012 © MAKING WAVES 32
Ch
an
ge
Time
frequently
less changes
• Feedback from users
– Competitive advantage
– Fail fast and early
• Reduced risks of release
– Automated
• Real progress
– Definition of done
• Quicker return of investment
![Page 30: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/30.jpg)
Examples
12.12.2012 © MAKING WAVES 33
Waiting for 151 hosts
![Page 31: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/31.jpg)
Examples
12.12.2012 © MAKING WAVES 34
![Page 32: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/32.jpg)
Most software developed by large teams spends a significant proportion of its development time in an unusable state.
![Page 33: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/33.jpg)
Waterfall
Deployment – bad parts
Black art
„All hands on board”
„We deploy on Saturday”
![Page 34: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/34.jpg)
Day 5 Design deployment pipeline
![Page 35: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/35.jpg)
12.12.2012 © MAKING WAVES 38
Deployment pipeline
Version
control
Build &
unit test
Acceptance
tests
Acceptance
tests Release
Artifacts repository
Dev Tester/PO PO
![Page 36: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/36.jpg)
When it hurts, do it more often
![Page 37: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/37.jpg)
Day 6 Manage environment configuration
![Page 38: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/38.jpg)
It’s easier to break system by changing one line of config than one line of code
![Page 39: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/39.jpg)
Configuration types
12.12.2012 © MAKING WAVES 43
Environment Environment
+
Application
Application
![Page 40: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/40.jpg)
Configuration templating
12.12.2012 © MAKING WAVES 44
Configuration
template Environment-
specific
configuration
Environment
&application
specific
Deployment
package
![Page 41: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/41.jpg)
Hotfix
* Rollback
* Deploy last good version
* Rollback scripts less tested than deployment
* Avoid Fix-forward fire
* Hotfix
* Follow regular deployment pipeline
* It is a tested path
* It has known time of deployment
Troubles
![Page 42: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/42.jpg)
Day 8 Deploy to production
![Page 43: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/43.jpg)
12.12.2012 © MAKING WAVES 49
• Deploy continuoulsy
• After each change
Continuous deployment
Continuous delivery • Be production ready
• Release any time
![Page 44: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/44.jpg)
Best practices How we get there
![Page 45: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/45.jpg)
• Version everything
• Similar environment
• Automate existing procedure
• Manage configuration
• Most expensive/risky first
• Deploy never easy - try as soon as possible
Best practices - Summary
12.12.2012 © MAKING WAVES 51
![Page 46: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/46.jpg)
Doubts/Fears
• Setup time
– Sum up deployment and fix times
• Replacing software
– Release to beta environment for early adopters
• Confidence in automation
– Do it more often
12.12.2012 © MAKING WAVES 52
![Page 48: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/48.jpg)
Database deployment
• separate database migrations
– expansion scripts - changes not breaking backwards compatibility with the existing version
– contraction scripts - clean up any database structure that is no longer needed
App
v1.0
Expansion
script v2.0
App
v2.0
Contractions
cript v2.0
![Page 49: Continuous Delivery story with FIFA (Wroc.net - 2012.12.11)](https://reader033.vdocument.in/reader033/viewer/2022061218/54b7150c4a7959af718b45a1/html5/thumbnails/49.jpg)
12.12.2012 © MAKING WAVES 55