Upload
sebastien-le-marchand
View
83
Download
5
Embed Size (px)
Citation preview
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Lightning Talk
7 minutes to talk about
Exporting and importing
company-level data
Sébastien Le Marchand
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012 2
PROBLEMATIC
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Problematic
+ Transfer data between multiple environnements
•Need for
« Selective » export or import, not all data…
Incremental import
• don’t push DB dump !
+Available tools
•« Site scope » data
LAR export / import
Remote stagging
Resource Importer Plugin
•Data outside « site scope » (company-level data)
?... that’s the problem !
3
A classic data import/export use case
Integration
Q/A
Acceptance
Production
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Problematic
4
What are company-level data ?
« Site-scope » data
Covered by Liferay ARchive native export /
import
« Company-scope » data
No native feature to help us…
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012 5
FRONTLINE FEEDBACK
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Frontline feedback
+Default permissions for roles
•A critical security configuration
+ How-to ?
•Without any tool (very painful) :
you need to write specific configuration procedure documentation (potentially huge)
You need to « replay » procedure manually (UI) for each environement (re-)initi
Unsafe (human error)
Build a tool to do the work (go back at home earlier !)
Fast to replay
Repeatable (error-prone)
6
Example : roles permissions definitions
1 2
3
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Frontline feedback
+Don’t work directly with database (SQL extract & load)
•Possible application-level data integrity violations
+Only use portal services to read and write data
•Choose your weapon
Plain-old plugin, written in Java
Admin script, written in Groovy, Ruby, etc.
+ Be carreful about IDs
•An entity ID is not the same in source environment and target environment
Do not rely on entity ID
Relations between entities must not be stored with IDs
7
Best practices to write import/export tools
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012 8
OUT-OF-THE-BOX TOOL
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Out-of-the-box tool
+Hook Plugin
•No user interface, actions only by file manipulation
Easy to use for Ops
•Input and output files in the same directory (configurable)
${liferay.home}/deploy/imex
+Export
Input
xxxx.export.properties (options)
Output
xxxx.imex.zip (data archive)
+ Import
Input
xxxx.import.properties (options)
xxxx.imex.zip (data archive)
9
Discover a comprehensive ready-to-use tool
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Out-of-the-box tool
10
Options overview
xxxx.export.properties
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Out-of-the-box tool
11
Data format overview
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
Out-of-the-box tool
+Historically, internal developpement targeting Liferay 5.2.x
+Now open-source project targeting Liferay 6.1
•Beta release
+Coverage :
•Now
Roles & roles default permissions definitions
Sites (using LAR mechanisms)
•Next releases
Extended coverage…
12
Get it !
http://sqli-imex.github.com
Liferay Europe Symposium – Wiesbaden, Germany | 16-17 october 2012
That's all folks!
13
Thanks!
+Im/Ex tool •http://sqli-imex.github.com
+SQLI Group •http://www.sqli.com
•http://www.entreprise-digitale.com
•@SQLIEENTREPRISE
+Sébastien Le Marchand •[email protected]
•@slemarchand
> 1800 employees
€170 M turnover
Capability to deploy projects
internationally