The TIBCO Appmanage utility is a powerful tool for a TIBCO administrator professional. With this, you can get a deployment configuration file from ear file or from TIBCO administrator GUI without logging in to admin GUI. Read more about AppManage and commands in my previous post, appmanage-commands-in-tibco.

Now let’s go through the steps for Batch Deployment.

Step 1: Place all the EAR and Configuration file in a common directory.

Create a directory under /opt/tibco/tra/<version>/bin and place all the XML and EAR file inside it which you need to deploy in the particular domain. You can create this directory anywhere you need, In my case, I choose this directory as I am running AppManage command from here and for better management.

Created the directory my batch under /opt/tibco/tra/5.10/bin/MYBATCH. Now we need to copy the EAR and XML file to this directory. If you don’t have the Configuration XML file, you can create it from the EAR using the below AppManage command.

./AppManage -export 
            -out /opt/tibco/tra/5.10/bin/MYBATCH/applicationName_1.xml 
            -ear /opt/tibco/tra/5.10/bin/MYBATCH/applicationName_1.ear

This command will create applicationName_1.xml under MYBATCH directory. Now you need to edit the XML to change any Global variable value if needed.

Step 2: Creating AppManage.batch file

For AppMange batch deployment, AppManage.batch is the most important file. In this file, you need to give the location of an EAR, Configuration XML, and Application path. Below is sample AppManage.batch file.

<?xml version="1.0" encoding="UTF-8"?>
<apps>
  <app name="Folder/application" 
  ear="/opt/tibco/tra/5.10/bin/MYBATCH/application.ear" 
  xml="/opt/tibco/tra/5.10/bin/MYBATCH/application.xml"/>
  <app name="Folder/applicationName_2" 
  ear="/opt/tibco/tra/5.10/bin/MYBATCH/applicationName_2.ear" 
  xml="/opt/tibco/tra/5.10/bin/MYBATCH/applicationName_2.xml"/>
  <app name="Folder/applicationName_3" 
  ear="/opt/tibco/tra/5.10/bin/MYBATCH/applicationName_3.ear" 
  xml="/opt/tibco/tra/5.10/bin/MYBATCH/applicationName_3.xml"/>
</apps>

Here app name tag is to point out under which directory application needs to get deployed. And EAR & XML tag is to give the path of these two files. Once this step is completed you are ready to run the batch deployment command.

Step 3: Run batch deployment command

Run the AppManage batch deployment command from /opt/tibco/tra/<version>/bin. In this case, the command will look like the below one.

./AppManage -batchDeploy 
            -domain DOMAIN_NAME 
            -user tibco -pw 'tibco' 
            -dir  /opt/tibco/tra/5.8/bin/MYBATCH -nostart

Once you run this command, it will look for the AppManage.batch file under MYBATCH folder and execute each deployment using the EAR and XML file which we provided in the batch file.  And you can see it in the screen as well like the below screenshot

Also, you can refer the ApplicationManagement.log file in case of any failure in the deployment. Even if any application got failed while deploying, the command won’t stop the execution. It will move to the next one and continue its execution until it deploys the last on the batch file.

Leave a Reply

Your email address will not be published. Required fields are marked *