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?

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:

  1. Download the framework from here;
  2. Unzip the archive file to a new local directory;
  3. 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.
  4. Go to the EchoService\settings directory and modify the environment settings accordingly. By default, the script will use the settings for the TST environment;
  5. Return back to the EchoService directory and run "ant".

That's it! What you have just done is:

  1. Built an EAR file from a BW project automatically;
  2. Reconfigured the environment specific global variables;
  3. 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

Technorati Tags: , , ,

del.icio.us Tags: , , ,

Comments:
Hello,

I havent' tried it yet, But I am not sure what great funcationality it adds. Since we are going to create configuration files manually for all three environments, we can just add create ear, configure and deploy appmanage commands in a shell script and run it. Let me know, If gorssly missed something.

R
 
You don't have to create the configuration files manually, check the EnvironmentSettings.xls file. You can keep it in your code repository as well. When you add a new global variable, just put a new row and modify the values accordingly. Another advantage is that you can deploy all with a single operation, minimizing errors that might occur during manual operations. You can also let an administrator deploy the components for you, and ask them to send you the ant log file if errors occur (easier to debug misconfigurations of the target environment).
 
I Nikola, I'm trying to use the Deployment Framework, but I've got some errors when I execute the Ant. Can you help me?
 
Dear Leonard,

Please post your ant log file, so I can take a look at it. Additionally you can put your contact details so I can get in touch with you by e-mail.

- Nikola.
 
Thanks, Nikola, for putting this framework together.

I have it configured and almost have it working. Maybe you know how to solve this issue.

All the steps worked fine until I got to the deployment part.

Here's the output:

[deployear] Checking if master server is responding ...
[deployear] Finished checking
[deployear] Failed. Master server is either down or too busy to respond within 10 seconds

I am not sure why it takes longer than 10 sec for this machine to respond. Any suggestions on how I can fix this?

Thanks

H
 
Hi Hartim,

It's great, that you are using the framework! I am happy to hear, that more and more people are using it. I will appreciate if you send me your comments, as I might be able to fix issues if any arise.

With respect to the deployment issue, that you have: check the exact case/spelling of the TIBCO Administrator node name. I have had that issue before, when the server was for example SERVER001 in TIBCO Administrator and I had server001 in my deployment scripts.

Hope this helps,
- Nikola
 
At KPN we try to do something similar.
See also my
Hudson page.
One of our problems is that we can not control the java and log file settings within AppManage. AppManage does not seem to recognize the <setting> tag in the deployment file. What is your experience ?
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?