HP Serviceguard Contributed Toolkit Suite Version A.12.00.00 on Linux User Guide Abstract This guide describes instructions for integrating a Apache Web Server, MySQL Database Server, PostgreSQL Database Server, Samba, Sendmail, and Tomcat Server instances with HP Serviceguard to achieve high availability.
© Copyright 2014 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents 1 Introduction...............................................................................................6 Storage considerations..............................................................................................................6 General commands..................................................................................................................6 Installing the Contributed Toolkits...........................................................................................
Prerequisites......................................................................................................................22 Files and directories created for Samba toolkit after installation.....................................................22 Setting up the Samba server in SG/LX environment.....................................................................22 Supported Configuration.........................................................................................................
A Sample Apache toolkit package configuration file........................................41 B Sample MySQL toolkit package configuration file.........................................42 C Sample PostgreSQL toolkit package configuration file....................................43 D Sample Samba toolkit package configuration file.........................................44 E Sample Sendmail toolkit package configuration file.......................................
1 Introduction The HP Serviceguard Contributed Toolkit Suite is a collection of toolkits for popular applications to integrate them with the HP Serviceguard for Linux (SG/LX) environment. This toolkit suite is available as a tar file, which you must extract to get the RPM of each toolkit bundled with this suite.
Upgrading the Contributed Toolkits The Contributed toolkits can be upgraded by upgrading the individual software components of the Contributed toolkits such as Apache, Tomcat, and so on. These RPMs must be installed on all the nodes of the cluster that are configured to run the toolkit package. To upgrade a already installed version of the toolkit, run the following command: rpm -Uvh --nopostun serviceguard--toolkit-..noarch.rpm .
2 Apache Toolkit Overview HP Serviceguard toolkit for Apache on Linux (Apache toolkit) enables you to integrate the Apache web server application with HP Serviceguard. Using Apache toolkit simplifies application integration, and eases deployment and maintenance of the application in a Serviceguard cluster environment. The Apache toolkit consists of a set of scripts that are used to start, stop, and monitor the Apache web server application. The toolkit simplifies the task of integrating Apache with SG/LX.
Files and directories created for Apache toolkit after installation The following table describes the scripts installed as part of the Apache toolkit installation. Table 1 Apache toolkit files File name Description hahttp.sh This is the toolkit main script that $SGROOT/apachetoolkit contains internal functions that start or stop an Apache instance. hahttp.mon This is the toolkit monitor script that contains internal functions for monitoring an Apache server instance. toolkit.
ServerName web.site2.url DocumentRoot /shared/httpd/www-site2 For more information about configuring virtual hosts, see the Apache Web Server documentation. Supported configuration This section explains the following supported configurations for Apache toolkit packages: • Local configuration • Shared configuration • Multiple instance configuration Local configuration In a typical local configuration, files are not shared among the nodes.
Using SG Apache toolkit After installing the SG Apache toolkit, you can use the toolkit to: • Configure Apache toolkit packages in an SG/LX environment • Manage Apache toolkit package For more information about managing packages, see Managing packages. (page 35) Configuring Apache toolkit packages The subsequent sections explain how to configure Apache web server as a single instance package and as a multiple instance package using the Apache toolkit.
To create multiple Apache toolkit packages for multiple Apache instances: 1. Configure volume groups for each Apache instance. To create volume groups applicable for both shared and local configuration: a. Create another volume group, such as vgtry2. b. Create a logical volume lvol in the volume group that you just created. c. Create a file system on this logical volume and mount it. For example: /mnt/vgtry2/apache d. Copy all the files from the server root directory to /mnt/vgtry2/apache.
Table 2 List of attributes that you can edit (continued) Attribute Description NOTE: • The PID file must be in the local hard disk. • On RHEL, the default PID file is /var/run/httpd/ httpd.pid. • On SLES, the default PID file is /var/run/ httpd2.pid. • Configure your Serviceguard package with the appropriate values for your environment. • Apache toolkit does not support online modification of this attribute. MONITOR_INTERVAL The time interval in seconds to monitor the Apache server instance.
3 MySQL Toolkit Overview HP Serviceguard toolkit for MySQL on Linux (MySQL toolkit) enables you to configure MySQL database server application in an SG/LX cluster environment. The MySQL toolkit consists of a set of shell scripts that are used by the package control script to start, stop, and monitor the MySQL database server. The toolkit simplifies the task of integrating MySQL with SG/LX.
1. 2. Create a unique volume group and filesystem on shared storage for each instance of the database to be included in the configuration. On each node, create a mount point for each filesystem. The mount point for a specified instance/package must be the same for all the nodes. The following example shows a configuration of MySQL for a filesystem, /MySQL_1 on /dev/ vg01. 1.
Shared configuration The configuration and database files are placed on shared disks, accessible to all the nodes. Since the storage is shared, you need not ensure that all the nodes have the same configuration. Multiple instance configuration MySQL database server supports multiple DB instances running on the same node. Using this toolkit, you can configure multiple MySQL toolkit packages to run on the same node. One copy of the toolkit can serve one package.
Table 4 Lists the attributes that you can edit (continued) Attribute Description RETRY_TIMES The number of trials attempted by the toolkit script to check the MySQL server daemon before giving up and exiting. The default value is 0. TIME_OUT The time for which the toolkit waits for the completion of a normal shutdown before initiating forceful halt of the application.
4 PostgreSQL Toolkit Overview HP Serviceguard toolkit for PostgreSQL on Linux (PostgreSQL toolkit) enables you to integrate the PostgreSQL database server with HP Serviceguard. Using PostgreSQL toolkit simplifies application integration, and eases deployment and maintenance of applications in a cluster environment. The PostgreSQL toolkit consists of a set of shell scripts that are used by the package control script to start, stop, and monitor the PostgreSQL database server.
Table 5 PostgreSQL toolkit files File name Description hapgsql.sh This is the toolkit main script that $SGROOT/postgresqltoolkit contains internal functions that start or stop an PostgreSQL instance. hapgsql.mon This monitors the health of the running PostgreSQL server application. toolkit.sh This is interface between the package control script and the PostgreSQL toolkit main shell script hapgsql.sh. pgsq.
tcpip_socket by listen_address. Depending on the parameter supported by PostgreSQL, configure tcpip_socket=true or listen_addresses. listen_addresses = # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost', '*' = all In listen_addresses, specify the IP addresses on which the server is to listen for connections from client applications. The value takes the form of a comma-separated list of host names and/or numeric IP addresses.
Using PostgreSQL toolkit After installing the PostgreSQL toolkit, you can use the toolkit to: • Configure packages in an SG/LX environment • Manage packages For more information about managing packages, see Managing packages. (page 35) Configuring PostgreSQL toolkit packages Configuring PostgreSQL toolkit packages To configure modular PostgreSQL toolkit packages: 1. Create the package configuration and control templates using the cmmakepkg command: # cmmakepkg –m tkit/pgsql/pgsql pgsql_pkg.conf 2.
5 Samba Toolkit Overview HP Serviceguard toolkit for Samba on Linux (Samba toolkit) enables you to configure Samba in an SG/LX cluster environment. The Samba toolkit consists of a set of shell scripts that are used by the package control script to start, stop, and monitor the Samba database server. The toolkit simplifies the task of integrating Samba with SG/LX. Advantages When Samba toolkit is deployed in an SG/LX environment, following are the advantages: • Provides monitoring for Samba daemons.
1. When the Samba server is installed, the default Samba server may be automatically configured to be started during system startup via the runlevel (rc) scripts in the /etc/rc.d directory. Disable the auto-start of a Samba server if the Samba is planed as a SG/LX package on the running node. NOTE: If you plan only a single Samba instance running in a cluster, all default configuration of the standard Samba installation will be fitted into this single instance.
NOTE: To use a shared file system, you must make all necessary preparations for the file system creation prior to creating the Samba toolkit package. For a local configuration, you must install and configure Samba in the same location on both the primary and all backup nodes and set up identical (or equivalent) configuration files in the same directory on all nodes. For a shared configuration, one or more shared file systems is used.
By bringing the Samba instances in service on one or more nodes, you can distribute the workload as desired. In addition, by adjusting the failover policy for each instances, the user can configure the Samba instance to fail over to a particular node, or to fail over to different nodes to distribute the workload when a failure occurs.
3. Validate the configuration using the cmcheckconf command: # cmcheckconf -P smb_pkg.conf 4. Create the package using the cmapplyconf command, if the cmcheckconf command does not report any errors: # cmapplyconf -P smb_pkg.conf 5. To view the package details, run: # cmviewcl 6. 26 To enable package switching and start the package refer Managing packages. (page 35).
6 Sendmail Toolkit Overview HP Serviceguard toolkit for Sendmail on Linux (Sendmail toolkit) enables you to configure Sendmail in an SG/LX cluster environment. The Sendmail toolkit consists of a set of shell scripts that are used by the package control script to start, stop, and monitor the Sendmail server. The toolkit simplifies the task of integrating Sendmail with SG/LX. Sendmail application must be installed on all nodes that runs the Sendmail application in the SG/LX cluster.
Table 9 Sendmail toolkit files File name Description hasendmail.sh This is the toolkit main script that $SGROOT/sendmailtoolkit contains internal functions that start or stop an Sendmail server instance. hasendmail.mon This monitors the health of the running Sendmail server application. toolkit.sh This is interface between the package control script and the Sendmail toolkit main shell script hasendmail.sh. sendmail.
that require to be shared. Optionally, files under /etc/mail directory and /etc/ sendmail.cf file can reside on their own nodes as long as their contents are identical. Make link connections for /var/spool/mail and /var/spool/mqueue to the newly created directories on the shared disks on each node. Volume group /dev/vgSM E.g. pvcreate /dev/sdb1, then vgvreate /dev/sdb1; sdb1 is a shared disk Logical volume /dev/vgSM/lvolSM E.g. lvcreate -L M vgSM File system /pkgSM/sendmail E.g.
Using Sendmail toolkit After installing the Sendmail toolkit, you can use this toolkit to: • Configure packages in an SG/LX environment • Manage packages For more information about managing packages, see Managing packages. (page 35) Configuring Sendmail toolkit packages Configuring Sendmail toolkit packages To configure modular Sendmail toolkit packages: 1. Create the package configuration and control templates using the cmmakepkg command: # cmmakepkg –m tkit/sendmail/sendmail pkgsm.conf 2.
7 Tomcat Toolkit Overview HP Serviceguard toolkit for Tomcat on Linux (Tomcat toolkit) enables you to configure Tomcat server in an SG/LX cluster environment. The Tomcat toolkit consists of a set of shell scripts that are used by the package control script to start, stop, and monitor the Tomcat database server. The toolkit simplifies the task of integrating Tomcat with SG/LX.
2. 3. 4. Tomcat server is installed, the default instance may be automatically configured to be started during system startup via the runlevel (rc) script in the /etc/rc.d directory. Modify the port attribute present in the connector component. It must be unique for each Tomcat instance. Connector component is defined as an element in the Tomcat server configuration server.xml file. Create a separate, distinct CATALINA_BASE directory for each Tomcat Serviceguard package.
Using Tomcat toolkit After installing the Tomcat toolkit, you can use this toolkit to: • Configure packages in an SG/LX environment • Manage packages For more information about managing packages, see Managing packages. (page 35) Configuring Tomcat toolkit packages Configuring Tomcat toolkit packages To configure modular Tomcat packages: 1. Create the package configuration and control templates using the cmmakepkg command: # cmmakepkg -m tkit/tomcat/tomcat tomcat_pkg.conf 2.
3. Validate the configuration using the cmcheckconf command: # cmcheckconf -P tomcat_pkg.conf 4. Create the package using cmapplyconf command, if the cmcheckconf command does not report any errors: # cmapplyconf -P tomcat_pkg.conf 5. To view the package details, run: # cmviewcl 6. 34 To enable package switching and start the package refer Managing packages. (page 35).
8 Managing packages You can manage packages by running, maintaining, halting, and deleting them. Running packages To start a package use the following command: # cmrunpkg Enabling AUTORUN Parameter To enable the AUTORUN parameter, run: # cmmodpkg –e Enabling Package Switching To enable package switching, run: # cmmodpkg –e -n node-1, -n node-2 ...
NOTE: This command prompts for a verification, before deleting the files.
9 Online Modification of the Toolkit package In addition to the Online modification feature supported by Serviceguard, the online modification feature of the toolkit allows you to modify some of the toolkit attribute values, while the toolkit package is running. For more information about the list of attributes that support online modification for a specific toolkit package, see the Attribute definition table in Configuring modular toolkit packages of that Toolkit. To perform online package modification: 1.
10 Troubleshooting This section explains some of the problem scenarios that you might encounter while working with the Contrib toolkit in an SG/LX cluster. Table 27 lists the problem scenarios that you might encounter while working with the Contrib toolkit in an SG/LX cluster. Table 13 List of problem scenario Problem scenario Possible cause Recommended action Package startup fails during cmrunpkg. Incorrect package configuration or the Verify the package log to identify the application fails to start.
11 Support and other resources Information to collect before contacting HP Ensure that the following information is available before you contact HP: • Software product name • Hardware product model number • Operating system type and version • Applicable error message • Third-party hardware or software • Technical support registration number (if applicable) How to contact HP HP provides the HP Serviceguard Contributed Toolkit Suite on Linux for free, so there is no support for it.
Term A term or phrase that is defined in the body text of the document, not in a glossary. User input Indicates commands and text that you type exactly as shown. Replaceable The name of a placeholder that you replace with an actual value. [] In command syntax statements, these characters enclose optional content. {} In command syntax statements, these characters enclose required content. | The character that separates items in a linear list of choices. ...
A Sample Apache toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . . tkit/apache/apache/HTTPD_CONFIG_FILE tkit/apache/apache/PID_FILE tkit/apache/apache/FAIL_CRITERIA tkit/apache/apache/MONITOR_INTERVAL tkit/apache/apache/RETRY_TIMES service_name service_cmd service_restart service_fail_fast_enabled service_halt_timeout . .
B Sample MySQL toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . . tkit/mysql/mysql/CONFIGURATION_FILE_PATH tkit/mysql/mysql/PID_FILE tkit/mysql/mysql/RETRY_TIMES tkit/mysql/mysql/MONITOR_INTERVAL tkit/mysql/mysql/TIME_OUT service_name service_cmd service_restart service_fail_fast_enabled service_halt_timeout . . .
C Sample PostgreSQL toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . .
D Sample Samba toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . . tkit/samba/samba/BASE_CONF_FILE tkit/samba/samba/MONITOR_INTERVAL tkit/samba/samba/RETRY_TIMES service_name service_cmd service_restart service_fail_fast_enabled service_halt_timeout . . .
E Sample Sendmail toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . .
F Sample Tomcat toolkit package configuration file package_name package_description module_name . . . module_version package_type node_name auto_run node_fail_fast_enabled run_script_timeout halt_script_timeout successor_halt_timeout script_log_file . . .
Glossary $SGCONF /opt/cmcluster/conf for SLES /usr/local/cmcluster/conf for Red Hat $SGROOT /opt/cmcluster for SLES /usr/local/cmcluster for Red Hat ADF Attribute definition file CIFS Common Internet File System Package A grouping of application services (individual Linux Processes) under Serviceguard SLES SUSE Linux Enterprise Server SMB Server Message Block VG Volume Group 47
Index A Apache Toolkit Advantages, 8 Overview, 8 Prerequisites, 8 Apache toolkit after Installation files and directories, 9 H HP Serviceguard Contributed Toolkit Suite Introduction, 6 troubleshooting, 38 M Managing packages halting packages, 35 running packages, 35 S Storage considerations, 6 Supported configuration, 10 T typographic conventions, 39 48 Index