AdSence

Sunday, March 22, 2009

TIBCO auto deployment

When you deploy ears at TIBCO it require the two things
1. Ears.
2. corresponding xml file from which ears properties will be taken.

How to deploy ears First Time:
First time deploy all ears manually and set all properties of ears like “prependToClassPath”, MaxHeapSize, etc..

We need to import xml file into our local derive.

One time activity

Steps to import existing xml file from tibco domain Go to that tibco machine and fire the following command
1. appmanage -batchExport -domain tdmarrsqa1 -user admin -pw qa123 -dir c:/TDMARRSQA1

-batchExport -> It export a AppManage.batch file with all ears and corresponding xml into target directory specified in –dir location

-domain : Tibco domain from which you wants to import the xml and ears.

-user : Tibco domain user name

-pw : Tibco domain password.

-dir : Target folder where all ears will be exported.

Now all ears and corresponding xml are now exported into target folder.

Steps to prepare auto deployment :
1. ‘AppManage.batch’ is xml based file modify the file with following entries


--app name: Application name on tibco domain .
--ear : Path of ears to be loaded at tibco .
--xml: path of xml file path which will import all ears properties from xml file.


2. for multiple application name specify the multiple node for each application.

Save the ‘AppManage.batch’ file.

Sample of AppManage.batch file








Please note all ears path, its ideal to give path like ‘ear= ’ so the we don’t need to copy the individual ears just copy the tibco’s target folder. XML path point to folder where all imported xml are present, as imported from above steps.

Create the .bat file for auto deployment script With following command

ECHO %DATE% %TIME% >tibcolog.LOG
ECHO ###STOPPING SERVICES###>>
tibcolog.LOG
appmanage -batchstop -domain -user -pw -dir >>
tibcolog.LOG
ECHO ###UNDEPLOYING SERVICES###>>
tibcolog.LOG
appmanage -batchUndeploy -
ECHO ###DELETE SERVICES###>>
tibcolog.LOG
appmanage -batchDelete -domain -
ECHO ###DEPLOYING SERVICES###>>
tibcolog.LOG
appmanage -batchDeploy -domain -
ECHO ###DEPLOYING ENDS###>>
tibcolog.LOG


Save the file with above commands don’t forget to replace the corresponding –domain , -user, -pw , -dir with correct values.


How to deploy New ears (automatically)

1. Copy tibco’s target folder contains ears from the latest build folder into the TIBCO machine where you have created all AppManage.batch, xml file, .bat file.

2. Just hit the .bat file created above and monitor the logs file for ears uploading progress.

3. just sit back and see the auto deployement.

No comments:

Post a Comment