Variables are used when servers in a cluster must configured with different values. These values might be macros to define slaves using different port numbers, or plug-ins to define different shlib paths.
Adding variables affects only the master cluster database. The remote administration servers are not affected unless their files were transferred through Cluster Control. When variables are defined, the Administration Server can no longer run independently.
From the Master Administration Server, and choose the Cluster Mgmt tab.
Click the Add Variables link.
Check the specific server you wish to add variables for.
In the Name field enter the type of variable you are adding.
For example: ”Port’.
In the Value field enter the value you are adding.
For example: if ”Port’ is entered in the name field, the value would be the port number.
A message appears confirming that the server variable was added.
Also add the variable to the server’s configuration file you are transferring to the slave. For example, if you are transferring the variable port, the variable should be declared in a server configuration file, say server.xml, as shown below:
<SERVER legacyls="ls1" qosactive="no" qosmetricsinterval="30" qosrecomputeinterval="100"> ... <LS id="ls1" ip="0.0.0.0" port="$port" security="off" acceptorthreads="1" blocking="no"> ... </SERVER>
You can set variables with different values for each slave in the configuration file. Once added, variables can edited and deleted using the drop-down Option list in the Add Variables page.