wiki:NDGBrowseHowTo

Version 5 (modified by lawrence, 12 years ago) (diff)

--

How to Install the NDG Browse Code

[This page is NOT FINISHED ... and is not a real guide to do anything YET]

(Intended for *full* NDG data providers: that is, data providers who *do* have their own browse repository of MOLES documents.)

Note that the new browse and discovery code is integrated using paste, so you will need to ensure you have all the paste code installed in your python. In the following instructions, I'll assume you have access to your python, and that it exists at /your/path/bin/python. You may not need all these steps depending on the state of your system, and you may have needed to ensure that you have a http proxy variable set!

  1. Setup fastcgi. Your apache configuration should have something like this in it:
    <IfModule mod_fastcgi.c>
      Alias /retrieve "/var/www/fastcgi/ndg"
      Alias /browse "/var/www/fastcgi/ndg"
      Alias /discovery "/var/www/fastcgi/ndg"
      Alias /layout "/var/www/fastcgi/ndg"
      <Directory /var/www/fastcgi>
        SetHandler fastcgi-script
        Order allow,deny
        Allow from all
      </Directory>
      # following socket ought to be setup by paste via ndg.ini (bnl)
      FastCgiExternalServer /var/www/fastcgi/ndg -socket /tmp/ndg_fastcgi.soc
    </IfModule>
    
  2. Make sure the pieces we need from paste are installed:
    /your/path/bin/easy_install paste
    /your/path/bin/easy_install PasteDeploy
    /your/path/bin/easy_install PasteScript
    /your/path/bin/easy_install flup
    
  3. If your python is 2.4 or less (it comes as standard in 2.5), you'll need elementtree:
    /your/path/bin/easy_install elementtree
    
  4. And now for the big one, we need a recent version of ZSI. I've used the default today, which pulled

ZSI-2.0RC3. Watch out for this one because a later one might break. Let me know how this goes!:

/your/path/bin/easy_install 
  1. Modify 00deploy.sh so that MYPYTHONBIN points to your python:
    MYPYTHONBIN=/your/path/bin/
    
  2. Modify the contents of ndg.ini so that the socket matches the description in your fastcgi setup, so it has this in the server.main section:
    use = egg:PasteScript#flup_fcgi_thread
    socket = /tmp/ndg_fastcgi.soc
    
  3. Create a passwords.txt file and make sure it exists in the directory from which you run the deploy script (and check that you can't get access to that directory via the web!). It is for allowing the browse code access to your exist repository and should have the following format:
    your.repository.name exist_access_usercode password
    
  4. x
  5. ...

Obsolete Instructions Follow

This version of the page discusses what I did to install NDG browse on superglue, based on the glue distribution (which is older than that in SVN, but considered "stable").

  1. Tarred up the glue distribution (should have used an svn distribution, but there were useful stable mods post alpha but before the current version)
    1. In /var/www/cgi-bin. I used tar czvf ~lawrence/browse.tgz browse*
    2. In /var/www/html. I used tar czvf ~lawrence/layout.tgz layout*
  2. Unpack files
    1. c.d into the appropriate cgi-bin directory. I think this should be /var/www/cgi-bin
      1. Unpack ... tar xzvf yourbrowsetarfile
    2. c.d into the appropriate layout directory /var/www/html/
      1. Unpack ... tar xzvf yourlayouttarfile
  3. Edit the browse config file in /var/www/cgi-bin so that
    1. the localAA and localSM point to an installation of NDG security running on this system.
    2. the exist database is the superglue one ...
    3. Wonder, like I did, about the libraryLOC, but don't do anything.

At this point I visited  http://host/cgi-bin/browse.py and it crashed with a security releated problem.

Message sent to list.