User-defined environment variables
User-defined variables define any details that are used when creating a cluster.
The following are the different types of user-defined variables that you can define:
Single Value variables have values that the user cannot modify. The variable values are still shown when the cluster is created. The value of the variable can only be changed in the cluster template with the Cluster Template Designer.
For example, in several provided cluster templates, the SOURCE_URL user-defined variable specifies the URL of a Web server repository containing installation packages for installing software on provisioned machines. An administrator specifies a URL containing the installation packages, but users should not change the location of installation packages when creating a cluster. Similarly, the names of the installation packages can also be user-defined variables so an administrator can control the specific version of the installation package installed in the provisioned machines.
- Single Modifiable variables use a text input field where the user may specify a value for the variable when creating a cluster.
- Multiple Values variables allow the user
to select a value for the variable from a list. Use a semicolon (;)
to separate multiple values for the dropdown list.
For example, in the provided LSF cluster template, the PAC_INSTALL user-defined variable allows the user to specify whether to install PAC along with LSF. Since installing PAC is a yes or no decision, this user-defined variable has "N" and "Y" as the two multiple values.
- Script variables use a script to determine
the value of the variable. Specify a file path to the script (in the
master management server) that will determine the value of the variable.
For example, you can define a ZoneEnv user-defined variable to define a zone environment (such as Development, Testing, and Production) to allow users to provision clusters to run only on specific environments on nodes. Instead of having to specify Development, Testing, and Production as zone environments in each of your cluster templates, you can create a common script that defines these values and automatically provides a user with these options. This is also useful if you decide to add another environment (such as a Demo zone environment), you only have to change the single script rather than having to change the variable values in each of your cluster templates.
- Password variables contain values that are not displayed in the Cluster Template Designer(that is, they are indicated by a series of asterisks (such as *****). This way, you can pass the variable to a layer without showing it on the Web Portal.
When users create a cluster from a cluster template, the create cluster dialog asks them to specify values (or accept the default values) for the modifiable user-defined variables before creating the cluster.
User-defined variables may be defined at the cluster template (template-wide) level or at the layer (layer-wide) level.
User-defined variables defined at the cluster template level are available to all scripts in the cluster template. To define these user-defined variables, click any area in the main canvas area that is not a tier (for example, click an area to the right of all the tiers), then click the User-defined Variables tab in the details pane.
User-defined variables defined at the script level are available to a single script in the cluster template, which is useful to define specific variables only if the script calls for it.
To define these user-defined variables, click a layer, then click the User-defined Variables tab in the details pane.