Upgrading to Alfresco 6
The Short History of the Long Road
Angel Borroy
Developer at UST Global
@AngelBorroy
angelborroy
keensoft
Learn. Connect. Collaborate.
Upgrading process in a nutshell
Previous version
1. Backup database and content store
2. Identify your customizations and addons
New version
1. Install Alfresco 6 from scratch… or use public Docker images!
2. Restore database and content store
3. Apply your customizations and addons
4. Start Alfresco and have some fun
https://docs.alfresco.com/community/tasks/upgrade-process.html
Learn. Connect. Collaborate.
Wait a minute…
2010 Peter Monks
Alfresco Environment Validation and “Day Zero” Configuration
2011 Frederik Heremans
Migration from jBPM to Activiti
2013 Kyle Adams
The Art of the Upgrade
2015 Alfresco Tech Talk Live 82
Upgrading to Alfresco 5.0
2017 Ian Wright
Upgrading extensions - help is at hand
Learn. Connect. Collaborate.
Contents
• Understanding the Upgrade Process
• Elaborating an Upgrade Plan
• Identifying Deprecated Features
• Adapting your Customizations
• Installing your new Alfresco
• D-Day considerations
Understanding the Upgrade Process
Learn. Connect. Collaborate.
What is happening behind the scenes
Source Alfresco
Content Store
Database
Indexes
Halfway Alfresco
copy
dump
N
Target Alfresco
move
move
copy
patch patch
Learn. Connect. Collaborate.
Source Alfresco
• Test your backups
– Database
– Content Store
– Indexes
• Use dump for the Databases
• Use rsync for Content Store
– So you can perform a quick last rsync just before stopping the service for the
upgrading process
– Consider only files modified 30 days ago or less from Content Store Deleted
• Use rsync for Indexes
– Only required for Target Alfresco, as Halfway(s) Alfresco are running in no index
mode
Source Alfresco
Learn. Connect. Collaborate.
Halfway Alfresco(s)
• Not all Database Patches are included in every Alfresco version
– Depending on the Source Alfresco version, several Halfway Alfresco instances must
be used
• Prepare as many Alfresco Instances as required (3.4, 4.2…)
– Deploy only customized Content Models
Other addons and customizations can be ignored
– Deploying Share web application is not required
– Transformation Service is not required
ooo.enabled=false
jodconverter.enabled=false
– Configure noindex mode
index.subsystem.name=noindex
– Disable scheduled jobs
• These instances are used only to patch the Database, so server resources
(CPU, RAM…) can be lower than PROD environment
Halfway Alfresco
Learn. Connect. Collaborate.
Target Alfresco
• Same (or higher) resources as Source Alfresco
• Every configuration, customization and addon is deployed
– Probably some adaptations are required
• Using original Indexer Subsystem mode to minimize downtime
– For instance, configure solr4 mode
index.subsystem.name=solr4
• Last Database Patch should be also applied when starting Alfresco
Repository for the first time
• Just switch your public HTTP proxies to Target Alfresco hostname or IP
after validating the environment
Target Alfresco
Learn. Connect. Collaborate.
Database Patches Catalog
https://github.com/Alfresco/alfresco-repository/tree/master/src/main/resources/alfresco/patch
Learn. Connect. Collaborate.
Final adjustments: upgrading SOLR
Target Alfresco
Content Store
Database
Indexes
Indexer Alfresco
Indexes
solr4 solr6
Final Alfresco
move
move
move
Learn. Connect. Collaborate.
Indexer Alfresco
• This instance calculates indexes for the new SOLR version while Target
Alfresco is being used in real
• Same configuration as Target Alfresco can be used, but deploying Share
web application is not required
• Indexation is a heavy process (in CPU and network bandwidth), so you
can consider a nightly only execution
• SOLR Web Console can be used to follow indexation progress
Indexer Alfresco
• Once the indexation is current, you can switch
Indexer Subsystem mode to the new SOLR
version and (finally)… you’re done!
Elaborating an Upgrade Plan
Learn. Connect. Collaborate.
Auditing your Source Alfresco
Volume
• Count of all database tables
• Size and number of files in content store
• Size of Lucene or Solr indexes
Customizations
• Custom Content Models
• Custom Process Definitions
• Installed Modules
• Other Customizations or Extensions Source Alfresco
OOTB Alfresco
Learn. Connect. Collaborate.
Preparing your playground
Backup
• Database dump
• Content Store rsync
• Indexes rsync
Test data
• For large Content Stores
– Mock up with small files
https://github.com/kylefernandadams/alfresco-mock-content-generator
Learn. Connect. Collaborate.
Defining your upgrade path
• Apply the latest Service Pack to
your Source Alfresco
• Upgrades from 5.0 and 5.1 need to
stop at 5.2
• Upgrades from Solr 4/6 subsystems
need to upgrade also to Alfresco
Search Services 1.2
5.2.x
5.2.x
Learn. Connect. Collaborate.
Identifying required steps
Learn. Connect. Collaborate.
Recovery strategy
• Prepare for the worst scenario
• Preserve your Source Alfresco untouched to switch it live again (quickly) if
upgrading process fails
Do not perform an in-place upgrade!
Kyle Adams – The Art of the Upgrade - 2013
Identifying Deprecated Features
Learn. Connect. Collaborate.
Alfresco 5
• Alfresco Explorer
• AVM (Advanced Versioning Manager)
• Lucene
• Old Fashioned CMIS API endpoints replaced by clearer ones
• CML Web Services SOAP API
• JCR / JCR-RMI
• URL Addressability API
• Social Publishing Features
• Blog Publishing Features
https://ecmarchitect.com/archives/2014/11/06/3962
Learn. Connect. Collaborate.
Alfresco 6
• Binary installers
• JBoss (aka WildFly), WebSphere and WebLogic
• DB2
• Solaris
• CIFS (unsupported)
• Solr 1
• Share Connector for Activiti integration
• Multi-Tenancy
https://ecmarchitect.com/archives/2017/12/02/4305
Learn. Connect. Collaborate.
Alfresco 6.1
• CIFS (removed)
• NTLM v1
– Passthru authentication subsystem is no longer available
• API Deprecation
– TransformService
– RenditionService
• Additional deprecations planned for 6.x
– Embedded Activiti
– Share Pages (blogs, calendars, wiki…)
– Web Quick Start
– Alfresco in the Cloud
https://community.alfresco.com/community/ecm/blog/2018/01/03/architecture-changes-for-alfresco-content-services-version-60
https://github.com/Alfresco/acs-packaging/blob/master/CHANGELOG.md
Learn. Connect. Collaborate.
Alfresco Product Support Status
• Product releases
• Modules, add-ons and components
• SDKs
• All items currently EOM
– Workdesk
– Google Docs v1 and v2
– Quickr Connector
– XAM Connector
– Alfresco Analytics
– …
https://www.alfresco.com/alfresco-product-support-status
Adapting your Customizations
Learn. Connect. Collaborate.
Alfresco 6 Backward Compatibility
Some addons will work without recompiling nor
repackaging them with Alfresco SDK for version 6
• Repository includes relevant Java Library
upgrades
– Addons must be reviewed
• Share code from 5.x is compatible
– Everything should work in the same way
• ADF 1.x & 2.x code from 5.2.x is compatible
• Activiti workflows from 5.x are compatible
– But probably you should start thinking of moving
them outside ACS
Repository
Learn. Connect. Collaborate.
Alfresco 6 Repository Migration Guide
• Hibernate is completely remove from the product
– Use iBatis framework if you had custom DAOs
• Quartz has been updated to 2.3.0
– Change your Job Spring Bean definitions
• Spring has been updated to 5
– Update your XSD declaration for beans
– Change your “idreflocal“ to “idrefbean“ clauses
– Review your testing code
• Jackson has been updated to 2.9.5
– JSON Mappers based in 1.x must be rewritten
https://github.com/Alfresco/alfresco-repository/wiki/ACS-6-Migration-Guide
Learn. Connect. Collaborate.
Integrations
Upgrading process preserves UUIDs from Source
Alfresco
CML Web Services SOAP API
• Removed in Alfresco 5.0
• Time to Move!
CMIS
• 1.1 specification (Atom / Browser) closed in 2017
• Still supported by many products
REST API
• Old Version still available for Share and other products
• Consider migrating to New Version, based in Swagger and
designed for Angular apps
Installing your new Alfresco
Learn. Connect. Collaborate.
Alfresco 6
By Components
• Distribution ZIP
– Community
https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition
– Enterprise
http://support.alfresco.com
• Supported Platforms
https://docs.alfresco.com/6.0/concepts/supported-platforms-ACS.html
• Installation instructions
http://docs.alfresco.com/community/concepts/install-community-intro.html
http://beecon.buzz/2017/assets/files/EF09/EF09-Installing-Alfresco-components-1-by-1.pdf
Learn. Connect. Collaborate.
Alfresco 6
Docker Compose
• Not supported for Enterprise PROD installations!
• Official Docker Images
– Community https://hub.docker.com/u/alfresco/
– Enterprise https://quay.io/organization/alfresco
• Official Docker Container Compositions
– Community https://github.com/Alfresco/acs-community-deployment
– Enterprise https://github.com/Alfresco/acs-deployment
• Community provided deployments
– https://github.com/keensoft/docker-alfresco
Learn. Connect. Collaborate.
Alfresco 6
Kubernetes
• Official Helm Charts not available at https://hub.helm.sh
• Official Kubernetes deployment
– Community https://github.com/Alfresco/acs-community-deployment
– Enterprise https://github.com/Alfresco/acs-deployment
Amazon AWS
CFN Template
https://github.com/Alfresco/acs-deployment-aws
D-Day considerations
Learn. Connect. Collaborate.
Monitoring
Logs
tail, docker logs, kubectl logs
Log4j logging levels to TRACE or DEBUG
JVM
JProfiler, YourKit
Database
SQL Developer, psql, mysql
Performance
top, nmon, kill -3
Learn. Connect. Collaborate.
Common problems
Long running patches
Depending on your data, some patches can take long time to complete
Auditable Behavior
Depending on your upgrade path, Auditable Aspect must be disabled during
upgrading process
Orphaned nodes
Content Store Cleaner Job will purge them after upgrading
Unindexed nodes
Not every node can be indexed
Learn. Connect. Collaborate.
Validation
• Verify that every service, subsystem and protocol is working as expected
– Repository, Share, CMIS, REST API, AOS, SOLR
– Transformation, Authentication, Synchronization, Search
– FTP, WebDAV, AOS, SMTP, IMAP, CIFS
• Verify that nodes count is the same
• Verify SOLR count and errors
• Verify that every addon and
customization is still working
Learn. Connect. Collaborate.
Final Operations
Document final operations and inform involved people before going on with
the upgrading process
Moving forward
Switch public addresses to Final Alfresco
Going back
Restore your Source Alfresco Source Alfresco
Final Alfresco
Learn. Connect. Collaborate.
Downtime
Source Alfresco Halfway Alfresco Target Alfresco
Indexer Alfresco Final Alfresco
Service Downtime
Upgrading Finished
Upgrading to Alfresco 6
The Short History of the Long Road
Angel Borroy
Developer at UST Global
@AngelBorroy
angelborroy
keensoft

Upgrading to Alfresco 6

  • 1.
    Upgrading to Alfresco6 The Short History of the Long Road Angel Borroy Developer at UST Global @AngelBorroy angelborroy keensoft
  • 2.
    Learn. Connect. Collaborate. Upgradingprocess in a nutshell Previous version 1. Backup database and content store 2. Identify your customizations and addons New version 1. Install Alfresco 6 from scratch… or use public Docker images! 2. Restore database and content store 3. Apply your customizations and addons 4. Start Alfresco and have some fun https://docs.alfresco.com/community/tasks/upgrade-process.html
  • 4.
    Learn. Connect. Collaborate. Waita minute… 2010 Peter Monks Alfresco Environment Validation and “Day Zero” Configuration 2011 Frederik Heremans Migration from jBPM to Activiti 2013 Kyle Adams The Art of the Upgrade 2015 Alfresco Tech Talk Live 82 Upgrading to Alfresco 5.0 2017 Ian Wright Upgrading extensions - help is at hand
  • 5.
    Learn. Connect. Collaborate. Contents •Understanding the Upgrade Process • Elaborating an Upgrade Plan • Identifying Deprecated Features • Adapting your Customizations • Installing your new Alfresco • D-Day considerations
  • 6.
  • 7.
    Learn. Connect. Collaborate. Whatis happening behind the scenes Source Alfresco Content Store Database Indexes Halfway Alfresco copy dump N Target Alfresco move move copy patch patch
  • 8.
    Learn. Connect. Collaborate. SourceAlfresco • Test your backups – Database – Content Store – Indexes • Use dump for the Databases • Use rsync for Content Store – So you can perform a quick last rsync just before stopping the service for the upgrading process – Consider only files modified 30 days ago or less from Content Store Deleted • Use rsync for Indexes – Only required for Target Alfresco, as Halfway(s) Alfresco are running in no index mode Source Alfresco
  • 9.
    Learn. Connect. Collaborate. HalfwayAlfresco(s) • Not all Database Patches are included in every Alfresco version – Depending on the Source Alfresco version, several Halfway Alfresco instances must be used • Prepare as many Alfresco Instances as required (3.4, 4.2…) – Deploy only customized Content Models Other addons and customizations can be ignored – Deploying Share web application is not required – Transformation Service is not required ooo.enabled=false jodconverter.enabled=false – Configure noindex mode index.subsystem.name=noindex – Disable scheduled jobs • These instances are used only to patch the Database, so server resources (CPU, RAM…) can be lower than PROD environment Halfway Alfresco
  • 10.
    Learn. Connect. Collaborate. TargetAlfresco • Same (or higher) resources as Source Alfresco • Every configuration, customization and addon is deployed – Probably some adaptations are required • Using original Indexer Subsystem mode to minimize downtime – For instance, configure solr4 mode index.subsystem.name=solr4 • Last Database Patch should be also applied when starting Alfresco Repository for the first time • Just switch your public HTTP proxies to Target Alfresco hostname or IP after validating the environment Target Alfresco
  • 11.
    Learn. Connect. Collaborate. DatabasePatches Catalog https://github.com/Alfresco/alfresco-repository/tree/master/src/main/resources/alfresco/patch
  • 12.
    Learn. Connect. Collaborate. Finaladjustments: upgrading SOLR Target Alfresco Content Store Database Indexes Indexer Alfresco Indexes solr4 solr6 Final Alfresco move move move
  • 13.
    Learn. Connect. Collaborate. IndexerAlfresco • This instance calculates indexes for the new SOLR version while Target Alfresco is being used in real • Same configuration as Target Alfresco can be used, but deploying Share web application is not required • Indexation is a heavy process (in CPU and network bandwidth), so you can consider a nightly only execution • SOLR Web Console can be used to follow indexation progress Indexer Alfresco • Once the indexation is current, you can switch Indexer Subsystem mode to the new SOLR version and (finally)… you’re done!
  • 14.
  • 15.
    Learn. Connect. Collaborate. Auditingyour Source Alfresco Volume • Count of all database tables • Size and number of files in content store • Size of Lucene or Solr indexes Customizations • Custom Content Models • Custom Process Definitions • Installed Modules • Other Customizations or Extensions Source Alfresco OOTB Alfresco
  • 16.
    Learn. Connect. Collaborate. Preparingyour playground Backup • Database dump • Content Store rsync • Indexes rsync Test data • For large Content Stores – Mock up with small files https://github.com/kylefernandadams/alfresco-mock-content-generator
  • 17.
    Learn. Connect. Collaborate. Definingyour upgrade path • Apply the latest Service Pack to your Source Alfresco • Upgrades from 5.0 and 5.1 need to stop at 5.2 • Upgrades from Solr 4/6 subsystems need to upgrade also to Alfresco Search Services 1.2 5.2.x 5.2.x
  • 18.
  • 19.
    Learn. Connect. Collaborate. Recoverystrategy • Prepare for the worst scenario • Preserve your Source Alfresco untouched to switch it live again (quickly) if upgrading process fails Do not perform an in-place upgrade! Kyle Adams – The Art of the Upgrade - 2013
  • 20.
  • 21.
    Learn. Connect. Collaborate. Alfresco5 • Alfresco Explorer • AVM (Advanced Versioning Manager) • Lucene • Old Fashioned CMIS API endpoints replaced by clearer ones • CML Web Services SOAP API • JCR / JCR-RMI • URL Addressability API • Social Publishing Features • Blog Publishing Features https://ecmarchitect.com/archives/2014/11/06/3962
  • 22.
    Learn. Connect. Collaborate. Alfresco6 • Binary installers • JBoss (aka WildFly), WebSphere and WebLogic • DB2 • Solaris • CIFS (unsupported) • Solr 1 • Share Connector for Activiti integration • Multi-Tenancy https://ecmarchitect.com/archives/2017/12/02/4305
  • 23.
    Learn. Connect. Collaborate. Alfresco6.1 • CIFS (removed) • NTLM v1 – Passthru authentication subsystem is no longer available • API Deprecation – TransformService – RenditionService • Additional deprecations planned for 6.x – Embedded Activiti – Share Pages (blogs, calendars, wiki…) – Web Quick Start – Alfresco in the Cloud https://community.alfresco.com/community/ecm/blog/2018/01/03/architecture-changes-for-alfresco-content-services-version-60 https://github.com/Alfresco/acs-packaging/blob/master/CHANGELOG.md
  • 24.
    Learn. Connect. Collaborate. AlfrescoProduct Support Status • Product releases • Modules, add-ons and components • SDKs • All items currently EOM – Workdesk – Google Docs v1 and v2 – Quickr Connector – XAM Connector – Alfresco Analytics – … https://www.alfresco.com/alfresco-product-support-status
  • 25.
  • 26.
    Learn. Connect. Collaborate. Alfresco6 Backward Compatibility Some addons will work without recompiling nor repackaging them with Alfresco SDK for version 6 • Repository includes relevant Java Library upgrades – Addons must be reviewed • Share code from 5.x is compatible – Everything should work in the same way • ADF 1.x & 2.x code from 5.2.x is compatible • Activiti workflows from 5.x are compatible – But probably you should start thinking of moving them outside ACS Repository
  • 27.
    Learn. Connect. Collaborate. Alfresco6 Repository Migration Guide • Hibernate is completely remove from the product – Use iBatis framework if you had custom DAOs • Quartz has been updated to 2.3.0 – Change your Job Spring Bean definitions • Spring has been updated to 5 – Update your XSD declaration for beans – Change your “idreflocal“ to “idrefbean“ clauses – Review your testing code • Jackson has been updated to 2.9.5 – JSON Mappers based in 1.x must be rewritten https://github.com/Alfresco/alfresco-repository/wiki/ACS-6-Migration-Guide
  • 28.
    Learn. Connect. Collaborate. Integrations Upgradingprocess preserves UUIDs from Source Alfresco CML Web Services SOAP API • Removed in Alfresco 5.0 • Time to Move! CMIS • 1.1 specification (Atom / Browser) closed in 2017 • Still supported by many products REST API • Old Version still available for Share and other products • Consider migrating to New Version, based in Swagger and designed for Angular apps
  • 29.
  • 30.
    Learn. Connect. Collaborate. Alfresco6 By Components • Distribution ZIP – Community https://www.alfresco.com/thank-you/thank-you-downloading-alfresco-community-edition – Enterprise http://support.alfresco.com • Supported Platforms https://docs.alfresco.com/6.0/concepts/supported-platforms-ACS.html • Installation instructions http://docs.alfresco.com/community/concepts/install-community-intro.html http://beecon.buzz/2017/assets/files/EF09/EF09-Installing-Alfresco-components-1-by-1.pdf
  • 31.
    Learn. Connect. Collaborate. Alfresco6 Docker Compose • Not supported for Enterprise PROD installations! • Official Docker Images – Community https://hub.docker.com/u/alfresco/ – Enterprise https://quay.io/organization/alfresco • Official Docker Container Compositions – Community https://github.com/Alfresco/acs-community-deployment – Enterprise https://github.com/Alfresco/acs-deployment • Community provided deployments – https://github.com/keensoft/docker-alfresco
  • 32.
    Learn. Connect. Collaborate. Alfresco6 Kubernetes • Official Helm Charts not available at https://hub.helm.sh • Official Kubernetes deployment – Community https://github.com/Alfresco/acs-community-deployment – Enterprise https://github.com/Alfresco/acs-deployment Amazon AWS CFN Template https://github.com/Alfresco/acs-deployment-aws
  • 33.
  • 34.
    Learn. Connect. Collaborate. Monitoring Logs tail,docker logs, kubectl logs Log4j logging levels to TRACE or DEBUG JVM JProfiler, YourKit Database SQL Developer, psql, mysql Performance top, nmon, kill -3
  • 35.
    Learn. Connect. Collaborate. Commonproblems Long running patches Depending on your data, some patches can take long time to complete Auditable Behavior Depending on your upgrade path, Auditable Aspect must be disabled during upgrading process Orphaned nodes Content Store Cleaner Job will purge them after upgrading Unindexed nodes Not every node can be indexed
  • 36.
    Learn. Connect. Collaborate. Validation •Verify that every service, subsystem and protocol is working as expected – Repository, Share, CMIS, REST API, AOS, SOLR – Transformation, Authentication, Synchronization, Search – FTP, WebDAV, AOS, SMTP, IMAP, CIFS • Verify that nodes count is the same • Verify SOLR count and errors • Verify that every addon and customization is still working
  • 37.
    Learn. Connect. Collaborate. FinalOperations Document final operations and inform involved people before going on with the upgrading process Moving forward Switch public addresses to Final Alfresco Going back Restore your Source Alfresco Source Alfresco Final Alfresco
  • 38.
    Learn. Connect. Collaborate. Downtime SourceAlfresco Halfway Alfresco Target Alfresco Indexer Alfresco Final Alfresco Service Downtime Upgrading Finished
  • 40.
    Upgrading to Alfresco6 The Short History of the Long Road Angel Borroy Developer at UST Global @AngelBorroy angelborroy keensoft