pppa d8 presentation drupal for gov_0

Post on 09-Jan-2017

46 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

+

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/

+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

+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

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

+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

+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

+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

+Our Migration Strategy Including pros and cons of three approaches

+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

+

Auditing the source siteStep One: Where are we now?

+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

+

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

+

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

+

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

+

Source

Wellspring Special Collection

Language Wellspring Copy Location

Poster

Iconography

ArtistPublisher

Nationality

Taxonomy term

Node

Planning the New Data Model:The New Poster Model

+

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

+

Steps everyone should take before starting a migration

+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

+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

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

+

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

+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

+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

+

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

+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

+Not all migrations ready so we used development too

+

Launching the MigrationStep Five, the next step

+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

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

+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

+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

+

Migrating through the User InterfaceMigrate_UI module

+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

+

Migrating with a Module with PluginsA careful developers way to go

+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

+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

+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

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

+

Migrating through Drush commands only And prayers

+

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

+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

+Review of the major systemsWhat got broken during migration?

+

Content Types & TaxonomyWhat the site is really there for

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

+Content Types

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

Last update was

+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

+

Views & PanelsGet ready for some work

+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

+View Migration

Drupal 7 Drupal 8

Done by hand but UI is very similar

+Panels Pages: Page Manager works differently

Drupal 7 Drupal 8: Layout Manager

+

Configuration Management and Site Automation

+Features

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

(bundles).

+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

+

Search Functionality

+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

+

The Theme

+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

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

+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

+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

+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

+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

+

Special Thanks for my time at Drupal Gov Con

IT Solutions for a modern world

(Phase One had nothing to do with this project)

+

Questions?Please be nice

top related