This document contains the agenda and slides from a presentation about deploying TYPO3 CMS sites using Deployer. The presentation covers an introduction to deployment, common deployment tools including Deployer, the rationale for using a deployment tool, basic Deployer concepts like recipes and functions, and demonstrates Deployer through a recipe walkthrough.
3. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
PETER NIEDERLAG
●
open source and TYPO3 addict since
2000
●
self-employed
●
former member of server- and
certification-teams
●
console kid
●
start=$(date +%s.%N);for i in $(seq 100); do echo $i; curl -s
'http://master3.local.d4b6.de/?eID=f24api' > /dev/null; done; dur=$(echo "$
(date +%s.%N) - $start" | bc); printf "Execution time: %.6f seconds" $dur
●
passionate juggler und accordionist
(http://zoff.band)
3
5. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
AGENDA
5
1. Intro to deployment
2. Overview of Tools
3. Reasons for deployer
4. Installation
5. Concepts of deployer
6. Recipe Walk Through
6. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
DEPLOYMENT ?
6
7. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 7
DEPLOYMENT ?
8. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 8
SURVEY
WHO USES A
DEPLOYMENT TOOL ?
9. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 9
SURVEY
WHICH DEPLOYMENT
TOOL DO YOU USE?
10. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 10
SURVEY
WHERE DO YOU USE
DEPLOYMENT TOOL?
11. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
RATIONALE FOR
USING A
DEPLOYMENT
TOOL
11
12. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Rationale
Lot’s of simple steps
Reproducable
Documentation
Automation
Less error prone
12
13. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
FAMOUS TOOLS
13
14. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Big Famous Deployment Tools
TYPO3 Surf
Capistrano
Ansistrano
Magallanes
Deployer
...
14
15. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 15
SURVEY
THROW IN YOUR
FAVORITE
16. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 16
SHOUT LOUDER POLL ;)
17. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
DEPLOYER.ORG
17
19. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
NICE THINGS
ABOUT
DEPLOYER
19
20. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Arguments for deployer
Fast
Parallelism
Simple
Ease of Use
Composer based
20
21. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Arguments for deployer
Modularity
Clean Code
Test Coverage
Active Development [3.x, 4.x, 5.x]
Broad Acceptance in PHP-World
21
22. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
INSTALLATION
22
23. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Local Installation
# add dependency to composer.json
composer require deployer/deployer
# run deployer
./vendor/bin/dep
23
24. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Global Installation
# download
curl -LO https://deployer.org/deployer.phar
# move to local bin path
mv deployer.phar /usr/local/bin/dep
# make executable
chmod +x /usr/local/bin/dep
24
25. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
BASIC CONCEPTS
25
26. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
RECIPE
26
27. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
A Recipe
Is a definition for a deployment
process
Can be split across multiple files
Consists of settings and tasks
27
28. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
deploy.php
By default deployer will look for the
recipe in the file ‘deploy.php’
28
29. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Common and community
recipes
Bunch of common recipes and tasks
shipped with deployer (symfony,
typo3, ...)
Bunch of additional recipes and
tasks in package deployer/recipes
29
30. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
FUNCTIONS
30
31. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Functions in namespace deployer
[5.x/master!!!!]
set() // set variable
get() // get variable
host() // define host
run() // execute process on host
write() // write to stdout
task() // define a task (run, write, ...)
31
32. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
CONFIGURATION
32
33. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Settings
set('repository', 'https://git.typo3.org/Packages/TYPO3.CMS');
get(‘repository’);
// look ahead
// interpolation inside run()
// run(‘git checkout {{repository}}’);
33
38. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Settings
write(‘saying hello’);
$output = run('hostname -f')->output();
write(‘saying hello on “‘ . $output ‘”’);
38
39. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
RECIPE
WALKTHROUGH
39
40. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Demo Time
installation
dep init
40
41. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
Demo Time
explain “our” recipe
41
42. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun
THANK YOU!
Thx to @bitmotion_de for engaging me
Thx to all the wonderfull sharing in TYPO3
community
Join in on t3summer.io :->
42