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.

Ddev workshop t3dd18

938 views

Published on

Workshop at TYPO3 Developer Days 2018. Goal is to have a working ddev setup with a simple TYPO3 installation. A quick look in the extensive possibilities is also part of the presentation.

Published in: Software
  • Be the first to comment

Ddev workshop t3dd18

  1. 1. DDEV Jigal van Hemert jigal.van.hemert@typo3.org @jigalvh Docker made easy
  2. 2. D-WHAT?? 23-06-2018 ddev: docker made easy 2
  3. 3. CONTAINERS - DOCKER  Lightweight virtual machine  Linux based, compressed  Supported by major virtualization players  Supported in deployment solutions 23-06-2018 ddev: docker made easy 3
  4. 4. DDEV - DOCKER  DDEV:  pre-built containers  configuration for WordPress, Drupal, Backdrop, TYPO3  Contains: db, nginx, solr, PHP 5.6-7.2, xdebug  Your own additional services 23-06-2018 ddev: docker made easy 4
  5. 5. WORKSHOP 23-06-2018 ddev: docker made easy 5
  6. 6. AGENDA 23-06-2018 6ddev: docker made easy 1. Requirements 2. Installation 3. Project configuration 4. Daily use 5. Extending the configuration
  7. 7. REQUIREMENTS What do I need to run ddev? 23-06-2018 ddev: docker made easy 7
  8. 8. REQUIREMENTS  Docker version 17.05 or higher  Docker compose 1.10.0 or higher  macOS Sierra and higher  Windows 10 Pro (Home recently supported)  Linux (Ubuntu 14.04+, Debian Jessie+, Fedora 25+, ...) 23-06-2018 ddev: docker made easy 8
  9. 9. INSTALLATION Get things running... 23-06-2018 ddev: docker made easy 9
  10. 10. INSTALLATION Homebrew – macOS 23-06-2018 ddev: docker made easy 10 brew tap drud/ddev && brew install ddev
  11. 11. INSTALLATION Linux and macOS – install script 23-06-2018 ddev: docker made easy 11 curl https://raw.githubusercontent.com/↲ drud/ddev/master/install_ddev.sh | bash
  12. 12. INSTALLATION Windows 10 23-06-2018 ddev: docker made easy 12 ddev_windows_installer.<version>.exe
  13. 13. PROJECT CONFIGURATION Set up a project 23-06-2018 ddev: docker made easy 13
  14. 14. CONFIGURATION 23-06-2018 ddev: docker made easy 14 ddev config
  15. 15. CONFIGURATION  Name  Docroot  Type of project 23-06-2018 ddev: docker made easy 15
  16. 16. DAILY USE Get productive 23-06-2018 ddev: docker made easy 16
  17. 17. CONFIGURATION 23-06-2018 ddev: docker made easy 17 ddev start
  18. 18. CONFIGURATION  Starts environment  Checks/creates containers  Creates/starts router 23-06-2018 ddev: docker made easy 18
  19. 19. CONFIGURATION 23-06-2018 ddev: docker made easy 19 ddev stop
  20. 20. CONFIGURATION  Stops router  Shuts down containers  Stops environment 23-06-2018 ddev: docker made easy 20
  21. 21. LET’S START A PROJECT 23-06-2018 ddev: docker made easy 21
  22. 22. DEMO PROJECT 23-06-2018 ddev: docker made easy 22 mkdir ddevproject cd ddevproject
  23. 23. DEMO PROJECT 23-06-2018 ddev: docker made easy 23 ddev config
  24. 24. DEMO PROJECT 23-06-2018 ddev: docker made easy 24 Creating a new ddev project config in the current directory (D:t3dd18ddevproject) Once completed, your configuration will be written to D:t3dd18ddevproject.ddev config.yaml Project name (ddevproject): The docroot is the directory from which your site is served. This is a relative path from your project root (D:t3dd18ddevproject) You may leave this value blank if your site files are in the project root Docroot Location (current directory): Found a php codebase at D:t3dd18ddevproject. Project Type [php, drupal6, drupal7, drupal8, wordpress, typo3, backdrop] (php): typo3 TYPO3 does not seem to have been set up yet, missing LocalConfiguration.php (D: t3dd18ddevprojecttypo3confAdditionalConfiguration.php) Generating LocalConfiguration.php file for database connection. Unable to create settings file: Failed to write TYPO3 AdditionalConfiguration.php file: chmod D:t3dd18ddevprojecttypo3conf: The system cannot find the file specified. Configuration complete. You may now run 'ddev start'.
  25. 25. DEMO PROJECT 23-06-2018 ddev: docker made easy 25 ddev start
  26. 26. DEMO PROJECT 23-06-2018 ddev: docker made easy 26 Starting environment for ddevproject... Warning: containers will run as root. This is fine on Docker for Windows or Docker for Mac, but could be a security risk on Linux. Starting ddev-ddevproject-db ... done Starting ddev-ddevproject-dba ... done Starting ddev-ddevproject-web ... done Network ddev_default is external, skipping Creating ddev-router ... done Successfully started ddevproject Your project can be reached at http://ddevproject.ddev.local, https://ddevproject.ddev.local
  27. 27. DEMO PROJECT 23-06-2018 ddev: docker made easy 27 ddev hostname ddevproject.ddev.local 127.0.0.1 ddev hostname ddevproject.ddev.local ::1
  28. 28. DEMO PROJECT 23-06-2018 ddev: docker made easy 28 ddev ssh winpty ddev ssh Windows:
  29. 29. DEMO PROJECT 23-06-2018 ddev: docker made easy 29 Warning: containers will run as root. This is fine on Docker for Windows or Docker for Mac, but could be a security risk on Linux. Warning: containers will run as root. This is fine on Docker for Windows or Docker for Mac, but could be a security risk on Linux.
  30. 30. DEMO PROJECT 23-06-2018 ddev: docker made easy 30 composer create-project jigal/ddevt3dd18 ./temptarget
  31. 31. DEMO PROJECT 23-06-2018 ddev: docker made easy 31 Installing jigal/ddevt3dd18 (dev-master 448831c4595bf10bc213d182cc7be47d2dfc834c) - Installing jigal/ddevt3dd18 (dev-master master): Cloning master Created project in ./temptarget Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 48 installs, 0 updates, 0 removals - Installing typo3/class-alias-loader (1.0.0): Downloading (100%) - Installing typo3/cms-composer-installers (v1.5.2): Downloading (100%) - Installing helhum/typo3-console-plugin (2.0.4): Downloading (100%) - Installing symfony/dotenv (v4.1.0): Downloading (100%) - Installing helhum/dotenv-connector (v2.1.0): Downloading (100%) - Installing mso/idna-convert (v1.1.0): Downloading (100%) - Installing cogpowered/finediff (0.3.1): Downloading (100%) - Installing helhum/config-loader (v0.9.0): Downloading (100%) - Installing symfony/process (v4.1.0): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%) - Installing symfony/console (v4.1.0): Downloading (100%) - Installing psr/log (1.0.2): Loading from cache - Installing doctrine/lexer (v1.0.1): Downloading (100%) - Installing doctrine/annotations (v1.6.0): Downloading (100%) - Installing typo3/cms-core (v8.7.16): Downloading (100%) - Installing typo3/cms-scheduler (v8.7.16): Downloading (100%) - Installing helhum/typo3-console (5.4.0): Downloading (100%) - Installing typo3fluid/fluid (2.5.3): Downloading (100%) - Installing symfony/finder (v4.1.0): Downloading (100%) - Installing doctrine/inflector (v1.3.0): Downloading (100%) - Installing doctrine/collections (v1.5.0): Downloading (100%) - Installing doctrine/cache (v1.7.1): Downloading (100%) - Installing doctrine/common (v2.7.3): Downloading (100%) - Installing doctrine/dbal (v2.5.13): Downloading (100%) - Installing guzzlehttp/promises (v1.3.1): Downloading (100%) - Installing psr/http-message (1.0.1): Downloading (100%) - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%) - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
  32. 32. DEMO PROJECT 23-06-2018 ddev: docker made easy 32 - Installing doctrine/instantiator (1.0.5): Downloading (100%) - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%) - Installing swiftmailer/swiftmailer (v5.4.9): Downloading (100%) - Installing helhum/typo3-composer-setup (v0.5.2): Downloading (100%) - Installing typo3/cms-sv (v8.7.16): Downloading (100%) - Installing symfony/yaml (v4.1.0): Downloading (100%) - Installing typo3/cms-saltedpasswords (v8.7.16): Downloading (100%) - Installing typo3/cms-recordlist (v8.7.16): Downloading (100%) - Installing typo3/cms-extensionmanager (v8.7.16): Downloading (100%) - Installing typo3/cms-lang (v8.7.16): Downloading (100%) - Installing typo3/cms-extbase (v8.7.16): Downloading (100%) - Installing typo3/cms-fluid (v8.7.16): Downloading (100%) - Installing typo3/cms-install (v8.7.16): Downloading (100%) - Installing typo3/cms-frontend (v8.7.16): Downloading (100%) - Installing typo3/cms-filelist (v8.7.16): Downloading (100%) - Installing typo3/cms-cshmanual (v8.7.16): Downloading (100%) - Installing typo3/cms-backend (v8.7.16): Downloading (100%) - Installing typo3/cms-fluid-styled-content (v8.7.16): Downloading (100%) - Installing typo3/cms-rte-ckeditor (v8.7.16): Downloading (100%) helhum/config-loader suggests installing ext-yaml (For improved performance when parsing yaml files you should use the PECL YAML Parser php extension) symfony/console suggests installing symfony/event-dispatcher () symfony/console suggests installing symfony/lock () symfony/console suggests installing psr/log-implementation (For using the console logger) doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver) helhum/typo3-composer-setup suggests installing pagemachine/typo3-composer-legacy-cli (Provides the legacy cli_dispatch.phpsh entry point for TYPO3.) typo3/cms-saltedpasswords suggests installing typo3/cms-rsaauth (*) typo3/cms-rte-ckeditor suggests installing typo3/cms-setup (*) Writing lock file Generating autoload files Registered helhum/dotenv-connector Generating class alias map file Inserting class alias loader into main autoload.php file Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?Y
  33. 33. DEMO PROJECT 23-06-2018 ddev: docker made easy 33 mv temptarget/* . mv temptarget/.gitignore . rmdir temptarget
  34. 34. DEMO PROJECT 23-06-2018 ddev: docker made easy 34 composer dumpautoload exit ddev config
  35. 35. DEMO PROJECT 23-06-2018 ddev: docker made easy 35 You are reconfiguring the project at D:t3dd18ddevproject. The existing configuration will be updated and replaced. Project name (ddevproject): The docroot is the directory from which your site is served. This is a relative path from your project root (D:t3dd18ddevproject) You may leave this value blank if your site files are in the project root Docroot Location (web): Found a typo3 codebase at D:t3dd18ddevprojectweb. Project Type [wordpress, typo3, backdrop, php, drupal6, drupal7, drupal8] (typo3): TYPO3 does not seem to have been set up yet, missing LocalConfiguration.php (D:t3dd18ddevprojectwebtypo3conf AdditionalConfiguration.php) Generating LocalConfiguration.php file for database connection. Configuration complete. You may now run 'ddev start'.
  36. 36. DEMO PROJECT 23-06-2018 ddev: docker made easy 36 ddev start winpty ddev ssh
  37. 37. DEMO PROJECT 23-06-2018 ddev: docker made easy 37 ../vendor/bin/typo3cms install:setup
  38. 38. DEMO PROJECT 23-06-2018 ddev: docker made easy 38 Welcome to the TYPO3 Console installer! ✔ Prepare installation ✔ Check environment and create folders ✔ Skipped Set up database connection ✔ Skipped Select database ➤ Set up database Username of to be created administrative user account (required): jigal Password of to be created administrative user account (required): Name of the TYPO3 site (default: "New TYPO3 Console site"): ddevt3dd18 ✔ Ok ➤ Set up configuration Specify the site setup type (default: "no"): [no ] Do nothing [site] Create root page > site ✔ Ok ✔ Set up extensions Successfully installed TYPO3 CMS!
  39. 39. DEMO PROJECT BACKEND 23-06-2018 ddev: docker made easy 39
  40. 40. DEMO PROJECT FRONTEND 23-06-2018 ddev: docker made easy 40
  41. 41. WHAT ELSE IS THERE? 23-06-2018 ddev: docker made easy 41
  42. 42. PHP VERSION 23-06-2018 ddev: docker made easy 42 ddev describe
  43. 43. PHP VERSION 23-06-2018 ddev: docker made easy 43 NAME TYPE LOCATION URL(s) STATUS ddevproject typo3 D:/t3dd18/ddevproject http://ddevproject.ddev.local running https://ddevproject.ddev.local Project Information ----------------- PHP version: 7.1 URLs: http://ddevproject.ddev.local, https://ddevproject.ddev.local MySQL Credentials ----------------- Username: db Password: db Database name: db Host: db Port: 3306 To connect to mysql from your host machine, use port 32768 on 127.0.0.1. For example: mysql --host=127.0.0.1 --port=32768 --user=db --password=db --database=db Other Services -------------- MailHog: http://ddevproject.ddev.local:8025 phpMyAdmin: http://ddevproject.ddev.local:8036 DDEV ROUTER STATUS: healthy
  44. 44. PHP VERSION 23-06-2018 ddev: docker made easy 44 less .ddev/config.yaml
  45. 45. PHP VERSION 23-06-2018 ddev: docker made easy 45 APIVersion: "1" name: ddevproject type: typo3 docroot: web php_version: "7.1" webimage: drud/nginx-php-fpm-local:v1.2.2 dbimage: drud/mariadb-local:v0.9.0 dbaimage: drud/phpmyadmin:v0.2.0 router_http_port: "80" router_https_port: "443" additional_hostnames: [] provider: default # Key features of ddev's config.yaml: # name: <projectname> # Name of the project, automatically provides # http://projectname.ddev.local and https://projectname.ddev.local # type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php # docroot: <relative_path> # Relative path to the directory containing index.php. # php_version: "7.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2"
  46. 46. ENVIRONMENT VARIABLES  .ddev/docker-compose.<something>.yaml 23-06-2018 ddev: docker made easy 46
  47. 47. ENVIRONMENT VARIABLES 23-06-2018 ddev: docker made easy 47 version: '3' services: web: environment: - TYPO3_CONTEXT=Development
  48. 48. … AND MORE  MailHog  PhpMyAdmin  Xdebug  Apache Solr container 23-06-2018 ddev: docker made easy 48
  49. 49. EXTENDING DDEV I want more and I want it now! 23-06-2018 ddev: docker made easy 49
  50. 50. EXTENDING DDEV 23-06-2018 ddev: docker made easy 50 https://ddev.readthedocs.io/en/latest/ users/extending-commands/
  51. 51. EXTENDING DDEV  Hooks to run: - pre/post - start / import-db / import-files  In .ddev/config.yaml file 23-06-2018 ddev: docker made easy 51
  52. 52. EXTENDING DDEV  Additional hostnames  Custom configuration for nginx, PHP, MariaDB  Custom services in containers 23-06-2018 ddev: docker made easy 52
  53. 53. THANK YOU! 23-06-2018 ddev: docker made easy 53

×