Monday, July 23, 2007
Deployment Framework for TIBCO BusinessWorks v.0.1 with Ant
During the last several TIBCO BusinessWorks (BW) projects that I worked on, I continuously kept hitting the same type of deployment problems. Imagine a common integration project where a team of BW developers are building services, interfaces and adapters. You also have at least three environments: DEV (local development machines), TEST (QA) and PRODUCTION. Every time when you migrate the solution from DEV to TEST, then from TEST to PRODUCTION most of the environment settings are different. How do you make sure that the deployment is successful and that all settings are correct? Can you follow continuous integration best practices during the development of a BW solution? Can you deliver a set of scripts, so even a less experienced administrator can deploy your application?
In order to answer these questions and make my life easier I have decided to write a set of custom ant tasks and a configuration utility based on Excel. Usually all the BW development is done on a Windows environment, and that is why I stick to it as a prerequisite. What else do I run?
- Microsoft Windows XP, SP2
- Microsoft Excel 2003
- TIBCO Runtime Agent 5.5
- TIBCO BusinessWorks 5.4
- TIBCO Administrator 5.4
- Apache Ant 1.7
I assume that the reader is familiar with Ant, build scripts and automated deployment in general. Make sure that the tool is successfully installed by running "ant" in a command prompt and verify the tool output.
For a quick start with the deployment framework:
- Download the framework from here;
- Unzip the archive file to a new local directory;
- Modify the EchoService\build.xml file and make sure that all properties are valid. For example the path to the TRA, the path to the BW source files, etc.
- Go to the EchoService\settings directory and modify the environment settings accordingly. By default, the script will use the settings for the TST environment;
- Return back to the EchoService directory and run "ant".
That's it! What you have just done is:
- Built an EAR file from a BW project automatically;
- Reconfigured the environment specific global variables;
- Deployed the EAR file in TIBCO Administrator.
Start using the framework in your own BusinessWorks projects by copying the build.xml file, and both lib and settings directories into your source folder structure. A best practice is to keep all BW source files in the same parent directory ("src" in the sample project). You can extend the framework by modifying the build scripts or by developing custom ant tasks.
Sources: ant-tibco-0.1.zip.
