Membership policy builder

Use the membership policy subexpression builder to create an expression that defines the members of your dynamic cluster. Use the build subexpression utility to build complex rule conditions from subexpressions by using AND, OR, NOT and parenthetical grouping. The rule builder validates the rule when you apply the changes, and alerts you to mismatched parentheses and unsupported logic operators.

To use the membership policy builder, click Subexpression builder. Select the properties that you want to be in your membership policy, and click Generate subexpression. The subexpression value displays. To append the subexpression to your membership policy, click Append.

Logical operator

Specifies the operator that is used to append this subexpression to the previous subexpression in the membership policy.

and
To select a node, both subexpressions that are around the and operator must be true for that node.
or
To select a node, one of the two subexpressions that are around the or operator must be true for that node.

Operand

Specifies the node information on which you want to select the nodes that host your dynamic cluster.

Node group
Specifies the name of the node group. To define a node group, click System administration > Node groups. Node groups were used in previous releases to define the dynamic cluster membership. Use the node group operand if you defined a node group with a previous release.
Node name
Specifies the name of the node.
Node host name
Specifies the node host name.
Node property
Specifies a property that is defined on the node. To view the properties that are defined on a node, click System administration > Middleware nodes > node_name > Node installation properties. You can use any of the properties listed in your membership policy. For a PHP dynamic cluster, specify a membership policy that requires PHP and Apache HTTP Server to be installed on the nodes.

Appended value equal to

Specifies a custom property value when you select Node property as your operand.

To define a node custom property, click System administration > Nodes > node_name > Custom properties or System administration > Middleware nodes > middleware_node_name > Custom properties.

Operator

  • = The equality operator expresses a case-sensitive match.
  • <> The not equal operator expresses that the operand value is not equal to the value you enter.
  • > The greater-than operator is for use with numbers.
  • >= The greater-than or equal to operator is for use with numbers.
  • < The less-than operator is for use with numbers.
  • <= The less-than or equal to operator is for use with numbers.
  • AND: For xx AND yy, expresses matches that contain both xx, yy.
  • BETWEEN: This operator is used with AND to select a range of values inclusive of the first, or low, value and the last, or high, value. Together, they operate on numbers and dates.
  • EXISTS: This Boolean operator checks for an operand or the result of a compound subexpression, for example, while checking for certain HTTP header element attributes.
  • IN: This operator expresses an operand with multiple values in a single expression. For example, if, for an operand called port, you want to express that the port value can be any or all of the values such as 9080, 9090, 9091, the expression fragment is port IN (9080,9090,9091). How the values inside the brackets are expressed depends on the data type of port. If port is an integer, the correct syntax is the values without quote marks. If port is a string, the correct syntax is port IN (‘9080’,‘9090’,‘9091’).
  • IS NULL: This operator expresses that a validation of the query shows that the requested parameter does not exist.
  • IS NOT NULL: This operator expresses that a validation of the query shows that the requested parameter exists.
  • LIKE: This operator expresses pattern matching for string operand values. The value must contain the wildcard character percent sign (%) in the position where the pattern matching starts. For example, the expression, host LIKE %blanca, matches the word blanca, or any other word that ends in blanca, while the expression host LIKE blanca% matches the word blanca or any other word that starts with blanca, and the expression, host LIKE %blanca% matches the word blanca or any word that has blanca embedded in it.
  • NOT: For NOT xx, this operator expresses matches that do not contain xx.
  • OR: For xx OR yy, this operator expresses matches that contain either xx, yy.

Value

Depending on the operator that you choose, type in a value for the subexpression that you want to create.

Subexpression

After you click Generate subexpression, this field displays the generated subexpression fragment based on the options that you selected. To add this subexpression to your membership policy, click Append.

Examples

You can use the following examples to create your own membership policy.

Example membership policies

  • To define membership as all nodes in a specific node group:
    node_nodegroup = 'my_node_group'
  • To define membership as all nodes that run Apache:
    node_property$APACHE_2_0 IS NOT NULL
  • To define membership as all nodes that run Apache and PHP:
    node_property$APACHE IS NOT NULL and node_property$PHP IS NOT NULL
  • To define membership as all nodes that run WebSphere® Application Server Community Edition Version 2.0 or later:
    node_property$WASCE_2.0* IS NOT NULL
  • To define membership as all nodes that run WebSphere Application Server Community Edition Version 2.0 only:
    node_property$WASCE_2.0 IS NOT NULL
  • To define membership as all nodes that have a name that is like my_node, including my_node_1, my_node_2, and so on:
    node_name like 'my_node%'
  • To define membership as a list of specific host names:
    node_hostname in ('node1.mydomain.com','node2.mydomain.com')
You can group subexpressions by using and, or, or not logical operators and parenthesis. The following example defines node membership as nodes that are not in the my_node_group node group, and have a name that is like my_node, including my_node_1, my_node_2, and so on.
not (node_nodegroup='my_node_group') and node_name like 'my_node%'


File name: dc_membership.html