2. Setting Up Pentaho
-
Download and install Pentaho Community Edition from https://community.hds.com/community/products-and-solutions/pentaho/:
-
Downloads → Main Downloads → Business Analytics Platform
-
-
Download Saiku Analytics plugin (Meteorite BI) from http://www.pentaho.com/marketplace/ and install it.
-
Move the
saiku
folder to the$PENTAHO_HOME$/pentaho-server/pentaho-solutions/system
directory, where$PENTAHO_HOME
is the directory where Pentaho is installed. -
The Saiku plugin doesn’t work with the latest version of Pentaho Server. Do the following to fix the problem:
-
Remove the
cpf-core-6.0.0.0-353.jar
andcpf-pentaho5-6.0.0.0-353.jar
libraries from$PENTAHO_HOME$/pentaho-server/pentaho-solutions/system/saiku/lib
folder. -
Copy the following libraries from
$PENTAHO_HOME$/pentaho-server/pentaho-solutions/system/sparkl/lib
to$PENTAHO_HOME$/pentaho-server/pentaho-solutions/system/saiku/lib
folder:
cpf-core-7.1.0.0-12.jar cpf-pentaho-7.1.0.0-12.jar cpk-core-7.1.0.0-12.jar cpk-pentaho5-7.1.0.0-12.jar
-
-
Access the http://licensing.meteorite.bi and sign up for a new account. Once you have validated your account, create a new company and generate the community license for it:
-
Login to the system and click the CREATE NEW LICENSE button.
-
On the new license page, set the license type to COMMUNITY_EDITION.
-
Save and download the license. Rename the file to
license.lic
and then copy it to the$PENTAHO_HOME$/pentaho-server/pentaho-solutions/system/saiku
-
-
Download and install Pentaho Data Integration from https://community.hds.com/community/products-and-solutions/pentaho/:
-
Downloads → Main Downloads → Data Integration
-
-
Change Pentaho default port to 8081:
-
Navigate to
$PENTAHO_HOME/pentaho-server/tomcat/conf
. -
Change default Tomcat port to 8081 in the
server.xml
:
<Connector URIEncoding="UTF-8" port="8081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="18443" />
-
-
Change the Tomcat shutdown port to 8015 in the
server.xml
to avoid collision with CUBA default shutdown port:<Server port="8015" shutdown="SHUTDOWN"> ... </Server>
-
Setup authentication of CUBA users in Pentaho:
-
Download https://dl.bintray.com/cuba-platform/main/com/haulmont/addon/bi/cuba-bi-pentaho/1.2.1/cuba-bi-pentaho-1.2.1.jar and copy it to
$PENTAHO_HOME$/pentaho-server/tomcat/webapps/pentaho/WEB-INF/lib
. -
Create new
cuba-pentaho-community-authentication.xml
file in the$PENTAHO_HOME/pentaho-server/pentaho-solutions/system
folder with the following content:<?xml version="1.0" encoding="UTF-8"?> <!--+ | Application context containing FilterChainProxy. +--> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:sec="http://www.springframework.org/schema/security" xmlns:pen="http://www.pentaho.com/schema/pentaho-system" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-4.1.xsd http://www.pentaho.com/schema/pentaho-system http://www.pentaho.com/schema/pentaho-system.xsd" default-lazy-init="true"> <!-- ======================== FILTER CHAIN ======================= --> <!-- if you wish to use channel security, add "channelProcessingFilter," in front of "httpSessionContextIntegrationFilter" in the list below --> <bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy"> <constructor-arg> <util:list> <sec:filter-chain pattern="/webservices/**" filters="securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,cubaAuthenticationFilter,basicProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS" /> <sec:filter-chain pattern="/api/repos/**" filters="securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,cubaAuthenticationFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS,preFlightFilter" /> <sec:filter-chain pattern="/api/**" filters="securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,cubaAuthenticationFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS" /> <sec:filter-chain pattern="/plugin/reporting/api/jobs/**" filters="securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS,preFlightFilter" /> <sec:filter-chain pattern="/plugin/**" filters="securityContextHolderAwareRequestFilterForWS,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilterForWS,filterInvocationInterceptorForWS" /> <sec:filter-chain pattern="/**" filters="securityContextHolderAwareRequestFilter,httpSessionPentahoSessionContextIntegrationFilter,httpSessionContextIntegrationFilter,httpSessionReuseDetectionFilter,logoutFilter,authenticationProcessingFilter,cubaAuthenticationFilter,basicProcessingFilter,requestParameterProcessingFilter,anonymousProcessingFilter,sessionMgmtFilter,exceptionTranslationFilter,filterInvocationInterceptor" /> </util:list> </constructor-arg> </bean> <bean id="cubaAuthenticationProvider" class="com.haulmont.addon.bi.pentaho.CubaAuthenticationProvider"/> <!-- ======================== AUTHENTICATION ======================= --> <bean id="authenticationManager" class="org.springframework.security.authentication.ProviderManager"> <constructor-arg> <util:list> <ref bean="cubaAuthenticationProvider"/> <pen:bean class="org.springframework.security.authentication.AuthenticationProvider"/> <ref bean="anonymousAuthenticationProvider" /> </util:list> </constructor-arg> <property name="eraseCredentialsAfterAuthentication" value="false" /> <property name="authenticationEventPublisher"> <ref bean="defaultAuthenticationEventPublisher" /> </property> </bean> <bean id="cubaAuthenticationFilter" class="com.haulmont.addon.bi.pentaho.CubaPentahoAuthenticationFilter"> <property name="userRoleDao"> <ref bean="userRoleDaoTxn" /> </property> <property name="authenticationManager"> <ref bean="authenticationManager" /> </property> <property name="extraRoles" ref="extraRoles" /> <property name="cubaConnectionUrl" value="http://localhost:8080/app"/> </bean> </beans>
TipSpecify URL of your CUBA application in the
cubaConnectionUrl
property of thecubaAuthenticationFilter
bean:<property name="cubaConnectionUrl" value="http://localhost:18080/app"/>
-
Edit
pentaho-spring-beans.xml
inpentaho-solutions/system
and add the line<import resource="cuba-pentaho-community-authentication.xml" />
after the<import resource="applicationContext-spring-security.xml" />
line:<import resource="applicationContext-spring-security.xml" /> <import resource="cuba-pentaho-community-authentication.xml" />
-
-
Start Pentaho Server:
-
Navigate to the
$PENTAHO_HOME$
directory. -
Run
start-pentaho.bat
-