HP Enterprise Cluster Master Toolkit User Guide (5900-2131, December 2011)

Setting up the package
The following procedures include the steps to configure a Serviceguard package running the
Apache instance, which includes customizing the Serviceguard package configuration file and
package control script. (See Managing ServiceGuard manual available at http://www.hp.com/
go/hpux-serviceguard-docs —>HP Serviceguard " for more detailed instructions on cluster
configuration.
The procedures below assume that the user is configuring a Serviceguard Apache package named
"http_pkg1", consisting of one service named "http1_monitor". The Apache instance is listening
to a relocatable IP address "192.168.0.201" and all of its configuration and document files are
on a file system "/shared/apache_1" directory, which resides on a logical volume "lvol1" in a
shared volume group "/dev/vg01". Here, it is assumed that the user has already determined the
Serviceguard cluster configuration, including cluster name, node names, heartbeat IP addresses,
and so on. See the Managing ServiceGuard manual available at http://www.hp.com/go/
hpux-serviceguard-docs —>HP Serviceguard for more detail.
NOTE: To increase the number of packages that may be added to this cluster, modify the cluster
configuration file and set the variable MAX_CONFIGURED_PACKAGES to reflect the number of
packages to be added to the cluster. After the edit, apply the change to the cluster via
cmapplyconf -C cluster_config_file
Before working on the package configuration, create a directory (for example, /etc/cmcluster/
pkg/http_pkg1) for this package to run. This directory should belong to a single Apache package.
Copy all Apache toolkit scripts from the directory /opt/cmcluster/toolkit/apache to the
package directory.
For example:
$ mkdir /etc/cmcluster/pkg/http_pkg1
$ cd/etc/cmcluster/pkg/http_pkg1
$ cp/opt/cmcluster/toolkit/apache/*.
To create both the package configuration (http_pkg.conf) and package control
(http_pkg.cntl) files, cd to the package directory (example, cd /etc/cmcluster/pkg/http_pkg1).
1. Create a Serviceguard package control file with command cmmakepkg -s http_pkg.cntl.
The package control file must be edited as indicated by the comments in that file. The package
control file must be customized to your environment.
For Example:
PACKAGE_NAME http_pkg1
NODE_NAME node1
NODE_NAME node2
NOTE: When configuring an Active - Active configuration the package configuration file
should hold the name of that single node only on which the instance will run. For example,
on node1, NODE_NAME parameter in the package configuration file would be edited as
NODE NAME node1 and in node2 as, NODE NAME node2
RUN_SCRIPT /etc/cmcluster/pkg/http_pkg1/http_pkg.cntl
RUN_SCRIPT /etc/cmcluster/pkg/http_pkg1/http_pkg.cntl
HALT_SCRIPT /etc/cmcluster/pkg/http_pkg1/http_pkg.cntl
SERVICE_NAME http1_monitor
If CFS mounted file system is used configure dependency of this Apache package on SG CFS
package. If the Apache package is configured to depend on a SG CFS package, the Apache
package will run as long as the dependee package is running. If the dependee package fails,
then the dependent Apache package will also fail.
Setting up the package 103