Deployment
strategies

January 14th, 2019
Faktor E Multimedia GmbH

What does deployment mean?

Software deployment is all of the activities that make a software system available for use. http://en.wikipedia.org/wiki/Software_deployment

Which activities could these be in our cases?

  • database migration
  • flush / warm up caches
  • run automated tests
  • test new version
  • transfer code changes
  • build frontend
  • install dependencies
  • code migrations
  • rollback on failure

Do we have to cover all of the mentioned aspects?

Starting a basic website in 2014:

 

Starting a basic website in 2014:

  • 1. Install Node
  • 2. Install Bower
  • 3. Pick CSS framework
  • 4. Pick responsive approach
  • ...
  • 47. Write some HTML
iamdevloper@twitter

Find the workflow that fit your needs!

deployment processes

deployment strategies

how

what

deployment processes

how

File Transfer Protocol

SFTP / SCP

  • (nearly) no setup needed
  • platform independent
  • easy to understand
  • no tracking of deployed changes
  • difficult to keep in sync
  • unable to track manuel changes
  • hard to compare

rsync

  • easy to setup
  • more or less platform independent
  • easy to understand
  • only needed files will be overwritten
  • no tracking of deployed changes
  • unable to track manual changes
  • hard to compare

Another Neat Tool

 
Phing

Shell-
Scripts

  • Allows to keep track of manual changes
  • Let you automize almost everything
  • Reduces manual steps
  • quite complex to setup
  • might need configuration on every developers machine
  • otherwise a dedicated deployment machine is needed

PhpStorm

  • Allows to keep track of manual changes
  • Easy compare
  • Provides an intuitive GUI
  • Custom setup for every developer needed
  • Gives you less flexibility for the choice of your editor or IDE
  • Synchronization might take a lot of time

SVN / GIT

  • Easy to setup
  • Easy to compare
  • Can be used with the GUI of you choice
  • Fluently works along with your branching concept out of the box
  • Automization of tasks might get more complicated
  • GIT integration needed on production machine
  • Might get hard to understand, depending on the branching concept

Capistrano

Deployer

TYPO3 Surf

  • Preconfigured setup available
  • Zero-downtime deployments out of the box
  • Works on the development machine out of the box
  • Fully automization possible
  • Automatic rollbacks out of the box
  • Harder to understand
  • Initial setup might get complex based on project

Deployment strategies

what

Recreate

Big Bang Deployment

Ramped deployments

also known as

rolling update or
incremental
deployment

Blue/Green

Canary

A/B testing

Shadow

Which way to use?

As always:
It depends

Find ways to deploy features or even parts of features as early as possible.

The smaller the change, the greater the chance it won't break.

Feature
switches

How to handle user generated content?

project-based decisions if a fully automated solution is needed

  • Multiple sources / environments/ destinations
  • Code & database migrations
  • Run tests before launch
    • Smoke test
    • Unit tests
    • Functional tests
    • Behat tests
    • Whatever you want to test in some way tests
  • Clean up / compiling / warm up caches
  • Simple / automatic rollbacks
  • Zero downtime deployments

Continuous integration

what Mr. Jenkins has to say about this

Continuous delivery

deployments as an automated process
of your daily work

Questions?

Credits

Used images

1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10
11 / 12 / 13 / 14 / 15 / 16 / 17 / 18 / 19 / 20
21 / 22 / 23 / 24 / 25 / 26 / 27 / 28 / 29 / 30
31 / 32 / 33 / 34 / 35 / 36 / 37 / 38 / 39 / 40
41 / 42 / 43