Administrator

Basic Deployment

Deploy the Mobiliser feature to SAP HANA Cloud Platform.

Procedure

  1. Obtain and install your copy of SAP Mobile Platform, Version 3.0. Mobiliser is packaged as an optional feature inside SAP Mobile Platform.
  2. If the Mobiliser feature is active in your SAP Mobile Platform installation, the Mobiliser WAR file will be in $SMP\_HOME/pickup. You can also extract the WAR file from the Mobiliser feature without activating it using this Unix command:
    jar xf $SMP_HOME/p2/com.sap.mobile.platform.server.repository/binary/com.sap.mobile.platform.server.build.feature.mobiliser_root_* pickup/mobiliser.war \
    && mv pickup/mobiliser.war . && rm -r pickup

    If you are running on Windows, open the file $SMP\_HOME/p2/com.sap.mobile.platform.server.repository/binary/com.sap.mobile.platform.server.build.feature.mobiliser\_root\_\* with an unpacking tool of your choice (it is in zip format) and extract the mobiliser.war file to a location on your file system.

  3. If the Mobiliser portal feature is active SAP Mobile Platform, you will find the portal WAR file in $SMP\_HOME/pickup. You can also extract the WAR file from the portal feature without activating it using this Unix command:
    jar xf $SMP_HOME/p2/com.sap.mobile.platform.server.repository/binary/com.sap.mobile.platform.server.build.feature.mobiliser.web.portal_root_* pickup/portal.war \ 
    && mv pickup/portal.war . && rm -r pickup

    If you are running on Windows, open the file $SMP\_HOME/p2/com.sap.mobile.platform.server.repository/binary/com.sap.mobile.platform.server.build.feature.mobiliser.web.portal\_root\_\* with an unpacking tool of your choice (it is in zip format) and extract the portal.war file to a location on your file system.

  4. If you have built a customization from Mobiliser, then your source files will come from your customization build.
  5. Put mobiliser.war and portal.war into a directory. This will be used as the source directory for deployment.
  6. To initialize the database, you will also need the dbmaintain scriptarchives included in SAP Mobile Platform. You can find the scriptarchives and properties files in $SMP_HOME/db/hdb/smp3/sql for SAP HANA databases and in $SMP_HOME/db/ase/smp3/sql for SAP ASE Databases.
  7. If you have built a customization from Mobiliser, you will only need the com.sybase365.mobiliser.vanilla.standalone-<version>-scriptarchive-<db>.jar file. In place of the vanilla data, you will have your customization scriptarchive. Otherwise, com.sap.mobile.platform.server.db.<db>.dbmaintain-<version>-scriptarchive-<db>.jar will contain the vanilla / demo data.
  8. To successfully deploy the portal onto SAP HANA Cloud Platform, a few of the files that are required for SAP Mobile Platform must be removed from the war file. This can be done automatically like this:
    zip -d portal.war META-INF/context.xml 
    zip -d portal.war WEB-INF/lib/com.springsource.slf4j.api-1.6.1.jar 
    zip -d portal.war WEB-INF/lib/com.springsource.slf4j.log4j-1.6.1.jar 
    zip -d portal.war WEB-INF/lib/com.springsource.slf4j.org.apache.commons.logging-1.6.1.jar 
    zip -d portal.war WEB-INF/lib/com.springsource.org.apache.log4j-1.2.16.jar
    Or you can manually remove these files from the war file:
    META-INF/context.xml 
    WEB-INF/lib/com.springsource.slf4j.api-1.6.1.jar 
    WEB-INF/lib/com.springsource.slf4j.log4j-1.6.1.jar 
    WEB-INF/lib/com.springsource.slf4j.org.apache.commons.logging-1.6.1.jar 
    WEB-INF/lib/com.springsource.org.apache.log4j-1.2.16.jar
  9. For deployment with javaee6-wp, no extra steps are required.

    For deployment using the neo-java-web profile, the deployment.properties file in this directory contains an example configuration for deploying onto SAP HANA Cloud Platform. If you plan to use java-web, a resource-ref must be added to the web.xml file of both mobiliser.war and portal.war.

    # line by line 
    # create a temporary directory 
    # extract web.xml 
    # enable the resource-ref for the PasswordStorage service 
    # "" 
    # "" 
    # override web.xml inside the WAR file 
    # clean up the temporary directory 
    
    mkdir -p /tmp/WEB-INF/ && \ 
    unzip -c mobiliser.war WEB-INF/web.xml > /tmp/WEB-INF/web.xml && \ 
    sed '/if you deploy to the hcp-javaweb runtime/Q' /tmp/WEB-INF/web.xml | sed '$d' > /tmp/WEB-INF/web.xml.new && \ 
    sed '1,/if you deploy to the hcp-javaweb runtime/d' /tmp/WEB-INF/web.xml | sed '/^-->/d' >> /tmp/WEB-INF/web.xml.new && \ 
    cat /tmp/WEB-INF/web.xml.new > /tmp/WEB-INF/web.xml && 
    rm /tmp/WEB-INF/web.xml.new && \ 
    zip mobiliser.war WEB-INF/web.xml /tmp/WEB-INF/web.xml && \ 
    rm -rf /tmp/WEB-INF 
    # and the same again for the portal 
    mkdir -p /tmp/WEB-INF/ && \ 
    unzip -c portal.war WEB-INF/web.xml > /tmp/WEB-INF/web.xml && \ 
    sed '/if you deploy to the hcp-javaweb runtime/Q' /tmp/WEB-INF/web.xml | sed '$d' > /tmp/WEB-INF/web.xml.new && \ 
    sed '1,/if you deploy to the hcp-javaweb runtime/d' /tmp/WEB-INF/web.xml | sed '/^-->/d' >> /tmp/WEB-INF/web.xml.new && \ 
    cat /tmp/WEB-INF/web.xml.new > /tmp/WEB-INF/web.xml && 
    rm /tmp/WEB-INF/web.xml.new && \ 
    zip portal.war WEB-INF/web.xml /tmp/WEB-INF/web.xml && \ 
    rm -rf /tmp/WEB-INF

    You can also manually extract the web.xml file and uncomment the resource-ref and add this back to the mobiliser.war/portal.war file.

  10. Uncomment the vm-arguments for java-web and comment out the vm-arguments for javaee6-wp in the deployment properties file.