continuous delivery: implementation considerations...devops and continuous delivery dev agile...
TRANSCRIPT
Continuous Delivery:
implementation
considerations
Léon Hagenaars-Keus [email protected]
Edwin van Dillen [email protected]
Done = Released
SOFTWARE INNOVATORS
What is Continuous
Delivery all about?
SOFTWARE INNOVATORS 3
At first there was a machine
SOFTWARE INNOVATORS 4
Dev is operator, operator is dev
Source: What is DevOps? By Mike Loukides
Dev versus ops
The first reaction to a bug or issue:
Ops: “It’s not my machines, it’s your code”
Dev: “It’s not my code, it’s your machines”
SOFTWARE INNOVATORS 5Source: 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
Dev and Ops
“Operations doesn’t go away, it becomes part of
development.”
“The infrastructure doesn’t go away, it moves into
the code”
By James Urquhart
SOFTWARE INNOVATORS 6Source: What is DevOps? By Mike Loukides
DevOps and
Continuous Delivery
DEV
Agile (SCRUM, ..)
High frequently
change
Ops
Strong procedure (ITIL, ASL,…)
Stable production
environment
SOFTWARE INNOVATORS 7
Continuous Delivery
Embrace change in a high
quality driven environment
Who is in control of …
SOFTWARE INNOVATORS 8
D T PA
Ops
Dev
Reduce the cost, time and risk of delivering
incremental changes to users
Jez Humble
Author of Continuous Delivery
What is continuous delivery
Shorter time to market▫ Smaller batches of change, more grip
Faster user feedback▫ Show them the results instead of specs
Contributes to the increase of overall quality▫ Automation versus manual
process
Reduced risk of release
▫ If it hurts, do it more often
What should be the benefits
10SOFTWARE INNOVATORSSource: “introducing continuous delivery in the Enterprise” by XebiaLabs
Signs are:
Extensive and detailed documentation
Reliance on manual testing
Frequent calls to the dev team why it’s gone
wrong
Frequent corrections to the release process
Releases that take more than 5 minutes
Releases that are unpredictable in their outcome
…
Anti-Pattern:
Deploying software manually
12SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.
Signs are:
The system has been tested on dev machines
Releasing is the first time operation people
interact with the new release
A production like environment is not available or
hard to get access to
Little to no collaboration between Dev and
Operations or Deployers
…
Anti-Pattern: Deploying to a
production-like environment only
after development is complete
13SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.
Signs are:
Many successful deployments to staging but deploying
to production fails
The operations team take a long time to prepare an
environment for a release
You can not step back to an earlier configuration/version
Configuration is carried out by modifying it directly on the
production systems
…
Anti-Pattern: Manual
configuration management of
production environment
14SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.
Howto:
Continuous Delivery
SOFTWARE INNOVATORS 16
Software pipeline
SOFTWARE INNOVATORS 17
D T PA
Continuous Integration
Growth of software projects
SOFTWARE INNOVATORS 18
Source code
Continuous Build
Unit Tests
Continuous Test
Test server
Continuous Deploy
Acceptance
Continuous Delivery
Load test server
Production
Flow of software change
SOFTWARE INNOVATORS 19
Source code
Integrate Test Release
Everyone owns the code
▫ The developers
▫ The product owner
▫ Operations
If stuff breaks everyone is responsible
Trunk is the mainline, trunk must work
Code ownership
20SOFTWARE INNOVATORS
Source code
Integrate Test Release
CD in DATP
Single environment
No, branches just the trunk!
Build in feature flags
Turn off and on features for the user
Run features without users knowing about it
They are in production and the environment is
configured
SOFTWARE INNOVATORS 21“Dark Launching”
At every check-in:
▫ Check-out
▫ Sign the deployables with build and revision number
▫ Build the code
▫ Run the unit-tests
▫ Run the code analysis
If the build fails:
▫ Inform the team
▫ Revert the change
If build succeeds
▫ Tag
▫ Trigger deploy
Continuous
Integration
22SOFTWARE INNOVATORS
Source code
Integrate Test Release
More at http://en.wikipedia.org/wiki/Comparison_of_continuous_integration_software
Examples of CI tools
23SOFTWARE INNOVATORS
Source code
Integrate Test Release
24
When is a build
successful?
The moment it builds it is successful
It is successful when: All the latest sources are checked out of the SCM
Every file is compiled from scratch
The resulting object files are linked and deployed for execution
The system is started and suite of tests is run against the system
If all these steps execute without error or human intervention and every test passes, then we have a successful build!
“Smoke test : switch it on and see if smoke comes out” McConnell
Source code
Integrate Test Release
Automated deploy
At every check-in, deploy to test, including
automated upgrade
Dev is done if test environment still works
If test breaks:
▫ Revert the test machine to before deploy
▫ Alter the automated upgrade to keep test alive
▫ Check in the changed automate upgrade
Result: automated deploy to acceptance or
production does not break the environment
SOFTWARE INNOVATORS 25
Source code
Integrate Test Release
“If it hurts do it more often”
Testing
Unit testing
▫ NUnit, JUnit, QUnit, PyUnit
Specification testing
▫ Specflow, JBehave
Application testing
▫ Selenium (Web & javascript), NUnit.Forms
Load testing
▫ JMeter, LoadRunner, Firebenchmarks
SOFTWARE INNOVATORS 26
Source code
Integrate Test Release
You, the developer are responsible for your
code working on the live environment
You, the developer are responsible for
deployment to this live environment
Infrastucture
responsibility
27SOFTWARE INNOVATORS
Source code
Integrate Test Release
You, the systems admin are responsible for your
the live environment running the code
You, the systems admin are responsible for the
differences between the live environment and
various staging facilities
Infrastucture
responsibility
28SOFTWARE INNOVATORS
Source code
Integrate Test Release
Benefits
Dependencies on environment specifics will be
found when introduced, not when deployed to
live.
Deploy has been tested at test and at
acceptance, therefor will work on live.
SOFTWARE INNOVATORS 29
Source code
Integrate Test Release
Delivery tools
SOFTWARE INNOVATORS 30
Continuous Delivery Automation
SmartCloud Continuous Delivery
Source code
Integrate Test Release
Continuous delivery requires
Continuous integration
A single code repository
Automated testing
▫ Acceptance
▫ Nonfunctional requirements
Automated deployment
Configuration Management
SOFTWARE INNOVATORS 31
Continuous imporving process
Lessons Learned:
Rules of continuous delivery
Done = released
DRY (don’t repeat yourself)
Releasable over new features
Fail fast
If you break it, you fix it
Deploy often
Quality built in
A deploy must maintain a workable state
Acceptance test: intention, not implementation
SOFTWARE INNOVATORS 32Scoure: based upon Humble
Fast feedback of failure
SOFTWARE INNOVATORS 33
Asking various devs
“Why we haven’t implemented CD?”:
The code is not in our repository
The production server is not in our control
Operations won’t give us ‘x’
We haven’t got the time
We haven’t got round to it
The project is too small
We haven’t …
“What was your first response to TDD?”
SOFTWARE INNOVATORS 34
ContextOf:
Continuous Delivery
SOFTWARE INNOVATORS 36
Dimensions on
the software live cycle
37
Software
Proces
Design
Organisatie
Infrastructuur
Scope of continuous
delivery
SOFTWARE INNOVATORS 38
Software
Proces
Design
Organisatie
Infrastructuur
D T PA
CD in DATP
DevOps
1. Extend Development into production
2. Create production feedback into development
3. Embed development into IT operations
4. Embed IT operations into development
SOFTWARE INNOVATORS 39
Software
Proces
Design
Organisatie
Infrastructuur
Source: Top 11 Things You Need to Know About DevOps, by Gene Kim
Continuous delivery
The world of SCRUM and DevOps
Product owner
▫ owns features
▫ owns incidents and problems
Will you make incidents part of the backlog
SOFTWARE INNOVATORS 40
Software
Proces
Design
Organisatie
Infrastructuur
Final thoughts…
SOFTWARE INNOVATORS
Continuous Delivery and the
marriage of Dev and ops
“Agile was instrumental in
Development regaining the trust in the business
but it unintentionally left IT Operations behind.
DevOps is a way for the business to regain trust
in the entire IT organization as a whole.”
Clyde Logue, founder of StreamStep
SOFTWARE INNOVATORS 42
SOFTWARE INNOVATORS 43Source: http://www.infoq.com/articles/Continuous-Delivery-Maturity-Model
By Andreas Rehn, e.l.
Yes it is comprehensive…
Start by building a small feature
Automate testing it
And deploy throughout the areas of target
SOFTWARE INNOVATORS 44
Think big, start small.
Continuously improve
Some interesting sources …
http://itrevolution.com/blog/▫ THE TOP 11 THINGS YOU NEED TO KNOW ABOUT DEVOPS
http://itrevolution.com/11devops
http://blip.tv/oreilly-velocity-conference/velocity-09-john-
allspaw-10-deploys-per-day-dev-and-ops-cooperation-
at-flickr-2297883
SOFTWARE INNOVATORS 45
“Continuous Delivery”
Jez Humble and
David Farley
Done = Released
SOFTWARE INNOVATORS
SOFTWARE INNOVATORS 47
Contact
Léon Hagenaars-Keus Edwin van Dillen
[email protected] [email protected]
030 220 22 16 06 22 50 62 33
Web: www.sogyo.nl
Blog: www.software–innovators.nl