Deployment Strategies – The Good, the Bad and the Ugly

Deployment Strategies – The Good, the Bad and the Ugly

Overview of proven software development principles.

09677128abcb12c688ed29f2d8359fae?s=128

Peter Foerger

July 16, 2017
Tweet

Transcript

  1. dkd Internet Service GmbH TYPO3 Developer Days 2017 the good,

    the bad and the ugly deployment strategies 1
  2. agenda • the ugly • the bad • the good

    2
  3. 3 who`s that guy?

  4. Peter Foerger • DevOps Engineer • dkd Internet Service GmbH

    • TCCI • TCCD • @bauschan 4
  5. 5 »The first rule of any technology used in a

    business is that automation applied to an efficient operation will magnify the efficiency.«
  6. 6 »The second is that automation applied to an inefficient

    operation will magnify the inefficiency.«
  7. None
  8. the ugly 8

  9. None
  10. deploying software manually 10

  11. antipattern: manual deployment • extensive documentation • manual testing •

    frequent corrections to the release process • environments that differ • releases are unpredictable in their outcome 11
  12. the bad 12

  13. different environments 13

  14. None
  15. antipattern: different environments • testing on development machines • different

    binaries, installers, configuration files • no collaboration between developers and operation • manual configuration management • deploy successful to staging, deploying into production fails • modifying configuration directly on production systems 15
  16. can we do better? 16

  17. the good 17

  18. agile commandments • thou shall keep your code in a

    repository • thou shall automate the build • thou shall keep the build fast and green • thou shall automate deployment • thou shall make builds self testing • thou shall test in clone of the production environment • thou shall make it easy to get the latest version 18
  19. build radical

  20. build radical Reusable Accessible Documented Integrated Complete Automated Lean 20

  21. continuous integration Grady Booch (first draft 1991) adopted by XP

    21
  22. 22 »Continuous Integration doesn’t get rid of bugs, but it

    does make them dramatically easier to find and remove.« Martin Fowler, Chief Scientist, ThoughtWorks
  23. 23 frequency is everything

  24. 24 automate almost everything

  25. 25 run tests in parallel

  26. 26 deployment pipeline

  27. 27 best practise

  28. best practise • build binaries/artifacts once • keep your environments

    similar • deploy the same way to every environment • smoke test your deployments • if anything fails, stop the line • use semantic versioning • external environment configuration • short lived feature branches • feature toggles • blue/green deployments 28
  29. 29 deployment toolsets

  30. None
  31. None
  32. None
  33. None
  34. None
  35. 35 cloud deployments

  36. service models • Software as a Service (SaaS) 36

  37. service models • Software as a Service (SaaS) • Platform

    as a Service (PaaS) 37
  38. service models • Software as a Service (SaaS) • Platform

    as a Service (PaaS) • Infrastructure as a Service (IaaS) 38
  39. deployment models • private cloud 39

  40. deployment models • private cloud • community cloud 40

  41. deployment models • private cloud • community cloud • public

    cloud 41
  42. deployment models • private cloud • community cloud • public

    cloud • hybrid cloud 42
  43. TYPO3 SaaS / Cloud based infrastructure 43

  44. None
  45. .platform.app.yaml # The hooks that will be performed when the

    package is deployed. hooks: build: | set -e vendor/bin/typo3cms install:generatepackagestates --activate- default=true if [ ! -f web/typo3conf/writeable/LocalConfiguration.php ]; then cd web touch FIRST_INSTALL cd typo3conf ln -sf writeable/LocalConfiguration.php LocalConfiguration.php ln -sf writeable/ENABLE_INSTALL_TOOL ENABLE_INSTALL_TOOL fi; 45
  46. .platform.app.yaml deploy: | set -e if [ ! -f web/typo3conf/writeable/installed.lock

    ]; then cp web/typo3/sysext/core/Configuration/FactoryConfiguration.php web/typo3conf/writeable/LocalConfiguration.php vendor/bin/typo3cms install:setup --non-interactive --admin-user- name='admin' --admin-password='password' --site-setup-type='none' --site- name='TYPO3 on Platform.sh' --skip-integrity-check touch web/typo3conf/writeable/installed.lock fi; 46
  47. dkd sagt Danke 47