Pro Yearly is on sale from $80 to $50! »

I deploy on Fridays (and maybe you should too) (Lean Agile Scotland 2018)

I deploy on Fridays (and maybe you should too) (Lean Agile Scotland 2018)

Have you ever heard yourself or someone else say "Don't deploy on Friday"? Perhaps it's your company's policy?

I used to have a 'Fear of Fridays' too! Join me as I tell you about my experiences and how I improved. Learn about risk and confidence, build pipelines (with Jenkins), automated testing, continuous deployment and monitoring. Discover the details of trunk-based development, feature toggles, pair programming and other best practices, and gain the confidence to deploy multiple times per day, any day of the week!

2f4800411154a8c66dde489448a044d2?s=128

Michiel Rook

October 04, 2018
Tweet

Transcript

  1. I DEPLOY ON
 FRIDAYS
 (AND MAYBE YOU SHOULD TOO) @MICHIELTCS

  2. None
  3. DEPLOYING

  4. ON A FRIDAY

  5. DEPLOYING?

  6. ON A
 FRIDAY??

  7. None
  8. None
  9. None
  10. None
  11. BUT WHY?

  12. RISK

  13. CONTROL

  14. CONFIDENCE

  15. TRUST

  16. TIME TO REPAIR / RECOVER

  17. ON-CALL

  18. DON'T DEPLOY ON A FRIDAY

  19. I USED TO SAY THAT TOO

  20. I LIKE MY WEEKENDS

  21. AND MY EVENINGS

  22. WHAT ABOUT BUGS?

  23. WHAT ABOUT 3 PM?

  24. WHAT ABOUT THURSDAY?

  25. IMPROVE!

  26. IF IT HURTS
 DO IT MORE OFTEN

  27. * THE BEATINGS WILL CONTINUE UNTIL MORALE IMPROVES

  28. FRIDAY IS 20%
 OF THE WEEK

  29. SMALL STEPS

  30. @FGOULDING

  31. CONTINUOUS EVERYTHING

  32. PROJECT PRODUCT

  33. CONTINUOUS INTEGRATION

  34. DEV BUILD / TEST CONTINUOUS INTEGRATION @michieltcs

  35. INTEGRATE AT LEAST
 DAILY

  36. CONTINUOUS DELIVERY

  37. DEV BUILD / TEST ACCEPTANCE PRODUCTION CONTINUOUS DELIVERY @michieltcs

  38. CODE IS ALWAYS
 IN A RELEASABLE STATE

  39. CONTINUOUS DEPLOYMENT

  40. DEV BUILD / TEST ACCEPTANCE PRODUCTION CONTINUOUS DEPLOYMENT @michieltcs

  41. DELIVERING VALUE TO USERS

  42. SAFELY & QUICKLY

  43. IN A SUSTAINABLE WAY

  44. @michieltcs HIGH VS. LOW PERFORMING TEAMS Source: 2017 State Of

    DevOps report
  45. AUTOMATION

  46. AUTOMATION
 AUTOMATION

  47. AUTOMATION
 AUTOMATION
 AUTOMATION

  48. BUT OUR CODE IS OLD

  49. BUT OUR CODE IS NOT UNDER TEST

  50. BUT OUR CODE IS IMPOSSIBLE TO CHANGE

  51. DEALING WITH "LEGACY"

  52. STRANGLER PATTERN

  53. ORIGINAL MONOLITH DB @michieltcs

  54. ORIGINAL MONOLITH PROXY SERVICE ORIGINAL MONOLITH DB DB DB @michieltcs

  55. ORIGINAL MONOLITH PROXY SERVICE ORIGINAL MONOLITH ORIGINAL MONOLITH SERVICE SERVICE

    SERVICE PROXY DB DB DB DB DB DB @michieltcs
  56. BRANCH BY ABSTRACTION

  57. CLIENT OLD MODULE CLIENT CLIENT @michieltcs

  58. CLIENT ABSTRACTION LAYER OLD MODULE CLIENT CLIENT @michieltcs

  59. CLIENT ABSTRACTION LAYER OLD MODULE CLIENT CLIENT @michieltcs

  60. CLIENT ABSTRACTION LAYER OLD MODULE CLIENT CLIENT ABSTRACTION LAYER NEW

    MODULE @michieltcs
  61. CLIENT ABSTRACTION LAYER OLD MODULE CLIENT CLIENT ABSTRACTION LAYER NEW

    MODULE @michieltcs
  62. CLIENT ABSTRACTION LAYER CLIENT CLIENT NEW MODULE @michieltcs

  63. CLIENT NEW MODULE CLIENT CLIENT @michieltcs

  64. ON BRANCHES...

  65. CONFLICTS

  66. "This pull request affects 31 files...
 could be a lot

    of conflicts if we don't merge it soon"
  67. None
  68. DELAYING INTEGRATION

  69. BRANCHING STRATEGIES

  70. BRANCHING STRATEGIES 1. DON'T BRANCH

  71. BRANCHING STRATEGIES 1. DON'T BRANCH 2. DON'T BRANCH

  72. BRANCHING STRATEGIES 1. DON'T BRANCH 2. DON'T BRANCH 3. DON'T

    BRANCH
  73. None
  74. TRUNK
 BASED DEVELOPMENT

  75. SHORT LIVED
 FEATURE BRANCHES?

  76. PULL REQUESTS?

  77. CODE REVIEWS

  78. FLOW DELAY

  79. PAIR PROGRAMMING

  80. CONTINUOUS INLINE
 CODE REVIEW

  81. MERGING FEATURES?

  82. DECOUPLE
 DEPLOYMENTS FROM RELEASES

  83. FEATURE TOGGLES

  84. None
  85. @michieltcs

  86. FEATURE TOGGLE DEBT

  87. PIPELINES

  88. COMPILE CHECKOUT TEST PACKAGE

  89. COMPILE CHECKOUT TEST PACKAGE

  90. COMPILE CHECKOUT TEST PACKAGE

  91. COMPILE CHECKOUT TEST PACKAGE

  92. COMPILE CHECKOUT TEST PACKAGE

  93. DEPLOY ACC VERIFY ACC DEPLOY PROD VERIFY PROD

  94. DEPLOY ACC VERIFY ACC DEPLOY PROD VERIFY PROD

  95. DEPLOY ACC VERIFY ACC DEPLOY PROD VERIFY PROD

  96. DEPLOY ACC VERIFY ACC DEPLOY PROD VERIFY PROD

  97. DEPLOY ACC VERIFY ACC DEPLOY PROD VERIFY PROD

  98. CONTINUOUS TESTING

  99. POTENTIAL TESTING LAYERS UNIT TESTS INTEGRATION
 TESTS ACCEPTANCE
 TESTS UI

    TESTS @michieltcs
  100. UNIT TESTS INTEGRATION
 TESTS ACCEPTANCE UI TESTS @Test
 public void

    jobCannotBeFound() {
 when(jobRepository.getById(EXPECTED_JOB_ID))
 .thenReturn(null);
 
 JobService jobService = new JobService(jobRepository);
 
 assertNull(jobService.getById(EXPECTED_JOB_ID));
 verify(jobRepository).getById(EXPECTED_JOB_ID);
 } @michieltcs POTENTIAL TESTING LAYERS
  101. UNIT TESTS INTEGRATION
 TESTS ACCEPTANCE
 TESTS UI TESTS @Test
 public

    void shouldFindJob() {
 expectedJob = loadFixture('active_job.yml');
 actualJob = repository.getById(expectedJob.getId());
 
 assertThat(actualJob, isA(Job.class));
 assertEquals(expectedJob.getId(), actualJob.getId());
 } @michieltcs POTENTIAL TESTING LAYERS
  102. UNIT TESTS INTEGRATION
 TESTS ACCEPTANCE
 TESTS UI TESTS Scenario: Link

    to related job
 Given a job exists
 And there are related jobs available
 When that job is viewed
 Then a list of related jobs is shown
 And each related job links to the detail page of the related job @michieltcs POTENTIAL TESTING LAYERS
  103. POTENTIAL TESTING LAYERS UNIT TESTS INTEGRATION
 TESTS ACCEPTANCE
 TESTS UI

    TESTS @michieltcs
  104. CONTINUOUS TESTING UNIT TESTS ACCEPTANCE TESTS UI
 TESTS Cost Speed

    INTEGRATION TESTS @michieltcs
  105. CONTINUOUS TESTING UNIT TESTS ACCEPTANCE TESTS UI
 TESTS Cost Speed

    Exploratory
 testing & user
 feedback Monitoring
 & alerting INTEGRATION TESTS @michieltcs
  106. GOOD ENOUGH

  107. NO TEST SUITE DETECTS EVERY ISSUE

  108. PIPELINE SPEED = KEY

  109. DEPLOYMENTS

  110. CANARY

  111. LOAD BALANCER SERVICE V1.0 SERVICE V1.1 CANARY 100% 0% SERVICE

    V1.0 SERVICE V1.1 SERVICE V1.0 SERVICE V1.1 @michieltcs
  112. LOAD BALANCER SERVICE V1.0 SERVICE V1.1 CANARY 99% 1% SERVICE

    V1.0 SERVICE V1.1 SERVICE V1.0 SERVICE V1.1 @michieltcs
  113. LOAD BALANCER SERVICE V1.0 SERVICE V1.1 CANARY 50% 50% SERVICE

    V1.0 SERVICE V1.1 SERVICE V1.0 SERVICE V1.1 @michieltcs
  114. LOAD BALANCER SERVICE V1.0 SERVICE V1.1 CANARY 0% 100% SERVICE

    V1.0 SERVICE V1.1 SERVICE V1.0 SERVICE V1.1 @michieltcs
  115. LOAD BALANCER SERVICE V1.0 SERVICE V1.1 CANARY 0% 100% SERVICE

    V1.0 SERVICE V1.1 SERVICE V1.0 SERVICE V1.1 @michieltcs
  116. ROLLING UPDATE

  117. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.0 SERVICE V1.0

    @michieltcs
  118. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.0 SERVICE V1.0

    SERVICE V1.1 @michieltcs
  119. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.1 SERVICE V1.0

    SERVICE V1.0 @michieltcs
  120. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.1 SERVICE V1.0

    SERVICE V1.1 @michieltcs
  121. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.1 SERVICE V1.1

    SERVICE V1.0 @michieltcs
  122. LOAD BALANCER ROLLING UPDATE SERVICE V1.0 SERVICE V1.1 SERVICE V1.1

    SERVICE V1.1 @michieltcs
  123. LOAD BALANCER ROLLING UPDATE SERVICE V1.1 SERVICE V1.1 SERVICE V1.1

    SERVICE V1.0 @michieltcs
  124. LOAD BALANCER ROLLING UPDATE SERVICE V1.1 SERVICE V1.1 SERVICE V1.1

    @michieltcs
  125. BUILD PIPELINE @michieltcs

  126. FEEDBACK!

  127. None
  128. DEPLOYING

  129. ON A FRIDAY

  130. None
  131. YOU CAN DO IT TOO!

  132. LITERATURE https://trunkbaseddevelopment.com/ @michieltcs

  133. THANK YOU! @michieltcs / michiel@michielrook.nl www.michielrook.nl