...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Author and Maintainer: Pedro Alves |
Info | ||
---|---|---|
| ||
Released version 3.7.0 compatible with pentaho 3.7 |
Table of contents
Table of Contents | ||||
---|---|---|---|---|
|
Concepts
Overview
Community Build Framework (CBF) is an ant build.xml file script and alternate way to setup and deploy Pentaho based applications. Focused on a multi-project/ multi-environment scenario, here are the main characteristics:
...
- Supports deploy to local/remote machines
- OS independent
Description
Project pentaho already has a good dev_build.xml ant script, but it wasn't enough for my needs, since I needed to change the svn sources in order to configure a solution. So I built my own structure, and its like this:
Directory layout and code checkout
Code Block |
---|
MyProjectDir |-- build.xml |-- pentaho | |-- bi-platform-api | |-- bi-platform-appserver | |-- bi-platform-assembly | |-- bi-platform-assembly-open | |-- bi-platform-build | |-- bi-platform-engine-core | |-- bi-platform-engine-security | |-- bi-platform-engine-services | |-- bi-platform-legacy | |-- bi-platform-plugin-actions | |-- bi-platform-plugin-services | |-- bi-platform-repository | |-- bi-platform-sample-data | |-- bi-platform-sample-solution | |-- bi-platform-scheduler | |-- bi-platform-test-foundation | |-- bi-platform-ui-foundation | |-- bi-platform-util | |-- bi-platform-web | |-- bi-platform-web-portlet | |-- bi-platform-web-servlet | |-- dummy-jre | |-- mantle | `-- test-solutions |-- project-client | |-- patches | | |-- pentaho | | `-- target-preconfiguredinstall | `-- solution |-- target-build `-- target-dist |
...
Aside: Heres a screenshot of all the files I changed to make pentaho 3.0 work for me:
Configuration files
The main config file is in config/build.properties; specific environment configurations can then be set in config/build-env.properties . Here's an example file:
Code Block | ||||
---|---|---|---|---|
| ||||
##################################### ## GENERIC PROPERTIES ###################################### javac.path = NOT SET # Solution path. Required for compile time # Set this to the absolute path to project-client/solution solution.path = NOT SET # Solution path required for runtime. Defaults to the above value but can be different if we're # deploying to another place. Should be used in WEB-INF/web.xml in the solution-path parameter solution.deploy.path = NOT SET #accepted values: tomcat or jboss server.name = tomcat # Tomcat 5.5 path: tomcat.path = NOT SET # Copy the sample solutions to our project directory? true | false copy.pentaho.samples = true # Java options for the run command java.opts = -Xmx512m -XX:MaxPermSize=512m -Xrunjdwp:transport=dt_socket,address=8765,server=y,suspend=n ##################################### ## PROJECT DIRECTORIES - The defaults usually work fine ###################################### pentaho.dir = pentaho/ pentaho.build.dir = target-build/ ##################################### ## DEPLOY OPTIONS ###################################### deploy.mode = rsync deploy.args = -avz --exclude '.svn/' --exclude '*.log' --exclude 'work/' --exclude 'temp_user/' --exclude 'temp/' --exclude 'tmp/' deploy.dest.server = user@host:path deploy.dest.solution = user@host:path ##################################### ## DYNAMIC TOKENS TO BE USED AS FILTERS ##################################### DB_LOCATION = 127.0.0.1 DB_USER = pedro DB_PASSWORD = bar BASE_URL = http://127.0.0.1:8080/pentaho/ |
Tokens
To extend customization to a greater extent, I've implemented dynamic filter tokens for changeable attributes, such as database locations and passwords. Whenever CBF finds a text file with a string of the form ( (DB_LOCATION)) that token will be replaced at compile time.
CBF execution and available targets
Building and executing
After all this environment is correctly set up, CBF is ready to be executed. ant executable needs to be on the path and the properties project and optionally env need to be passed. If no env property is passed only build.properties will be used.
...
Just by passing different properties we can immediately build and run a totally different project, in a different platform version or different application server. With the right properties and tokens, we can instantly deploy a solution in a remote server.
Deploy
Despite the property deploy.mode, only the rsync method is currently supported. It's by far the most appropriate way to handle my kind of requirements, but a lot more modes can be implemented, like copy, scp or even ftp transfer.
Debug
With the appropriate JAVA_OPTS parameters, all that's needed to debug the platform is do a socket attach using your favorite IDE.
Ctools
Starting from version 3.10.1, there is an additional target named ctools that can automatically execute the ctools-installer.sh available here. You need to save the script in your CBF root (same folder where you have build.xml) and add the following properties in build.properties in order to have it working:
...
Code Block |
---|
ant -Dproject=client dist-clean all run |
Download
Anchor | ||||
---|---|---|---|---|
|
- CBF Version 3.10.1 - ctools bundle
- This version works with Pentaho 3.10.0 Stable. It allows automatic setup of ctools (see above Ctools section)
- CBF Version 3.7.0
- This version works with Pentaho 3.7.0 Stable
- CBF Version 3.5.0
- This version works for pentaho 3.5 branch as of 9/31/09
- CBF Version 3.0.1
- This version works for pentaho 3.0 branch as of 5/21/09
- CBF Version 3.0
- This version does NOT work out of box for pentaho 3.0 branch as of 5/21/09
- CBF Version 2.1-RC1
- CBF Version 2.0
- CBF Version 1.0
Old versions
Anchor | ||||
---|---|---|---|---|
|
FAQ
I don't have any questions. Do you?
Changelog
Version | Changes |
---|---|
3.10.1 | Support for pentaho 3.10. It can install ctools script. |
3.5.0 | Suuport for pentaho 3.5 |
3.0.1 | No longer required to manually handle system/admin folders. Project revision no longer set |
3.0 | Support for Pentaho 3.0 |
2.1 | Support for Pentaho 2.x |
2.0 | Major changes; Introduced different configurations and deployments; dynamic tokens; deploys |
1.0 | Initial CBF |