TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Upgrading to Alfresco 6
1. Upgrading to Alfresco 6
The Short History of the Long Road
Angel Borroy
Developer at UST Global
@AngelBorroy
angelborroy
keensoft
2. 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
3.
4. 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
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
7. 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
8. 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
9. 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
10. 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
12. Learn. Connect. Collaborate.
Final adjustments: upgrading SOLR
Target Alfresco
Content Store
Database
Indexes
Indexer Alfresco
Indexes
solr4 solr6
Final Alfresco
move
move
move
13. 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!
15. 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
16. 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
17. 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
19. 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
21. 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
26. 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
27. 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
28. 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
30. 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
31. 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
32. 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
35. 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
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.
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