pppa d8 presentation drupal for gov_0

65
+ Oh Yeah!! The story of a Drupal 7 to Drupal 8 migration Migrating the Palestine Poster Project from Drupal 7 to Drupal 8 http://palestineposterproject.org/

Upload: stan-ascher

Post on 09-Jan-2017

46 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: PPPA D8 presentation Drupal For Gov_0

+

Oh Yeah!! The story of a Drupal 7 to Drupal 8 migration Migrating the Palestine Poster Project from Drupal 7 to Drupal 8http://palestineposterproject.org/

Page 2: PPPA D8 presentation Drupal For Gov_0

+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

Page 3: PPPA D8 presentation Drupal For Gov_0

+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

Page 4: PPPA D8 presentation Drupal For Gov_0

+All about the Palestine Poster Project ArchivesA brief history of the site and the development team

Page 5: PPPA D8 presentation Drupal For Gov_0

+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

Page 6: PPPA D8 presentation Drupal For Gov_0

+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

Page 7: PPPA D8 presentation Drupal For Gov_0

+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

Page 8: PPPA D8 presentation Drupal For Gov_0

+Our Migration Strategy Including pros and cons of three approaches

Page 9: PPPA D8 presentation Drupal For Gov_0

+The five phases of migration and where the PPPA is in the process1. Auditing the source site

2. Planning the new data model

3. Prepping for migration

4. Planning the migration

5. Launching the migration

Borrowed from

Page 10: PPPA D8 presentation Drupal For Gov_0

+

Auditing the source siteStep One: Where are we now?

Page 11: PPPA D8 presentation Drupal For Gov_0

+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

Page 12: PPPA D8 presentation Drupal For Gov_0

+

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

Page 13: PPPA D8 presentation Drupal For Gov_0

+

Planning The New Data ModelStep two: Should it be content or not?

Page 14: PPPA D8 presentation Drupal For Gov_0

+

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

Page 15: PPPA D8 presentation Drupal For Gov_0

+

Source

Wellspring Special Collection

Language Wellspring Copy Location

Poster

Iconography

ArtistPublisher

Nationality

Taxonomy term

Node

Planning the New Data Model:The New Poster Model

Page 16: PPPA D8 presentation Drupal For Gov_0

+

Prepping For MigrationStep 4 Get ready to break your source siteTips for starting your migration

Page 17: PPPA D8 presentation Drupal For Gov_0

+

Steps everyone should take before starting a migration

Page 18: PPPA D8 presentation Drupal For Gov_0

+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

Page 19: PPPA D8 presentation Drupal For Gov_0

+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

Page 20: PPPA D8 presentation Drupal For Gov_0

+Check on the status of Migration Modules This stuff changes on a daily basis Drupal 7 to 8 is still under development

Page 21: PPPA D8 presentation Drupal For Gov_0

+

PPPA specific tasks for prepping the Drupal 7 source siteFollow the rules, baby!

Page 22: PPPA D8 presentation Drupal For Gov_0

+Converted Node, Term and User reference fields to Entity Reference Used module Reference to

Entity Reference Field Migration https://www.drupal.org/

project/entityreference_migration

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

Page 23: PPPA D8 presentation Drupal For Gov_0

+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

Page 24: PPPA D8 presentation Drupal For Gov_0

+

Planning For MigrationStep Three: Getting ahead of what could go wrong

Page 25: PPPA D8 presentation Drupal For Gov_0

+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

Page 26: PPPA D8 presentation Drupal For Gov_0

+Not all migrations ready so we used development too

Page 27: PPPA D8 presentation Drupal For Gov_0

+

Launching the MigrationStep Five, the next step

Page 28: PPPA D8 presentation Drupal For Gov_0

+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

Page 29: PPPA D8 presentation Drupal For Gov_0

+Tools to attempt your own migrationAnd how we used them on the PPPA

Page 30: PPPA D8 presentation Drupal For Gov_0

+Contributed tools for MigrationModule Desctiptionmigrate_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

Page 31: PPPA D8 presentation Drupal For Gov_0

+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

Page 32: PPPA D8 presentation Drupal For Gov_0

+

Migrating through the User InterfaceMigrate_UI module

Page 33: PPPA D8 presentation Drupal For Gov_0

+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

Page 34: PPPA D8 presentation Drupal For Gov_0

+

Migrating with a Module with PluginsA careful developers way to go

Page 35: PPPA D8 presentation Drupal For Gov_0

+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

Page 36: PPPA D8 presentation Drupal For Gov_0

+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

Page 37: PPPA D8 presentation Drupal For Gov_0

+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

Page 38: PPPA D8 presentation Drupal For Gov_0

+Creating a Module with Plugins: A Look at some code

Page 39: PPPA D8 presentation Drupal For Gov_0

+

Migrating through Drush commands only And prayers

Page 40: PPPA D8 presentation Drupal For Gov_0

+

Page 41: PPPA D8 presentation Drupal For Gov_0

+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/

Page 42: PPPA D8 presentation Drupal For Gov_0

+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 migrationMigrate-messages

gives you errors that came up

Page 43: PPPA D8 presentation Drupal For Gov_0

+Review of the major systemsWhat got broken during migration?

Page 44: PPPA D8 presentation Drupal For Gov_0

+

Content Types & TaxonomyWhat the site is really there for

Page 45: PPPA D8 presentation Drupal For Gov_0

+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!

Page 46: PPPA D8 presentation Drupal For Gov_0

+Content Types

Fields missing on the UI Manage form and mange display tabs need to be set up

Last update was

Page 47: PPPA D8 presentation Drupal For Gov_0

+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

Page 48: PPPA D8 presentation Drupal For Gov_0

+

Views & PanelsGet ready for some work

Page 49: PPPA D8 presentation Drupal For Gov_0

+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

Page 50: PPPA D8 presentation Drupal For Gov_0

+View Migration

Drupal 7 Drupal 8

Done by hand but UI is very similar

Page 51: PPPA D8 presentation Drupal For Gov_0

+Panels Pages: Page Manager works differently

Drupal 7 Drupal 8: Layout Manager

Page 52: PPPA D8 presentation Drupal For Gov_0

+

Configuration Management and Site Automation

Page 53: PPPA D8 presentation Drupal For Gov_0

+Features

Purely a building tool. Automatic packaging. Interoperability build in. Support for feature sets

(bundles).

Page 54: PPPA D8 presentation Drupal For Gov_0

+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/node/1211396

We can use actions for basic workflows

Page 55: PPPA D8 presentation Drupal For Gov_0

+

Search Functionality

Page 56: PPPA D8 presentation Drupal For Gov_0

+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

Page 57: PPPA D8 presentation Drupal For Gov_0

+

The Theme

Page 58: PPPA D8 presentation Drupal For Gov_0

+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

Page 59: PPPA D8 presentation Drupal For Gov_0

+How you can get involvedAnd learn some great stuff too.

Page 60: PPPA D8 presentation Drupal For Gov_0

+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

Page 61: PPPA D8 presentation Drupal For Gov_0

+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

Page 62: PPPA D8 presentation Drupal For Gov_0

+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

Page 63: PPPA D8 presentation Drupal For Gov_0

+Contact info:

Site Owner: Dan Walsh Email:

[email protected] Web Projects Manager: Stan

Ascher Email:

[email protected] Twitter: stanascher Skype: stanascher Drupal.org: sascher

Page 64: PPPA D8 presentation Drupal For Gov_0

+

Special Thanks for my time at Drupal Gov Con

IT Solutions for a modern world

(Phase One had nothing to do with this project)

Page 65: PPPA D8 presentation Drupal For Gov_0

+

Questions?Please be nice