Nuxeo Distributions
What it is ? How to use the tools ?

Julien Carsique / Thierry Delprat




                                      1
Agenda
●
    About Nuxeo Distributions
●
    Existing Nuxeo Distributions
    ●
        focus on CAP and Core Server
●
    Using Nuxeo Distributions and tools




                                          2
Nuxeo EP is




       a set of ECM building blocks
     (but software components, not wooden blocks!)
                                                     3
that can be assembled

                   to do this




         or that
                                4
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

                                              5
Distributions and Nuxeo EP

             DM   DAM          CS            CMF           CAP



Nuxeo EP            Assemble, conf gure, package
                                 i


  Features

 UI frameworks    Flex
                  Flex       Flex
                             GWT          Flex
                                          JSF         Flex
                                                   WebEngine


  Services

  Core
                                                                 6
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)



                                              7
Distribution generation steps
                 Select bundles

                Get dependencies

          Get conf guration template
                 i

                Packaging model

          Deployment target choice




                                       8
                   Maven
          ZIP      artifact   Setup
Building your distribution
   Custom UI
  Auth, Users ...     Project
                      specif c
                           i                          EAR
  Custom types        bundles
                                                     Production
 Custom Services                                       Conf g
                                                          i
                      Additional
  Core bundles
  Core bundles      Nuxeo bundles
 Nuxeo bundles      used by project
                                        Project
                                        Custom
                                      Distribution
 Featurebundles
   Core bundles
  Core bundles
                                                     Tomcat
  Core bundles
   UI bundles           Base
                       Nuxeo                           Dev
  Core bundles
  Core bundles
 Servicebundles      Distribution                     Conf g
                                                         i
  Core bundles
  Core bundles
  Core bundles


                                                                  9
Nuxeo Distributions
Existing Distributions




                         10
Existing distributions
●
    Functional ones
    ●
        Nuxeo DM
    ●
        Nuxeo DAM
    ●
        Nuxeo Correspondence

➔
    Turn-key applications
    ●
        ready to run applications
    ●
        can be confgured via Studio


                                      11
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           12
Nuxeo CAP
●
    CAP: Content Application Platform
    ●
        Repository (Nuxeo Core)
    ●
        Selection of Services and Features
    ●
        JSF and WebEngine infrastructure


              DAM            DM              CMF


            Additional     Additional      Additional
            Packages       Packages        Packages


                          Nuxeo CAP
                                                        13
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
                                                      14
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)

                                                                 15
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
                                                        16
Using Nuxeo Core Server
●
    To have a pure Content Repository Server
                                     CMIS

           External                  SOAP                  Nuxeo
          Application                                    Core Server
                               Content Automation


●
    To have a webengine rendering server
            Viewers            Viewers        Contributors


                      WebEngine                       JSF
                      Front Off ce
                              i                       Back Off ce
                                                             i


            Nuxeo             Nuxeo           Nuxeo
          Core Server       Core Server        CAP

                                                                       17
                                                    VCS Cluster
Nuxeo Distributions
Using Nuxeo Distributions and tools




                                      18
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)

                                                              19
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
                                                           20
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                              21
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
                                                           22
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


                                                                       23
Distribution tools
Standard 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>


                                                                   24
Distribution tools
Assembly 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>
  ...                                                    25
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>                                                       26
Distribution tools
Reuse 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>                                                        27
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




                                                                   28
Thank you!




             29

Nuxeo World Session: Nuxeo Distributions

  • 1.
    Nuxeo Distributions What itis ? How to use the tools ? Julien Carsique / Thierry Delprat 1
  • 2.
    Agenda ● About Nuxeo Distributions ● Existing Nuxeo Distributions ● focus on CAP and Core Server ● Using Nuxeo Distributions and tools 2
  • 3.
    Nuxeo EP is a set of ECM building blocks (but software components, not wooden blocks!) 3
  • 4.
    that can beassembled to do this or that 4
  • 5.
    It's not soeasy ● 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 5
  • 6.
    Distributions and NuxeoEP DM DAM CS CMF CAP Nuxeo EP Assemble, conf gure, package i Features UI frameworks Flex Flex Flex GWT Flex JSF Flex WebEngine Services Core 6
  • 7.
    What is aDistribution? ● 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) 7
  • 8.
    Distribution generation steps Select bundles Get dependencies Get conf guration template i Packaging model Deployment target choice 8 Maven ZIP artifact Setup
  • 9.
    Building your distribution Custom UI Auth, Users ... Project specif c i EAR Custom types bundles Production Custom Services Conf g i Additional Core bundles Core bundles Nuxeo bundles Nuxeo bundles used by project Project Custom Distribution Featurebundles Core bundles Core bundles Tomcat Core bundles UI bundles Base Nuxeo Dev Core bundles Core bundles Servicebundles Distribution Conf g i Core bundles Core bundles Core bundles 9
  • 10.
  • 11.
    Existing distributions ● Functional ones ● Nuxeo DM ● Nuxeo DAM ● Nuxeo Correspondence ➔ Turn-key applications ● ready to run applications ● can be confgured via Studio 11
  • 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 12
  • 13.
    Nuxeo CAP ● CAP: Content Application Platform ● Repository (Nuxeo Core) ● Selection of Services and Features ● JSF and WebEngine infrastructure DAM DM CMF Additional Additional Additional Packages Packages Packages Nuxeo CAP 13
  • 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 14
  • 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) 15
  • 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 16
  • 17.
    Using Nuxeo CoreServer ● To have a pure Content Repository Server CMIS External SOAP Nuxeo Application Core Server Content Automation ● To have a webengine rendering server Viewers Viewers Contributors WebEngine JSF Front Off ce i Back Off ce i Nuxeo Nuxeo Nuxeo Core Server Core Server CAP 17 VCS Cluster
  • 18.
    Nuxeo Distributions Using NuxeoDistributions and tools 18
  • 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) 19
  • 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 20
  • 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 21
  • 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 22
  • 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 23
  • 24.
    Distribution tools Standard Mavenplugin 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> 24
  • 25.
    Distribution tools Assembly filemixing 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> ... 25
  • 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> 26
  • 27.
    Distribution tools Reuse otherdistributions 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> 27
  • 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 28
  • 29.