There are no doubts about the benefits for
using CTools CBF. Good blog posts are available about it.
Read http://pedroalves-bi.blogspot.co.uk/2012/09/cbf-and-versioning-how-to-develop.html and http://diethardsteiner.blogspot.com.br/2013/10/going-agile-pentaho-community-build.html.
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
Option | Description |
---|---|
all | Apply the patches and runs the solution |
apply-patch | Apply the patches |
clean-solution | Deletes the pentaho-solutions of the project |
deploy-all | Apply patches and deploys both the solution and the server to the specified destinations |
deploy-server | Apply patches and deploys the entire server to the specified destination |
deploy-solution | Apply patches and deploys the solution to the specified destination |
dist-clean | Deletes the target preconfigured |
list | List build files of a project |
run | Runs the solution |
stop | Stops the solution |
zip | ZIP the solution |
Feature #1:
apply-patch option
Copy Pentaho software to target directory and
apply all patches.
This option execute also: dist-clean
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
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.
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.
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.
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.
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
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:
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:
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@
Enjoy.
Nenhum comentário:
Postar um comentário