Creating and configuring the Infrastructure Management resource type
Use the agent builder utility to create the resource type for the Infrastructure Management product. This utility is a part of the Sun Cluster installation.
To create the resource type on Solaris computers
Perform the following procedure on each node in the cluster:
- Start the agent builder utility by entering the following command:
/usr/cluster/bin/scdsbuilder
In the agent builder window, provide information for the following items:
Item
Description
Vendor Name
Name that identifies the vendor of the resource type. Typically, the name is SUNW.
Application Name
Name of the resource type.
RT Version
Version of the generated resource type. The version is by default 1.0.
Working Directory
Directory under which the agent builder creates a directory structure to contain all the files that are created for the target resource type. You can create only one resource type in any working directory. Under the working directory, agent builder creates a subdirectory with the resource type name. Ensure that both the primary and secondary nodes in the cluster have the same working directory name. For example, if SUNW is the vendor name and pnbmc is the application name, then the agent builder names this subdirectory as SUNWpnbmc.
Scalable or Failover
Target resource type. Select Failover.
C, ksh
Language of the generated source code. Select ksh.
- Click Create.
- Click Next.
In the Configure window, provide information for the following items:
Item
Description
Start Command (or file)
The complete command line to pass to any Linux/Solaris shell to start the base application:
/usr/pw/pronto/bin/pw system start
Stop Command (optional)
The complete command line to pass to any Linux/Solaris shell to stop the base application:
/usr/pw/pronto/bin/pw system stop
Probe Command
The command to run periodically to check the health of the application. The command returns an exit status between 0 (success) and 100 (complete failure). If you do not specify a probe command, the generated code simply connects to and disconnects from the port that is used by the resource. If the connect and disconnect operations succeed, the generated code declares the application healthy.
Timeout
A timeout value, in seconds, for each command. You can specify a new value or accept the default value that the agent builder provides. The default value is 3600 seconds for start, 500 seconds for stop, and 30 seconds for probe.
- Click Configure.
The agent builder generates a resource type (data service) that includes source and executable code (Korn shell), a customized Resource Type Registration (RTR) file, and a Solaris package for the Infrastructure Management product.
The Solaris package contains the RTR file in the /etc directory. The file is named based on the values that you entered for Vendor Name and Application Name in the agent builder window. For example, if the Vendor Name is SUNW
and the Application Name is pnbmc
, then the name of the RTR file will be SUNW.pnbmc. Open the RTR file and ensure that the RT_BASEDIR
parameter is set to the path of the /bin directory. For example, if the path to the /bin directory is /opt/SUNWpnbmc/bin, then the value for the RT_BASEDIR
parameter must be /opt/SUNWpnbmc/bin.
The Solaris package also contains start, stop, and probe scripts for the Infrastructure Management application resource type in the /bin directory. Provide execute permissions for all the generated scripts in the /bin directory.
To configure a resource type
Perform the following procedure on the primary node of the cluster.
- Ensure that the Infrastructure Management application RTR file exists in the /opt/cluster/lib/rgm/rtreg directory or the /usr/cluster/lib/rgm/rtreg directory.
If it does not exist in one of these two directories, copy the RTR file that is in the /workingDirectory/resourceType/etc directory to either the /opt/cluster/lib/rgm/rtreg directory or the /usr/cluster/lib/rgm/rtreg directory. For example, if you created a resource type named SUNW.pnbmc by using the agent builder, then the name of the RTR file is SUNW.pnbmc. Copy that file from the /opt/SUNWpnbmc/etc/ directory to the /opt/cluster/lib/rgm/rtreg directory or the /usr/cluster/lib/rgm/rtreg directory. - Register a resource type by entering the following commands:
clresourcetype register resourceType
clresourcetype show
resourceType
For example:clresourcetype register SUNW.pnbmc
clresourcetype show SUNW.pnbmc
The following output is displayed:=== Registered Resource Types ===
Resource Type: SUNW.pnbmc:1.0
RT_description: pnbmc server for Sun Cluster
RT_version: 1.0
API_version: 2
RT_basedir: /opt/SUNW.pnbmc/bin
Single_instance: False
Proxy: False
Init_nodes: All potential masters
Installed_nodes: <All>
Failover: False
Pkglist: SUNW.pnbmc
RT_system: False
The resourceType variable is the resource type created using the agent builder as described in the procedure 70166.
Where to go from here
Related topics
Configuring Infrastructure Management Server in a cluster
Configuring the Infrastructure Management Server in Sun Cluster
Comments
Log in or register to comment.