quinta-feira, 31 de outubro de 2013

CBFL – A modified version of CTools CBF

There are no doubts about the benefits for using CTools CBF. Good blog posts are available about it.


For those ones that need customize Pentaho source code to change or include new features, CBF is the best option.

But, why do I need to compile the entire source code of Pentaho if there is no change in the source code? How to use Pentaho bundled package instead?
 
To addressing those questions, I’ve made some changes on CBF to use Pentaho bundled package instead of Pentaho source code. Moreover, I’ve also added some new features that I think be important.

CBFL was tested only on CE and can be found on http://code.google.com/p/cbfl/ .

I won’t go deep in how to use CBFL, however I’ll show mainly the new features on CBFL (Community Build Framework Light).

To see all the options available, run:

# ant -Dproject=samples -Denv=48_dev –p

OptionDescription
allApply the patches and runs the solution
apply-patchApply the patches
clean-solutionDeletes the pentaho-solutions of the project
deploy-allApply patches and deploys both the solution and the server to the specified destinations
deploy-serverApply patches and deploys the entire server to the specified destination
deploy-solutionApply patches and deploys the solution to the specified destination
dist-cleanDeletes the target preconfigured
listList build files of a project
runRuns the solution
stopStops the solution
zipZIP the solution


Feature #1: apply-patch option
Copy Pentaho software to target directory and apply all patches.

This option execute also: dist-clean


Feature #2: clean-solution option
Remove the cbfl/project-samples/pentaho-solutions folder created in the apply-patch process.

CAUTION: If you use CBFL for development, you can loose projects inside the folder.


Feature #3: list option
Many config file can be created to fit specific needs for the same project, such as production.properties / dev.properties OR joe.properties / suse.properties.

List option will print on screen all files within config directory.


Feature #4: stop option
If you use CBFL for development, you can use stop option to shutdown Pentaho server.


Feature #5: zip option
A very useful option, allow you to generate a new bundled package with all patches.

The zip file generated will keep the same structure found on original Pentaho bundled package.


Feature #6: delete_list.xml config file
Is advised when installing a new version of a plugin, for instance CDF/CDA/CDE, delete the previous version of it.

Sometimes you also need to update some lib, such as a new version of Mondrian. So, you need before delete the old version of .jar file to copy the new one.

Use the config/delete_list.xml file to configure properly all folders and files that you wish to delete before.


Feature #7: rename_list.xml config file
When building a new package (zip file), the files specified in the config file will be renamed for a versioned name.

This will guarante you that some files won't be override when unziping the new package in the pentaho server.


Feature #8: patches-private option
We had a need to do a specific configuration for a server. But that wasn’t possible using just tokens.

So, patches-private gives you a second level to apply the patches. In our case, we used this second level to copy customized configuration files


Feature #9: MANDATORY token configuration
Is mandatory defining the token @SOLUTION.PATH@ on web.xml file.

For that, edit project-samples/patches/biserver-ce/tomcat/webapps/pentaho/WEB-INF/web.xml file and configure:

<context-param>
       <param-name>solution-path</param-name>
       <param-value>@SOLUTION.PATH@</param-value>
</context-param>

That configuration set up the correct location of pentaho-solutions folder when starting pentaho from cbfl or from the zip file.


Feature #10: MANDATORY token configuration
Is mandatory defining the token @SAMPLE.CATALOGS@ on datasources.xml file.

For that, edit project-samples/patches/biserver-ce/pentaho-solutions/system/olap/datasources.xml file and replace:

<Catalog name="SteelWheels">
 <DataSourceInfo>Provider=mondrian;DataSource=SampleData</DataSourceInfo>
 <Definition>solution:steel-wheels/analysis/steelwheels.mondrian.xml</Definition>
</Catalog>
<Catalog name="SampleData">
 <DataSourceInfo>Provider=mondrian;DataSource=SampleData</DataSourceInfo>
        <Definition>solution:steel-wheels/analysis/SampleData.mondrian.xml</Definition>
</Catalog>

for

@SAMPLE.CATALOGS@

That configuration will set up the sample catalogs only if you defined copy.pentaho.samples=TRUE.


Enjoy.

Nenhum comentário: