Configuring the Rational Build Agent on a z/OS system to start by using InetD

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 Rational Build Agent under z/OS® UNIX System Services. 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

  1. Define the Rational Build Agent (bfagent) service on your z/OS UNIX System Services by adding the following line to the /etc/services file:
    bfagent       8888/tcp    #Rational Build Agent
  2. 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.
  3. 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:
    1. <user> is the RACF user ID under which the service should be run
    2. <agentPath> is the full path to the bfagent executable file
    3. <configPath> is the full path to the bfagent.conf configuration file
  4. 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

  1. When 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.3/buildsystem/buildtoolkit/examples/startbfa/startbfa.sh.
    Note: Some of these variables might not be required for your setup.
  2. Define these variables as properties of a build engine in your project area. To define the variables:
    1. Define a Rational Build Agent type build engine. For more information, see Using the Ant with Enterprise Extensions build definition editor.
    2. In the build definition editor, specify the port you defined in the /etc/services file.
    3. On the build engine editor Overview tab, in the Properties section, define the variables listed previously.