Hitachi Vantara Pentaho Community Wiki
Child pages
  • Upgrading the Pentaho Pre-Configured Install
Skip to end of metadata
Go to start of metadata

Warning

The content of this document serves as a record of changes made to the JBoss AS 4.2.1 + JBoss Portal 2.6.1 bundle in order to create the Pentaho Pre-Configured Install (PCI). Others can use these steps to prepare an existing JBoss installation to run Pentaho, but keep in mind that these steps have only been tested in the aforementioned versions.

Overview

The Pentaho Pre-Configured Install (PCI) is a customized version of the JBoss Portal + JBoss AS bundle.

Downloading the JBoss Portal + JBoss AS Bundle

From JBoss Portal Downloads, download the JBoss Portal + JBoss AS bundle. This is a bundle of JBoss Application Server and JBoss Portal together in one archive.

Pentaho Customizations

This section enumerates all of the Pentaho customizations to the JBoss Portal + JBoss AS bundle.

${home}/bin

  • Add an empty file named lines.txt in this directory.
  • Modify the file named run.bat in this directory.
    run.bat

    REM PENTAHO CHANGES. WE ADDED THIS BECAUSE WE DON'T SHIP THE SERVER JVM
    REM if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
    rem JVM memory allocation pool parameters. Modify as appropriate.
    set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=256m

  • Modify the file named run.conf in this directory. Some of the changes relate to PPP-113.
    run.conf

    # temp dir
    MYTEMP="/tmp/"
    if [ "x$TMP" != "x" ]; then
    MYTEMP="$TMP/"
    elif [ "x$TEMP" != "x" ]; then
    MYTEMP="$TEMP/"
    elif [ "x$TMPDIR" != "x" ]; then
    MYTEMP="$TMPDIR/"
    fi
    #
    # Specify options to pass to the Java VM.
    #
    if [ "x$JAVA_OPTS" = "x" ]; then
    JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.awt.headless=true -Djava.io.tmpdir=$MYTEMP"
    fi

  • Add a file named stop.bat in this directory.
    stop.bat

    shutdown -S

${home}/docs/licenses/jdbc_drivers_from_pentaho

This directory contains the licenses of the JDBC drivers included in server/default/lib.

${home}/server/default/conf

By default, JBoss redirects System.out and System.err calls to a logger stream. The level of that stream is INFO and the name of the logger is STDOUT and STDERR. So in order to show these statements, the following settings are required. (System.out and System.err calls are made in SolutionContextListener to print the Pentaho "ready" message.)

<!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
<category name="org.apache">
  <priority value="WARN"/>
</category>

<!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
<category name="org.jboss.serial">
  <priority value="WARN"/>
</category>

<!-- Limit the JSR77 categories -->
<category name="org.jboss.management">
  <priority value="WARN"/>
</category>

<!-- allow any System.out.print calls -->
<category name="STDOUT">
  <priority value="INFO" />
</category>

<!-- allow any System.err.print calls -->
<category name="STDERR">
  <priority value="INFO" />
</category>

<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->

<root>
  <priority value="WARN" />
  <appender-ref ref="CONSOLE"/>
  <appender-ref ref="FILE"/>
</root>

${home}/server/default/data

The contents of this directory are created automatically. After starting and shutting down the application server at least once, you'll need to add the Pentaho users to the portal. You can either do this using the Management portlet or add the following SQL statements to ${home}/server/default/data/portal/hypersonic/database.log.

INSERT INTO JBP_USERS VALUES(3,'joe',NULL,NULL,'5f4dcc3b5aa765d61d8327deb882cf99','joe.pentaho@pentaho.org','','2007-01-05 13:40:16.421000000',FALSE,TRUE)
INSERT INTO JBP_ROLE_MEMBERSHIP VALUES(3,2)
INSERT INTO JBP_ROLE_MEMBERSHIP VALUES(3,1)
INSERT INTO JBP_USERS VALUES(4,'suzy',NULL,NULL,'5f4dcc3b5aa765d61d8327deb882cf99','suzy.pentaho@pentaho.org','','2007-01-05 13:40:33.578000000',FALSE,TRUE)
INSERT INTO JBP_ROLE_MEMBERSHIP VALUES(4,2)
ALTER TABLE JBP_USERS ALTER COLUMN JBP_UID RESTART WITH 5

Make sure ${home}/server/default/data/portal/hypersonic/* gets checked into version control. This is the only database that needs to be added to version control; the others are created when JBoss starts.

${home}/server/default/deploy/jboss-portal.sar/portal-admin.sar/portal-admin.war/WEB-INF/faces-config.xml

And any other faces-config.xml files (${home}/server/default/deploy/jboss-portal.sar/portal-wsrp.sar/portal-wsrp-admin.war/WEB-INF/faces-config.xml)

The following xml should be added to the faces-config->application element:

<locale-config>
            <default-locale>en_US</default-locale>
            <supported-locale>en</supported-locale>
      </locale-config>

${home}/server/default/deploy/jboss-portal.sar/conf/data

  1. Change the security constraints for the default portal to view and personalize.
  2. Add viewrecursive and personalizerecursive security constraints to the default page (within the default portal).
default-object.xml
<!-- omitted -->
<deployment>
  <parent-ref/>
  <if-exists>keep</if-exists>
  <portal>
    <portal-name>default</portal-name>
    <!-- omitted -->
    <security-constraint>
      <policy-permission>
        <action-name>view</action-name>
        <action-name>personalize</action-name>
        <unchecked/>
      </policy-permission>
    </security-constraint>
    <page>
      <page-name>default</page-name>
      <!-- omitted -->
      <security-constraint>
        <policy-permission>
          <action-name>viewrecursive</action-name>
          <action-name>personalizerecursive</action-name>
          <unchecked/>
        </policy-permission>
      </security-constraint>
      <!-- omitted -->
    </page>
  </portal>
</deployment>
<!-- omitted -->

${home}/server/default/deploy/jboss-portal.sar/portal-server.war

Insert the following HTML to include a JavaScript-powered shortcut to filling out the JBoss Portal login form.

login.jsp
<!-- begin Pentaho -->
<tr>
  <td colspan="2" align="center">
    Valid Pentaho Users:&nbsp;
  </td>
</tr>
<tr>
  <td colspan="2" align="center">
    <select onchange="document.forms.loginform.elements.j_username.value=this.options[this.selectedIndex].value; document.forms.loginform.elements.j_password.value='password'">
      <option value="" selected>Select: </option>
      <option value="suzy">Suzy</option>
      <option value="joe">Joe (Admin)</option>
    </select>
  </td>
</tr>
<!-- end Pentaho -->

${home}/server/default/deploy/jboss-portal.sar/samples/portal-news-samples.war/WEB-INF

Add viewrecursive and personalizerecursive security constraints to the News page (within the default portal).

default-object.xml
<deployments>
  <deployment>
    <parent-ref>default</parent-ref>
    <if-exists>keep</if-exists>
    <page>
      <page-name>News</page-name>
      <!-- omitted -->
      <security-constraint>
        <policy-permission>
          <action-name>viewrecursive</action-name>
          <action-name>personalizerecursive</action-name>
          <unchecked/>
        </policy-permission>
      </security-constraint>
      <!-- omitted -->
    </page>
  </deployment>
</deployments>

${home}/server/default/deploy/jboss-portal.sar/samples/portal-weather-samples.war/WEB-INF

Add viewrecursive and personalizerecursive security constraints to the Weather page (within the default portal).

default-object.xml
<deployments>
  <deployment>
    <parent-ref>default</parent-ref>
    <if-exists>keep</if-exists>
    <page>
      <page-name>Weather</page-name>
      <!-- omitted -->
      <security-constraint>
        <policy-permission>
          <action-name>viewrecursive</action-name>
          <action-name>personalizerecursive</action-name>
          <unchecked/>
        </policy-permission>
      </security-constraint>
      <!-- omitted -->
    </page>
  </deployment>
</deployments>

${home}/server/default/deploy/jboss-web.deployer

Edit server.xml to look like the following. (The URIEncoding is the only added attribute.)

<Connector port="8080" address="${jboss.bind.address}"
  maxThreads="250" maxHttpHeaderSize="8192"
  emptySessionPath="true" protocol="HTTP/1.1"
  enableLookups="false" redirectPort="8443" acceptCount="100"
  connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />

${home}/server/default/deploy/jboss-web.deployer/ROOT.war

Edit index.html to look like the following. This change redirects the user to the pentaho web application if no context path is specified.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Pentaho BI Platform</title>
    <meta http-equiv="refresh" content="0;URL=/pentaho">
  </head>
  <body>
  </body>
</html>

${home}/server/default/lib

Various JDBC drivers have been added to this directory.

JBoss Libraries

If you will be building the Pentaho code, be sure to update any JBoss JARs within any projects (e.g. pentaho) that depend on JBoss libraries.

  • No labels