one of best feature of the Sun Cluster 3.x SW is the buildin SunPlex Agent Builder
you can use this simple tool to build a failover agent or scalable agent. You can use the full GUI version: scdsbuilder or the CLI scdscreate and scdsconfig commands
you can build agent based on the SUNWgds (Generic Data Service) or generate source code in C or ksh.
Please refer to the Sun Cluster Dataservice developer’s (817-4227) guide for full detail.
We just give an example that use the CLI tool. Let’s assume that we have an application that has the following script
and we will like to create a failover agent.
First we run the following command
scdscreate -V BIG -T apps -d /tmp -k
…… Creating the RTR file BIG.apps …. done.
here we use the vender_id=BIG, resource_type_name=apps, working_directory=/tmp and generate ksh source code.
It is always a good idea to use generate ksh code, one can learn alots by just examine the codes.
Next we run the following command
scdsconfig -s /usr/local/bin/startapps -t /usr/local/bin/stopapps -d /tmp
we will see
The Package for the apps services has benn created in /tmp/BIGapps/pkg
you can tar the diectory BIGapps up and ready to use it.
Next setup to to install the BIGapps by the command pkgadd -d /tmp/BIGAppd/pkg at one node and copy the BIGapps directory to the second node and install it also.
register Resource Type
In th configuration process you will need to register the BIGapps rsource type and you are on you way to configure the failover agent for apps
scrgadm -t BIGapps
that is all …