Rush Logo Rush Unix Install Instructions
(C) Copyright 1995,2000 Greg Ercolano. All rights reserved.
V 102.43 07/18/07




Unix Install Instructions
                                                     

   Installing Rush  
    0) Be sure your network meets these prerequisite requirements.

      This is essential to ensure a stable network so Rush can operate reliably.
      It's important machines don't change their hostnames or IP addresses after normal reboots, and that IP address lookups are consistent throughout reboots which a consistent local DNS (or /etc/hosts) configuration provides.

    1) Check your /etc/hosts file for this common loop back address problem:

      Most Redhat machines come with a bad default in the /etc/hosts file for the 127.0.0.1 loopback entry. Check to see if your machine's hostname is listed on the same line as 'localhost'. For instance, on a machine named 'tahoe':

      127.0.0.1    localhost localhost.yourdomain tahoe    # BAD  
      	

      To correct this, remove 'tahoe' from the 127.0.0.1 line, and make a new entry for 'tahoe' with the machine's correct IP address:

      127.0.0.1      localhost localhost.yourdomain       # GOOD
      192.168.0.100  tahoe                                # GOOD   
      	

    2) Choose a local directory to install rush.

      It is recommended to use /usr/local/rush. Extract the tar file as:

        cd /usr/local
        gunzip -c /tmp/rush-xxxxx.tar.gz | tar xvfp -

      It is important to use the 'p' flag to tar(1), to preserve permissions.

      To install the system on a large network, first install the software on the license server(s) and get everything working, then follow the Network Install instructions below.

      If you install rush in another location, then you must be sure the $RUSH_DIR environment variable points to the directory, and this variable must be set a) before the daemon is started and b) in all user environments. You will make life easier if you install rush in /usr/local/rush.

        WARNING: As with all daemons and their config files, do *not* install the rush directory or binaries on an NFS drive.
        Keep rush binaries and config files local on each machine. Here is why.


    3) Configure the /usr/local/rush/etc/hosts file

      It should contain the names of all hosts that participate in rendering. See Hosts File for descriptions of each field.

    4) (OPTIONAL) Configure the /usr/local/rush/etc/rush.conf file.

      For most situations the defaults suffice.

        Be sure to register your settings for serverport in /etc/services, or equivalent. See serverport for an example entry.

      If security is an issue at your site, be sure to check ALL settings, esp. UidRange and GidRange. Also, correctly configure AdminUser for your environment. Read about these before accepting the defaults.

      If you want to make changes, see the Rush Configuration File documentation for more info.

    5) (OPTIONAL) Configure the /usr/local/rush/etc/templates file.

      Customize the template render/submit scripts for your local environment. TDs use these templates to create their submit scripts and render scripts via 'rush -tss/-trs', and they will want to inherit settings for typical situations.

    6) (OPTIONAL) Configure the /usr/local/rush/etc/.submit and /usr/local/rush/etc/.render files.

      These files are sourced by the default Submit Script and Render Scripts respectively.

    7) Run the install script.

        /usr/local/rush/etc/bin/install.sh

      Watch for any errors in the output.

    8) Start the daemon, and test it.

      Start the daemon by invoking the boot script:

        /usr/local/rush/etc/S99rush start

      Then open a *new terminal window* and use 'rush -ping' to verify the daemon's running:

        Testing The Daemon
          % rush -ping
          yourhost: RUSHD 102.42 PID=XXXXX   Boot=10/15/00,03:25:49  Online, 0 jobs, 0 procs
          % 
        	   

      Possible errors:

        Possible Error Messages
        rush: command not found
          This means you might have:

          • Not opened a new terminal window before running 'rush -ping'
          • Forgot to run the install script
          • Terminal windows using a default shell other than sh/bash/csh/tcsh
          • New windows that are not picking up the settings from the
            /etc/profile or /etc/csh.cshrc files. Add /usr/local/rush/bin
            to your PATH, then try the 'rush -ping' command again. Or use the
            complete path to invoke the command, e.g.:
            '/usr/local/rush/bin/rush -ping'.

          Under some window managers, opening a new window doesn't source shell
          rc files (/etc/profile, etc) unless you log out, in which case you can source
          the files manually to avoid logging out, eg. from Bash: . /etc/profile,
          or from Csh on Mac or Linux: source /etc/csh.cshrc, or from
          Csh on Irix: source /etc/cshrc

         libstdc++.so.5: cannot open shared object file 
          (Linux specific) You probably downloaded the wrong tar file
          for the platform you're running on. In some cases this can happen
          if you don't have the 'compatibilitiy libraries' installed.
          For instance, you can run the redhat9 binaries on RHE4/FC4
          if you install compat-libstdc++-33-3.2.3-47.3.i386.rpm
          from the install cds.
        rresvport(): Permission denied
          Example context might be:

            % rush -ping +any -t 5
            rodin: rush: rresvport(): Permission denied
            bacon: rush: rresvport(): Permission denied

          Make sure the SUID bit on the rush(1) binary is enabled,
          and make sure the owner is root:

            chmod 4755 /usr/local/rush/bin/rush
            chown 0.0  /usr/local/rush/bin/rush

        Connection refused or other such errors..
          Check the daemon logs for problems, eg:

            tail -f /usr/local/rush/var/rushd.log

      To test if the daemon is working, you can run this test submit script, just to verify jobs can be started, listed, and dumped:

        /usr/local/rush/examples/test-submit

      To submit a real job, similar to what TDs use, you can run this test which includes complete instructions for someone who has never used rush before.

    9) Install the submit scripts for the users

      Use these instructions to install the submit scripts on your file server.

      Then login as a normal user, and verify you can make desktop shortcuts to the submit scripts, and can bring up the interfaces properly.

    10) (OPTIONAL) Setup accounting log rotations.

      Make a crontab entry that runs on a nightly basis that rotates out the cpu accounting information. The simplest would be:
      
          0 0 * * * /bin/mv /usr/local/rush/var/cpu.acct /usr/local/rush/var/Ocpu.acct 
               
      You may want to then push the rotated file through an accounting filter to keep tabs on cpu usage for the network. This is left as an exercise to the reader.

    11) (OPTIONAL) Security issues.

    Once you have things working on the first machine, then you can easily install rush on the rest of the machines. See 'Network Install' below..

   Network Install  
    To install rush on the rest of the network (assuming you've got it working on one machine), you will want to rdist(1) the /usr/local/rush directory to all the machines, start the daemons, and verify they're running.

  1. Copy the rush directory to the remotes, run install and start commands.

    Make sure /usr/local/rush/etc/hosts contains the names of all the hosts that will be running rushd, including the license server, and that the license.dat file is in place.

    Then, release everything to the net, and start the daemons:

      Network Install
        The new install script can greatly simplify installation; it handles the platform
        specific stuff, and simplifies things down to single rdist(1) and rsh(1) commands:
        
        # IRIX REMOTES
        foreach i ( octane1 octane2 octane3 octane4 )
            rdist -c /usr/local/rush ${i}:/usr/local/rush
            rsh $i /usr/local/rush/etc/bin/install.sh \; /usr/local/rush/etc/S99rush start       
        end
        
        # LINUX REMOTES
        foreach i ( linux1 linux2 linux3 linux4 )
            rdist -c /usr/local/rush ${i}:/usr/local/rush
            rsh $i /usr/local/rush/etc/bin/install.sh \; /usr/local/rush/etc/S99rush start
        end
                          

        Caveats:

        • The above are csh examples. If you're using bash, you can get a csh prompt easily by typing 'csh',
          then pasting the above commands into that. Or, use the bash equivalent commands, ie:
          
          for i in linux1 linux2 linux3 linux4; do
              rdist -c /usr/local/rush ${i}:/usr/local/rush
              rsh $i /usr/local/rush/etc/bin/install.sh \; /usr/local/rush/etc/S99rush start
          done
          
        • You can also use rcp(1) or scp(1) instead of rdist(1). What ever works for your site
          where you can move entire directories around as root while preserving permissions.

  2. Verify all the daemons have started.

    You can 'ping' all the daemons in the rush/etc/hosts file:

      rush -ping +any

  3. Check the daemon logs for errors.

    Common errors (and their soultions) can be found in the Admin FAQ.

   Network Install: Disk Cloning  
    If you are setting up a large farm, often you set up the software on one machine, then 'clone the disk' to all the other machines.

    With Rush, the idea is to ensure the /usr/local/rush/var directory is empty on all the cloned disks, so that the daemons on the cloned machines don't inherit stale files from the master (eg. old accounting logs, job checkpoint files, daemon logs with irrelevant error messages), as these files will negatively interfere with the cloned machines:

      Preparing A Master Disk To Be Cloned
        The following commands will prepare the cloning 'master disk'; shut down the rush daemon on this machine
        so that all files in the /usr/local/rush/var directory are closed, then clear out the 'var' directory
        completely by removing and re-creating it. Run these commands as root:
        
            /etc/init.d/rush stop
            rm -rf /usr/local/rush/var
            mkdir -m 755 /usr/local/rush/var
        	    

        The disk is now ready to be cloned.

        You can shut down the machine, but do not reboot it using this drive, or the daemon will start automatically,
        and the /usr/local/rush/var directory will have to be cleared again with the above commands.

    That should be all you need to do.

    If you made a mistake, and forgot to clear the /usr/local/rush/var directory, and cloned an entire farm accidentally, then run these cleanup commands with the farm running:

      Forgot To Do Preparation Steps? How To Clean Up
        If you forgot to prepeare the master disk for cloning, you can fix up the farm by running these commands as root:
        
        foreach i ( farm1 farm2 farm3 .. farm99 )
            echo -n Working on ${i}:
            rsh $i /etc/init.d/rush stop 
            rsh $i rm -rf /usr/local/rush/var
            rsh $i mkdir -m 755 /usr/local/rush/var
            rsh $i /usr/local/rush/etc/bin/install.sh
            rsh $i /usr/local/rush/etc/S99rush start
        end
        	    

        This will clean up a farm that was accidentally cloned with left over files in the /usr/local/rush/var directory.

   Installing www-rush  
To use www-rush, the web GUI interface for rush, make sure *one* of the rush machines is also running a web server (like Apache). You would only need to the following config on the web server.

  1. Copy the www-rush perl script to the webserver's 'cgi-bin' directory.
    
        cp /usr/local/rush/cgi-bin/www-rush /usr/local/apache/cgi-bin
    
  2. Install the www-rush documentation in the 'htdocs' directory.
    
        cp -rp /usr/local/rush/html/www-rush /usr/local/apache/htdocs/www-rush
    
  3. Test it by opening Netscape to the URL for the script.
    
        http://yourserver.com/cgi-bin/www-rush
    
  4. Customize the www-rush script's variables if need be.
    Usually the defaults work fine, but sometimes the variables at the top of the www-rush script will need to be modified to help it know about your web server's environment.

   Uninstalling Rush  

    1) Kill the daemon: 

           killall rushd

    2) Remove the entire /usr/local/rush directory: 

           rm -rf /usr/local/rush

    3) Remove the boot scripts: 

           rm /etc/init.d/rush /etc/rc?.d/[SK]??rush