GovHUB Story Migration: A Georgia Custom Drupal Data A P R I L S I D E S + L U L L A B O T G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 1
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 April Sides S R. D E V E L O P E R + L U L L A B O T weekbeforenext weekbeforenext aprilsides 2
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 3
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 4
Migration Lullabot Team G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 5
Digital Services Georgia G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 6
What we will cover ⭑ ⭑ ⭑ Magical Nerdery Strategies and Workflow Discovery and Planning G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 7
Photo by Elodie Oudot on Unsplash and Planning Discovery G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 8
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Source Destination Drupal 7 Multisite Drupal 8 Multisite ⭑ ⭑ (85+ sites) (~6 at a time) Hosted on Acquia Hosted on Acquia ⭑ ⭑ 27 Content Types 20 Content Types ⭑ ⭑ (15 migrated) (14 populated) 14 Taxonomy Vocabularies 17 Taxonomy Vocabularies ⭑ ⭑ (9 migrated) (10 populated) Paragraphs, Field Collections "Micro-content" Types ⭑ ⭑ and Entity Embeds and Entity Embeds 9
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 10
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 11
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 12
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 13
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 14
https://www.drupal.org/project/migration_planner G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 15
Photo by mali maeder from Pexels SQueaLer G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 16
SQueaLer scans G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 WYSIWYG string queries: ⭑ Object tags Custom classes ✩ ✩ Image tags Custom forms ✩ ✩ Embedded entities Email links ✩ ✩ Absolute links Style tags and attributes ✩ ✩ Span tags Social network links ✩ ✩ iFrames Video iFrames ✩ ✩ Script tags Links to PDFs ✩ ✩ Tables File Lists ✩ ✩ 17
SQueaLer reports (continued) G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Content by date thresholds Metatag string queries: ⭑ ⭑ Parent Content Description ⭑ ✩ Unpublished Content Abstract ⭑ ✩ Content with documents Token ⭑ ✩ Paragraphs Creator ⭑ ✩ Field Collections Canonical ⭑ ✩ Specific field values Title ⭑ ✩ Redirects Image ⭑ ✩ Keyword ✩ Video ✩ Twitter ✩ Open Graph ✩ 18
SQueaLer command G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 $ drush @[SITENAME].[ENVIRONMENT] squeal /sites/[SITENAME].georgia.gov/files/ga_squealer_reports/ [SITENAME].georgia.gov_YYYY-MM-DD.xlsx 19
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 20
https://www.drupal.org/project/squealer G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 21
Photo by chuttersnap on Unsplash and Workflow Strategies G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 22
❌ ✅ G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Did not migrate Migrated Structural elements: Data elements: ⭑ ⭑ Content types and Select nodes ✩ ✩ field definitions and field data Vocabularies Select taxonomy ✩ ✩ terms Paragraph and ✩ field collection Menus ⭑ bundles Webforms ⭑ Views ⭑ Files ⭑ Webform submissions ⭑ 23
Migration modules Core: Contributed: G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 ⭑ ⭑ Migrate Migrate Files (extended) ✩ ✩ migrate migrate_file Migrate Drupal Migrate Plus ✩ ✩ migrate_drupal migrate_plus Custom: Migrate Source CSV ⭑ ✩ migrate_source_csv ga_migrate ✩ Migrate Tools ✩ ga_migrate_site ✩ migrate_tools ga_migrate_source_ui ✩ Drupal Upgrade ✩ migrate_upgrade Migrate Source UI ✩ migrate_source_ui 24
Development tools G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Local development environment: ⭑ Lando ✩ QA environment: ⭑ Tugboat.qa ✩ DevOps magic: ⭑ CircleCI ✩ Quay.io ✩ 25
https://tugboat.qa G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 26
Development workflow G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Focus on field mapping by complexity/content type: ⭑ Basic fields ✩ Rich fields ✩ File/image fields ✩ Paragraphs/Field Collections ✩ WYSIWYG cleanup ✩ 27
Migration development strategy G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Create/edit migration configuration files directly in config sync directory ⭑ Preserve nids for standalone nodes ⭑ Migrate unpublished content ⭑ Prioritize ability to rollback and re-import ⭑ Use ga_migrate_site for site specific overrides ⭑ Log skips and exceptions using custom logging solution ⭑ Solution order: ⭑ Configuration, core and contrib ✩ Custom source/process plugins and services in ga_migrate module ✩ hook_migrate_MIGRATION_ID_prepare_row() ✩ 28
Photo by Dorelys Smits on Unsplash Logging Custom G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 29
ga_migrate_log( G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 $message, // String: detailed message with ids. $migration_id, // String: current migration id. $audience, // String: 'DSGa' or 'dev'. $needs_fix, // Boolean: Does this need to be fixed. $severity, // String: 'warning', 'notice', or 'error'. $category, // String: Short descriptor. $row_id // Integer: The current row id. ); 30
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 31
Photo by Farzad Mohsenvand on Unsplash Phases Migration G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 32
Migration phases G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 Add/remove sites from Tugboat ⭑ Run migrations on Tugboat ⭑ Client QA's migrations on Tugboat ⭑ Development team fixes issues ⭑ Run migration on Production ⭑ Client prepares sites for launch ⭑ Sites are launched ⭑ 33
Nerdery Magical G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 34
Photo by James Wheeler from Pexels Overrides Site Specific G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 35
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 /modules/custom/ga_migrate_site /sites/[SITENAME].georgia.gov/modules/custom/ga_migrate_site 36
... ga_migrate_site: 0 ga_migrate: 0 ... core.extension.yml G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 37
interface GaMigrateSiteInterface { G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 // Press_release nodes with release date greater // than threshold are trashed. const GA_MIGRATE_SITE_PRESS_RELEASE_THRESHOLD = 3; // The date unit that accompanies the threshold value. const GA_MIGRATE_SITE_PRESS_RELEASE_THRESHOLD_UNIT = 'y'; // The site node skip list. const GA_MIGRATE_SITE_SKIP_LIST = []; } /modules/custom/ga_migrate_site/src/Plugin/GaMigrateSiteInterface.php 38
G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 // Implements hook_migrate_prepare_row(). // Implements hook_migrate_MIGRATION_ID_prepare_row(). /sites/[SITENAME].georgia.gov/modules/custom/ga_migrate_site/ga_migrate_site.module 39
Photo by Victor Larracuente on Unsplash Paragraphs Nested G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 40
Paragraphs Container G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 41
Paragraphs Content Paragraphs Container G E O R G I A G O V H U B M I G R A T I O N + F L O R I D A D C 2 0 2 0 42
Recommend
More recommend