Conference Migrate to Drupal 8 by Leon Cros at Drupal Developer Days 2015 in Montpellier

  • Upload
    chipway

  • View
    118

  • Download
    0

Embed Size (px)

Citation preview

1. Migration to Drupal 8: Introduction Lon CROS @chipway 2. . . @chipway / chipway-drupal Drupal Community Lon Cros President of Drupal France & Francophony Association CEO of Chipway 3. Chipway: focused on Drupal Drupal 6, 7 & 8 Trainings for Developers Drupal Project Managers Webmasters & DevOps Designers & front-end developers, ... Audit Advisory & Consultancy Coaching Development 4. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migration to Drupal 8: Introduction How will we migrate an existing website to Drupal8? What is the state of migration tools? How to test & contribute to migration improvement Experience level: Beginner 5. DrupalDevDays Montpellier 2015 Lon Cros @chipway What migration do we speak about? Pull (process/prepare) Create Store Settings Users Taxonomies Menus Entity Bundles Content Data 6. DrupalDevDays Montpellier 2015 Lon Cros @chipway What migration do we speak about? Pull (process/prepare) Create Store Settings Users Taxonomies Menus Entity Bundles Content Data Drupal 8 Migrate Credit : http://www.odbco.com/products/lct650b.htm 7. DrupalDevDays Montpellier 2015 Lon Cros @chipway Want to hear about module migration? Rewriting Contributed Modules for Drupal 8 Kevin Kaland Friday 10:30-11:20 Amphitheater 2 8. DrupalDevDays Montpellier 2015 Lon Cros @chipway How can we migrate to D8? 9. DrupalDevDays Montpellier 2015 Lon Cros @chipway Old deprecated way Update.php script Overwrite D6 web site / update-in-place / dev copy One BIG shot script Retry from scratch Update.php kept for minor upgrades only Php D6 to D8 & Drush D6 to D8 + 10. DrupalDevDays Montpellier 2015 Lon Cros @chipway New way: migrate in core API or framework Modular (Roll backs / incremental) Create drupal objects Generic Extensible / OOP migrate_ui migrate_upgrade [8.1.0] Don't touch/overwrite source site! 11. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate POC in D7 Migrate 43 K reported installs migrate_d2d D5 D7, D6 D7 and D7 D7 migrate_d2d_ui 3 K reported installs Tested with core components 12. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate modular system Takes some ideas from update.php Create content types, Principles Row by row Sources plugins processes Destinations Open to future other sources (wordpress, joomla, typo3, spip, ...) 13. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate to 8: Puzzle Core Migrate (framework) Migrate_drupal Specific configurations & plugins D6 D8 D7 D8 (D8 D8) Source plugins process Destination plugins (entities, configuration) Contrib Migrate_upgrade (simple UI) D5 D8, worpress to D8, ... Migrate_plus Rollbacks, incremental Full UI Mapping Sources plugins Migration configuration (yaml) plugins 14. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate to 8 paths: D6 D8 Skip core versions D6 D8 Priority for migration End of D6 official support Support extended for some months? 15. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate to 8 paths: D7 D8 Little changes between D6 & 7 16. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate to 8 paths: D8 D8 Use cases? Repair/Rescue a broken site Early D8 websites Refactor a website Change structures New site Minor version upgrades use update.php 8.0.x to 8.0.y 17. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate to 8.0.0 will support all core components Included in D8 core From D6 contribs to D8 core Configuration ; variables, settings CMI Cck Content types Cck core Fields + link field [issue?] Users Vocabularies & Terms Nodes Multilingual from i18n Node translation entity translation Count language source nodes before! ~ 100 migrate templates 18. DrupalDevDays Montpellier 2015 Lon Cros @chipway How to use it ? Drupal 8 fresh install Drush 7.x-dev latest 19. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate: Workflow/sequence Clean up your D6 web site Disabled modules + uninstall Deprecated contents Garbage in garbage out On fresh D8 Enable all modules with target data It will accept disabled modules data from D6 Migrate to Drupal 8 (Refactor/improve your D8 site then) 20. DrupalDevDays Montpellier 2015 Lon Cros @chipway Migrate: how to do ? A new Drupal 8 fresh install, with Access to old DataBase Access to old files A theme with target regions migrate_upgrade contrib module (UI) Enable all needed modules on D8 install Check all those ever used on D6 Enable your own/contrib modules [create plugins] Enable migrate + migrate_drupal + migrate_upgrade Type-in Drupal upgrade source site information DB user+pw Http URL of public files to migrate private files filesystem path Click Perform upgrade 21. DrupalDevDays Montpellier 2015 Lon Cros @chipway Processing order Replicate Configuration Settings Content types/Entity bundles + Fields Import content Load one row at a time PrepareRow hook => Here you can change it ! Save Watchdog 22. DrupalDevDays Montpellier 2015 Lon Cros @chipway Drush or UI ? Now use UI to test it [all migration] Drush commands available Some or all migrations Use drush to rebuild your fresh D8 site 23. DrupalDevDays Montpellier 2015 Lon Cros @chipway How to customize? Drush Manifest file(s) lists migrations to run Can't use manifest file from UI Hook PrepareRow Drop deprecated contents/config from D6 install Clean up texts or content issues Convert Populate new fields with default/computed values Move block in a new region 24. DrupalDevDays Montpellier 2015 Lon Cros @chipway Doing it with Drush : Manifest.yml - d6_user_role - d6_user - d6_filter_format - d6_locale_settings - d6_language_negociation - d6_language_types - d6_language ... - d6_file: source: conf_path: sites/assets destination: source_base_path: destination/base/path destination_path_property: uri 25. DrupalDevDays Montpellier 2015 Lon Cros @chipway Create a plugin Build your own handler for your custom entities Plugins are awesome File with a migration class In a special folder of your module Custom/src/Plugin/migrate/ => update name in comment Place your plugin in your module With configuration file for your migration Or change configuration for existings migrations [CMI] Process plugins to change things + chainable Copy/rename from Core core/modules/migrate/src/Plugin/migrate/ Annotation in comments Try by building a custom block ../source/blocks/ Migrate API in Drupal 8 https://www.drupal.org/node/2127611 26. DrupalDevDays Montpellier 2015 Lon Cros @chipway Drush useful commands drush config-list | grep migrate List all available templates drush si standard --db-url=mysql://[db_user]: [db_pass]@localhost/[db_name] --site- name=[site_name] --account-name=[user_name] --account-pass=[user_pass] --account- mail=[user_mail] --locale=fr drush migrate-manifest MyManifest.yml --legacy-db- url=mysql://D6user:D6pw@localhost/D6db 27. DrupalDevDays Montpellier 2015 Lon Cros @chipway Status of migrate Migrate + migrate_drupal in core D6 D8 D7 D8 : templates needed help D8 D8 : templates needed help Source plugins Rollbacks ? (now reinstall, build & distroy CI) migrate_plus Incremental migration? migrate_plus Views to rebuild Roadmap : [META] node/2456261 Be ready to re-migrate with new Core version :( 28. DrupalDevDays Montpellier 2015 Lon Cros @chipway State of migrate in core Things that work Migrate D6 D8 path Let's test in real life Multilingual support test Still needs work migrate_drupal D7 migrate_upgrade [Ui] core 8.1 Documentation / contrib modules upgrade TESTING 29. DrupalDevDays Montpellier 2015 Lon Cros @chipway Schedule 8.0.0 API in core contrib UI 8.1.x Official Migration path to D8 with UI 30. DrupalDevDays Montpellier 2015 Lon Cros @chipway How to contribute : Info Join https://groups.drupal.org/imp drupal.org/node/2456261 [META] Finalize the Migration system IRC : #drupal-migrate Drupal.org/irc Migrate API in Drupal 8 https://www.drupal.org/node/2127611 Weekly G+ hangout for progress updates at 01:00am Paris every wednesday [9pm EST (-05:00)] If you begin: https://www.drupal.org/getting-involved 31. DrupalDevDays Montpellier 2015 Lon Cros @chipway How to contribute : What to do? Create plugins for your contrib/custom modules Create templates for D7, D8 Test No technical skills needed Come with your D6 sites Test D6 D8 on simple sites Test D6 D8 on multilingual sites Test D6 D8 on comprehensive sites Test D6 D8 on complex/risky sites [upraded multiple times] Sprint here http://montpellier2015.drupaldays.org/sprints Report !, Report !, Give feedback ! 32. DrupalDevDays Montpellier 2015 Lon Cros @chipway How to contribute : Report Report running cases Report issues : D6 migration in Core issues (Drupal.org user) https://drupal.org/project/issues/drupal Select component = migration system Report Smal bugs Data integrity migrate_upgrade problems Coders Report and submit patches 33. DrupalDevDays Montpellier 2015 Lon Cros @chipway Congrats and credits Ben Dougherty (benjy) maintainer Kroly Ngyesi (chx) Ryan Weal (ryan weal) Mike Ryan (mikeryan) Brent Dunn (bdone) Christian Lopez Espinola (penyaskito) Melissa Anderson (eliza411) Mickael Anello (ultimike) Bohjan Somers (bojhan) Moshe Weitzman (moshe weitzman) Many more... Next: Yourself! 34. Thank you for attending Questions? @chipway_en @chipway Feedbacks? Slides on: http://fr.slideshare.net/chipway/ConferenceMigrateToDrupal8DrupalDevDays2015