KMF Integration Service - Manual Upgrade: Upgrading Kony MobileFabric Integration Service > Tomcat > Upgrading Tomcat Manually 5.5.x / 5.6.x to 6.5.x

Upgrade Tomcat Manually from 5.5.x / 5.6.x to 6.5.x

This section provides you the steps to upgrade Kony MobileFabric Integration Service manually from 5.6.x to 6.5.x (Tomcat).

Prerequisites

The following table displays the prerequisites for upgrading Kony MobileFabric Integration Service.

Refer to http://community.kony.com/downloads/manual to download the following artifacts:

Artifacts Type Purpose
Respective Database scripts Database Scripts To setup the required schema
  • admin.war
  • middleware.war
  • metrics.ear (applicable only for metrics)

    (Advantages)

WAR files To be deployed to Application Server
  • middleware-bootconfig.tar
  • libraries-MIDDLEWARE-GA-ver.tar
TAR files  
JAR files  

 

Advantages of Upgrading with metrics.ear File

From Kony MobileFabric Integration Service 6.0 release, metrics.ear is required for reporting. The Admin module is enhanced for a better user experience and instead of depending on server user management, users are now stored in the database. To use the new features, you need to setup a database and install metrics.ear file.

Note: It is mandatory to install metrics.ear file along with admin.war.

The Kony Reports portal provides the following features:

  1. Enhanced User Session - A strong method for reporting the true session count in a given date range.
  2. Mechanism for tracking unique users per application.
  3. Middleware sends data in the new format to the specified JMS queue. Then metrics.ear processes messages from the JMS queue.
  4. Support for legacy reports. Following are the features of on-premise metrics along with legacy reports:
    1. Kony MobileFabric Integration Service Message
    2. Geo Location
    3. Custom Metrics
    4. Message Processing
    5. JasperSoft Reporting
    6. Basic Reporting
  5. Note: For more information on Kony Reports, click here.

    Important: If you do not want to use the Kony Reports, use your existing admin.war file (for example, use the war file you have for 5.6.x version). By using the existing admin.war file, you avoid the need for additional hardware or software.

Backup

To backup files, follow these steps: 

  1. Stop the application server.
  2. Take a backup of the following files from your current server installation location.
    1.  .WAR files - These files are available at <installation_location>\tomcat\instance1\webapps\ .
      • middleware.war
      • admin.war
      • reports.war
      • appdownload.war
    2. middleware-bootconfig directory

      Sample path for middleware -bootconfig <installation_location\install\middleware>

    3. middleware libraries (.JAR files) - The files are located at \<installation_location>\install\lib\\middleware.
    4. After taking the backup, delete all the above files.
  3. Retain the changes made to middleware.properties or middleware-log4j.poperties files for version 5.x.

Database Upgrade for Legacy Reports

To upgrade the database for legacy reports, follow these steps:

Download and run the upgrade scripts from http://community.kony.com/downloads/manual to upgrade the database and enable legacy reports.

For example: If your database version is 5.0.3 Oracle, run the schemas in "Oracle_upgrade_5.0.3 to 5.0.6" folder in the numerical order.

Note: To enable the legacy reports, the database should be the latest 5.0.6. version. If your database is not latest, run the database scripts based on your database and upgrade to 5.0.6 version.

Execute Database Scripts

  1. Execute the database scripts downloaded artifacts and create the new Admin and Reports schema.

    Note: This is required for new metrics.

Add New and Update Existing Property Files

middleware-bootconfig of 6.5.x is bundled with few additional .properties files compared to earlier versions that are required during the upgrade process. You would also need few .properties files from your backup location.

To add new and update existing property files, follow these steps: 

  1. Download and extract the middleware-bootconfig.tar file from http://community.kony.com/downloads/manual to the <installation_location>\install\middleware.

    The following new property files extracted are applicable only for metrics

    1. metrics-log4j.properties in the middleware-bootconfig folder that is available under middleware home.
    2. admin-log4j.properties and serverconsole.properties in the admin folder available under middleware-bootconfig.

      Note: If admin was used previously, update the admin-log4j.properties file by adding the location to previously used admin.logas shown log4j.appender.file.File=${middleware.home}/../logs/admin.log.

  2. Copy the deployment-config.properties file from your backup location to <installation_location\install\middleware\middleware-bootconfig\admin>.
  3. Update existing property files: 
    1. Update the middleware.properties file from <installation_location>\install\middleware\middleware-bootconfig with the configuration you have used with earlier version.
    2. Open the file and add the following content at the end of the file.

    Note: You must replace the credentials and IP addresses according to your environment.

      ##################################################
      #Metrics Topic Configuration (applicable only for metrics)
      ##################################################
      #To enable / disable metrics
      #Make it true, if Kony Reports enabled and Metrics Topic is configured
      metrics.logging=true
      metrics.TopicName=jms/KonyMetricsTopic
      metrics.TopicConnectionFactoryName=jms/KonyConnectionFactory
      
      #For JBOSS JMS
      metrics.initialContextFactoryName=org.jboss.naming.remote.client.
       InitialContextFactory
      metrics.providerURL=remote://<ipaddress:port>
      
      #For Weblogic JMS
      #metrics.initialContextFactoryName=weblogic.jndi.
       WLInitialContextFactory
      #metrics.providerURL=remote://<ipaddress:port>
      
      #START- JBoss 6.2 EAP Additional Properties
      metrics.securityPrincipalName=admin
      metrics.securityCredentials=admin123
      metrics.userName=admin
      metrics.password=admin123
      #END- JBoss 6.2 EAP Additional Properties
      
      #Add the Kony Account ID and Environment ID keys as shown below and 
      change the values of these keys accordingly.
      KONY_ACCOUNT_ID= Account_ID 
      ENVIRONMENT_ID= Environment_ID
      You can mention your own Account_ID and Environment_ID.
    1. Open middleware-log4j.properties file from <install_location>\install\middleware\middleware-bootconfig> and edit as following.

    Note: You must replace the credentials and IP addresses according to your environment.

      jms.logging=true (Change this value to false if you are 
       not using old reports and  remove the below content else 
       no changes required to this file)
      
      #if middleware is hosted on Tomcat server 
      log4j.appender.jms=com.konylabs.middleware.common.JMSAppender
      
      log4j.appender.jms.TopicBindingName=topic/KonyLogTopic
      log4j.appender.jms.TopicConnectionFactoryBindingName=
       jms/KonyConnectionFactory
      log4j.appender.jms.initialContextFactoryName=
       org.jboss.naming.remote.client.InitialContextFactory
      log4j.appender.jms.providerURL=remote://<ipaddress:port>
      #log4j.appender.jms.URLPkgPrefixes=jboss.naming:
       org.jnp.interfaces
      #NOTE: failoverDuration and failoverRetries introduced 
       for kony middleware ( not defined by log4j)
      log4j.appender.jms.FailoverDuration=5000
      log4j.appender.jms.FailoverRetries=3
      
      #START- JBoss 6.2 EAP Additional Properties
      log4j.appender.jms.securityPrincipalName=admin
      log4j.appender.jms.securityCredentials=admin123
      log4j.appender.jms.userName=admin
      log4j.appender.jms.password=admin123
      #END- JBoss 6.2 EAP Additional Properties
      

Note: From 6.0.3.3 GA, metrics.logging flag is available and by default, is set to true. Prior to that, the below error statement is displayed (you can ignore this). ERROR-logservice.JMSLogService - Error while look up topic .

Note: If we set metrics.logging property to false, call the kony.license.disableMetricReporting() API in app init to disable “Maximum Offline Sessions Exceeded” alert.

Update Data Source Configuration (Applicable Only For Metrics)

To update the data source configuration, follow these steps: 

  1. Add admin.xml file under Server\<version>\tomcat\instance1\conf\Catalina\localhost.
  2. Update the admin and report schema names accordingly. Following is the example for your reference in the admin.xml file.
  3. <Resource name="jdbc/konyadmindb" auth="Container" 
     type="javax.sql.DataSource"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver" username="root"
    password="kony123!" url="jdbc:mysql://<ipaddress:port>/
     admin_db_upgrade?autoReconnect=true"
    testWhileIdle="true" testOnBorrow="true" testOnReturn="false" 
     validationQuery="SELECT 1"
    validationInterval="30000" timeBetweenEvictionRunsMillis="30000"
    initialSize="10" maxActive="30" minIdle="10" 
     maxWait="10000" maxIdle="30"
    removeAbandonedTimeout="60" removeAbandoned="true" 
     logAbandoned="true"
    minEvictableIdleTimeMillis="30000" jmxEnabled="true"/>
    
    <Resource name="jdbc/konyreportsdb" auth="Container" 
     type="javax.sql.DataSource"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver" username="root"
    password="kony123!" url="jdbc:mysql://<ipaddress:port>/
     reports_db_upgrade"
    testWhileIdle="true" testOnBorrow="true" testOnReturn="false" 
     validationQuery="SELECT 1"
    validationInterval="30000" timeBetweenEvictionRunsMillis="30000"
    initialSize="10" maxActive="30" minIdle="10" 
     maxWait="10000" maxIdle="30"
    removeAbandonedTimeout="60" removeAbandoned="true" 
     logAbandoned="true"
    minEvictableIdleTimeMillis="30000" jmxEnabled="true"/>
    

Update JMS Configuration (Applicable Only For Metrics)

To update JMS Configuration, follow these steps: 

  1. Open standalone-full.xml file from <\installation_location>\jboss62_jms\standalone\configuration\> and update data sources and JMS Topic configurations as shown below.
    1. DataSource configuration:
    2. <datasources>
      <datasource jndi-name="java:/jdbc/konyreportsdb" 
       pool-name="konyreportsdb" enabled="true" use-java-context="true">
      <connection-url>jdbc:mysql://<ipaddress:port>/
       reports_db_upgrade</connection-url>
      <driver>com.mysql</driver>
      <pool>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>30</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      <security>
      <user-name>userid</user-name>
      <password>pwd </password>
      </security>
      </datasource>
      
      <datasource jndi-name="java:/jdbc/konyadmindb" 
       pool-name="konyadmindb" enabled="true" use-java-context="true">
      <connection-url>jdbc:mysql://<ipaddress:port>/
       admin_db_upgrade?autoReconnect=true</connection-url>
      <driver>com.mysql</driver>
      <pool>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>30</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      <security>
      <user-name>userid</user-name>
      <password>pwd</password>
      </security>
      </datasource>
      <drivers>
      <driver name="com.mysql" module="com.mysql"/>
      </drivers>
      
    3. JMS Topic configuration:
    4. Replace the below configuration
      <jms-destinations>
      <jms-topic name="konyLogTopic">
      <entry name="java:jboss/exported/topic/KonyLogTopic"/>
      </jms-topic>
      <jms-destimations>
      
      with the below
      <jms-destinations>
      <jms-topic name="KonyMetricsTopic">
      <entry name="java:jboss/exported/jms/KonyMetricsTopic"/>
      </jms-topic>
      </jms-destinations>
      

Deploy the latest .WAR Files

To deploy the latest WAR files, follow these steps: 

  1. Deploy the latest admin.war and middleware.war files to the application server.
  2. Deploy the metrics.ear file to the JBoss application server <\install_location>\jboss62_jms\standalone\deployments\> (applicable only if you are using metrics).
  3. Extract the jar files available in libraries-MIDDLEWARE-QA-ver.tar to this location - /<Installation-location>/install/lib/middleware.

Note: Based on the database used, copy the respective DB driver .JAR file to \<Installation-location>\install\lib\middleware. For example if you are using MYSQL DB, copy MySQL.jar file from MySQL site.

Important: Start the JBoss application server followed by Tomcat.

Upgrade from 5.x to 6.x

To upgrade from 5.x to 6.x, follow these steps: 

  1. Install a fresh instance of JBoss 6.2 and configure Kony MobileFabric Integration Service 6.0.
    1. Configure legacy database
    2. Republish the apps

Kony Report Portal Configuration

If you are using the Kony Reporting Portal for tracking sessions and users, then you must make the following changes so that you continue to see the reports in the new Admin Console (under the section Reports > Legacy Reports).

To track sessions and users, follow these steps: 

  1. Place the following files in a location. These files are available in the 5.x installation:
    • DbSpecificProcedureCall.properties
    • konyreport.properties
    • log4j.properties
  2. Open catalina.properties file and provide the location where the files mentioned in Step-1 are placed - konyreports.home=<The directory location>.
  3. Open admin.xml file and configure the data source for legacy reports (<tomcat home dir>\instance1\conf\Catalina\localhost).
  4. <Resource name="jdbc/KARDB" auth="Container" type="javax.sql.DataSource"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver" username="root"
    password="kony123!" url="jdbc:mysql://<ipaddress: port>/ADMIN"
    testWhileIdle="true" testOnBorrow="true" testOnReturn="false" 
     validationQuery="SELECT 1"
    validationInterval="30000" timeBetweenEvictionRunsMillis="30000"
    initialSize="10" maxActive="30" minIdle="10" maxWait="10000" 
     maxIdle="30"
    removeAbandonedTimeout="60" removeAbandoned="true" logAbandoned="true"
    minEvictableIdleTimeMillis="30000" jmxEnabled="true"/>
    
  5. Execute the database scripts in konyreports.sql of KonyReportsDB and admin schema required for Kony reports.

Verification

Verify the upgrade process by logging into the console and look for Server Version and Health Check. Use version.html for verification.

To verify the upgrade process, follow these steps:

  1. Navigate to the URL http://ipaddress:port/middleware/version.html and look for server version.
  2. Navigate to Settings and click Health Check and look for Report DB, Admin DB and Reporting Queue. Note that the status should be in PASSED state.
  3. Navigate to Settings and click Configuration.

Copyright © 2013 Kony, Inc. All rights reserved.