Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Deploying and Managing Engines with MM : Deploying, Starting, Stopping PUs with the MM-tools Utility

Deploying, Starting, Stopping PUs with the MM-tools Utility
This section explains how to deploy engines and start and stop remote engines (PUs) at the command line using the MM command line utility, mm-tools.
All engines have to be predefined in the site topology file.
Before you can use the mm-tools utility you must configure it. Optionally, you can authenticate a user using certificates when performing deploy and remote start and stop operations, which requires additional configuration.
Configuring the MM Tools Utility TRA File
Before you can use the mm-tools utility, you must configure the mm-tools.tra file to reference the cluster’s site topology file.
Prerequisite Configuration
In addition, the mm-tools.tra file must be configured as explained in this section.
To Configure the mm-tools.tra File
1.
BE_HOME/mm/bin/mm-tools.tra
2.
   September 10, 2014 2:05 pm.topology.file pathToTopology/toplogy.st
3.
For remote start, if the start-pu-method in the site topology file is Hawk, and you use non-default values, uncomment and specify the following Hawk properties. Use the values that are configured for the Hawk agent running on the remote machine:

 
#be.mm.tools.Domain=TIBCO Hawk Domain
#be.mm.tools.TIBHawkService=Rendezvous daemon used by Hawk
#be.mm.tools.TIBHawkNetwork=Rendezvous network used by Hawk
#be.mm.tools.TIBHawkDaemon=Rendezvous service used by Hawk

 
If Hawk is also used for machine level metrics, the values specified would be the same as those specified in the MM.cdd See Install and Configure TIBCO Hawk for Machine Level Metrics.
4.
Using Public/Private Key Authentication with mm-tools
To authenticate a user using certificates when performing deploy and remote start and stop operations, do the following.
1.
On the computer hosting the MM server, use a utility to create a public/private key pair. The ssh-keygen utility is widely available. Two files are generated. They are referred to as follows:
PK_FILE_NAME: The file containing the private key
PK_FILE_NAME.pub: The file containing the public key
Optionally, you can specify a passphrase.
Place both generated files in the same directory on the computer hosting the MM server. For example, put them in BE_HOME/mm/certificates.
2.
On computers hosting the to-be-monitored cluster PUs that you want to remotely deploy, start, or stop, copy the contents of the PK_FILE_NAME.pub file to the file containing the list of authorized keys for the user who will be logging in remotely.
For example, for SSH using certificates for authentication, the authorized keys file is called 'authorized_keys' and it is stored in the .ssh directory of the user who will be logging in remotely, that is, in ~/.ssh/authorized_keys.
3.
-pkf The fully qualified path to the PK_FILE_NAME file, that is, the file with the private key.
-pph The passphrase, if you specified one when creating the public/private key pair. (One example below shows the -pph option.)
Example Commands
Remote Deploy:
mm-tools --propFile mm-tools.tra -op deploy -m 100.100.100.101 -pkf BE_HOME/mm/certificates/PK_FILE_NAME
Remote Deploy, with passphrase:
mm-tools --propFile mm-tools.tra -op deploy -m 100.100.100.101 -pkf BE_HOME/mm/certificates/PK_FILE_NAME -pph passphrase
Remote Start:
mm-tools --propFile mm-tools.tra -op start -puc CS -m 100.100.100.101 -pkf BE_HOME/mm/certificates/PK_FILE_NAME
Remote Stop:
mm-tools --propFile mm-tools.tra -op stop -puc CS -m 100.100.100.101 -pkf BE_HOME/mm/certificates/PK_FILE_NAME
Deploying, Starting, or Stopping a Remote Engine
Deployment is done through SSH. Remote start is done using the method configured in the site topology file start-pu-method setting.

 
BE_HOME/mm/bin/mm-tools [-h] [--propFile StartupProperty File] -op [deploy | start | stop] -m MachineHostName [-puc ProcessingUnitConfig] [-user UserName] [-pwd Password>]

 
Deployment example:
mm-tools --propFile mm-tools.tra -op deploy -m Acme-PC
Remote start example:
mm-tools --propFile mm-tools.tra -op start -m Acme-PC -puc CacheServer
Remote stop example:
mm-tools --propFile mm-tools.tra -op stop -m Acme-PC -puc CacheServer
mm-tools Utility Options Reference
 
When you execute mm-tools, by default it looks in the working directory (the directory where you execute the command) for a property file of the same name (mm-tools.tra). This property file provides startup values and other parameters to the executable.
For example, if you execute the command from a directory other than BE_HOME/mm/bin, then you would generally use --propFile to specify BE_HOME/mm/bin/mm-tools.tra.
deploy: The deploy operation is done through SSH
start: The start operation is done using the mechanism defined in the site topology file start-pu-method setting.
stop: The stop operation is done using the mechanism defined in the site topology file start-pu-method setting.
For the deploy option: The username used by SSH on the remote machine.
For the start option: The user name used to log on to the remote machine for remote start.
For the deploy option: The password for the username used by SSH on the remote machine.
For the start option: The password for the username used to log on to the remote machine for remote start.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved