Details

    • Type: Feature Request
    • Status: Contributed Solution
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.0.5 GA, 6.0.6 GA
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      All
    • Liferay Contributor's Agreement:
      Accept

      Description

      Consider a Liferay installed into a tomcat using the ROOT context.

      With Liferay 5.* you can do "ext" development and:

      • ext-service.jar and some other things goes into tomcat/lib/ext
      • ext-impl.jar, ext-web, and some other things goes into tomcat/webapps/ROOT

      With Liferay 5.* I've created a build-redist.xml based on build-dist.xml code to create:

      • a lib-ext.zip with things goes into lib/ext
      • a ROOT.war

      To update a production server I have to:

      • stop tomcat
      • take a backup of lib/ext and webapps/ROOT
      • unzip lib-ext.zip into lib/ext
      • delete webapps/ROOT
      • create webapps/ROOT and unzip ROOT.war in it
      • start tomcat
        All these steps are automated into a bash script.

      In an clustered production environment I have to:

      • stop all nodes
      • update the first node (using the procedure explained before)
      • now I can start that node because it's up to date
      • update the second node and start it
      • update the third, forth, etc..

      All mines 5.* ext contains new taglib or utilities into ext-util.jar. That file has to be copied into WEB-INF/lib of the portlets.
      This is done by the update bash script.

      With Liferay 6 ext becomes extlet. This simplify development, but create some difficult during update because there are 2 situation:

      • first time extlet install
      • extlet update

      The 'out-of-box' way to install extlet in a production server is:

      • copy "extlet.war" in the auto-deploy dir
      • wait auto-deploy ends
      • restart tomcat
      • redeploy plugins

      The 'out-of-box' way to update extlet in a production server is:

      • stop tomcat
      • recreate lib/ext from 'Liferay vanilla'
      • recreate webapps/ROOT from 'Liferay vanilla'
      • start tomcat
      • copy "extlet.war" in the auto-deploy dir
      • wait auto-deploy end
      • restart tomcat
      • redeploy plugins

      In a clustered production environment it is a 'nightmare', because I have to:

      • stop all nodes
      • update all nodes using the procedure listed before
      • start all nodes

      I cannot start up one node before update the others because I have to start tomcat to install the extlet, and I'll have an up-to-date node talking to a no-extlet-node.

      With extlet we have some jars (ext-util, ext-taglib, ext-bridges) automatically copied into plugins WEB-INF/lib.

      I've tried to create an update bash script, as for 5.*, but tomcat restarts are difficult to manage.

      Using code from LPS-14221 (thanks Thomas!) I've created ExtUpdater: a class able to do an offline extlet install or update.

      It is a revork of ExtAutoDeployer and ExtHotDeployListener that:

      • take the extlet war as input parameter
      • use ExtAutoDeployer logic to expand that war into tomcat/webapps (removing previous portlet)
      • if extlet was already installed undeploy it (using Thomas logics) from webapps/ROOT and from plugins WEB-INF/lib
      • install extlet into webapps/ROOT creating a backup copy of raplaced files
      • install extlet dependecies into plugins WEB-INF/lib

      To update a production server you have to:

      • stop tomcat
      • take a backup of lib/ext and webapps/ROOT (optional)
      • exec ExtUpdater
      • start tomcat

      These steps can be easily automated using a bash script

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              maumar Mauro Mariuzzo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: