Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
#AlfrescoDayBarcelona
Marco Mancuso
• Currently Alfresco DevOps team
• Previously…
– Alfresco global Support team
• Advance Team
• Expert Team
•...
Aboutus
Alfresco Devops
Keep the lights on
• Public services (activiti|my.alfresco.com, Alfresco
Online Trials)
• Internal...
Alfresco Demo Data
Big Questions
What? Why? How? Where?
What it is?
AMP
BigQuestions
What it is NOT?
BigQuestions
Not an import/export tool!
Not a migration tool!
• Not tested against large data
• Just teste...
Why Demo Data?
BigQuestions
https://www.alfresco.com/products/one/trial/online
What else?
• Quickly test customisations with limited set of predefined bootstrapped
data
• Collaborative approach on data...
How does it work?
• 2 repo AMPs:
BigQuestions
• Applied to the repo in which to
export data
• Contains all the APIs to ext...
Users.acp
mysite.acp
myfolder.acp
…
Timeline
BigQuestions
Where I can find the project?
https://github.com/maoo/alfresco-demo-data
BigQuestions
General Details
What is it possible to export & bootstrap?
• Full Share Sites
• Contents in Company Home
– Models (Bootstrap)
– Virtual Fo...
Technologies used
• Alfresco 5.1.EA
– AMP
– Java Backed WebScripts
– Patch Service
– Bootstrap Services
– ACP
• Alfresco M...
Export APIs
Export a Site
• Existing Alfresco API
• (GET) http://localhost:8080/alfresco/s/api/sites/{SITE_NAME}/export
• Admin authen...
Export the authorities (1/2)
• Custom API
• (GET) http://localhost:8080/alfresco/s/api/people-groups/export
• Optional Par...
Export the authorities (2/2)
ExportAPIs
people-users-groups-export.zip
Users.acp
People.acp
Groups.json
Excluded: admin + ...
Export files/folders
• Custom API
• (GET) http://localhost:8080/alfresco/s/api/file-folder/export?path={path}
• Optional P...
AMP structure
AMP
Import
Structure
AMPstructure
Authorities
AMPstructure
Models (standard way) 
AMPstructure
Models 
AMPstructure
Workflows
(standard way)

AMPstructure
Workflows 
AMPstructure
Sites (standard way) 
AMPstructure
Sites 
AMPstructure
Record Management site 
• Treated as standard site
• Problem:
– ACP does not handle well d:any objects:
– rma:readers (ty...
Files/Folders (standard way) 
AMPstructure
Files/Folders

AMPstructure
(Model Manager) Content Models
• Alfresco already provides a way to export/import them
• Folders not visible from Share  ...
Technical Details
So… Where are the configurations?
• (Generally) No configuration is required
• Beans dynamically generated with:
– org.spr...
Just one single configuration bean
TechnicalDetails
Order really matters!
Dynamic order to bootstrap content:
1. Company Home
2. Models
3. Workflows
4. Sites (on Context Refr...
Let’s run it!
Prerequisites
• Alfresco Maven SDK 2.1.1 with Alfresco 5.1:
– JDK 1.8
– Maven 3.2.5 or above
Let’srunit!
How to run the SDK
1. git clone git@github.com:maoo/alfresco-demo-data.git
2. cd alfresco-demo-data
3. ./run.sh
4. Go to h...
How to create the bootstrap AMP
1. git clone git@github.com:maoo/alfresco-demo-data.git
2. cd /alfresco-demo-data/alfresco...
How to create the export AMP
1. git clone git@github.com:maoo/alfresco-demo-data.git
2. cd /alfresco-demo-data/alfresco-de...
ACP Limitations
• Document categories and tags
• Content models with d:any properties
• Node versions
• Secondary parents
...
Questions?
¡Gracias!
@Alfresco
Síguenos en
#AlfrescoDayBarcelona
Nächste SlideShare
Wird geladen in …5
×

Alfresco Demo Data

850 Aufrufe

Veröffentlicht am

Tool to export and bootstrap data from an existing Alfresco instance to an empty and new Alfresco instance.
Presented at the Alfresco Day in Barcelona the 10th of February 2016

Veröffentlicht in: Software
  • Gehören Sie zu den Ersten, denen das gefällt!

Alfresco Demo Data

  1. 1. #AlfrescoDayBarcelona
  2. 2. Marco Mancuso • Currently Alfresco DevOps team • Previously… – Alfresco global Support team • Advance Team • Expert Team • Development Support – Developer for Italian OSS Consultancy Company (Alfresco Partner) Aboutus
  3. 3. Aboutus Alfresco Devops Keep the lights on • Public services (activiti|my.alfresco.com, Alfresco Online Trials) • Internal infrastructure • Internal projects (QA, Engineering, Sales, Marketing, ...) Automate all the things • Mostly inspire • Sometimes lead • Never impose
  4. 4. Alfresco Demo Data
  5. 5. Big Questions What? Why? How? Where?
  6. 6. What it is? AMP BigQuestions
  7. 7. What it is NOT? BigQuestions Not an import/export tool! Not a migration tool! • Not tested against large data • Just tested at bootstrap time
  8. 8. Why Demo Data? BigQuestions https://www.alfresco.com/products/one/trial/online
  9. 9. What else? • Quickly test customisations with limited set of predefined bootstrapped data • Collaborative approach on data definition • Show test environments: – Marketing – Sales – Partners – … • Needs Little or NO configuration at all! BigQuestions
  10. 10. How does it work? • 2 repo AMPs: BigQuestions • Applied to the repo in which to export data • Contains all the APIs to extract data • Applied at bootstrap time to the repo • Contains all the data to bootstrap
  11. 11. Users.acp mysite.acp myfolder.acp … Timeline BigQuestions
  12. 12. Where I can find the project? https://github.com/maoo/alfresco-demo-data BigQuestions
  13. 13. General Details
  14. 14. What is it possible to export & bootstrap? • Full Share Sites • Contents in Company Home – Models (Bootstrap) – Virtual Folders – Scripts – Webscripts – Workflows (Bootstrap) • Models (Dynamic) • Workflows (Dynamic) • Authorities ( Users + People + Groups) GeneralDetails
  15. 15. Technologies used • Alfresco 5.1.EA – AMP – Java Backed WebScripts – Patch Service – Bootstrap Services – ACP • Alfresco Maven SDK 2.1.1 All In One Archetype • Java • Spring • Maven GeneralDetails
  16. 16. Export APIs
  17. 17. Export a Site • Existing Alfresco API • (GET) http://localhost:8080/alfresco/s/api/sites/{SITE_NAME}/export • Admin authentication ExportAPIs SiteName.zip Contents.acp Users.acp People.acp Groups.txt
  18. 18. Export the authorities (1/2) • Custom API • (GET) http://localhost:8080/alfresco/s/api/people-groups/export • Optional Parameters: ExportAPIs usersToExport users to export Default: ALL groupsToExport groups to export Default: ALL excludeSiteGroups TRUE/FALSE Default: False groupsToExclude groups to exclude Default: NULL usersToExclude users to exclude Default: NULL
  19. 19. Export the authorities (2/2) ExportAPIs people-users-groups-export.zip Users.acp People.acp Groups.json Excluded: admin + guest
  20. 20. Export files/folders • Custom API • (GET) http://localhost:8080/alfresco/s/api/file-folder/export?path={path} • Optional Parameters: • It can extract just content inside Company Home (No tags/categories) • ACP file with specified content ExportAPIs crawlSelf TRUE/FALSE Default: TRUE crawlChildNodes TRUE/FALSE Default: TRUE crawlContent TRUE/FALSE Default: TRUE crawlAssociations TRUE/FALSE Default: TRUE
  21. 21. AMP structure
  22. 22. AMP Import Structure AMPstructure
  23. 23. Authorities AMPstructure
  24. 24. Models (standard way)  AMPstructure
  25. 25. Models  AMPstructure
  26. 26. Workflows (standard way)  AMPstructure
  27. 27. Workflows  AMPstructure
  28. 28. Sites (standard way)  AMPstructure
  29. 29. Sites  AMPstructure
  30. 30. Record Management site  • Treated as standard site • Problem: – ACP does not handle well d:any objects: – rma:readers (type d:any) – rma:writers (type d:any) • Solution: – RMSitePatch: find nodes and convert properties values from String to Map AMPstructure
  31. 31. Files/Folders (standard way)  AMPstructure
  32. 32. Files/Folders  AMPstructure
  33. 33. (Model Manager) Content Models • Alfresco already provides a way to export/import them • Folders not visible from Share  NodeBrowser • Path: /app:company_home/app:dictionary/app:models AMPstructure
  34. 34. Technical Details
  35. 35. So… Where are the configurations? • (Generally) No configuration is required • Beans dynamically generated with: – org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor • Resources dynamically found with: – org.springframework.core.io.support.PathMatchingResourcePatternResolver TechnicalDetails
  36. 36. Just one single configuration bean TechnicalDetails
  37. 37. Order really matters! Dynamic order to bootstrap content: 1. Company Home 2. Models 3. Workflows 4. Sites (on Context Refresh) 5. Authorities (on Context Refresh) TechnicalDetails
  38. 38. Let’s run it!
  39. 39. Prerequisites • Alfresco Maven SDK 2.1.1 with Alfresco 5.1: – JDK 1.8 – Maven 3.2.5 or above Let’srunit!
  40. 40. How to run the SDK 1. git clone git@github.com:maoo/alfresco-demo-data.git 2. cd alfresco-demo-data 3. ./run.sh 4. Go to http://localhost:8080/share Let’srunit!
  41. 41. How to create the bootstrap AMP 1. git clone git@github.com:maoo/alfresco-demo-data.git 2. cd /alfresco-demo-data/alfresco-demo-data-repo-amp 3. mvn package –DskipTests=true 4. AMP in /alfresco-demo-data/alfresco-demo-data-repo-amp/target Let’srunit!
  42. 42. How to create the export AMP 1. git clone git@github.com:maoo/alfresco-demo-data.git 2. cd /alfresco-demo-data/alfresco-demo-data-exporter-repo-amp 3. mvn package –DskipTests=true 4. AMP in /alfresco-demo-data/alfresco-demo-data-exporter-repo-amp/target Let’srunit!
  43. 43. ACP Limitations • Document categories and tags • Content models with d:any properties • Node versions • Secondary parents • ACP export/import can only be used between same versions Limitations
  44. 44. Questions?
  45. 45. ¡Gracias! @Alfresco Síguenos en #AlfrescoDayBarcelona

×