Windows Mifos BI 1.3 (Pentaho) Installation & Upgrade Guide

Software Requirements

These are the required software for Mifos BI 1.3 (they are the same as required by the Mifos application itself)

  • Sun Microsystems Java - JDK/JRE 1.6
  • MySQL - Community Edition 5.1.45 or higher
  • Mifos BI 1.3 is required if you are on Mifos 3.1.x

Upgrade to BI 1.3 From BI 1.2

If you have already installed BI 1.2 you don't need to do a full Pentaho installation and instead you can just update the mifos files.

Get the latest Mifos BI (1.3) from sourceforge.org. download here and unzip it.

Move or delete the following target directories prior to upgrading (copying). 

biserver-ce\tomcat\webapps\pentaho\WEB-INF\classes\org

"The install directory"\ETL

biserver-ce\pentaho-solutions\standardReports

biserver-ce\pentaho-solutions\mpesa

biserver-ce\pentaho-solutions\Dashboards

biserver-ce\pentaho-solutions\DashboardsMenu

biserver-ce\pentaho-solutions\CommonActions

biserver-ce\pentaho-solutions\DataAccess

If you have added your own files, add them back afterwards.
 
copy directory reports\i18n\org to biserver-ce\tomcat\webapps\pentaho\WEB-INF\classes
copy directory ETL to "The install directory" (same level as initialise_datawarehouse.bat file is)

copy file reports\CDFReportingTemplate\template-dashboard-mifosreports.html to biserver-ce\pentaho-solutions\system\pentaho-cdf
copy file DashboardsTemplate\template-dashboard-dashboards.html to biserver-ce\pentaho-solutions\system\pentaho-cdf
copy files reports\CDFReportingTemplate*.jpg to biserver-ce\pentaho-solutions\system\pentaho-cdf\resources\style\images

copy directory reports\standardReports to biserver-ce\pentaho-solutions
copy directory reports\mpesa to biserver-ce\pentaho-solutions
copy directory reports\Dashboards to biserver-ce\pentaho-solutions
copy directory reports\DashboardsMenu to biserver-ce\pentaho-solutions
copy directory reports\commonActions to biserver-ce\pentaho-solutions
copy directory reports\dataAccess to biserver-ce\pentaho-solutions (and delete file index.html in the dataAccess directory so it doesn't show up on pentaho)

Then login to Pentaho as admin and do
i) Tools/Refresh/Repository Cache
ii) Tools/Refresh/CDA Cache

If you want to run the incremental ETL, create a file with the contents below called incremental_datawarehouse.bat and put it in pentaho_mifosbi_1_3_windows directory

SET PDIPATH=data-integration\
SET DWPATH=ETL\MifosDataWarehouseETL\

%PDIPATH%kitchen.bat /file:../%DWPATH%DataWarehouseIncrementalLoad.kjb %1  /level:Basic > transformationLog_incremental.log

EXIT

If you want to run the incremental ETL on Windows XP you will have to replace ETL\MifosDataWarehouseETL\SetDBParametersForCreatingDWDB.ktr with this attachment of the same name

SetDBParametersForCreatingDWDB.ktr

Full Installation of BI 1.3

This assumes:

  1. No previous mifos BI installation
  2. The mifos database is called 'mifos'
  3. mysql is using port 3306
  4. Running Mifos 2.0 or higher. 

The installation process will create a data warehouse database called 'mifos_dw'.  It will also create databases quartz, hibernate and sampledata for pentaho use.

  • Download Mifos BI 1.3 Windows Install package I chose to download this install_mifos_bi_1_3_Windows.zip file directly into my C:\MifosInstall folder. If you don't have the option to specify your download folder; after the download completes use windows explorer to 'cut it' (for speed instead of copy) from your download folder to an install folder of your choice.
  • Go to your install folder via Windows Explorer. Extract/Unzip install_mifos_bi_1_3_Windows.zip into your install folder.  This creates a folder called install_mifos_bi_1_3_Windows
    • You can extract/unzip into any folder, the install folder is used here for simplicity.
  • Set up MySQL: Open up a Command Prompt (Start >> run >> CMD) and cd into the install_mifos_bi_1_3_Windows folder. Run the following command replacing MYSQLUSERNAME with root and PASSWORD with your password for root user. 

mifosbi_mysql_scripts.bat MYSQLUSERNAME PASSWORD

if you don't use a password with root you will need to edit the mifosbi_mysql_scripts.bat and remove all the occurrences of -p%2

  • Run the Datawarehouse ETL Job: You can do this manually by cd'ing into pentaho_mifosbi_1_3_windows folder and entering: 

    initialise_datawarehouse.bat

    or (for larger MFI's of 5000 Clients plus)

    incremental_datawarehouse.bat

  • For your data to be populated from Mifos into the datawarehouse, this ETL job needs to be run (typically each day just after midnight but could be less frequent if preferred). See below for instructions on scheduling the ETL job.

    If you run into issues running Mifos and Pentaho simultaneously, it's because of their port numbers. Mifos by default runs on port 8080. This is where Pentaho will try to run as well. To run both applications simultaneously, you need to change the port Pentaho runs on to 8086. Follow these steps to change the port for Pentaho.

Running Mifos BI

  • Go to the biserver-ce folder in the pentaho_mifosbi_1_3_windows folder. Double-click start-pentaho.bat 

(A tomcat window will pop up - it will be successfully running when you see the following)

  • Go to your browser and enter: http://localhost:8080  (I'm only running Mifos and Mifos BI locally so my url is my localhost.  If you have deployed this on a webserver, enter the url of your server accordingly)
  • Log on using the default admin account with user id, joe and the password, password.
  • Enable the browser view by clicking the toggle browser icon.
  • Go into the standard reports folder and begin to run reports.

Scheduling ETL Job

The instructions below are for Windows Task Scheduler (Windows XP/Windows 2003)

  • Navigate to your control panel and double click Scheduled Tasks icon.  
  • Double click to Add Scheduled Task
  • Under the Add Scheduled Task wizard, click the Browse option and navigate to the pentaho_mifosbi_1_3_windows directory and select initialise_datawarehouse.bat or incremental_datawarehouse.bat
  • You can rename the task if you like. For Perform this task, select Daily.
  • Select the time you'd like it to run at. I've selected it to run after midnight each day so all daily transactions will have been entered. 
  • Enter your Windows user credentials.
  • Click Finish to successfully add the task. You can select advanced properties to control how and when the task gets run.

  

For more on using Windows Task Scheduler, see http://www.iopus.com/guides/winscheduler.htm.