Adding commands to the bundle

The Remote Deploy Bundle Editor allows you to opt for a set of default copy commands that copy the files in your bundle to a set location. If this option is selected, then a copy command is generated for each file in your bundle project. The default copy location is |INSTALLDIR|. This is a special remote deploy variable that, if not set on the deploy command line, defaults to CANDLEHOME. To change the location specified by INSTALLDIR, specify the KDY.INSTALLDIR property when running the addSystem command.

The same directory structure specified in your bundle project is replicated in |INSTALLDIR|. For example, if there is a folder named config in your bundle project with a file named myprod.config, then the copy command generated copies the file to |INSTALLDIR|/config/myprod.config when the bundle is deployed.

In addition, you can specify additional commands to run during the deploy. To do this, click Add in the Commands section of the Remote Deploy Bundle Editor. In the Command window Figure 302, select the type of command (Preinstall, Install, Post-Install, or Uninstall) and then specify the command to run.

Figure 302. Command window
Command window

You must specify the fully qualified path to the command you want to run. For convenience, remote deploy provides a set of predefined variables. To reference the variable for a command, surround the variable with vertical bars, for example, |DEPLOYDIR|. Table 57 describes the predefined variables for commands.

Table 57. Predefined Variables for Commands
Variable Description
DEPLOYDIR The temporary directory on the endpoint where the bundle resides during the deploy. For example, if you wanted to run myscript.sh, a script that was included in your bundle, you would specify the following command: |DEPLOYDIR|/myscript.sh
INSTALLDIR Either CANDLEHOME or the value of KDY.INSTALLDIR if specified on the addSystem command.
CANDLEHOME The IBM® Tivoli® Monitoring installation directory.

Finally, select the operating systems on which the command is to run.