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.

PPPA D8 presentation Drupal For Gov_0

  • Be the first to comment

  • Be the first to like this

PPPA D8 presentation Drupal For Gov_0

  1. 1. + OhYeah!! The story of a Drupal 7 to Drupal 8 migration Migrating the Palestine Poster Project from Drupal 7 to Drupal 8 http://palestineposterproject.org/
  2. 2. + Assumptions about this audience  You have or know someone who has experience as a site builder within Drupal 7  You are looking to migrate you site over to Drupal 8 but may not know where to start  You are ok with rebuilding some configuration  Drupal 8 is still kind of an abstract concept to you.  You’re looking for a good time
  3. 3. + Here’s what’s going to be covered  Background on the project and the development team  Migration Strategy Used  Tools to attempt your own migration  Review of major systems of the site  How you can get involved with the PPPA
  4. 4. +All about the Palestine Poster Project Archives A brief history of the site and the development team
  5. 5. + Site history: Owner and Purpose  Site owner: Dan Walsh: Businessman and artist  Designed as resource for academic research and curriculum source  Chronicles history of Palestinian-Israeli conflict through posters  Shows 4 different viewpoints  The development team is politically neutral
  6. 6. + Site history:The Technology  PPPA first started with Drupal 4  Drupal 6 to 7 migration involved update in place  Cleaned up database while we did it
  7. 7. + Our backgrounds and how we approach development  Senior developers have extensive development experience with large scale Drupal 6 and 7 sites  We have extensive experience with site building and theming  We prefer configuration over code in most instances  easier to support business users  make next developers job easier  We want to use Drupal 8  Our day jobs have us still mostly working in Drupal 7  We want to mentor junior developers
  8. 8. + Our Migration Strategy Including pros and cons of three approaches
  9. 9. + The five phases of migration and where the PPPA is in the process 1. Auditing the source site 2. Planning the new data model 3. Prepping for migration 4. Planning the migration 5. Launching the migration Borrowed from
  10. 10. + Auditing the source site Step One:Where are we now?
  11. 11. + Here is a rundown the Drupal 7 source site  Data structure pretty easy to understand  Content Type light,Taxonomy heavy  No Workbench Access  We use Apache Solr Search  Not much custom module development  Theme is pretty is basic  Poster is our central content type
  12. 12. + Source Wellspring Special Collection Language Wellspring Copy Location Poster Iconography ArtistPublisher Publish Nationality Artist Nationality Taxonomy term Node The Old Poster Model Poster Entity Relationship Diagram
  13. 13. + Planning The New Data Model Step two: Should it be content or not?
  14. 14. + Source Wellspring Special Collection Language Wellspring Copy Location Poster Iconography ArtistPublisher Publish Nationality Artist Nationality Taxonomy term Node Planning the New Data Model: The Old Poster Model
  15. 15. + Source Wellspring Special Collection Language Wellspring Copy Location Poster Iconography ArtistPublisher Nationality Taxonomy term Node Planning the New Data Model: The New Poster Model
  16. 16. + Prepping For Migration Step 4 Get ready to break your source site Tips for starting your migration
  17. 17. + Steps everyone should take before starting a migration
  18. 18. + Take care of the basics  Get comfortable with Drush and check out Drupal Console  Get a good local workflow  Update your modules to the latest versions  drush pm-update  Get Database connection settings from source site  Find them in your settings.php file
  19. 19. + Get that Destination Site prepared  Set up a brand new instance of Drupal 8 and install contributed modules being used on Drupal 7 site  Also install backup and migrate  Enable all the modules you want to use.  Drush will enable dependencies  Enabled all the migrate contib modules  Make sure we are using 8x.2x branch of these  Make sure Drupal 8 is latest  This made a difference as of July 9, 11
  20. 20. + Check on the status of Migration Modules  This stuff changes on a daily basis  Drupal 7 to 8 is still under development
  21. 21. + PPPA specific tasks for prepping the Drupal 7 source site Follow the rules, baby!
  22. 22. + Converted Node,Term and User reference fields to Entity Reference  Used module Reference to Entity Reference Field Migration  https://www.drupal.org/pro ject/entityreference_migrati on  Good to do even though entity reference isn’t working in migrate to 8 yet.  Lots more d7 modules can do cool stuff with entity references  Creates new field and deletes old one
  23. 23. + Converted Artist nodes to Taxonomy terms  Created Rules Component to create term based on node title  Included View Bulk Operation view to batch it and monitor  Created Rules Component to fill in field values of term  Fetch artist by title (to get the fields)  Set Data value of fields from fetched entity  Included View Bulk Operation view to batch it and monitor  Component to make the switch  Fetch term by artist title on poster  Included View Bulk Operation view to batch it and monitor
  24. 24. + Planning For Migration Step Three: Getting ahead of what could go wrong
  25. 25. + Planning our Process: Figuring out the unknowns  Got our migrate commands together  Moving forward we know 90% of this can be done with the plugins  Moving forward we know everything not done in Drupal 7 yet so our best move is to document, try it out weekly  Long term plan is to roll out around late October (In time for BAD camp) Example list of plugins
  26. 26. + Not all migrations ready so we used development too
  27. 27. + Launching the Migration Step Five, the next step
  28. 28. + What’s left to do?  80% of our systems were migrated over successfully  Once we reach 100% we come up with a testing plan  Once tested we come up with basic CI plan  Cutover
  29. 29. +Tools to attempt your own migration And how we used them on the PPPA
  30. 30. + Contributed tools for Migration Module Desctiption migrate_upgrade Drush commands for running upgrades fro Drupal 6 or 7 to Drupal 8 migrate_tools General purpose Drush commands and basic UI for managing migrations migrate_plus Extends the core migration framework with additional functionality. (things like bringing in content via JSON or XML migrate_ui Ui o top of migration entitles in core migrate_manifest Drush command for running template bases SQL migration from a manifest site Borrowed from
  31. 31. + We looked at three paths to begin and you can too!  Migrate through the User Interface  Migrate by creating a custom module and drush commands  Migrate by using drush commands only and fixing systems on the destination site
  32. 32. + Migrating through the User Interface Migrate_UI module
  33. 33. + Migration through the UI  Go to /upgrade  Migrate not great on custom stuff yet  Generally rejected at this time  https://www.drupal.org/node/ 2257723 is the documentation on Drupal.org
  34. 34. + Migrating with a Module with Plugins A careful developers way to go
  35. 35. + Creating a Module with Plugins: The pros and cons for the PPPA  Granular control of migration  Ability to dictate custom functions  Ability to migrate non- standard fields or data structures  Not sure what we were getting into  Spent a lot of time caught up in the weeds Pros Cons
  36. 36. + Creating a Module with Plugins: A look at some commands  drush migrate-upgrade --legacy-db- url=mysql://drupaluser:@127.0.0.1:33067/YOUR DB NAME --legacy-root=http://YOUR SITE:8083/ --configure-only  Sets up migrations – configure only will track all migration but not execute  Once you have set up you can command migrate-import to get specific migrations going  Good tutorial https://drupalize.me/blog/201606/custom- drupal-drupal-migrations-migrate-tools
  37. 37. + Creating a Module with Plugins: A look at the process  Run the configure only command  It creates a bunch of migration plugin files in the tmp directory (or whatever directory you specify)  Use Drupal Console (Thanks FFW) to generate a custom module  Copy the generated migration plugins into your migration  Alter the plugins based on your needs
  38. 38. + Creating a Module with Plugins: A Look at some code
  39. 39. + Migrating through Drush commands only And prayers
  40. 40. +
  41. 41. + Migrate through Drush Commands: Let’s pull the trigger!  drush migrate-upgrade --legacy-db- url=mysql://drupaluser:@127.0.0.1:33067/YOUR DB NAME --legacy-root=http://YOUR SITE:8083/
  42. 42. + Migrate through Drush Commands : Other Commands  migrate-import useful parameters  --limit (this will limit the number of migrations done  -- feedback you will be notified of progress  Migrate –status  Gives you up to date info on migration Migrate-messages gives you errors that came up
  43. 43. + Review of the major systems What got broken during migration?
  44. 44. + Content Types & Taxonomy What the site is really there for
  45. 45. + Content Types  Trouble with contributed module fields  Each entity sits in its own silos for fields so a field on a node will not show up the manage fields page for taxonomy terms like it did in Drupal 7.  Entity Reference field migration is not working right yet in core https://www.drupal.org/node/2611066  There is a patch available to make it work now!
  46. 46. + Content Types  Fields missing on the UI  Manage form and mange display tabs need to be set up Last update was
  47. 47. + Taxonomy  Pretty Easy – 1 to 1 migration  Data structure different in back end but not front end  Made easier by prepping our D7 site by making terms out of nodes  When setting up views on the Destination site for development, we used Taxonomy Manager
  48. 48. + Views & Panels Get ready for some work
  49. 49. + Views Migration  Views are not yet migrated automatically.  No glossary view type in d8  No PHP headers  Who’s online block in now s view
  50. 50. + View Migration Drupal 7 Drupal 8 Done by hand but UI is very similar
  51. 51. + Panels Pages: Page Manager works differently Drupal 7 Drupal 8: Layout Manager
  52. 52. + Configuration Management and Site Automation
  53. 53. + Features  Purely a building tool.  Automatic packaging.  Interoperability build in.  Support for feature sets (bundles).
  54. 54. + Site Automation  Rules UI not working in d8  The d8Rules initive is making improvements to this fast  A lot of the updates can be kept track of here https://www.drupal.org/nod e/1211396  We can use actions for basic workflows
  55. 55. + Search Functionality
  56. 56. + Search Functionality: Still an issue for PPPA D8  Main site navigation for academics working now  Site was intended for researchers so the menu structure and taxonomy follow SLIS guidelines  Apache SOLR not ready for prime time  alpha releases are available already.  Search API Multilingual Solr Search has been created as an extension to ease language specific full text search settings.  The minimum support Solr version is Solr 4.5.1
  57. 57. + The Theme
  58. 58. + The Theme  Our theme in d7 was Adaptive theme  It was based off of Garland  We just used Bartik for 8 since it was responsive  We are considering headless approach
  59. 59. + How you can get involved And learn some great stuff too.
  60. 60. + Who do we need  Developers  Any skill level welcome  Designers  We are looking to give the PPPA a facelift, but special consideration must be made
  61. 61. + Our development process  We have a team of 4 people working on site now  We have an internal issue tracking system where developers are assigned tasks  Once a week, the PM meets at least a half hour to go over with developer the assigned tasks  Meetings usually happen over Skype at 9 pm on Wednesdays and Sundays
  62. 62. + Useful Links  https://www.sitepoint.com/your-first-drupal-8-migration/ Overview of migration concepts  https://drupalize.me/blog/201606/custom-drupal-drupal- migrations-migrate-tools - Migration custom module  https://www.youtube.com/watch?v=fsiepxMIx2w Migrating Drupal and minimizing risks  https://www.drupal.org/node/2257723 Migrate UI Documentation
  63. 63. + Contact info:  Site Owner: Dan Walsh  Email: ppparchives@gmail.com  Web Projects Manager: Stan Ascher  Email: stan.ascher@gmail.com  Twitter: stanascher  Skype: stanascher  Drupal.org: sascher
  64. 64. + Special Thanks for my time at Drupal Gov Con IT Solutions for a modern world (Phase One had nothing to do with this project)
  65. 65. + Questions? Please be nice

×