How can I write a script to automatically start IBM Rational DOORS Web Access during a Linux or UNIX server bootup?
IBM Rational DOORS Web Access currently does not ship with startup scripts.
This document targets system administrators with scripting experience who are already familiar with developing startup scripts on Linux or UNIX.
You will need to create scripts to start and stop IBM Rational DOORS Web Access (DWA) on your system -- the details of how to do this are out of the scope of this document. Please refer to your DWA install guide for the exact commands to start and stop your version of DWA.
Since it is common for DWA to be owned by the DOORS user, it is likely that the optimal owner/runner of the DWA start/stop scripts will be the DOORS user and not root. However, startup scripts are generally run as root. You may want to write a scripts -- owned by the DOORS user -- to start and stop DWA. Then write a wrapper script -- owned by the root user -- that gets called during server startup or shutdown that su's to the DOORS user and calls the DWA start and stop scripts as needed.
A common challenge when developing a Linux/UNIX DWA start script is setting up a valid DISPLAY for use by the DWA Interoperation server. The Interoperation server on Linux and Unix requires an X DISPLAY because the third party Mainwin subsystem that ports the Interoperation server code from win32 to UNIX needs a DISPLAY to be set. Thus, the Interoperation server requires that a valid DISPLAY be set.
If you find that your script works when your Linux/Unix server is running, but not during server bootup, due to X server access problems, you may want to consider using Xvfb to create a DISPLAY for use by the Interoperation server. If you use Xvfb, it's helpful for Xvfb to have its own startup script. Documenting Xvfb is outside the scope of this tech note -- you can find Xvfb documentation and sample startup scripts on the internet. One such reference is Rational Performance Tester Tech Note #1421214.
You may choose to start Xvfb during the bootup sequence, or have root's DWA startup script call the Xvfb startup script instead.
In addition, you need to ensure that all the users involved in your process to start DWA have access to the X server and the DISPLAY you are using for DWA. One way to do this is to have root's DWA startup script grant access to the X server to any non-root users that require it, before those users run any commands.
Some tips on developing Rational DOORS Web Access (DWA) start and stop scripts:
- Test the scripts on a test server to minimize disruption to DWA users.
- Write scripts to run the commands to start and stop DWA as documented in the install guide -- these are owned by the user who owns the DWA installation (usually the DOORS user). Debug these scripts until they work successfully when invoked manually.
- Once you have good DWA start/stop scripts, write a wrapper script -- usually owned by root -- that can be called during server startup and shutdown, using best practices for your platform. This script will call the DWA start/stop scripts. Debug this script until you are satisfied with how it runs when invoked manually.
- After all your scripts have been finished, add them to your startup/shutdown sequence and debug any issues that only show up during server startup and shutdown.
Attached you will find unsupported sample scripts showing one way to implement Rational DOORS Web Access (DWA) startup scripts. These are sample shell scripts and cannot be run unmodified -- if you choose to base your scripts on them, you will have to make modifications to get them to work in your environment.
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
The first version works with Rational DOORS Web Access (DWA) 1.3 and the Rational DOORS 9.2 Interoperation server, where the Interoperation server is installed in the same place as DOORS:
The version below has the changes to work with Rational DOORS Web Access (DWA) 1.4 and the Rational DOORS 9.3 Interoperation server, where the Interoperation server is installed into a different location than the DOORS database: