Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Continuous deployment

19,610 views

Published on

Published in: Technology, Business

Continuous deployment

  1. 1. Daniel Pötzinger CIO AOE media GmbH
  2. 2. What is your cycle time?
  3. 3. are youscared on release days?
  4. 4. late night bugfixing?
  5. 5. there is another way!
  6. 6. How?
  7. 7. Automate everything!
  8. 8. Automate everything! build
  9. 9. Automate everything! build test
  10. 10. Automate everything! build test deploy
  11. 11. Do it frequently
  12. 12. Do it frequently ys 3 plo . de fl ickr a day.. tim es
  13. 13. agile agile agile continuous deployment
  14. 14. agile development best practice: agile test driven / refactoring / ddd agile agile continuous deployment
  15. 15. agile development best practice: agile test driven / refactoring / ddd agile continuous integration agile continuous deployment
  16. 16. agile development best practice: agile test driven / refactoring / ddd agile continuous integration agile continuous testing continuous deployment
  17. 17. It is not only the source code!
  18. 18. It is not only the source code! What else?
  19. 19. Source Code
  20. 20. Configuration Source Code
  21. 21. Environments Configuration Source Code
  22. 22. Environments Configuration Data Source Code
  23. 23. Principle s
  24. 24. Check everything into SVN
  25. 25. Check everything into SVN • all source code (of course) • each build script • each important configuration (apache, cronjobs, loadbalancer...)
  26. 26. do continuous integration
  27. 27. do continuous integration t ea rly mi com it often co mm
  28. 28. do continuous integration t ea rly mio ten om av tid f c i o bra co mm nch ing
  29. 29. do continuous integration t ea rly mio ten om av tid f omprehen sive c i o brc c o mm anctestsuite hing
  30. 30. do continuous integration t ea rly mio ten om av tid f omprehen fastsive c i o brc mm anctestsuite feed co hing back
  31. 31. use test automation...
  32. 32. use test automation...
  33. 33. use test automation...
  34. 34. use test automation...
  35. 35. use test automation...
  36. 36. use test automation...
  37. 37. use test automation... ...and feel responsible
  38. 38. automate deployment
  39. 39. automate deployment sa me the loy every dep wa y to ent! nvir onm e
  40. 40. automate deployment sa me the loy every dep do it frequently wa y to ent! nvir onm e
  41. 41. automate deployment adjust c onfigurations on deploy time sa me the loy every dep o do it frequently w ayt nt! iron me env
  42. 42. automate deployment adjust c onfigurations ./deme on de<e y ti ploy.s plo nviro h < ep nme the sam ack nt> y age> de plo ev ery do it frequently yt o w a me nt! env iron
  43. 43. Plan and test rollback
  44. 44. The Deployme nt Pipeline
  45. 45. deployment pipeline test + build package test strategy verification 1 verification II release to production
  46. 46. deployment pipeline test + build package Version 1 test strategy verification 1 verification II release to production
  47. 47. deployment pipeline test + build package test strategy verification 1 Version 1 verification II release to production
  48. 48. deployment pipeline test + build package test strategy verification 1 verification II Version 1 release to production
  49. 49. deployment pipeline test + build package Version 2 test strategy verification 1 verification II Version 1 release to production
  50. 50. deployment pipeline test + build package test strategy verification 1 Version 2 verification II Version 1 release to production
  51. 51. deployment pipeline test + build package Version 3 test strategy verification 1 Version 2 verification II Version 1 release to production
  52. 52. deployment pipeline Build Source (SVN, Backups) Commit Stage Version_1234 Artifacts Repository
  53. 53. deployment pipeline Build Source (SVN, Backups) Acceptance Commit auto Test Stage Stage (latest) Version_1234 Artifacts Repository
  54. 54. deployment pipeline Build Source (SVN, Backups) Acceptance Commit auto Test Stage Stage (latest) Version_1234 Artifacts Repository
  55. 55. deployment pipeline Build Source (SVN, Backups) Acceptance Performance Commit auto Test Stage auto Test Stage (latest) Stage Version_1234 Artifacts Repository
  56. 56. deployment pipeline Build Source (SVN, Backups) Acceptance Performance Commit auto Test Stage auto Test Stage (latest) Stage manual Manual Test Version_1234 Stage Artifacts Repository
  57. 57. deployment pipeline Build Source (SVN, Backups) Acceptance Performance Commit Release auto Test Stage auto Test manual Stage (latest) Stage Stage manual Manual Test Version_1234 Stage Artifacts Repository
  58. 58. deployment pipeline Build Source (SVN, Backups) Acceptance Performance Commit Release auto Test Stage auto Test manual Stage (latest) Stage Stage manual Manual Test Version_1234 Stage Build Downstream Artifacts Repository
  59. 59. deployment pipeline Build Source (SVN, Backups) Acceptance Performance Commit Release auto Test Stage auto Test manual Stage (latest) Stage Stage manual Manual Test Version_1234 Stage Build Downstream Feedback Artifacts Repository
  60. 60. view on artifact repository
  61. 61. the commit stage • <5min: Run Unit Tests asap • <10 min: Build Project (clean, build) • Result: • store all binaries required for deployment • package + releasenotes + unittest xml + deploy scripts
  62. 62. build only one package • pull configuration setting for environment on deploy • be able to rebuild any build by specifying the project revision
  63. 63. acceptance stage
  64. 64. acceptance stage • Define tests in domain specific language
  65. 65. acceptance stage • Define tests in domain specific language • Deployment to Environment „latest“ or „UAT“
  66. 66. acceptance stage • Define tests in domain specific language • Deployment to Environment „latest“ or „UAT“ • Run additional Unit-Test (integration...)
  67. 67. acceptance stage • Define tests in domain specific language • Deployment to Environment „latest“ or „UAT“ • Run additional Unit-Test (integration...) • Run Selenium Tests
  68. 68. Release
  69. 69. Source Code
  70. 70. Configuration Source Code
  71. 71. Environments Configuration Source Code
  72. 72. Environments Configuration Data Source Code
  73. 73. SVN structure for TYPO3 <projectname> branches tags build scripts (ant) trunk build scripts htdocs typo3conf Extensions dependencies are linked (e.g. svn.external)
  74. 74. TYPO3 configuration - Domains: - sys_domain - template: config.baseUrl - localconf.php - Database - Extensionsettings - Loglevel / Devcontext / Logfiles ...
  75. 75. Environments (example) dev x latest test (UAT) production
  76. 76. Environments (example) dev x latest test (UAT) performance production
  77. 77. Environments (example) dev x latest test (UAT) performance integration production
  78. 78. Environments (example) dev x latest test (UAT) performance integration stage production
  79. 79. managing data
  80. 80. managing data Production: - Content - Transaction data
  81. 81. managing data Production: Deploy: - Content - Configuration - Transaction data - Content
  82. 82. managing data Production: Deploy: UAT: - Content - Configuration - Testdata - Transaction data - Content
  83. 83. managing data Backupstorage Production: Deploy: UAT: - Content - Configuration - Testdata - Transaction data - Content
  84. 84. managing data Backupstorage Production: Deploy: UAT: - Content - Configuration - Testdata - Transaction data - Content
  85. 85. managing data Backupstorage use independent technical IDs Production: Deploy: UAT: - Content - Configuration - Testdata - Transaction data - Content
  86. 86. Hot Deployment
  87. 87. what to deploy? - database structure changes - configuration data - updated content - source code
  88. 88. build steps Preparation SVN Filesystem backupstorage Database Package
  89. 89. build steps Preparation: - clean - revision Tag extensions
  90. 90. build steps Filesystem: - checkout project from SVN - build TYPO3 source - get defined extensions - get assets (fileadmin / uploads) - create a version file
  91. 91. build steps Database: - create structure from Master - import master data - update database structure - import data from the systems - merge data
  92. 92. build steps Database: - create structure from Master - import master data - update database structure - import data from the systems - merge data structure_up.sql merge.sql
  93. 93. package Package (Delta): - use files from build process + create filesystem delta + tar.gz all the stuff
  94. 94. deploying a package - Deploy Database: - structure_up.sql - merge.sql - all full-*.sqls - Deploy Filesystem - Apply environment Settings - Clear Cache - Run Crawler
  95. 95. ...
  96. 96. useful extensions - clearcache (enables „clear all cache“ from commandline) - db_sequenzer (seperate technical ids as basis for merges) - t3deploy (cli access to installtool > database compare)
  97. 97. green / blue deployment current live version previous live version
  98. 98. green / blue deployment current live version previous live version Deploy
  99. 99. green / blue deployment previous live version current live version Deploy
  100. 100. Hudson
  101. 101. Hudson
  102. 102. Hudson
  103. 103. Hudson
  104. 104. is your deployment still a gamble?
  105. 105. is your deployment still a gamble?

×