You can configure the Rational® Build
Agent to start automatically when the server is restarted using the
Internet daemon (InetD).
About this task
The Build System Toolkit ships with a shell script (startbfa.sh)
for z/OS® that can be customized
to start the start the Rational Build
Agent under z/OS UNIX System Services (USS). The script establishes
the required system environment and then starts the agent as a stand-alone
daemon. Instead of using the script, you can configure the Rational Build Agent to start
automatically with the required system environment when the server
is restarted. Complete the following steps to add the build agent
to your InetD configuration.
Procedure
Update the InetD configuration files
- Define the Rational Build
Agent (bfagent) service on your USS system by adding the following
line to the /etc/services file:
bfagent 8888/tcp #Rational Build Agent
- Replace 8888 with the port number defined
in the bfagent.conf port property. This line
maps the service named bfagent to the specified
port. When InetD receives a service request on the specified port,
it will launch the bfagent service as defined in the InetD configuration
file.
- Add the following line to /etc/inetd.conf to
define the service for InetD:
stream tcp nowait <user> <agentPath>/bfagent bfagent -f <configPath>/bfagent.conf
Where:
- <user> is the RACF® user
ID under which the service should be run
- <agentPath> is the full path to the bfagent
executable file
- <configPath> is the full path to the bfagent.conf configuration
file
- After the service has been defined, the InetD daemon must
be forced to reread the configuration. There are several options for
forcing the daemon to reread the configuration, the easiest method
is to stop the daemon and restart it using the following command:
kill `cat /etc/inetd.pid`
/usr/sbin/inetd /etc/inetd.conf
Set up the build environment
- When Ant with Enterprise Extensions builds are running, the bfagent requires that several
environment variables be defined. These variables are typically defined by the
startbfa.sh script and exported prior to starting the bfagent daemon. To run
builds when you are running the agent through InetD, you must define the following variables:
- HOME
- ZLANG
- _TIMEOUT
- _CMDSRV
- _BASE_HOME
- SCM_WORK
- BLD_TOOLKIT
- JAVA_HOME
- JAZZ_USER
- JAZZ_PASSWORD_FILE
- STEPLIB
- ANT_HOME
To find the expected values of these variables and to determine which ones are required for
your environment, see the comments in the
startbfa.sh script, which is located
in the following directory:
@pathPrefix@/usr/lpp/jazz/v7.0.2/buildsystem/buildtoolkit/examples/startbfa/startbfa.sh.
Note: Some of these variables
might not be required for your setup.
- Define these variables as properties of a build engine
in your project area. To define the variables:
- Define a Rational Build Agent type build
engine. For details see, Using the Ant with Enterprise Extensions build definition
editor
- In the build definition editor, specify the port you
defined in the /etc/services file.
- On the build engine editor Overview tab,
in the Properties section, define the variables
listed previously.