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

Upgrade JBoss 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.5.x / 5.6.x to 6.5.x (JBoss).

Prerequisites

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

Refer to http://community.kony.com/archive/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)

  • appdownload.war
WAR files To be deployed to Application Server
  • libraries-MIDDLEWARE-QA-ver.tar
  • middleware-bootconfig.tar
TAR files  

 

Advantages of Upgrading from 5.x to 6.x 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

  1. Take a backup of the following files. These file are available at <jboss_install-location>\instance\standalone\deployments
    1. middleware.war
    2. admin.war
    3. 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.

Database Upgrade for Legacy Reports

Download and run the upgrade scripts from http://community.kony.com/archive/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

Execute the database scripts and verify the Admin and Reports schema created in the database.

Note: Change the name of the konyadmin and konyreports database as per your requirements. This is required for metrics.

Add New and Update Existing Property Files

  1. Download and extract the middleware-bootconfig.tar file from http://community.kony.com/archive/downloads/manual to the <installation_ location>\install\middleware.
  2. Open deployment-config.properties file from <jboss_install-location> install\middleware\middleware-bootconfig\admin.

    Remove all the entries between Tomcat and JBoss Entries Begin and Tomcat and JBoss Entries End and add the following entries :

    #TOMCAT AND JBOSS ENTRIES BEGIN
    #Must be "false" for websphere and "true" for tomcat and Jboss config.usersdb.validation=false

    # File based for Tomcat which move the wars in a given
    config.<config-name>.deploy.dir
    config.wap-default.type=JBoss
    config.wap-default.port=<port>

    #TOMCAT 7 server - value should be
    'http://ipaddress:port/manager/text'
    #config.wap-default.deploy.URL=http://<ipaddress>:<port>/manager/text
    #config.wap-default.deploy.managerID=manager
    #config.wap-default.deploy.managerPWD=m@n@g3r123
    #config.wap-default.deploy.dir=<jboss_install-location>/install/webapps

    # File based for Tomcat which move the wars in a given
    config.<config-name>.deploy.dir
    config.sms-default.type=Tomcat
    config.sms-default.host=localhost
    config.sms-default.port=80
    config.sms-default.deploy.dir=/home/core/install/apps

    # TOMCAT 7 server - value should be
    'http://<ipaddress>:<port>/manager/text'
    config.sms-default.deploy.URL=http://localhost/manager
    config.sms-default.deploy.managerID=manager
    config.sms-default.deploy.managerPWD=m@n@g3r123
    config.rc-default.type=JBoss
    config.rc-default.host=<ipaddress>
    config.rc-default.port=<port>
    config.rc-default.deploy.dir=<jboss_installlocation>/install/webapps/download.war #TOMCAT AND JBOSS ENTRIES END

    Note: You can retain the location from the above sample code from deploy-config.propertiesbackup file. You must replace the ipaddressport and port according to your environment.

  3. Update existing property file.
    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.

  4. ##################################################
    #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
    #ToDo
    #metrics.URLPkgPrefixes=jboss.naming:org.jnp.interfaces
    #NOTE: failoverDuration and failoverRetries introduced for kony middleware (not defined by log4j)
    #metrics.FailoverDuration=5000
    #metrics.FailoverRetries=3
    
    #Add the Kony Account ID and Environment ID keys for reports as shown below and 
    change the values of these keys accordingly.
    KONY_ACCOUNT_ID= <Kony_Account_ID>
    ENVIRONMENT_ID= <Kony_Environment_ID>
    You can mention your own Account_ID and Environment_ID.
    #Add to support 2D array in JSON Output
    jsonArraySupport=false (By default, this value should be false) 
    

    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.

  5. Open middleware-log4j.properties file and edit as below:
  6. 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 
     keep the below content as below)
    #-- Start add for service wars deployed
    log4j.category.com.kony=INFO,file
    #-- End
    log4j.category.com.konylabs=INFO,file
        
    #Enable below 2 line if kony reporting is enabled and jms topic is configured
    log4j.category.com.konylabs.middleware.connectors.logservice=INFO 
    log4j.additivity.com.konylabs.middleware.connectors.logservice=false
    
    #Reduce logging in thin client. This property controls the logging by the thin 
    client code.
    #log4j.category.com.konylabs.vm=INFO,file
    #log4j.category.com.konylabs.api=INFO,file
    
    #The additivity property below prevents the classname from propagating the logs to 
    it's ancestors and parent classes. If this flag is
    #set to true, then logging will happen in file1 as well as file. 
    If it is set to false, logging shall happen only in file1 and these logs shall
    #not be propagated to it's ancestors.
    #log4j.additivity.com.konylabs.vm=false
    #log4j.additivity.com.konylabs.api=false
    
    #if middleware is hosted on JBOSS server 
    #log4j.appender.jms=org.apache.log4j.net.JMSAppender
    
    #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
    
    ### temp appender for backup
    log4j.appender.file=org.apache.log4j.RollingFileAppender
    log4j.appender.file.maxFileSize=10240KB
    log4j.appender.file.maxBackupIndex=5
    log4j.appender.file.File=/Server<jboss_install-location>/logs/middleware/middleware.log
    log4j.appender.file.threshold=debug
    log4j.appender.file.layout=org.apache.log4j.PatternLayout
    # %L should be used only in dev, its extremely slow
    #log4j.appender.file.layout.ConversionPattern=[%x] %d{ABSOLUTE} %5p %c{2}:%L - %m%n
    log4j.appender.file.layout.ConversionPattern=[%x][KonyServer][%p]
     [%d{dd MMM yyyy HH:mm:ss,SSS}]-%5p-%c{2} - %m%n
    
    #The properties below are required to be added if logging is required in multiple 
    locations based on the class name or hierarchy.
    #Add the classname/hierarchy here and give it a log level and unique appender name
    #log4j.category.com.konylabs.middleware.common.CSRIssueLogger=DEBUG,file1
    
    #The additivity property below prevents the classname from propagating the logs to it's 
    ancestors and parent classes. If this flag is
    #set to true, then logging will happen in file1 as well as file. If it is set to false, 
    logging shall happen only in file1 and these logs shall
    #not be propagated to it's ancestors.
    #log4j.additivity.com.konylabs.middleware.common.CSRIssueLogger=false
    
    ### temp appender for backup
    #log4j.appender.file1=org.apache.log4j.RollingFileAppender
    #log4j.appender.file1.maxFileSize=10240KB
    #log4j.appender.file1.maxBackupIndex=5
    #log4j.appender.file1.File=D:/Middleware-Config/middleware-log_file1.txt
    #log4j.appender.file1.threshold=debug
    #log4j.appender.file1.layout=org.apache.log4j.PatternLayout
    #log4j.appender.file1.layout.ConversionPattern=[%x] %d{ABSOLUTE} %5p %c{2} - %m%n
    #
    

Update Data Source Configuration (Applicable Only For Metrics)

  1. Open standalone.xml file of standalone JBoss (Not the JMS JBoss) available at,
    \Server\Jboss_location \jboss\instance1\standalone\configuration.
  2. Update the data sources as in the following code: 
  3. Note: You must replace the credentials and IP addresses according to your environment.

    <datasources> 
    <datasource jndi-name="java:/jdbc/konyreportsdb" pool-name="konyreportsdb" enabled="true" 
     use-java-context="true">
    <connection-url>jdbc:sqlserver://ipaddress:port;DatabaseName=reportsdbname;
     </connection-url>
    <driver>com.sqlserver</driver>
    <new-connection-sql>SELECT 1</new-connection-sql>
    <pool>
    <min-pool-size>10</min-pool-size>
    <max-pool-size>30</max-pool-size>
    <flush-strategy>IdleConnections</flush-strategy>
    </pool>
    <security>
    <user-name>dbusername</user-name>
    <password>dbpassword</password>
    </security>
    <validation>
    <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
    <validate-on-match>true</validate-on-match>
    </validation>
    </datasource>
    <datasource jndi-name="java:/jdbc/konyadmindb" pool-name="konyadmindb" enabled="true" 
     use-java-context="true">
    <connection-url>jdbc:mysql://ipaddress:port;DatabaseName=admindbname?autoReconnect=true;
     </connection-url>
    <driver>com.sqlserver</driver>
    <new-connection-sql>SELECT1</new-connection-sql>
    <pool>
    <min-pool-size>10</min-pool-size>
    <max-pool-size>30</max-pool-size>
    <flush-strategy>IdleConnections</flush-strategy>
    </pool>
    <security>
    <user-name>dbusername</user-name>
    <password>dbpassword</password>
    </security>
    <validation>
    <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
    <validate-on-match>true</validate-on-match>
    </validation>
    </datasource>
    <datasource jndi-name="java:/jdbc/KARDB" pool-name="KARDB" enabled="true" use-java-context="true">
    <connection-url>jdbc:mysql://ipadress:port/ADMIN</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>dbusername</user-name>
    <password>dbpassword</password>
    </security>
    </datasource>
    
    Replace the driver entry under <driver> tag as below:
    <drivers>
    <driver name="org.apache.derby" module="org.apache.derby"/>
    <xa-datasource-class>org.apache.derby.jdbc.EmbeddedDriver</xa-datasource-class>
    </driver>
    <driver name="com.mysql" module="com.mysql"/>
    <driver name="org.apache.derby" module="org.apache.derby">
    </driver>
    </drivers>
    <datasources>
    
    Add these two selected entries under <global-modules> tag. Ex: Snippet
    <global-modules>
    <module name="com.kony.middleware" slot="main"/>
    <module name="javaee.api" slot="main"/>
    <module name="com.mysql" slot="main"/>
    <module name="javaee.api" slot="main"/>
    <module name="org.jboss.remote-naming" slot="main"/>
    <module name="org.hornetq" slot="main"/>
    </global-modules>
    

Update JMS Configuration (Applicable Only For Metrics)

  1. Open standalone-full.xml file of JBoss using JMS and update data sources and JMS Topic configurations as shown below.
  2. Note: You must replace the credentials and IP addresses according to your environment.

    1. DataSource configuration:
    2. <datasources>
      <datasource jndi-name="java:/jdbc/konyreportsdb" pool-name="konyreportsdb" enabled="true" 
       use-java-context="true">
      <connection-url>jdbc:sqlserver://ipaddress:port;DatabaseName=databasename;
       SelectMethod=cursor;</connection-url>
      <driver>com.sqlserver</driver>
      <security>
      <user-name>userid</user-name>
      <password>password</password>
      </security>
      <pool>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>30</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      </datasource>
      <datasource jndi-name="java:/jdbc/konyadmindb" 
       pool-name="konyadmindb" enabled="true" 
       use-java-context="true">
      <connection-url>jdbc:sqlserver://ipaddress:port;DatabaseName=databasename;
       SelectMethod=cursor;</connection-url>
      <driver>com.sqlserver</driver>
      <security>
      <user-name>userid</user-name>
      <password>password</password>
      </security>
      <pool>
      <min-pool-size>10</min-pool-size>
      <max-pool-size>30</max-pool-size>
      <flush-strategy>IdleConnections</flush-strategy>
      </pool>
      </datasource>
      <datasource jndi-name="java:/jdbc/konylogdb" pool-name="konylogdb" enabled="true" 
       use-java-context="true">
      <connection-url>jdbc:sqlserver://ipaddress:port;DatabaseName=databasename;
       SelectMethod=cursor;</connection-url>
      <driver>com.sqlserver</driver>
      <security>
      <user-name>userid</user-name>
      <password>password</password>
      </security>
      </datasource>
      
      <drivers>
      <driver name="com.sqlserver" module="com.sqlserver"/>
      </drivers>
      </datasources>
      
    3. JMS Topic configuration:

       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

  1. Deploy the latest admin.war, middleware.war and appdownload.war files to the deployment folder of JBoss application server <jboss_install-location>\jboss\instance\standalone\deployments.
  2. Deploy the metrics.ear file to JBoss application server for JMS <jboss-installlocation>\jboss62_jms\instance\standalone\deployments (applicable only if you are using metrics).
  3. Open serverconsole.properties file from <jboss-install-location>\install\middleware\middleware-bootconfig\admin.

Edit Metrics and Admin-log4j Properties

  1. Open the admin-log4j.properties from the following location: <jboss-install-location>\install\middleware\middleware-bootconfig\admin and edit the property log4j.appender.file (the location of the admin.log file).
  2. Open the metrics-log4j.properties from the following location <jboss-install-location>\install\middleware\middleware-bootconfig and edit the property log4j.appender.file (File is the location of the metrics.log file).
  3. Open the serverconsole.properties file from the following location : <jboss-install-location>\install\middleware\middleware-bootconfig\admin and compare the admin.dbtype and reports.dbtype.

    Both the database types compared should match your database.

  4. Note: You should select konyadmindb.dialect property as your database.

    For example:

    If you are using MySQL database, the property should be konyadmindb.dialect=com.kony.console.admin.dialect.CustomMySQLDialect.

    Similarly, admindb.dbtype and reportsdb.dbtype property should match your database.

  5. Extract the jar files available in libraries-MIDDLEWARE-QA-ver.tarto /<jboss_install-location>\install\lib\middleware.
  6. Add the thin client jars from <thin-client-jar-location> to the middleware libraries folder <jboss_install-location>\install\lib\middleware and add the jar entries to the module.xml file.
  7. Create a folder (Example: MySQL) in <jboss-install-location>\jboss\instance1\modules\system\layers\base\com . (The name of the folder created depends on the database you are using).

  8. Create a sub-folder Main in the folder created and add the selected database JAR to the folder.
  9. Create a module.xml file and enter the following code.
    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.1" name="com.mysql">
    <properties>
    <property name="jboss.api" value="unsupported"/>
    </properties>
    <resources>
    <resource-root path="<name of the database driver jar>"/
    </resources>
    <dependencies>
    <module name="javax.api"/>      
    <module name="javax.transaction.api"/>
    <module name="javax.servlet.api" optional="true"/>
    </dependencies>
    </module>
    
  10. Copy the appregistry folder from the middleware-bootconfig folder of the 5.6.x backup folder and paste it into the middleware-bootconfig of the 6.5.x server (i.e. <jboss-install-location>/install/middleware/middleware-bootconfig).
  11. Open mobilefabric_configuration table in konyadmin database and add two entries to the table as shown below :

    Note: The above step is required to publish application to a server integrated with the MobileFabric. If you are not using MobileFabric, ignore this step.

    • First entry should have prop_name as management_server_host_name and prop_value is the jboss.bind.address.management provided in the standalone.xml file of jboss_install-location>\jboss\instance\standalone\configuration of the jboss server.
    • Similarly, the second entry should have prop_name as management_server_port and prop_value as the jboss.management.native.port given in the standalone.xml file of jboss_install-location>\jboss\instance\standalone\configuration.

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

  1. Place the following files in a location. These files are available in the 5.x installation:
    1. DbSpecificProcedureCall.properties
    2. konyreport.properties
    3. log4j.properties
  2. Open the konyreports.properties file and update the database properties.
  3. #database properties
    #konyadminreports.jndi.name=java:comp/env/jdbc/KARDB
    konyadminreports.jndi.name=java:/jdbc/KARDB
  4. Open standalone.conf.bat from <jboss-install-location>/jboss/instance/bin.

    Add a –D parameter -Dkonyreports.home=<location of konyreports.home> in the JAVA_OPTS.

Verification

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

To verify the upgrade process  

  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.