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

Deployment Strategies – The Good, the Bad and the Ugly

Deployment Strategies – The Good, the Bad and the Ugly

Overview of proven software development principles.

Peter Foerger

July 16, 2017
Tweet

More Decks by Peter Foerger

Other Decks in Technology

Transcript

  1. dkd Internet Service GmbH
    TYPO3 Developer Days 2017
    the good, the bad and the ugly
    deployment strategies
    1

    View Slide

  2. agenda
    • the ugly
    • the bad
    • the good
    2

    View Slide

  3. 3
    who`s that guy?

    View Slide

  4. Peter Foerger
    • DevOps Engineer
    • dkd Internet Service GmbH
    • TCCI
    • TCCD
    • @bauschan
    4

    View Slide

  5. 5
    »The first rule of any technology used in
    a business is that automation applied to
    an efficient operation will
    magnify the efficiency.«

    View Slide

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

    View Slide

  7. View Slide

  8. the ugly
    8

    View Slide

  9. View Slide

  10. deploying software manually
    10

    View Slide

  11. antipattern: manual deployment
    • extensive documentation
    • manual testing
    • frequent corrections to the release process
    • environments that differ
    • releases are unpredictable in their outcome
    11

    View Slide

  12. the bad
    12

    View Slide

  13. different environments
    13

    View Slide

  14. View Slide

  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

    View Slide

  16. can we do better?
    16

    View Slide

  17. the good
    17

    View Slide

  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

    View Slide

  19. build radical

    View Slide

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

    View Slide

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

    View Slide

  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

    View Slide

  23. 23
    frequency is everything

    View Slide

  24. 24
    automate almost everything

    View Slide

  25. 25
    run tests in parallel

    View Slide

  26. 26
    deployment pipeline

    View Slide

  27. 27
    best practise

    View Slide

  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

    View Slide

  29. 29
    deployment toolsets

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. 35
    cloud deployments

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  39. deployment models
    • private cloud
    39

    View Slide

  40. deployment models
    • private cloud
    • community cloud
    40

    View Slide

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

    View Slide

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

    View Slide

  43. TYPO3 SaaS / Cloud based infrastructure
    43

    View Slide

  44. View Slide

  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

    View Slide

  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

    View Slide

  47. dkd sagt Danke
    47

    View Slide