[rt-devel] Suggestion/Question for multiple RT instances/versions

Bob Goldstein bobg at uic.edu
Fri Nov 21 19:00:02 EST 2003


Am I way off on the following?  I'd like to be able to give
each of 10-100 departments their own instance of RT, but run
everything centrally.  Each instance might need some cusomtization
(e.g. a departmental logo on the page, separate database in mysql,
maybe other minor tweaks to the interface.)  And I'd like to
be able to run different versions of RT so that I can test
a new version without overwriting the production one, and so
I can move a department one-at-a-time to the new version
(possibly with new customizations.)

RT with fastcgi is very close to this, but I'm slightly stymied
by paths and variables that are hardcoded at configure/make time.
I really want to pass these dynamically.

I'd lay out the directories like this:

/usr/local/rt-3.0.6/...   ## full 3.0.6 install, production
/usr/local/rt-3.0.7/...   ## full 3.0.7 install, testing
/usr/local/rt-instances/dept1/...  ## local RT_SiteConfig + local Overlay,
                                                   local callbacks
/usr/local/rt-instances/dept2/...  ## and so on

Then my apache config would have this:

	    ## production instance for dept1
FastCgiServer /usr/local/rt-3.0.6/bin/mason_handler_dept1.fcgi
                       -initial-env rt_localpath=/usr/local/rt-instances/dept1/
ScriptAlias /dept1 /usr/local/rt-3.0.6/bin/mason_handler_dept1.fcgi

	    ## production instance for dept2
FastCgiServer /usr/local/rt-3.0.6/bin/mason_handler_dept2.fcgi
                       -initial-env rt_localpath=/usr/local/rt-instances/dept2/
ScriptAlias /dept2 /usr/local/rt-3.0.6/bin/mason_handler_dept2.fcgi

	    ## test instance for dept2
FastCgiServer /usr/local/rt-3.0.7/bin/mason_handler_dept2-test.fcgi
                       -initial-env rt_localpath=/usr/local/rt-instances/dept2/
ScriptAlias /dept2-test /usr/local/rt-3.0.7/bin/mason_handler_dept2-test.fcgi


[Note: the mason_handler*.fcgi are all the same file, with symlinks.
I just need different names so that FastCgi can manage them with
different values of rt_localpath.]

So what I think I need is:

   1. mason_handler.fcgi should accept the 'rt_localpath' environment
       and pass this value to webmux.pl

   2. webmux.pl could use this value in 'use lib' to decide where
      to look for the RT.pm  It would also pass this value:

      BEGIN { use RT( $ENV{rt_localpath} ) };

   3. RT.pm, in turn, would use this value to construct important
      paths, such as
         $SITE_CONFIG_FILE
	 $BasePath
	 $MasonComponentRoot
	 ...


If I'm not missing too much, this gives us enough late binding
that I could control which version of RT or a department (local
overlays) by just a line or two in apache.

If there was any general interest, I'd be happy to submit
my diffs.  But before I work on this, I'd appreciate suggestions
for strategy, or just how general I should make it.

   Bob Goldstein



More information about the Rt-devel mailing list