Cluster the Application Server

Overview

These sections explain the requirements for clustering servers, how to initialize and configure the repository, configure a jackrabbit journal and quartz, and how to test the cluster.

A Pentaho node is made up of a Tomcat Web App server, and one BA server. Multiple nodes that are joined make up a cluster. You can create a cluster using any version of Pentaho BA Suite 5.x.

These sections explain the requirements for clustering servers, how to initialize and configure the repository, configure a jackrabbit journal and quartz, and how to test the cluster.

Prerequisites for Clustering

Before you begin the process of clustering your servers, there are a few tasks that you need to do and some specific requirements that must be met in order to successfully implement a Pentaho deployment on a Tomcat or JBoss cluster.

Requirement

Description

Make sure that all of your application nodes are set up with identical configurations and BA deployments.

Your application nodes all need the same configurations and BA deployments installed already in order for clustering to work.

Establish a load balancer.

This will make sure that computing resources are spread evenly among the nodes.

Each node and the load balancer must be time-synchronized via NTP.

All machines that make up the cluster have to have the same system time. If they do not, execution times of objects will be effected.

You must run only one node per machine (or NIC).

It is possible to run multiple application servers on each node with a modified configuration, but this scenario does not offer any benefit for load balancing (performance) or hardware failover (redundancy), and therefore is not covered in this guide. Refer to your application server's clustering documentation for more information.

You must use either Tomcat 6.0 /7.0 or JBoss EAP 6.1.x/6.2.x.

You may be able to use this guide as a basic blueprint for configuring other application servers or versions of Tomcat and JBoss for a clustered environment, but Pentaho support will not be able to assist you if you run into any problems with the BA or DI Servers.

You must have permission to install software and modify service configurations.

If you do not have permissions, you must have access to someone at your company who does have the correct permission levels - typically root access.

Only the Pentaho BA Server will be deployed to the cluster.

It is possible to modify the configuration to deploy other WARs or EARs. However, for ease of testing and support, Pentaho only supports deployment of the pentaho and pentaho-style WARs to the cluster.

You must use a single repository location.

Most people use a database-based solution repository. Keep in mind that you are not clustering the database server in this procedure, only the application server.

You must have sticky sessions enabled.

This will tie your session to a single node.

Initialize and Configure Repository

After you have determined that your systems meet all of the requirements listed in the checklist, you need to first initialize and then configure the repository for clustering. Finally, there are a few steps to take in order to verify your clustering setup, before you move on to setting up the jackrabbit journal.

Initialize your database using the steps in the appropriate article for your system. Initialize Repository has sections for PostgreSQL, MySQL, MS SQL Server, and Oracle databases.

After you have initialized your database, you will need to configure the data connections to the BA Repository. Specify Connections walks you through the steps for JDBC and JNDI connections for PostgreSQL, MySQL, and Oracle.

The next step is to configure your repository using the appropriate tasks in the Configure Repository article.

After you have initialized and configured your repository, you should clean up these files by following these steps.

Locate the ...biserver-ee/tomcat directory and remove all files and folders from the temp folder.

Locate the ...biserver-ee/tomcat directory and remove all files and folders from the work folder.

Locate the ...biserver-ee/pentaho-solutions/system/jackrabbit/repository directory and remove all files and folders from the final repository folder.

Locate the ...biserver-ee/pentaho-solutions/system/jackrabbit/repository directory and remove all files and folders from the workspaces folder.

You now have a configured repository and are ready to move to the next step for clustering.

Configure Jackrabbit Journal

These directions explain how to set up the Jackrabbit journal for your cluster. Make sure that each node has a unique ID.

Locate the repository.xml file in the .../bi-server/pentaho-solutions/system/jackrabbit directory and open it with any text editor.

Scroll to the bottom of the file and replace the section that begins with <!-- Run with a cluster journal --> with the correct code for your type of database repository.

Jackrabbit journaling is now set up for your BA cluster. The Jackrabbit Wiki has additional information about journaling. Next, you need to cluster the quartz tables to avoid duplicate scheduling on each node.

Configure Quartz

There are a few edits that you will need to make in the quartz.properties file to configure Quartz to work with your cluster.

org.quartz.scheduler.instanceId = AUTO

Locate the quartz.properties file in the .../bi-server/pentaho-solutions/system/quartz directory and open it with any text editor.

Find the org.quartz.scheduler.instanceId = INSTANCE_ID line and change INSTANCE_ID to AUTO.

org.quartz.scheduler.instanceId = AUTO

Find the #_replace_jobstore_properties section and change the default value of org.quartz.jobStore.isClustered to true as shown.