Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mobile: DevOps or Not DevOps

Mobile: DevOps or Not DevOps

Vladimir Ivanov

October 21, 2019
Tweet

More Decks by Vladimir Ivanov

Other Decks in Technology

Transcript

  1. DevOps иль не DevOps, вот в чем вопрос. Достойно ли

    Деплоить приложения в АппСтор Не ведая контроля над девайсом Иль бросить все и выучить проклятый кубернетес? 2
  2. DevOps Prac,ces • Secured process • Con.nuous integra.on • Con.nuous

    delivery • Frequent releases(Canary/BG deployments) 6
  3. DevOps Prac,ces • Secured process • Con.nuous integra.on • Con.nuous

    delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng 6
  4. DevOps Prac,ces • Secured process • Con.nuous integra.on • Con.nuous

    delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring 6
  5. DevOps Prac,ces • Secured process • Con.nuous integra.on • Con.nuous

    delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring • Automated rollback 6
  6. 7

  7. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers 7
  8. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code 7
  9. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code • deploy the App 7
  10. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code • deploy the App • no,fy about status 7
  11. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code • deploy the App • no,fy about status • run e2e tests 7
  12. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code • deploy the App • no,fy about status • run e2e tests • provide Logs, Ar,facts & Build Reports 7
  13. • run Lint/Sta,c Analysis on the Code • run Unit

    Tests • maintain Build Numbers • build the App from Code • deploy the App • no,fy about status • run e2e tests • provide Logs, Ar,facts & Build Reports • and actually many more 7
  14. 8

  15. 10

  16. 11

  17. 14

  18. 15

  19. 17

  20. 18

  21. 19

  22. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on •

    Con.nuous delivery • Frequent releases(Canary/BG deployments) 20
  23. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on •

    Con.nuous delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng 20
  24. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on •

    Con.nuous delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring 20
  25. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on •

    Con.nuous delivery • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring • Automated rollback 20
  26. 22

  27. 23

  28. Rollouts • Internal tes+ng, Alpha and Beta channels in Google

    Play • Internal tes+ng, Public Tes+ng in TestFlight 24
  29. Rollouts • Internal tes+ng, Alpha and Beta channels in Google

    Play • Internal tes+ng, Public Tes+ng in TestFlight • Public releases support staged rollouts 24
  30. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) 28
  31. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng 28
  32. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring 28
  33. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng • Monitoring • Automated rollback 28
  34. 30

  35. How to cope with devices? • Buy our own(expensive) •

    Test on Emulators(bad quality) • Device Farms 32
  36. 33

  37. 34

  38. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) 35
  39. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ 35
  40. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring 35
  41. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring • Automated rollback 35
  42. Monitoring • Mobile apps run on the user devices and

    deployed through stores which make them unmanageable 36
  43. Monitoring • Mobile apps run on the user devices and

    deployed through stores which make them unmanageable • However observability is s:ll in place 36
  44. What can be gathered • Free device memory • Free

    process memory • Device, OS Version 38
  45. What can be gathered • Free device memory • Free

    process memory • Device, OS Version • Ac6ve users 38
  46. What can be gathered • Free device memory • Free

    process memory • Device, OS Version • Ac6ve users • Session lengths 38
  47. What can be gathered • Free device memory • Free

    process memory • Device, OS Version • Ac6ve users • Session lengths • Thread dump 38
  48. What can be gathered • Free device memory • Free

    process memory • Device, OS Version • Ac6ve users • Session lengths • Thread dump • Stacktrace 38
  49. 39

  50. 41

  51. 42

  52. 43

  53. 44

  54. 46

  55. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) 47
  56. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ 47
  57. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ 47
  58. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ • Automated rollback 47
  59. 51

  60. Possible solu*ons • Feature flags and server configs • Usage

    of React-Na7ve or other js based technologies 52
  61. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) 53
  62. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ 53
  63. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ 53
  64. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ • Automated rollback ❌ 53
  65. 57

  66. • Iden&fying slow code parts • Caching dependencies • Modulariza&on

    • Build systems hacks • And more10 10 h%ps:/ /medium.com/@joshgare/8-9ps-to-speed-up-your-swi=-build-and-compile-9mes-in-xcode-73081e1d84ba 57
  67. 61

  68. 64

  69. 65

  70. • Checkout the code • Install the dependencies • Compile

    Android • Compile iOS • Sign both 65
  71. • Checkout the code • Install the dependencies • Compile

    Android • Compile iOS • Sign both • Deploy both 65
  72. • Checkout the code • Install the dependencies • Compile

    Android • Compile iOS • Sign both • Deploy both 66
  73. 68

  74. Gradle • Takes 1 minute to configure 1300 modules •

    Due to IO and unlimited immutability 70
  75. Local Jenkins • Free • Great flexibility • Agents system

    • Decent plugin system • For iOS: just install an agent on a Mac 75
  76. Local Jenkins • Free • Great flexibility • Agents system

    • Decent plugin system • For iOS: just install an agent on a Mac • But no containeriza@on out-of-the-box 75
  77. Local Jenkins • Free • Great flexibility • Agents system

    • Decent plugin system • For iOS: just install an agent on a Mac • But no containeriza@on out-of-the-box • All support burden is on your shoulders 75
  78. 77

  79. 78

  80. 79

  81. Pros ✨ More than 400 integra.ons " 100% open source

    under the MIT license ⚒ Runs on your machine, it's your app and your data $ Supports iOS, Mac, and Android apps % Extendable 80
  82. When • For educa+on purposes and student projects • For

    companies which already use Jenkins 81
  83. When • For educa+on purposes and student projects • For

    companies which already use Jenkins • For security paranoids(debatable) 81
  84. Jenkins in Cloud • Solves the containeriza1on issue • Support

    burden is par1ally decreased • Unclear how to solve Mac issue 82
  85. 3rd party services • GitLab CI • Circle CI •

    Nevercode • App Center • Bitrise 84
  86. GitLab CI/Circle CI • Very basic support(mac machines, xcode, gradle)

    • Integra;on with the parent tool • Yaml editor as an interface 85
  87. GitLab CI/Circle CI • Very basic support(mac machines, xcode, gradle)

    • Integra;on with the parent tool • Yaml editor as an interface • Almost no mobile specific involved 85
  88. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal 87
  89. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) 87
  90. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) • Configura:on as Code ✅ 87
  91. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) • Configura:on as Code ✅ • Mobile Apps as first class ci:zens ✅ 87
  92. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) • Configura:on as Code ✅ • Mobile Apps as first class ci:zens ✅ • Cloud based ✅ 87
  93. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) • Configura:on as Code ✅ • Mobile Apps as first class ci:zens ✅ • Cloud based ✅ • Allows for Machine Pools(which solves Mac issue) 87
  94. App Center - Azure DevOps • Part of the integrated

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) • Configura:on as Code ✅ • Mobile Apps as first class ci:zens ✅ • Cloud based ✅ • Allows for Machine Pools(which solves Mac issue) • Webhooks 87
  95. App Center - Azure DevOps • Support for ad-hoc git

    servers ❌ • SonarQube Support - ❌ 88
  96. App Center - Azure DevOps • Support for ad-hoc git

    servers ❌ • SonarQube Support - ❌ • Local debug - ❌ 88
  97. App Center - When • You already have Azure DevOps/Azure

    subscrip8on • You're hosted in Bitbucket/Github 89
  98. App Center - When • You already have Azure DevOps/Azure

    subscrip8on • You're hosted in Bitbucket/Github • You only want apps distribu8on solu8on 89
  99. 90

  100. Nevercode • Mobile Centric CI/CD • Distribu3on des3na3ons - App

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy 91
  101. Nevercode • Mobile Centric CI/CD • Distribu3on des3na3ons - App

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy • Bitbucket, GitHub or GitLab 91
  102. Nevercode • Mobile Centric CI/CD • Distribu3on des3na3ons - App

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy • Bitbucket, GitHub or GitLab • Cloud based ✅ 91
  103. Nevercode • Mobile Centric CI/CD • Distribu3on des3na3ons - App

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy • Bitbucket, GitHub or GitLab • Cloud based ✅ • Mobile Apps as first class ci3zens ✅ 91
  104. Nevercode • Mobile Centric CI/CD • Distribu3on des3na3ons - App

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy • Bitbucket, GitHub or GitLab • Cloud based ✅ • Mobile Apps as first class ci3zens ✅ • Webhooks ✅ 91
  105. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever 94
  106. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom 94
  107. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom • Configura3on as Code ✅ 94
  108. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom • Configura3on as Code ✅ • Mobile Apps as first class ci3zens ✅ 94
  109. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom • Configura3on as Code ✅ • Mobile Apps as first class ci3zens ✅ • Cloud based ✅ 94
  110. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom • Configura3on as Code ✅ • Mobile Apps as first class ci3zens ✅ • Cloud based ✅ • Webhooks 94
  111. Bitrise • Support for ad-hoc git servers ✅ • Support

    CI job triggers on push to Any branch 95
  112. Bitrise • Support for ad-hoc git servers ✅ • Support

    CI job triggers on push to Any branch • SonarQube Support with a community extension 95
  113. Bitrise • Support for ad-hoc git servers ✅ • Support

    CI job triggers on push to Any branch • SonarQube Support with a community extension • Local debug - ✅ 95
  114. Bitrise • Support for ad-hoc git servers ✅ • Support

    CI job triggers on push to Any branch • SonarQube Support with a community extension • Local debug - ✅ • Open source 95
  115. 96

  116. Services Comparison App Center Nevercode Bitrise Simplicity ✅ Flu,er ✅

    Flexible ✅ Device Cloud ✅ Build cache ✅ Build cache ✅ Crash Repor;ng ✅ No Xamarin ❌ Different inf. stacks ✅ Difficult customiza;on ❌ No conf as service ❌ Open Source ✅ Funny jokes Slow ❌ 98
  117. 99

  118. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) 100
  119. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ 100
  120. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ 100
  121. DevOps Prac,ces • Secured process ✅ • Con.nuous integra.on ✅

    • Con.nuous delivery ✅ • Frequent releases(Canary/BG deployments) • Automated tes.ng ✅ • Monitoring ✅ • Automated rollback ❌ 100
  122. Summary • Mobile is a serious business requiring automa2on •

    There are some caveats and issues which are overcomeable 101
  123. Summary • Mobile is a serious business requiring automa2on •

    There are some caveats and issues which are overcomeable • Except rollbacks 101
  124. 102