Nodes.properties
From ControlTier
The nodes.properties file is a CTL configuration file that drives the node dispatch feature in the command dispatcher.
The command dispatcher uses this file to look up node information when performing distributed command execution. See the node dispatch section for general info about the mechanism.
Contents |
Use
The nodes.properties file is used by:
- The nodedispatch strategy uses this file to look up metadata about nodes. Node filtering options are driven by this metadata.
- ctl-exec command: Drives command execution.
- ctl command: Drives command execution.
Location
Server
The file is located on the WebDAV and automatically retrieved from CTL commands when needed. CTL expects the file to be located at the URL:
${framework.webdav.uri}/project/etc/nodes.properties
Example
http://strongbad:8080/jackrabbit/repository/controltier/projects/demo/etc/nodes.properties
Client
On the CTL node, configuration file is located within the "etc" directory of the depot
$CTL_BASE/projects/project/etc/nodes.properties
Example
/Users/alexh/ctier/ctl/projects/demo/etc/nodes.properties
Generation and synchronization
If Workbench is enabled, this file is generated by Workbench. The file is regenerated on the server any time a node definition is made or updated.
CTL synchronizes with the server, pulling this file if any change has been detected since the last time it was updated.
If Workbench is disabled, it is possible to maintain this file using another means (eg manually or via an external tool). Adhere to the format described below.
Format
This configuration file uses Java properties format of key/value pairs. Keys are based on a dotted notation all prefixed with the prefix: node.
Each key takes the basic form: node.name.attribute = value
- The name is the logical name for the node (can be the same as its hostname).
- The attribute is a node metadata field.
| field | description | key | example |
|---|---|---|---|
| description | brief role of the node | node.name.description | node.strongbad.description = alex laptop |
| type | node type (usually Node) | node.name.type | node.strongbad.type = Node |
| name | Node's resource name. Typically value of uname -n
| node.name.name | node.strongbad.name = strongbad |
| hostname | administrative interface. could be the FQDN or name | node.name.hostname | node.strongbad.hostname = strongbad.local |
| os-arch | The hosts cpu architecture | node.name.os-arch | node.strongbad.os-arch = i386 |
| os-arch | The hosts cpu architecture | node.name.os-arch | node.strongbad.os-arch = i386 |
| os-family | Either "unix" or "windows" | node.name.os-family | node.strongbad.family = unix |
| os-name | The name of the operating system | node.name.os-name | node.strongbad.os-name = Linux |
| os-version | The operating system version | node.name.os-version | node.strongbad.os-version = 2.6.27-7-generic |
| tags | User defined tags. Comma separated | node.name.tags | node.strongbad.tags = desktop,sandbox |
Example
Example nodes.properties defining three nodes: centos, strongbad, development
# centos node.centos.description=a development sandbox host node.centos.type=Node node.centos.name=centos node.centos.hostname=centos node.centos.os-arch=i386 node.centos.os-family=unix node.centos.os-name=Linux node.centos.os-version=9.2.0 node.centos.tags=sandbox # strongbad node.strongbad.description=A development desktop host node.strongbad.type=Node node.strongbad.name=strongbad node.strongbad.hostname=strongbad node.strongbad.os-arch=i386 node.strongbad.os-family=unix node.strongbad.os-name=Mac OS X node.strongbad.os-version=10.5.2 node.strongbad.tags=desktop,sandbox # development node.development.description=development integration test host node.development.type=Node node.development.name=development node.development.hostname=demo@development node.development.os-arch=i386 node.development.os-family=unix node.development.os-name=Linux node.development.os-version=9.2.0 node.development.tags=DIT