2019 ·English ·29 slides ·893 views

Plone 5.2 migration at University Ghent, Belgium

The document outlines the migration process of Ghent University's website from Plone 4.3 to Plone 5.2 using Python 3, detailing various migration strategies, encountered challenges, and the involvement of a dedicated migration team. Key components include the use of ArangoDB for data migration, the creation of a custom migration script, and the need for extensive testing and quality control throughout the process. The current status indicates that content migration is almost complete, with ongoing tasks including testing and theme integration.

Slide 1 of 29 — Plone 5.2 migration at University Ghent, Belgium
1/29 arrow keys or swipe · click image for fullscreen
Slide 1 of 29 — Plone 5.2 migration at University Ghent, Belgium
1/29

Details

Uploaded
24 October 2019
Updated
18 November 2022
Language
English
Slides
29
Image size
2048x1448
Views
893
SlideShare ID
186121319
Uploaded format
PDF
Collected
2026-09-27

The description above is SlideShare's automatically generated summary, not the author's own text.

Source & completeness

Content
original + reconstructed
Validation
passed
Slide text
available (29 slides)
Original files
yes
  • original.pdf PDF · 3.8 MB · 29 slides
Checksums (SHA-256)
  • original.pdf: 7bff7465241063dc8a525f03f94f102860fcff6e9826db622c7cb019278c78ed

Slide images come from SlideShare's public renderings (2048x1448 px, WebP). Any file marked as reconstructed is assembled from those images and is not the author's original source file.

Full text of every slide

Text extracted by SlideShare from the slide images — may contain OCR errors. 29 of 29 slides have text.

1
UGent University website migration to Plone 5.2 Plone Conference 2019 Ferrara Andreas Jung
 www.zopyx.com • info@zopyx.com 1
2
About Me • Python since 1993 • Plone since 2002 • Publishing since 1995 • Plone migrations this year: • ✅  2 larger custom Plone migrations to Plone 5.2, Python 3 • ✅ 7 smaller/medium migrations to Plone 5.1 • 🚧 4 other migrations to Plone 5.2, Python 3 planned • contractor in current UGent Plone 5.2 migration project 2
3
Plone @ugent.be • Ghent University, Belgium • 44.000 students • 9.000 staff members • 500 active editors • one large Plone site for all departments • current state: Plone 4.3 • about 83 add-ons • 69 subsites • Size: about 90.000 content objects • Languages: English, Dutch, (Korean) (no translation tool) • Plone migration team: 6 persons (3 internal, 3 external) 3
4
Plone @ugent.be • 2002: Zope/CMF • 2007: Plone 2.5 • 2008: new theme • 2010: Plone 3.3 • 2012: Plone 4.1 • 2015: Plone 4.3 • 2016: new theme • 2019/2020: Plone 5.2/Python 3 4
5
Plone migration approaches • traditional Plone in-place migration • not applicable • too many old add-ons, no 1:1 mapping possible • Full export, full import using Transmogrifier • not ready for Python 3 (6 months ago) • too much magic hidden in too many places (blueprints) • Full export, full import using a custom migration solution • collective.jsonify → ArangoDB → plone.restapi 5
6
Add-ons @ugent.be archetypes.markerfield archetypes.schematuning atreal.massloader atreal.monkeyplone collective.blog.portlets collective.blog.view collective.contentstats collective.indexing collective.keywordwidgetreplacer collective.portlet.localsearch collective.revisionmanager collective.searchform collective.setdefaulteditor collective.tinymcetemplates collective.topicitemsevent collective.ZipFileTransport p4a.plonecalendar plone.app.changeownership Products.CAS4PAS Products.membrane Products.OpenXml Products.PloneFormGen Products.RedirectionTool munin.zope Products.ZNagios collective.portlet.localsearch pyugent ugent.api ugent.authorship ugent.cas_config ugent.clearhistory ugent.collectiondelete ugent.configuration ugent.contentfixer ugent.customsearch ugent.defaultpagechanged ugent.editmode ugent.folderdeleteconfirmation ugent.foldersorting ugent.forms ugent.frameworkcontracts ugent.helper ugent.homepages ugent.imagelibrary ugent.librarywidgets ugent.ldap ugent.linkchecker ugent.membrane ugent.metadata ugent.pas.ldap ugent.patches ugent.phddefense ugent.phonebook ugent.plone4theme ugent.plone4translations ugent.policy ugent.portlet.banner ugent.portlet.collection ugent.portlet.infolinks ugent.portlet.links ugent.portlet.slideshow ugent.portlet.socialbanner ugent.portlet.twitter ugent.portlets ugent.provisionalcontent ugent.removemarkers ugent.reporting ugent.review ugent.rss ugent.sharing ugent.stalecontent ugent.subsites ugent.supergroup ugent.textindex ugent.tinymce ugent.unavailable ugent.vacancy ugent.vocabularies mailinglogger collective.z3c.keywordwidget qi.portlet.TagClouds eea.facetednavigation raven 6
7
Content types @ugent.be • standard Plone types • custom content-types • PloneFormGen • PhdDefense • Vacancy • LibraryDocument • extensive usage of schema extenders 7
8
Analyze and investigate
 your dependencies • check your packages for Python 3 compatibility (setup.py) • check for Python 3/Plone 5.2 related branches • drop any package related to Archetypes or other Python 3 incompatible dependencies • drop packages are not no longer needed or are obsolete • check for package alternatives 
 (PloneFormGen → collective.easyform) 8
9
Document your insights 9
10
Create your target setup • start with a minimal Plone 5.2 buildout • add one verified Python 3 compatible 
 add-on at a time • test, test, test _manually_ • focus on content-types first • configurations, decorations, extra functionality next 10
11
@ugent.be migration export • customized version of collective.jsonify: • full-export of all content objects
 and their properties • export of portlet assignments • default pages, layout information • workflow states • local roles (@@sharing) • pre-computed values for further efficient processing • 90.000 content objects • 90.000 JSON files • 55 GB data • 90 minutes • binaries b64 encoded 11
12
ArangoDB migration DB Why a migration database? •we want to run partial imports (e.g. importing a particular subtree of the original site) •we want to test a particular migration feature e.g. a complex migration step 
 (PloneFormGen to EasyForm) •Easy query and check the original data (just a query by path) Why ArangoDB? • 👻 because MongoDB sucks (16 MB BSON limit) 👻 •Multi-model database: key-value, document, graph •dedicated DSL AQL (Arango Query Language) vs. JSON-based queries (ES, MongoDB…) •easy to install and use •JSON files can be dumped into ArangoDB without modifications •import time: about 45 minutes •successfully used in previous Python projects 12
13
ArangoDB migration DB 13
14
Import infrastructure • clean Python 3.7, Python 5.2 buildout • import via plone.restapi • dedicated migration package with specific views for functionality that is not provided by plone.restapi or specific to the migration project • path to UID in RichText fields • setting INavigationRoot • setting position in parent • allowed/addable types per folder (folder restrictions) • setting related items (as post migration operation) • setting permissions and roles • setting marker interfaces • adding portlets 14
15
• YAML based configuration The "magic" migration script (1/3) 15
16
The "magic" migration script (2/3) • Phase 1 (migration setup &preparation) • migration pre-check • removal of target site (if existing) • creating a new fresh Plone 5.2 site with a given number of extension profiles • Phase 2 (folders) • query ArangoDB for all folderish types • rebuild complete folder structure with full metadata, workflow information 16
17
• Phase 3 (non folders) • query ArangoDB for all non-folderish types • add non-folderish content as leafs to existing folder structure • Phase 4 (global actions) • path to UID check/migration for RichText fields • assignment of portlets • some specific fixup operations The "magic" migration script (3/3) 17
18
PloneFormGen to EasyForm • PloneFormGen no longer available under Plone 5.2/Python 3 
 (Archetypes dependency) • collective.easyform as replacement (Dexterity-based clone of PFG) • PFG export: one JSON for FormFolder and 1..N JSON for all fields and mail, save and script adapter • fields and actions are defined in collective.easyform as a schema • extract relevant metadata for EasyForm from all JSON files • build supermodel XML files for fields and actions from all JSON files • instantiate EasyForm instance and assign fields + actions supermodel 18
19
Topics to Collections • Topics export: one JSON for ’Topic’ and 1..N JSON file for each criteria • Conversion of old-style topic criteria to plone.app.querystring • basically based on original migration code of Plone • instantiate Collection and assign query strings 19
20
From schema extenders 
 to behaviors 1. documentation and analysis of all schema extenders, their usage 2. check with Dexterity replacements 3. reimplementation as behaviors Issues • customizing of existing behaviors painful • bunch of monkey-patches or code duplication 20
21
Migrating packages to Python 3 • mostly covered by talks of Philipp Bauer and David Glick • most common problems: • fixing UTF-8 vs. unicode related code • import fixes • @implements -> @implementer • rarely used 2to3 or moderinzr • no need to maintain both Python 2 and Python 3 compatibility • usually created a dedicated Plone52Python3 branch from the current master • unit tests if available • basic manually testing 21
22
Reimplementations • historic code in portal_skins replaced with browser views → reimplementation • core Archetypes-based content-types replaced with Dexterity → reimplementation 22
23
Other common problems • improper image/file metadata in blobs 
 (TIFF stored as some.jpg, image/jpeg) • migration on vocabulary values 
 (e.g. old to new departments) • there is always one more thing missing in your export (repetitive export/import cycles) • there is always one more bug in your migration script (portlets, collections) 23
24
Quality control • aspects • completeness of content and configurations • consistency of migration (systematic errors) • too many tiny aspects slipping out of our focus • unit tests if available • manual testing by different persons • "works for me" does not mean that it works for others 24
25
Add-ons @ugent.be (old) archetypes.markerfield archetypes.schematuning atreal.massloader atreal.monkeyplone collective.blog.portlets collective.blog.view collective.contentstats collective.indexing collective.keywordwidgetreplacer collective.portlet.localsearch collective.revisionmanager collective.searchform collective.setdefaulteditor collective.tinymcetemplates collective.topicitemsevent collective.ZipFileTransport p4a.plonecalendar plone.app.changeownership Products.CAS4PAS Products.membrane Products.OpenXml Products.PloneFormGen Products.RedirectionTool munin.zope Products.ZNagios collective.portlet.localsearch pyugent ugent.api ugent.authorship ugent.cas_config ugent.clearhistory ugent.collectiondelete ugent.configuration ugent.contentfixer ugent.customsearch ugent.defaultpagechanged ugent.editmode ugent.folderdeleteconfirmation ugent.foldersorting ugent.forms ugent.frameworkcontracts ugent.helper ugent.homepages ugent.imagelibrary ugent.librarywidgets ugent.ldap ugent.linkchecker ugent.membrane ugent.metadata ugent.pas.ldap ugent.patches ugent.phddefense ugent.phonebook ugent.plone4theme ugent.plone4translations ugent.policy ugent.portlet.banner ugent.portlet.collection ugent.portlet.infolinks ugent.portlet.links ugent.portlet.slideshow ugent.portlet.socialbanner ugent.portlet.twitter ugent.portlets ugent.provisionalcontent ugent.removemarkers ugent.reporting ugent.review ugent.rss ugent.sharing ugent.stalecontent ugent.subsites ugent.supergroup ugent.textindex ugent.tinymce ugent.unavailable ugent.vacancy ugent.vocabularies mailinglogger collective.z3c.keywordwidget qi.portlet.TagClouds eea.facetednavigation raven 25
26
Add-ons @ugent.be (new) Products.PloneKeywordManager eea.facetednavigation collective.siteimprove collective.blog.portlets collective.portlet.localsearch ugent.customaddforms ugent.forms ugent.imagelibrary ugent.librarywidgets ugent.phddefense ugent.phonebook ugent.plone5migration ugent.policy ugent.portlet.collection ugent.portlet.infolinks ugent.portlet.links ugent.portlet.slideshow ugent.portlet.socialbanner ugent.portlet.twitter ugent.showlabel ugent.subsitefolder ugent.textindex ugent.vacancy plone.app.changeownership 26
27
Current status/open issues • Content migration almost complete • next: detailed testing needed • next: integration with updated UGent theme and theme testing • open: • replacement of a specific Membrane usage • collective.castle, Products.CAS4PAS 27
28
Takeaways • Export Plone → JSON: 2 hours (fast) • Import JSON → ArangoDB: 45 mins (fast) • Import ArangoDB → plone.restapi: 36-48 hours (painfully slow) • 1,5-2,0 seconds per content object in average • no option for parallelization (risk of write conflicts) • CREATE most expensive operation • Plone/Zope/ZODB are painfully slow backends for "mass" content 28
29
Questions? 29