61
TYPO3 deployment with Jenkins Daniel Klockenkämper @derdanne T3CRR 2014 [email protected]

TYPO3 CMS deployment with Jenkins CI

Embed Size (px)

Citation preview

Page 1: TYPO3 CMS deployment with Jenkins CI

TYPO3 deployment

with Jenkins

Daniel Klockenkämper

@derdanne

T3CRR 2014

[email protected]

Page 2: TYPO3 CMS deployment with Jenkins CI

before Jenkins

Page 3: TYPO3 CMS deployment with Jenkins CI

multiple people working on every

deployment

Page 4: TYPO3 CMS deployment with Jenkins CI

we were really slow

Page 5: TYPO3 CMS deployment with Jenkins CI

deployment quality was low

Page 6: TYPO3 CMS deployment with Jenkins CI

rarely deployed

big changes

Page 7: TYPO3 CMS deployment with Jenkins CI

rollbacks were painful

Page 8: TYPO3 CMS deployment with Jenkins CI

the classics:

Page 9: TYPO3 CMS deployment with Jenkins CI

technically that should work ...

Page 10: TYPO3 CMS deployment with Jenkins CI

that worked on dev ...

Page 11: TYPO3 CMS deployment with Jenkins CI

since when we have this in prod?

Page 12: TYPO3 CMS deployment with Jenkins CI

let’s debug in production, yay

Page 13: TYPO3 CMS deployment with Jenkins CI
Page 14: TYPO3 CMS deployment with Jenkins CI

Let’s check out our

mission objectives!

Page 15: TYPO3 CMS deployment with Jenkins CI

velocity

Page 16: TYPO3 CMS deployment with Jenkins CI

quality

Page 17: TYPO3 CMS deployment with Jenkins CI

simplicity

Page 18: TYPO3 CMS deployment with Jenkins CI

workflow reflection

Page 19: TYPO3 CMS deployment with Jenkins CI

automation

Page 20: TYPO3 CMS deployment with Jenkins CI

let us write some shell scripts!

Page 21: TYPO3 CMS deployment with Jenkins CI

OK, bad idea - so why Jenkins?

Page 22: TYPO3 CMS deployment with Jenkins CI

natively supports our favorite

versioning system

svn, git, cvs ...

Page 23: TYPO3 CMS deployment with Jenkins CI

it is easy to install

Page 24: TYPO3 CMS deployment with Jenkins CI

it has dozens of plugins

Page 25: TYPO3 CMS deployment with Jenkins CI

it uses build management tools like

ant or maven

Page 26: TYPO3 CMS deployment with Jenkins CI

you can trigger build jobs from

external sources

Page 27: TYPO3 CMS deployment with Jenkins CI

easy to monitor

Page 28: TYPO3 CMS deployment with Jenkins CI

REST API

XML, JSON, Python

Page 29: TYPO3 CMS deployment with Jenkins CI

you can use notifications

email, jabber, ...

Page 30: TYPO3 CMS deployment with Jenkins CI

it is free!

Page 31: TYPO3 CMS deployment with Jenkins CI

everybody loves pushing buttons!

Page 32: TYPO3 CMS deployment with Jenkins CI

cool story bro!

Page 33: TYPO3 CMS deployment with Jenkins CI

what are we doing with it?

Page 34: TYPO3 CMS deployment with Jenkins CI

testing code

syntax, unit, integration ...

Page 35: TYPO3 CMS deployment with Jenkins CI

deployment to our environments

user-dev, dev, staging, live

Page 36: TYPO3 CMS deployment with Jenkins CI

synchronize environments from live

Page 37: TYPO3 CMS deployment with Jenkins CI

test performance of

our live websites

Page 38: TYPO3 CMS deployment with Jenkins CI

minify css

concatenate js

compile sass

Page 39: TYPO3 CMS deployment with Jenkins CI

any prerequisites for deployment?

Page 40: TYPO3 CMS deployment with Jenkins CI

use a versioning system!!!

Page 41: TYPO3 CMS deployment with Jenkins CI

strictly separate configs from

userdata

Page 42: TYPO3 CMS deployment with Jenkins CI

do not push userdata in your

versioning system!

Page 43: TYPO3 CMS deployment with Jenkins CI

develop in local environment

(vagrant?)

Page 44: TYPO3 CMS deployment with Jenkins CI

force devs to not insert TS in DB

Page 45: TYPO3 CMS deployment with Jenkins CI

force be users to not change config

or install / change extensions

Page 46: TYPO3 CMS deployment with Jenkins CI

install extensions:

coreapi (6.2)

cleartypo3cache and t3deploy (4.5)

Page 47: TYPO3 CMS deployment with Jenkins CI

then which steps to deploy

TYPO3 6.2

code to production?

Page 48: TYPO3 CMS deployment with Jenkins CI

new tag of code

triggers minify/concat job

Page 49: TYPO3 CMS deployment with Jenkins CI

anybody could now push the code

to production

even the project manager :)

Page 50: TYPO3 CMS deployment with Jenkins CI

tests syntax of files that have

changed

Page 51: TYPO3 CMS deployment with Jenkins CI

checks for modifications

on the target

Page 52: TYPO3 CMS deployment with Jenkins CI

checks out code on the target

system

Page 53: TYPO3 CMS deployment with Jenkins CI

reverts

typo3conf/PackageStates.php

Page 54: TYPO3 CMS deployment with Jenkins CI

deletes temporary files in typo3temp

Cache/*

compressor/*

cs/*

llxml/*

sprites/*

rtehtmlarea*

Page 55: TYPO3 CMS deployment with Jenkins CI

clears opcache code of php

opcache_reset();

Page 56: TYPO3 CMS deployment with Jenkins CI

generates new TYPO3 opcode cache

using curl request

Page 57: TYPO3 CMS deployment with Jenkins CI

clears cache in db:

cli_dispatch.phpsh extbase

cacheapi:clearallcaches

Page 58: TYPO3 CMS deployment with Jenkins CI

updates the database:

cli_dispatch.phpsh extbase

databaseapi:databasecompare 4,2,3

Page 59: TYPO3 CMS deployment with Jenkins CI

triggers frontend testing suite

(sitespeed.io)

Page 60: TYPO3 CMS deployment with Jenkins CI

sends notification when build was

not successful

Page 61: TYPO3 CMS deployment with Jenkins CI