Pages

Friday 15 November 2013

EAR Deployment Through Scripts(Scripted Deployment)

Scripted Deployment:

Deployment through scripts is called scripted Deployment.
Why Scripted deployments?
there are several advantages of having a fully scripted deployment versus performing the deployment via administrator ui, the main ones can be summarized as follows:

  • minimized typos and human error: each time you perform a complex operation manually there is a chance that you'll make a typo or forget one step of the work process.
  • having a repeatable process: by scripting the deployment you are sure that things will happen always in the same order and in the same way.
  • improve performances: having to manually validate, build, deploy and configure an artefact is very time consuming, scripts allow you to perform these steps safer and faster.
  • reduce work load on system administrators: managing a system may require considerable efforts, having scripts to automate common operations allows sysadmins to focus on keeping the platform healthy and running rather than getting stuck on repetitive jobs.
  • governance: using script allows you to generate logs that can be used both for debugging and tracing who-did-what-when.
 
Scripts provide you a much better "release management experience" than performing the operations via UI.


If we want to deploy EAR into domain we need to use following Utilities
  1. Buildear.
  2. Appmanage.
     
To deploy Simple application in administration domain configure enterprise archive in designer and build the ear by using Buildear utility. And export deployment configuration file by using appmanage utility. now configure the exported  xml file i.e provide all required binding parameters. now deploy  EAR with deployment configuration  in the administration domain using appmanage utility.
Buildear Utility:-

LOCATION OF Buildear Utility
The buildear utility(buildear.exe) and the buildear.tra file are installed in the TIBCO_HOME/tra/version/bin directory.


Starting Buildear


To start the buildear utility, change directory to TIBCO_HOME/tra/version/bin
and type buildear -options.You should verify your project by loading it into TIBCO Designer before you use the project with the buildear utility. If the project doesn't load correctly in TIBCO Designer, the buildear utility doesn't support it.

Buildear Utility


The buildear utility builds an EAR file based on the Enterprise Archive resource that is defined in a TIBCO Designer project. The project directories and files must be writable so that buildear can save the file. When saving, buildear increments the archive build number and saves it to the project. An EAR file size can be very large. You should ensure that the machine on which the EAR file is loaded and deployed has sufficient disk space
Command:-


buildear –h –x –a –v -s -ear <uri>  -o <name and location of ear> -p <Project location>


The -s option is saves the archive as another version in the project.

The -ear option allows you to provide the location of the archive resource that contains the changed components. You can get the archive resource URI in TIBCO Designer by selecting the archive and clicking Resource > Inspect Resource.The Resource Inspector dialog shows the URI next to the icon



The -o option identifies the location and name of the output EAR file. The EAR file name must use the .ear suffix. If not specified, the EAR file locationfor the Enterprise Archive is used
The -p option provides the location of the TIBCO Designer project where the archive has been created.
Example:-
Buildear –x –v -s -ear /filenotify.archive -o c:\ears\deployment\filenotify.ear -p c:\tibco\projects\filenotify



AppManage Utility:-


LOCATION OF AppManage Utility
The AppManage utility(AppManage.exe) and the AppManage.tra file are installed in the TIBCO_HOME/tra/version/bin directory. The AppManage.jar file is installed in the TIBCO_HOME/tra/version/lib directory.


The AppManage utility can be used to:
  • Create a deployment configuration file based on information in an EAR file.




In the exported xml we need to provide binding parameters as shown in the below screenshot.


  • Create a deployment configuration file from an application already configured in the TIBCO Administrator GUI.


  • Upload an EAR file to an administration domain without specifying
deployment configuration options. After the file is imported, it is ready to be
configured with deployment options and deployed using the TIBCO
Administrator GUI.
  • Upload an EAR file and a deployment configuration file into an
administration domain in one operation. The application is uploaded with its
deployment options set, but is not deployed.
  • Upload an EAR file and a deployment configuration file and deploy the
application in one operation. Using this method, you can quickly deploy your
applications in multiple domains.




  • Export all application archives and deployment configuration files within a
domain, so they can be batch deleted, started, stopped, undeployed, or
deployed in another domain.

  • Undeploy a deployed application.



  • Delete an application from an administration domain.


Before we deleting  the application we need to undeploy the application.






If we want to delete application without undeploying  application we need to use –force which makes  you delete  the application forcefully.





  • Start a service instance of an application.





  • Stop a successfully deployed service instance of an application













3 comments:

  1. Hi Venkatesh,,,,,,,

    Scripted Deployment concept is very good.... This is usefull for me...........

    ReplyDelete
  2. Really good one venkatesh...
    I am new to tibco and trying to understand how it works. Can you help me with any link that provides information about each component and how it works across...

    ReplyDelete