Date post: | 13-Jan-2015 |
Category: |
Technology |
Upload: | nuxeo |
View: | 1,204 times |
Download: | 1 times |
1
Nuxeo DistributionsWhat it is ? How to use the tools ?
Julien Carsique / Thierry Delprat
2
Agenda● About Nuxeo Distributions● Existing Nuxeo Distributions
● focus on CAP and Core Server● Using Nuxeo Distributions and tools
3
Nuxeo EP is
a set of ECM building blocks(but software components, not wooden blocks!)
4
that can be assembled
to do this
or that
5
It's not so easy● It is easy with wooden block ! …
● but with software components we need to● manage components dependencies● manage third party dependencies● manage confguration● manage packaging
nuxeo Distribution
6
Distributions and Nuxeo EP
Flex
Core
Services
UI frameworks
Features
DM DAM CS CMF
Assemble, confi gure, packageNuxeo EP
Flex FlexGWT FlexJSF FlexWebEngine
CAP
7
What is a Distribution?● a selection of features
● bundles and associated dependencies● a selection of confguration templates● a packaging model
● EAR / WAR / Embedded● a deployment target
● JBoss, Tomcat, bare runtime (Jetty)
8
Distribution generation stepsSelect bundles
Get dependencies
Get confi guration template
Packaging model
Deployment target choice
ZIP Mavenartifact Setup
9
Building your distribution
Core bundlesCore bundlesCore bundles
Core bundlesCore bundlesService bundles
Core bundlesUI bundles
Core bundlesCore bundlesFeature bundles
BaseNuxeo
Distribution
Core bundlesCore bundlesNuxeo bundles
Custom types
Auth, Users ...
Custom UI
Custom Services
Projectspecifi cbundles
AdditionalNuxeo bundlesused by project Project
CustomDistribution
EAR
Tomcat
ProductionConfi g
DevConfi g
10
Nuxeo DistributionsExisting Distributions
11
Existing distributions● Functional ones
● Nuxeo DM● Nuxeo DAM● Nuxeo Correspondence
➔ Turn-key applications ● ready to run applications● can be confgured via Studio
12
Existing distributions● Technical ones
● Nuxeo CAP : Content Application Platform● Nuxeo CMF : Case Management Framework● Nuxeo CS : Core Server
➔ Technical assemblies of Nuxeo bundles● could be used as is● can be confgured via Studio too● designed to be used as a framework
– a base infrastructure to build upon
13
Nuxeo CAP● CAP: Content Application Platform
● Repository (Nuxeo Core)● Selection of Services and Features● JSF and WebEngine infrastructure
DAM DM CMF
AdditionalPackages
AdditionalPackages
AdditionalPackages
Nuxeo CAP
14
Nuxeo CAP● Is basically a Nuxeo DM Light
● same perimeter as DM 5.1● You have the same infrastructure, less
● Preview and Annotations● A/V Media management● Wiki, Blogs, WebSites● OpenSocial integration and Dashboard● Tags, Virtual Navigation and Faceted Search● Mail folder
15
Using Nuxeo CAP● You may use CAP as a base distribution
● to avoid removing many packages from DM– build by addition rather than fltering
● to build a web application– but leverage the existing JSF Back Offce
● to have a very custom application– redefne completely JSF UI but reuse infrastructure
(DAM distribution is a good example)
16
Nuxeo CS● Core Server : Nuxeo Content Server
● Content Repository (Nuxeo Core)● small subset of services (Audit, Directories)● WebEngine infrastructure● WebService infrastructure● Content Automation● CMIS connector
➔ Light Nuxeo Server
17
Using Nuxeo Core Server● To have a pure Content Repository Server
● To have a webengine rendering server
NuxeoCore Server
ExternalApplication
CMIS
SOAP
Content Automation
NuxeoCore Server
NuxeoCAP
VCS Cluster
ContributorsViewers
JSF Back Offi ce
NuxeoCore Server
Viewers
WebEngine Front Offi ce
18
Nuxeo DistributionsUsing Nuxeo Distributions and tools
19
Principles● Effciency and simplicity
● no need of source code● reusable and easy to maintain
● Distribution results available ● as downloadable ZIP● as Maven artifacts
● Build custom distribution● use it for dev, testing and production
(templates are used to manage confguration changes)
20
Distribution tools● Maven power (dependencies management)
● Use your project's POM to list main dependencies● Less maintenance, more accuracy
● Ant power (multi-OS compliant scripting)● Common Ant tasks and well-known syntax● Maven-aware Ant tasks
● Nuxeo mixes best of both technologies● Dedicated tasks for common use cases● Produced distributions are Maven artifacts
21
Distribution tools● Tools
● org.apache.maven.plugins:maven-nuxeo-plugin● org.nuxeo.build:nuxeo-distribution-tools● org.nuxeo:nuxeo-qa-tools
● Usage● As Maven plugins● As standalone applications● As resources for other Maven plugins
● Samples in Nuxeo source code● Online documentation
22
Distribution tools● Templates system
● Easier development/maintenance– Inheritable and customizable– Resources factorization– Environment target (dev, preprod, prod, ...)
● Easier installation/administration– Pre-confgured templates– Manage confguration outside server directory– Quickly backup and upgrade
● Editable from the Nuxeo Admin Center
23
Distribution tools● Build your own distribution(s)
● Choose the distribution basis– Inherit its POM– Add your bundles– Create a custom assembly fle
● Create multiple templates for different targets– Pre-confgured templates are available as Maven artifacts– Add custom template resources
● Reuse distributions between projects
24
Distribution toolsStandard Maven plugin declaration:
<build> <plugins> <plugin> <groupId>org.nuxeo.build</groupId> <artifactId>nuxeo-distribution-tools</artifactId> <configuration> <buildFiles> <buildFile>src/main/assemble/assembly.xml</buildFile> </buildFiles> </configuration> </plugin> </plugins></build>
25
Distribution toolsAssembly file mixing Ant and Maven abilities:
<target name="build" depends="init" description="..."> <echo>Building custom EAR...</echo> <artifact:nuxeo-expand /> <artifact:print output="dependency-tree.log" /> <mkdir dir="${nuxeo.ear}" /> <copy todir="${nuxeo.ear}/bundles" overwrite="true"> <artifact:set> <includes> <artifact groupId="com.myorg*" /> </includes> <excludes> <artifact artifactId="*-test" /> </excludes> </artifact:set> </copy> ...
26
Distribution tools ... <copy todir="${nuxeo.ear}/lib" overwrite="true"> <artifact:set> <includes> <artifact groupId="!com.myorg*" /> </includes> <excludes> <artifact artifactId="gwt-dev" /> </excludes> </artifact:set> <artifact:resolveFile key="org.company:some-artifact" /> </copy> <nx:rmdups dir="${nuxeo.ear}/lib" /> <zip basedir="${nuxeo.ear}" destfile="....zip" /> <artifact:attach file="....zip" type="zip" classifier="dev" target="${maven.project.groupId}: ${maven.project.artifactId}" /></target>
27
Distribution toolsReuse other distributions as Maven artifacts:
<unzip dest="${outdir}"> <artifact:resolveFile key="org.apache.tomcat: apache-tomcat:6.0.20:zip" /> <patternset> <exclude name="**/some/directory/**" /> </patternset></unzip>
<unzip dest="${tomcat}/templates" overwrite="true"> <artifact:resolveFile key="org.nuxeo.ecm.distribution: nuxeo-distribution-resources:${maven.project.version}:zip" classifier="templates-common" /> <artifact:resolveFile key="org.nuxeo.ecm.distribution: nuxeo-distribution-resources:${maven.project.version}:zip" classifier="templates-tomcat" /></unzip>
28
Useful links● Distribution
● Documentation and samples: http://doc.nuxeo.com/display/NXDOC/Nuxeo+Distributions
● Contributing distributions: http://doc.nuxeo.com/display/CORG/Creating+distributions
● Templates● Documentation:
http://doc.nuxeo.com/display/NXDOC/Confguring+Nuxeo+EP
29
Thank you!