Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Alfresco Day Milano 2016 - Demo Data

790 views

Published on

Demo Data: come creare rapidamente istanze di test per Alfresco, Marco Mancuso, DevOps, Alfresco

Published in: Technology
  • Be the first to comment

Alfresco Day Milano 2016 - Demo Data

  1. 1. Demo Data: come creare rapidamente istanze di test per Alfresco
  2. 2. Marco Mancuso Automation Software Engineer (DevOps)
  3. 3. Marco Mancuso •  Currently Alfresco DevOps team •  Previously… –  Alfresco Support team –  Consultant/Developer for Italian Alfresco Partner Aboutus
  4. 4. Alfresco DevOps Aboutus 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
  5. 5. Alfresco Demo Data
  6. 6. Big Questions What? Why? How? Where?
  7. 7. What it is? BigQuestions AMP
  8. 8. What it is NOT? BigQuestions Not an import/export tool! Not a migra1on tool! •  Not tested against large data •  Just tested at bootstrap 1me
  9. 9. Why Demo Data? BigQuestions h&ps://www.alfresco.com/products/one/trial/online
  10. 10. What else? •  Quickly test customisations with limited set of predefined bootstrapped data •  Collaborative approach on data definition •  Show test environments: –  Marketing –  Sales –  Partners –  … •  Easy to use: little or NO configuration at all! BigQuestions
  11. 11. 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 1me to the repo •  Contains all the data to bootstrap
  12. 12. Users.acp mysite.acp myfolder.acp … Rest API Timeline BigQuestions
  13. 13. Where I can find the project? https://github.com/alfresco/alfresco-demo-data BigQuestions
  14. 14. What is it possible to export & import? •  Full Share Sites (Bootstrap) •  Contents in Company Home (Bootstrap) –  Models –  Virtual Folders –  Smart Folders –  Share facets –  Scripts –  Webscripts –  Workflows •  Authorities (Users + People + Groups) •  Models (Dynamic) •  Workflows (Dynamic) GeneralDetails
  15. 15. AMP Structure
  16. 16. 
 AMP
 Import Structure AMPstructure
  17. 17. Authorities AMPstructure
  18. 18. Models (standard way) L AMPstructure
  19. 19. Models J AMPstructure
  20. 20. Workflows (standard way)
 L AMPstructure
  21. 21. Workflows J AMPstructure
  22. 22. Sites (standard way) L AMPstructure
  23. 23. Sites J AMPstructure
  24. 24. Record Management site K •  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
  25. 25. Files/Folders (standard way) L AMPstructure
  26. 26. Files/Folders
 J AMPstructure
  27. 27. (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
  28. 28. Export APIs
  29. 29. 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 crawlAssociaDons TRUE/FALSE Default: TRUE
  30. 30. Export a Site •  (GET) http://localhost:8080/alfresco/service/api/file-folder/export? path=/Sites/{sitename} •  Admin authentication ExportAPIs
  31. 31. 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
  32. 32. Export the authorities (2/2) ExportAPIs people-users-groups-export.zip Users.acp People.acp Groups.json Excluded: admin + guest
  33. 33. Technical Details
  34. 34. 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
  35. 35. Just one single configuration bean TechnicalDetails
  36. 36. Let’s run it!
  37. 37. Prerequisites •  Alfresco Maven SDK 2.1.1 with Alfresco 5.1: –  JDK 1.8 –  Maven 3.2.5 or above Let’srunit!
  38. 38. 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!
  39. 39. 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!
  40. 40. 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!
  41. 41. 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
  42. 42. Questions?
  43. 43. Grazie! @Alfresco Condividi su #AlfrescoDayMilano

×