wilko nienhaus - continuous delivery release the right thing, done right, at the right time - con fu
TRANSCRIPT
DEVCONFU NOV 2014
CONTINUOUS DELIVERY
ABOUT ME• Enjoy Software Development • Started programming on an IBM compatible, 8088 8MHz
XT, 640k RAM, 10MB disk • Been through a few programming languages
1989 -> GW-BASIC -> Turbo Pascal 5 -> Turbo Pascal 7 -> x86 Assembly -> Delphi 3.0 -> SQL -> Visual Basic 6.0 -> Java SE 1.4 -> C++ -> C
-> Bash scripting -> Prolog -> Scheme -> C# -> HAL -> Objective-C -> Java SE 1.6 -> PHP 5.x -> Python 2.6 -> 2014 (NOW) -> Go?
ABOUT ME• I enjoy a challenge! • Giving up is not an option! • I enjoy improving things continuously!
ABOUT VAIMO!
• 100% eCommerce, 100% Magento • Full-service (web design, development, hosting, strategy) • Magento is biggest Open Source eCommerce Platform
• PHP/MySQL • I am 1 of 27 in Tallinn
WHY?
CONTINUOUS DELIVERY
WHY• Iterate faster, faster feedback • More reliable, less stressful releases • Less meetings • More fun!
BACKGROUND• Agile/Scrum (process) + XP (practices) • Continuous Integration • Continuous Deployment • DevOps
THE NAME
From the Agile Manifesto: !
Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.
Source: http://agilemanifesto.org/principles.html
WHAT?
CONTINUOUS DELIVERY
WHAT!
• Fast feedback on the production readiness of any change !
• The ability to reliably deploy that change into production on demand
HOW?
CONTINUOUS DELIVERY
HOW• Automate deployment • Infrastructure as code • Some form of testing • Developer practices • Mindset/culture
AUTOMATE DEPLOYMENT• Build only once • Only deploy green builds • Single path to production! • Deploy the same way everywhere
INFRASTRUCTURE AS CODE• Strive to keep all environments the same • Infrastructure automation
• Chef, Puppet, Ansible, etc • Share that code between development and ops • Do Continuous Delivery here too!
"It w
orks
on m
y mac
hine!"
TESTING• Manual testing is fine
• But expensive, easy to miss things • are you confident enough?
• Two type of tests • Unit tests (developer) • Acceptance tests (customer)
• Tools • Unit testing tools (JUnit, PHPUnit) • System testing (Selenium, CasperJS)
DEVELOPER PRACTICES• TDD • Refactoring • Pair-programming • Good design • Commit to mainline (vs long running branches)
FEATURE FLAGS• also called Flippers, or Toggles, Feature Bits • Commit to mainline • Hide features that are not done • Code is always integrated • Off by default by design • Feature can be selectively enabled • BUT: Prefer slicing stories thinner
Feature Flag Frameworks: http://www.beautifulbuilds.com/feature-toggle-frameworks-list/
MINDSET• Release != Deploy • Small units of deployment • Care about feedback • Care about production • Focus on learning • Who will pay for this?
DEPLOYMENT PIPELINE
Hack, hack hack...
Version Control
Code Review
Build + Unit Tests
Smoke Tests
Deploy Live!
Manual Automatic
MAGENTO + FEATURE FLAGS
DEMO TIME
DATABASE SCHEMA• Don't do using Continuous Delivery • But do use strategies
• migration frameworks (rails, south, Liquibase) • DB Thursday • 3 step change-overs
• Always keep in mind: • what if we need to back out?
I, THE SINGLE DEV?• How do I benefit, if my company does not buy into this? • Write tests • Get a CI server up (make it give feedback) • Automate deployment • Automate your own dev machine (vagrant, puppet) • Leverage the mindset
QUESTIONS?