02.03.2014 Views

Tornado

Tornado

Tornado

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2<br />

Setup and Startup<br />

No privilege is required to start the registry, and it is not harmful to attempt to start<br />

a registry even if another is already running on the same host—the second daemon<br />

detects that it is not needed, and shuts itself down.<br />

To start the registry daemon from a command line, execute wtxregd in the<br />

background. For example, on a Sun-4 running Solaris 2.x:<br />

2<br />

% /usr/wind/host/sun4-solaris2/bin/wtxregd -V >/tmp/wtxregd.log &<br />

This example uses the -V (verbose) option to collect diagnostic output in a logging<br />

file in /tmp. We recommend this practice, so that status information from the<br />

registry is available for troubleshooting.<br />

To ensure that the registry remains available after a system restart, run wtxregd<br />

from a system startup file. For example, on Sun hosts, a suitable file is /etc/rc2.<br />

Insert lines like the following in the appropriate system startup file for your<br />

registry host. The example below uses conditionals to avoid halting system startup<br />

if wtxregd is not available due to some unusual circumstance such as a disk failure.<br />

#<br />

# Start up <strong>Tornado</strong> registry daemon<br />

#<br />

if [ -f /usr/wind/host/host-os/bin/wtxregd ]; then<br />

WIND_HOST_TYPE=host-os<br />

export WIND_HOST_TYPE<br />

WIND_BASE=/usr/wind<br />

export WIND_BASE<br />

/usr/wind/host/host-os/bin/wtxregd -V -d /var/tmp >/tmp/wtxregd.log &<br />

echo -n '<strong>Tornado</strong> Registry started'<br />

fi<br />

The <strong>Tornado</strong> tools locate the registry daemon through the environment variable<br />

WIND_REGISTRY; each <strong>Tornado</strong> user must set this variable to the name of<br />

whatever host on the network runs wtxregd.<br />

In some cases, you may wish to segregate some collections of targets; to do this, run<br />

a separate registry daemon for each separate set of targets. Developers can then<br />

use the WIND_REGISTRY environment variable to select a registry host.<br />

One of the more exotic applications of <strong>Tornado</strong> is to set this environment variable<br />

to a remote site; this allows the <strong>Tornado</strong> environment to execute remotely. Using a<br />

remote registry can bridge two separate buildings, or even enable concurrent<br />

development on both sides of the globe! As a support mechanism, it allows<br />

customer support engineers to wire themselves into a remote environment. This<br />

application often requires setting WIND_REGISTRY to a numeric Internet address,<br />

since the registry host may not be mapped by domain name. For example (using<br />

the C shell):<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!