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 30, 2019
Tweet

More Decks by Vladimir Ivanov

Other Decks in Programming

Transcript

  1. 6

  2. 7

  3. DevOps Prac,ces • Con%nuous integra%on • Con%nuous delivery • Secured

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

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

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

    process • Frequent releases(Canary/BG deployments) • Automated tes%ng • Monitoring • Automated rollback 8
  7. 12

  8. 13

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

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

    Play • Internal tes+ng, Public Tes+ng in TestFlight • Public releases support staged rollouts 14
  11. 17

  12. 18

  13. 20

  14. 21

  15. 22

  16. DevOps Prac,ces • Con%nuous integra%on ✅ • Con%nuous delivery ✅

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

    • Secured process ✅ • Frequent releases(Canary/BG deployments) • Automated tes%ng • Monitoring • Automated rollback 27
  18. 29

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

    Test on Emulators(bad quality) • Device Farms 31
  20. 32

  21. Device Farms • AWS Device Farm • Firebase device farm

    • Azure Device Farm • Others 33
  22. Device Farms • AWS Device Farm • Firebase device farm

    • Azure Device Farm • Others • Your own 33
  23. What would you need • Web Server • Logs Storage

    • Devices • Media to connect to the devices(add, xcrun) 35
  24. 37

  25. Easy part... • List of devices $ adb devices $

    xcrun simctl list • Installa1on and uploading files $ adb push selfie.png /sdcard0/Downloads $ adb install -r myCoolApp.apk $ xcrun altool --upload-app --type ios --file "path/ to/application.ipa" --username "YOUR_ITMC_USER" -- password "YOUR_ITMC_PASSWORD" 38
  26. Complex thing • Streaming Android: adb, scrcpy2 tool iOS: xcrun

    2 h$ps:/ /blog.rom1v.com/2018/03/introducing-scrcpy/ 39
  27. 40

  28. In EPAM • Mobile farm for Mobile CC • Free

    for the projects at the moment 41
  29. In EPAM • Mobile farm for Mobile CC • Free

    for the projects at the moment • Plans for commercial offerings 41
  30. DevOps Prac,ces • Con%nuous integra%on ✅ • Con%nuous delivery ✅

    • Secured process ✅ • Frequent releases(Canary/BG deployments) • Automated tes%ng ✅ • Monitoring • Automated rollback 42
  31. 43

  32. Observability • Mobile apps run on the user devices and

    deployed through stores which make them unmanageable 44
  33. Observability • Mobile apps run on the user devices and

    deployed through stores which make them unmanageable • However observability is s:ll in place 44
  34. Crash Repor+ng and Analy+cs • Your own(with help of ACRA)

    • Firebase Analy:cs • AppCenter 45
  35. Crash Repor+ng and Analy+cs • Your own(with help of ACRA)

    • Firebase Analy:cs • AppCenter • Sentry 45
  36. Crash Repor+ng and Analy+cs • Your own(with help of ACRA)

    • Firebase Analy:cs • AppCenter • Sentry • Bugsnag 45
  37. What can be gathered • Free device memory • Free

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

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

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

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

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

    process memory • Device, OS Version • Ac6ve users • Session lengths • Thread dump • Stacktrace • Many more 46
  43. 47

  44. 49

  45. 51

  46. 52

  47. 53

  48. 54

  49. 55

  50. 57

  51. DevOps Prac,ces • Con%nuous integra%on ✅ • Con%nuous delivery ✅

    • Secured process ✅ • Frequent releases(Canary/BG deployments) • Automated tes%ng ✅ • Monitoring ✅ • Automated rollback 58
  52. 62

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

    of React-Na7ve or other js based technologies 63
  54. DevOps Prac,ces • Con%nuous integra%on ✅ • Con%nuous delivery ✅

    • Secured process ✅ • Frequent releases(Canary/BG deployments) • Automated tes%ng ✅ • Monitoring ✅ • Automated rollback ❌ 64
  55. How to fight long build /mes • Iden&fying slow code

    parts • Caching dependencies 68
  56. How to fight long build /mes • Iden&fying slow code

    parts • Caching dependencies • Modulariza&on 68
  57. How to fight long build /mes • Iden&fying slow code

    parts • Caching dependencies • Modulariza&on • Build systems hacks 68
  58. How to fight long build /mes • 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 68
  59. iOS • CocoaPods - source code based, own build spec

    • Carthage - dynamic frameworks 71
  60. iOS • CocoaPods - source code based, own build spec

    • Carthage - dynamic frameworks • Swi=PM - built by Apple 71
  61. iOS • CocoaPods - source code based, own build spec

    • Carthage - dynamic frameworks • Swi=PM - built by Apple • no resources support 71
  62. iOS • CocoaPods - source code based, own build spec

    • Carthage - dynamic frameworks • Swi=PM - built by Apple • no resources support • single language per package 71
  63. iOS • CocoaPods - source code based, own build spec

    • Carthage - dynamic frameworks • Swi=PM - built by Apple • no resources support • single language per package • problems having binary deps 71
  64. 73

  65. 76

  66. 77

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

    Android • Compile iOS • Sign both 77
  68. • Checkout the code • Install the dependencies • Compile

    Android • Compile iOS • Sign both • Deploy both 77
  69. • Checkout the code • Install the dependencies • Compile

    Android • Compile iOS • Sign both • Deploy both 78
  70. 80

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

    Due to IO and unlimited immutability 82
  72. Local Jenkins • Free • Great flexibility • Agents system

    • Decent plugin system • For iOS: just install an agent on a Mac 87
  73. 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 87
  74. 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 87
  75. 89

  76. 90

  77. 91

  78. 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 92
  79. When • For educa+on purposes and student projects • For

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

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

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

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

    • Integra;on with the parent tool • Yaml editor as an interface 97
  84. 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 97
  85. App Center - Azure DevOps • Part of the integrated

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

    environment(former TFS) • Distribu:on des:na:ons - GP, TestFlight, Internal • Bitbucket, Github, VSTS, GitLab(!) 99
  87. 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 ✅ 99
  88. 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 ✅ 99
  89. 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 ✅ 99
  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 ✅ • Mobile Apps as first class ci:zens ✅ • Cloud based ✅ • Allows for Machine Pools(which solves Mac issue) 99
  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 ✅ • Cloud based ✅ • Allows for Machine Pools(which solves Mac issue) • Webhooks 99
  92. App Center - Azure DevOps • Support for ad-hoc git

    servers ❌ • SonarQube Support - ❌ 100
  93. App Center - Azure DevOps • Support for ad-hoc git

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

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

    subscrip8on • You're hosted in Bitbucket/Github • You only want apps distribu8on solu8on 101
  96. 102

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

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

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

    Store Connect, Google Play, HockeyApp, Crashly3cs, TestFairy • Bitbucket, GitHub or GitLab • Cloud based ✅ 103
  100. 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 ✅ 103
  101. 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 ✅ 103
  102. Bitrise • Mobile Centric CI/CD • Distribu3on des3na3ons - GP,

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

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

    TestFlight, TestFairy, App Center, Whatever • Bitbucket, Github, Custom • Configura3on as Code ✅ 106
  105. 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 ✅ 106
  106. 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 ✅ 106
  107. 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 106
  108. Bitrise • Support for ad-hoc git servers ✅ • Support

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

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

    CI job triggers on push to Any branch • SonarQube Support with a community extension • Local debug - ✅ 107
  111. 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 107
  112. 108

  113. 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 ❌ 110
  114. 111

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

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

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

    There are some caveats and issues which are overcomeable • Except rollbacks 113
  118. 114