This document discusses Alfresco demo data, which allows users to quickly create test instances with predefined bootstrap data. It works by exporting authoritative data, models, workflows and sites from one Alfresco repository and importing them into another. The project is open source and hosted on GitHub. It provides APIs to export and import data without requiring extensive configuration.
3. Marco Mancuso
• Currently Alfresco DevOps team
• Previously…
– Alfresco Support team
– Consultant/Developer for Italian Alfresco Partner
Aboutus
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
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. 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
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
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
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. Export a Site
• (GET) http://localhost:8080/alfresco/service/api/file-folder/export?
path=/Sites/{sitename}
• Admin authentication
ExportAPIs
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
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
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. 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. 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. 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