Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

24

Transcript of Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

Page 1: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu
Page 2: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

DEVCONFU NOV 2014

CONTINUOUS DELIVERY

Page 3: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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?

Page 4: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

ABOUT ME• I enjoy a challenge! • Giving up is not an option! • I enjoy improving things continuously!

Page 5: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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

Page 6: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

WHY?

CONTINUOUS DELIVERY

Page 7: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

WHY• Iterate faster, faster feedback • More reliable, less stressful releases • Less meetings • More fun!

Page 8: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

BACKGROUND• Agile/Scrum (process) + XP (practices) • Continuous Integration • Continuous Deployment • DevOps

Page 9: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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

Page 10: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

WHAT?

CONTINUOUS DELIVERY

Page 11: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

WHAT!

• Fast feedback on the production readiness of any change !

• The ability to reliably deploy that change into production on demand

Page 12: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

HOW?

CONTINUOUS DELIVERY

Page 13: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

HOW• Automate deployment • Infrastructure as code • Some form of testing • Developer practices • Mindset/culture

Page 14: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

AUTOMATE DEPLOYMENT• Build only once • Only deploy green builds • Single path to production! • Deploy the same way everywhere

Page 15: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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!"

Page 16: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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)

Page 17: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

DEVELOPER PRACTICES• TDD • Refactoring • Pair-programming • Good design • Commit to mainline (vs long running branches)

Page 18: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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/

Page 19: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

MINDSET• Release != Deploy • Small units of deployment • Care about feedback • Care about production • Focus on learning • Who will pay for this?

Page 20: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

DEPLOYMENT PIPELINE

Hack, hack hack...

Version Control

Code Review

Build + Unit Tests

Smoke Tests

Deploy Live!

Manual Automatic

Page 21: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

MAGENTO + FEATURE FLAGS

DEMO TIME

Page 22: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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?

Page 23: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

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

Page 24: Wilko Nienhaus - continuous delivery release the right thing, done right, at the right time - con fu

QUESTIONS?