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
  2. 5 »The first rule of any technology used in a

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

    operation will magnify the inefficiency.«
  4. antipattern: manual deployment • extensive documentation • manual testing •

    frequent corrections to the release process • environments that differ • releases are unpredictable in their outcome 11
  5. 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
  6. 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
  7. 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
  8. 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
  9. service models • Software as a Service (SaaS) • Platform

    as a Service (PaaS) • Infrastructure as a Service (IaaS) 38
  10. .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
  11. .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