Administrator

Deployment Example

In this example, we will be deploying the application <mobiliser> to the account <myaccount> on hana.ondemand.com, and will use the database schema <mobiliser.schema>.

Prerequisites

Adjust the deployment parameters to match your environment. Set the following environment variables for the commands that follow.
hcpapp=mobiliser
hcpaccount=myaccount
hcphost=hana.ondemand.com
hcpschema=mobiliser.schema
hcpuser=myscnuser

You may also specify these values in the deployment.properties file.

Context

The following section describes deploying Mobiliser using the neo SDK tools. Apart from setting the preferences password in the PasswordStorage of SAP HANA Cloud Platform, all of these operations can also be performed manually in the SAP HANA Cloud Platform cockpit.

Procedure

  1. Deploy Mobiliser to the cloud.
    neo.sh deploy -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser -s mobiliser.war,portal.war deployment.properties
    • When executing from Windows and having the environment variables entered in the deployment.properties:

      neo.bat deploy -s mobiliser.war,portal.war deployment.properties
  2. When initially deploying, some additional steps are required. Set the Preferences password/secret for the Mobiliser back end in the PasswordStorage. If any preferences (configuration) values will be encrypted, the application will use this password value from the PasswordStorage to decrypt them. This value is used for all encrypted values stored in the <businesslayer> root node. The default secret used to encrypt values in the vanilla/demo scripts is <paybox>.
    neo.sh set-password -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser --alias prefs_aes_password deployment.properties
    When executing from Windows and having the environment variables entered in the deployment.properties:
    neo.bat set-password --alias prefs_aes_password deployment.properties
  3. Set the preferences password for the portal in the PasswordStorage. If any preferences (configuration) values will be encrypted, the application will use this password value from the PasswordStorage to decrypt them. This value is used for all encrypted values stored in the "presentationlayer" root node. The default secret used to encrypt values in the vanilla/demo scripts is <paybox>.
    neo.sh set-password -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser --alias prefs_remote_password deployment.properties
    When executing from Windows and having the environment variables entered in the deployment.properties:
    neo.bat set-password --alias prefs_remote_password deployment.properties
  4. Set the user password for the prefsread user in the PasswordStorage. The portal will use this user to fetch its configuration from the back end. The default password for the prefsread user is "notsosecret". If you plan to change it you need to also change the corresponding password in the database. Refer to the standard Mobiliser installation guide for details on how to set a new password for Mobiliser customers.
    neo.sh set-password -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser --alias prefs_user_remote_password deployment.properties
    When executing from Windows and having the environment variables entered in the deployment.properties:
    neo.bat set-password --alias prefs_user_remote_password deployment.properties
  5. Provision a new database instance. This can be done in the cockpit or on the command line.

    For SAP ASE:

    neo.sh create-schema -d SybaseASE -i $hcpschema -a $hcpaccount -h $hcphost -u $hcpuser
    When executing from windows and having the environment variables entered in the deployment.properties.
    neo.bat create-schema -d SybaseASE deployment.properties
    For SAP HANA:
    neo.sh create-schema -d HANA -i $hcpschema -a $hcpaccount -h $hcphost -u $hcpuser
    When executing from windows and having the environment variables entered in the deployment.properties:
    neo.bat create-schema -d HANA deployment.properties
  6. Bind the schema to our Java application.
    neo.sh bind-schema -i $hcpschema -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser
    When executing from windows and having the environment variables entered in the deployment.properties:
    neo.bat bind-schema deployment.properties
  7. Initialize the database with dbmaintain. To do this, you need to open a database tunnel:
    neo.sh open-db-tunnel -i $hcpschema -a $hcpaccount -h $hcphost -u $hcpuser --background
    When executing from Windows and having the environment variables entered in the deployment.properties:
    neo.bat open-db-tunnel --background deployment.properties
  8. Edit your dbmaintain.properties file with the schema, JDBC URL, user, and password printed to the console by the tunnel command. On SAP ASE, use the database name for the schema name in dbmaintain.
    Password for your user: 
     
                     Opening tunnel...
      
                     Tunnel opened.
      
                     Use these properties to connect to your schema:
                       Host name        : localhost
                       Database type    : ASE
                       JDBC URL         : jdbc:sybase:Tds:localhost:<port>
                       Database name    : <database name>
    Example dbmaintain properties
     
    	database.dialect=sybase
    	database.driverClassName=com.sybase.jdbc4.jdbc.SybDriver
    	database.url=jdbc:sybase:Tds:localhost:<port>/<database name>
    	database.userName=<database user>
    	database.schemaNames=<database name>
    	database.password=<database user password>
  9. Process the dbmaintain script archives:
    java -jar com.sybase365.mobiliser.vanilla.standalone-<version>-scriptarchive-<db>.jar -c dbmaintain.properties.<db>
    java -jar com.sap.mobile.platform.server.db.<db>.dbmaintain-<version>-scriptarchive-<db>.jar -c dbmaintain.properties.<db>
  10. Start the new java application.
    neo.sh start -a $hcpaccount -b $hcpapp -h $hcphost -u $hcpuser deployment.properties
    When executing from Windows and having the environment variables entered in the deployment.properties:
    neo.sh start deployment.properties