HP Serviceguard Linux Contributed Toolkit Suite A.04.02.01 User Guide (696979-001, June 2012)

ExampleDescriptionAttribute
service is restarted for the specified
number of times before failing. If
service_restart is not
specified, the default value is none.
function customer_defined_run_cmds
{
${SGCONF}/pkg/Tomcat/toolkit.sh start
test_return 51
}
function customer_defined_halt_cmds
{
${SGCONF}/pkg/Tomcat/toolkit.sh stop
test_return 52
}
6. Edit the tomcat the toolkit configuration file, hatomcat.conf.
7. Copy the package directory to the other nodes in the cluster.
For example, change to the parent directory of the package directory and enter the following
command:
# rcp -r p ${SGCONF}/pkg/Tomcat node2:$PWD/
8. Validate the configuration using the cmcheckconf command:
# cmcheckconf -P tomcat_pkg.conf
9. Add the package to the Serviceguard environment using cmapplyconf command, if the
cmcheckconf command does not report any errors:
# cmapplyconf -P hatomcat.conf
10. Enable package switching for the Tomcat toolkit package using:
# cmmodpkg -e -n node1 -n node2 tomcat_pkg1
# cmmodpkg -e tomcat_pkg1
11. Start the package using the cmrunpkg command.
# cmrunpkg tomcat_pkg1
Configuring modular Tomcat toolkit packages
To configure legacy modular packages:
1. Create a directory for the package on all the cluster nodes using the following command:
# mkdir ${SGCONF}/pkg/tomcat
2. cd to the package directory.
3. Create the package configuration and control templates using the cmmakepkg command:
# cmmakepkg -m tkit/tomcat/tomcat tomcat_pkg.conf
4. Edit the following attributes manually in the package configuration file:
DescriptionAttribute
The Toolkit configuration directory is synonymous to
package configuration directory. This directory holds
TKIT_DIR
the toolkit configuration file. This parameter directs
cmapplyconf to generate the hatomcat.conf file
56 Tomcat Toolkit