Maintaining PAHMA's webapps

PAHMA's CSpace implementation is supported by two sets of webapps:

  • CGI scripts which access the postgres database directly and (in some cases) update the database via Service API calls.  These all share the same .htaccess based authentication (a suboptimal approach).
  • Django webapps which share a Basic Auth framework for authentication (like the regular UI does).

It is anticipated that the CGI scripts will eventual migrate to the "official" Django-based framewok. In the meantime, these are maintained in an ad hoc fashion, and the procedures for maintaining them are described here and in GitHub.

  1. How to maintain the Prohibited Locations List.  The description of this feature may be found at: http://issues.collectionspace.org/browse/PAHMA-832
    1. Clone or fork the Tools GitHub repo.
    2. Navigate to Tools / webapps / cfg / 
    3. Edit the prohibitedLocations.csv file to add or subtract locations (NB: there are currently 16 prohibited locations)
    4. Save the file
    5. Commit the change back to GitHub, with apppriate notes
    6. ssh to pahma-dev.cspace.berkeley.edu
    7. Clone or fork the Tools GitHub repo.
      git clone ....
    8. Copy prohibitedLocations.csv to /var/www/cgi-bin; 
    9. Modify the list with your favorite text editor. One location per line (for now).
    10. Deploy the file to development for testing.
      scp prohibitedLocations.csv ...
    11. Test it. (how?)
    12. When you are satisfied the list is correct and functions properly, upload it to production:
      scp prohibitedLocations.csv ...
    13. Ensure that the file is readable by Apache and the correct SELinux tags set. The following seems to be working!
      [jblowe@pahma-dev cgi-bin]$ ls -lZ prohibitedLocations.csv
      -rw-r--r--. jblowe root unconfined_u:object_r:httpd_sys_script_exec_t:s0 prohibitedLocations.csv
      [jblowe@pahma-dev cgi-bin]$ ls -l prohibitedLocations.csv
      -rw-r--r--. 1 jblowe root 404 Aug 19 12:37 prohibitedLocations.csv
      
  2. How to maintain the .cfg files used by the CGI webapps
    1. TBD

The general process for developing and deploying CSpace-enabled Django webapps is described in the parent wiki page ?UC Berkeley web applications.

The specific procedures for PAHMA may be found below: