Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

deployer, deployment for TYPO3 CMS with ease and fun

523 views

Published on

Slides of a talk held during TYPO3 Developer Days 2017 (T3DD17) in Malmö/Sweden by Peter Niederlag.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

deployer, deployment for TYPO3 CMS with ease and fun

  1. 1. DEPLOYER Peter Niederlag peter.niederlag@datenbetrieb.de @jugglefish TYPO3 deployments with ease und fun // T3DD17
  2. 2. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun ME Wtf? 2
  3. 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
  4. 4. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun AGENDA 4
  5. 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. 6. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun DEPLOYMENT ? 6
  7. 7. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 7 DEPLOYMENT ?
  8. 8. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 8 SURVEY WHO USES A DEPLOYMENT TOOL ?
  9. 9. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 9 SURVEY WHICH DEPLOYMENT TOOL DO YOU USE?
  10. 10. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 10 SURVEY WHERE DO YOU USE DEPLOYMENT TOOL?
  11. 11. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun RATIONALE FOR USING A DEPLOYMENT TOOL 11
  12. 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. 13. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun FAMOUS TOOLS 13
  14. 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. 15. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 15 SURVEY THROW IN YOUR FAVORITE
  16. 16. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 16 SHOUT LOUDER POLL ;)
  17. 17. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun DEPLOYER.ORG 17
  18. 18. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun 18
  19. 19. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun NICE THINGS ABOUT DEPLOYER 19
  20. 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. 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. 22. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun INSTALLATION 22
  23. 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. 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. 25. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun BASIC CONCEPTS 25
  26. 26. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun RECIPE 26
  27. 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. 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. 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. 30. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun FUNCTIONS 30
  31. 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. 32. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun CONFIGURATION 32
  33. 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
  34. 34. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun HOSTS 34
  35. 35. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun Hosts 35 host('domain.com') ->hostname(‘foo.domain.com’) ->stage('production') ->set('deploy_path', '~/app');
  36. 36. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun Inventory 36 inventory('hosts.yml'); domain.com: hostname: domain.com user: name port: 22 configFile: ~/.ssh/config stage: production deploy_path: ~/app extra_param: "foo {{hostname}}"
  37. 37. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun RUN 37
  38. 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. 39. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun RECIPE WALKTHROUGH 39
  40. 40. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun Demo Time  installation  dep init 40
  41. 41. 2017/07/14 // T3DD17 Deployer, TYPO3 CMS deployments with ease und fun Demo Time  explain “our” recipe 41
  42. 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

×