Tuesday, November 27, 2018

AppManage Commands - To deploy applications in TIBCO Administration domain


       AppManage is an command line utility used to perform different administrative activities. This utility is used to create an XML based deployment configuration file in which deployment options can be defined. This Utility also uploads the deployment file and EAR file, deploy, start, stop and undeploy the applications accross an TIBCO Administration domain.

       Even we have TIBCO Administrator GUI tool to perform all these list of administrative tasks in an TIBCO Administration domain.

       But in real time, we won't prefer to go with the GUI deployments as we have to deploy our applications accross different Environments and even accross differenet TIBCO domains, This requires automation of your deployments by using DevOps integrations tools like Jenkins, CA release automation tools and even go with the scripted deployments. AppManage utility is used to integrate with these DevOps tools to automate your deployments.

To demonstrate, We have used the domain created in earlier post : TIBCO Administration Domain Creation using Domain Utility in GUI Mode and we consider below "TechsNibApp" application to deploy it in an administration domain using AppManage utility and even we see other useful list of AppManage commands :

As show above, we can build the ear either by using TIBCO Designer in GUI mode (or) we can use buildear utility in command line mode.

To know, how to build ear using buildear utility, follow the earlier post on : buildear utility usage in TIBCO BW

STEP-1 : Create the ear(TechsNibApp.ear) file either by using designer or by using buildear utility.

STEP-2 : Create the deployment configuration file.

The AppManage utility and AppManage.tra file are installed in the <<TIBCO_HOME>>\tra\version\bin directory. Navigate to this location through command prompt and run below command by passing required parameters mentioned as below :

AppManage -export -ear F:\TIBCO\BW\ear\TechsNibApp.ear -out F:\TIBCO\BW\ear\TechsNibApp.xml

Summary of options used :

-export  --> To export the deployment configuration file

-ear     --> Name and location of the ear file

-out     --> Name and location of the deployment configuration file

STEP-3 : Edit the deployment configuration file and update the bindings by passing BW machine name (which is part of a TIBCO Administration Domain) on which we are going to deploy our application.

As we are deploying it to TIBCO domain exists in local PC, So updated the machine name with PC host name as below :
and if you want to update the Global Variables then you can update the values under below section :

<NVPairs name="Global Variables">
     |
     |
     |
</NVPairs>

STEP-4 : Deploy the application with below AppManage command by passing required parameters.

AppManage -deploy -ear F:\TIBCO\BW\ear\TechsNibApp.ear -deployconfig F:\TIBCO\BW\ear\TechsNibApp.xml -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-deploy   --> To deploy the application in specified domain

-ear     --> Name and location of the ear file

-deployconfig --> Name and location of the deployment configuration file

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

STEP-5 : Check the configuration of deployed application through TIBCO Administrator GUI.

STEP-6 : Start the application either through below AppManage command (or) from TIBCO Administrator GUI.

AppManage -start -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-start   --> To start the application in specified domain

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password


Even you can go through the below list of other useful AppManage commands :

--> To export deployment configuration file from an application deployed in TIBCO Administration domain.

AppManage -export -out F:\TIBCO\BW\ear\TechsNibApp.xml -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-export  --> To export the deployment configuration file

-out     --> Name and location of the exported deployment configuration file

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

--> To export both deployment configuration file and EAR file for an application deployed in TIBCO Administration domain.

AppManage -export -out F:\TIBCO\BW\ear\TechsNibApp.xml -genEar -ear F:\TIBCO\BW\ear\TechsNibApp.ear -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-export  --> To export the deployment configuration file

-out     --> Name and location of the exported deployment configuration file

-genEar  --> Specify to generate ear from deployed application

-ear     --> Name and Location of the exported ear

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

--> Consider we have a change in both archive(ear) and deployment configuration files and if we want to deploy our changes then we can do it as follows :

i. Build the ear as mentioned in the STEP-1.

ii. Export the deployment configuration file(TechsNibApp_1.xml) from ear and then compare it with previous deployment configuration file (TechsNibApp.xml). When we run the below command, a log file(TechsNibApp_1.xml.log) is generated in the same folder where the new deployment configuration file is created. The Log file lists all changes that were made to the deployment configuration file,as a result of changes to the ear file

AppManage -export -ear F:\TIBCO\BW\ear\TechsNibApp.ear -deployconfig F:\TIBCO\BW\ear\TechsNibApp.xml -out F:\TIBCO\BW\ear\TechsNibApp_1.xml

Summary of options used :

-export  --> To export the deployment configuration file

-ear     --> Name and location of the ear file

-deployconfig --> Name and location of the deployment configuration file

-out     --> Name and location of the exported deployment configuration file

iii. Take the reference of log file and Update the new deployment configuration file like machine bindings, global variable changes etc.

iv. Once you done with the changes then you can deploy the application by passing the new deployment configuration file.

AppManage -deploy -ear F:\TIBCO\BW\ear\TechsNibApp.ear -deployconfig F:\TIBCO\BW\ear\TechsNibApp_1.xml -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-deploy   --> To deploy the application in specified domain

-ear     --> Name and location of the ear file

-deployconfig --> Name and location of the deployment configuration file

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

--> We can use AppManage Utility to stop an application (or) to stop just one service in an application.

To stop all services in an application :

  AppManage -stop -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

To stop specific service in an application :

  AppManage -stop -app TechsNibApp -service "Process Archive.par" -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-stop    --> To stop the application in specified domain

-service   --> To specify the service name, either it may be process archive (or) adapter archive.

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

--> We can use AppManage Utility to undeploy the application but application will remain in domain, in an undeployed state.

AppManage -undeploy -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib

Summary of options used :

-undeploy --> Specify to undeploy the application

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

--> We can use AppManage Utility to undeploy and delete the application in one operation using "-force" option. If you try to delete the deployed application without specifying the "-force" option then command will throw an error.

AppManage -delete -app TechsNibApp -domain TechsNib_Domain -user TechsNib -pw TechsNib -force

Summary of options used :

-delete   --> Specify to delete the application from an administration domain

-app      --> Application Name of the deployed application, same will be visible in TIBCO Administrator GUI

-domain  --> Domain name to which application is deployed

-user    --> Administrator user name

-pw      --> Administrator user password

-force  --> Specify to perform both undeploy and delete in one operation

   Please note we can check the logs of AppManage command executed in TIBCO administrative domain in <<TIBCO_HOME>>\tra\domain\<<Domain_Name>>\logs\ApplicationManagement.log file.

Follow the post on : AppManage Commands - To deploy applications in Batch Mode



No comments:

Post a Comment

back to top