Sun Cluster HA for Solaris Containers provides a script that automates the process of configuring zone script resource. This script obtains configuration parameters from the sczsh_config file in the /opt/SUNWsczone/sczsh/util directory. To specify configuration parameters for the zone script resource, edit the sczsh_config file.
Each configuration parameter in the sczsh_config file is defined as a keyword-value pair. The sczsh_config file already contains the required keywords and equals signs. For more information, see Listing of sczsh_config. When you edit the sczsh_config file, add the required value to each keyword.
The keyword-value pairs in the sczsh_config file are as follows:
RS=sczsh-rs RG=sczbt-rg SCZBT_RS=sczbt-rs PARAMETERDIR=sczsh-parameter-directory Zonename=sczbt-zone-name ServiceStartCommand=sczsh-start-command ServiceStopCommand=sczsh-stop-command ServiceProbeCommand=sczsh-probe-command
The meaning and permitted values of the keywords in the sczsh_config file are as follows:
Specifies the name that you are assigning to the zone script resource. You must specify a value for this keyword.
Specifies the name of the resource group the zone boot resource resides in. You must specify a value for this keyword.
Specifies the name of the zone boot resource. You must specify a value for this keyword.
Specifies the directory name that you are assigning to the parameter directory where the following variables and their values will be stored. You must specify a value for this keyword.
Specifies the zone name. You must specify a value for this keyword.
Specifies the zone start command or script to run. You must specify a value for this keyword.
Specifies the zone stop command or script to run. You must specify a value for this keyword
Specifies the zone probe command or script to run. You must specify a value for this keyword
In this example the zone script resource uses the Apache2 scripts that are available in Solaris 10. Before this example can be used the Apache2 configuration file http.conf needs to be configured. For the purpose of this example, the delivered http.conf-example can be used. Copy the file as follows:
# zlogin zone1 # cd /etc/apache2 # cp http.conf-example http.conf # exit |
This example shows an sczsh_config file in which configuration parameters are set as follows:
The name of the zone script resource is zone1-script-rs.
The name of the resource group for the zone script resource is zone1-rg.
The name of the zone boot resource is zone1-rs.
The name of the parameter file directory for the zone script resource is /global/zones/pfiles.
The name of the zone is zone1.
The name of the zone script resource start command and it`s parameter is "/lib/svc/method/http-apache2 start".
The name of the zone script resource stop command and it`s parameter is "/lib/svc/method/http-apache2 stop".
The name of the zone script resource probe command is "/var/tmp/probe-apache2". This script is shown in Example 2 and must exist in zone1.
RS="zone1-script-rs" RG="zone1-rg" SCZBT_RS="zone1-rs" PARAMETERDIR="/global/zones/pfiles" Zonename="zone1" ServiceStartCommand="/lib/svc/method/http-apache2 start" ServiceStopCommand="/lib/svc/method/http-apache2 stop" ServiceProbeCommand="/var/tmp/probe-apache2"