Install Pentaho

For Pentaho, you may install either the free Community Edition, or the commercial Enterprise Edition.  The Community Edition lacks the ability to export reports, but otherwise runs all current ArkCase reports.

Enterprise Edition

Only follow these steps if you want Pentaho Enterprise Edition.  If you are installing Pentaho Community Edition, skip this section.

Acquire the Installer File

ArkCase is tested with Pentaho Business Analytics 5.3.  Acquire the installer file suitable for your environment.  For example, on CentOS Linux 64-bit, the installer file is pentaho-business-analytics-5.3.0.0-213-x64.bin.

Run the Installation

Upload the installer file to the Pentaho host.  Execute the installer as the user who will own the Pentaho process (NOT as root).  Answer the installer questions as follows, after accepting the license agreement

 

  • —————————————————————————-
  • Setup Type
  • Choose the setup type that best suits your needs
  • Choose Setup Type
  • [1] Default: Installs all Pentaho applications with predefined settings.
  • [2] Custom: Choose the Pentaho applications you want installed and customize the server settings and password database administration access.
  • Please choose an option [1] : 2
  • —————————————————————————-
  • Select the Pentaho applications to install:
  • BA Server [Y/n] :Y
  • Reporting Design Tools [Y/n] :n
  • Analysis Design Tools [Y/n] :n
  • Dashboard Designer [Y/n] :n
  • Data Integration (ETL) [Y/n] :n
  • Data Integration Server [Y/n] :n
  • Analyzer [Y/n] :n
  • Interactive Reporting [Y/n] :Y
  • Pentaho Mobile [Y/n] :n
  • Is the selection above correct? [Y/n]: Y
  • —————————————————————————-
  • Sample Content
  • Do you want to install sample content including users, reports, dashboards, and
  • analysis views?
  •  [Y/n]: Y
  • —————————————————————————-
  • Installation folder
  • Specify the location in which to install the Pentaho applications.
  • Location: [/opt/Pentaho]: /opt/app/acm/pentaho
  • —————————————————————————-
  • Postgres will be installed and used to store reports, users and other system
  • information. Please create a password for the administrator userid “postgres”.
  • Password: :
  • Confirm Password: :
  • —————————————————————————-
  • Ready To Install
  • Setup is now ready to begin installing the Pentaho applications on your
  • computer.
  • Press [Enter] to continue :

 

After some time, Pentaho will be installed.  Then you will see:  “Launch the Pentaho User Console now. [Y/n]:”.  Answer N.

Configure Pentaho to use PostgreSQL on Port 5433

By default, Pentaho will start a PostgreSQL server on port 5432.  For ArkCase, Pentaho should use port 5433 (ArkCase itself would use 5432).

  • Shutdown Pentaho
  • Run this command from the Pentaho folder: grep -r 5432 * | grep jdbc
  • For every file in the results, if that file has text like “jdbc:postgresql://localhost:5432”, update that file to have “jdbc:postgresql://localhost:5433”. You can ignore files in the tomcat/temp folder.
  • Run this command: grep -r PGPORT *
  • For every file in the results, EXCEPT for C header files (*.h), C libraries (filename starts with lib), binary files, and include files (in /include folder); aside from those files, edit the file and change 5432 to 5433. The files to be changed should include: postgresql/scripts/ctl.sh and postgresql/bin/setenv.sh.
  • Start Pentaho

Configure the Tomcat Server.xml file

You may have to edit the ports in the Tomcat server.xml file to ensure there are no port conflicts with the other application servers that may be running on your host.

How to Start and Shutdown Pentaho

Stop: $PENTAHO/ctlscript.sh stop

Start: $PENTAHO/ctlscript.sh start

Update web.xml

​Edit the $PENTAHO/server/biserver-ee/tomcat/webapps/pentaho/WEB-INF/web.xml file.

Look for the fully-qualified-server-url context-param:

  •    <!–  FullyQualifiedServerUrl is used only in the case of offline content generation and whenever something need to talk back to the server –>
  •   <context-param>
  •     <param-name>fully-qualified-server-url</param-name>
  •     <param-value>http://localhost:8080/pentaho/</param-value>
  •   </context-param>

Make sure the param-value is correct. It should be the externally visible URL, e.g. the one that would work from the user network.  Example: http://demo.armedianet.com/pentaho.   Then, restart Pentaho.

Install Licenses

You should have one or more Pentaho license files.  Install each such license file via the Pentaho user console:

  • Login as Admin
  • In the Home menu in upper left, click Administration
  • Click Licenses
  • Click the + sign for each license you need to upload, and upload the license file
  • For each evaluation license that can be removed, select the row for that license and click the x to remove it.

Please continue with the “Configure Pentaho” section, which is below, just after the “Community Edition” instructions.

Community Edition

Only follow these steps if you want Pentaho Community Edition.  If you are installing Pentaho Enterprise Edition, skip this section.

Download and Unzip

Download site: http://community.pentaho.com/

The community edition is just a zip file.  Unzip it in whichever location you want, henceforth referred to as $PENTAHO.  The zip file includes a Tomcat server (in tomcat folder).  Start Tomcat like usual.  Depending on which other Tomcat servers you may already have running on the same host, you might have to edit the Tomcat server.xml file to ensure unique port numbers.

Default administrator account is admin/password.

To configure Community Edition to use Pentaho on port 5433, use the same instructions as above for the Enterprise Edition, except using the correct Community Edition shutdown and startup scripts.

Configure Pentaho to use PostgreSQL on Port 5433

By default, Pentaho will start a PostgreSQL server on port 5432.  For ArkCase, Pentaho should use port 5433 (ArkCase itself would use 5432).

  • Shutdown Pentaho
  • Run this command from the Pentaho folder: grep -r 5432 * | grep jdbc
  • For every file in the results, if that file has text like “jdbc:postgresql://localhost:5432”, update that file to have “jdbc:postgresql://localhost:5433”. You can ignore files in the tomcat/temp folder.
  • Run this command: grep -r PGPORT *
  • For every file in the results, EXCEPT for C header files (*.h), C libraries (filename starts with lib), binary files, and include files (in /include folder); aside from those files, edit the file and change 5432 to 5433. The files to be changed should include: postgresql/scripts/ctl.sh and postgresql/bin/setenv.sh.
  • Start Pentaho

Configure the Tomcat Server.xml file

You may have to edit the ports in the Tomcat server.xml file to ensure there are no port conflicts with the other application servers that may be running on your host.

How to Start and Shutdown Pentaho

Stop: $PENTAHO/tomcat/bin/shutdown.sh

Start: $PENTAHO/tomcat/bin/startup.sh

Update web.xml

​Edit the $PENTAHO/tomcat/webapps/pentaho/WEB-INF/web.xml file.

Look for the fully-qualified-server-url context-param:

 

  •   <!–  FullyQualifiedServerUrl is used only in the case of offline content generation and whenever something need to talk back to the server –>
  •   <context-param>
  •     <param-name>fully-qualified-server-url</param-name>
  •     <param-value>http://localhost:8080/pentaho/</param-value>
  •   </context-param>

 

Make sure the param-value is correct. It should be the externally visible URL, e.g. the one that would work from the user network.  Example: http://demo.armedianet.com/pentaho.   Then, restart Pentaho.

Configure Pentaho

The following steps are needed both for Enterprise Edition and for Community Edition.

JDBC Driver

Pentaho ships with the PostgreSQL driver.  If you are using some other database, copy the appropriate JDBC driver JAR file to the $PENTAHO_TOMCAT/lib folder, then restart Pentaho.

Data Source

Pentaho has its own ArkCase data source.  Create this data source by adding the following resource to the $PENTAHO_TOMCAT/conf/context.xml file, making the appropriate adjustments to the highlighted elements (the resource name must not be changed):

 

  • <Resource name=”jdbc/acm3DataSource”
  •       auth=”Container”
  •       type=”javax.sql.DataSource”
  •       factory=”org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory”
  •       maxActive=”20″
  •       maxIdle=”5″
  •       maxWait=”10000″
  •       username=”acm3
  •       password=”acm3
  •       driverClassName=”oracle.jdbc.OracleDriver
  •       url=”jdbc:oracle:thin:@localhost:1521:XE
  •   />

 

Edit the $PENTAHO_TOMCAT/webapps/pentaho/WEB-INF/web.xml file.  Look for <!– insert additional resource-refs –> comment.  After this comment, add the Ark resource reference:

 

  • <resource-ref>
  •       <description>acm3DataSource</description>
  •       <res-ref-name>jdbc/acm3DataSource</res-ref-name>
  •       <res-type>javax.sql.DataSource</res-type>
  •       <res-auth>Container</res-auth>
  •  </resource-ref>

Deploy the ArkCase Reports

Acquire 4 files from the ArkCase distribution repository.

If you are using the Oracle Database, use these reports:

  • pentaho/report-definitions/caseSummary.prpt
  • pentaho/report-definitions/ComplaintReport.prpt
  • pentaho/report-definitions/ComplaintDispositionCount.prpt
  • pentaho/report-definitions/AuditReport.prpt

If you are using the PostgreSQL database, use these reports:

  • pentaho/report-definitions/postgresql/caseSummary.prpt
  • pentaho/report-definitions/ postgresql/ComplaintReport.prpt
  • pentaho/report-definitions/ postgresql/ComplaintDispositionCount.prpt
  • pentaho/report-definitions/ postgresql/AuditReport.prpt

 

Log into Pentaho as the admin user (by default, user: admin, password: password; also, you have to click the Login button, you can’t just hit Enter after typing the password).

Click “Browse Files”.

Select the “Public” folder.

Select “New Folder”, and type “arkcase” as the new folder name.  This will create the /public/arkcase folder.

Still on the “Public” folder, Select “New Folder”, and type “arkcase-audit” as the new folder name.  This will create the /public/arkcase-audit folder.

Select the /public/arkcase folder.  Use the “Upload” button to upload 3 report definition files:

  • prpt
  • prpt
  • prpt

Select the /public/arkcase-audit folder.  Use the “Upload” button to upload 1 report definition file:

  • prpt

Linux Startup Script

On Linux, the Pentaho startup script should look something like this; make sure the bolded portions are correct for your system.

 

  • #!/bin/sh
  • # Starts, stops, and restarts Pentaho for ACM
  • #
  • # chkconfig: 345 90 10
  • # description: Starts and stops Pentaho for ACM
  • PENTAHO_DIR=”/opt/pentaho
  • PENTAHO_USER=armdev
  • case $1 in
  •     start)
  •         echo “Starting Pentaho for ACM”
  •         su – $PENTAHO_USER -c “cd $PENTAHO_DIR ; ./ctlscript.sh start”
  •         ;;
  •     stop)
  •         echo “Stopping Pentaho for ACM”
  •         su – $PENTAHO_USER -c “cd $PENTAHO_DIR ; ./ctlscript.sh stop”
  •         ;;
  •     restart)
  •         $0 stop
  •         sleep 10
  •         $0 start
  •         ;;
  •     *)
  •         echo “Usage: $0 {start|stop|restart}” >&2
  •         exit 1
  •         ;;
  • esac

 

Logrotate (Linux hosts only)

Unfortunately, by default Tomcat’s catalina.out file is never truncated or removed, and ordinarily you have to shutdown Pentaho to clean it.  On Linux hosts with logrotate enabled, Armedia uses the following method to manage the size of the catalina.out file, with no Pentaho restarts needed.

Create the file ‘/etc/logrotate.d/pentaho’ with this content:

 

  • /opt/app/acm/pentaho/server/biserver-ee/tomcat/logs/catalina.out {
  •   copytruncate
  •   daily
  •   rotate 7
  •   compress
  •   missingok
  •   size 5M
  • }

Ensure the path to the catalina.out is correct.  Then create or update a cron schedule for the root user:

  • sudo crontab –u root -e

Add a line like this:

  • 30 2 * * * /usr/sbin/logrotate -f /etc/logrotate.d/pentaho

When you finish updating this crontab, run this command to verify the crontab was updated:

  • sudo crontab –l

The output should include the line you just added, to run the logrotate script at 2:30 AM each day.  Of course the cron expression can be updated to your taste.