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.
- How to maintain the Prohibited Locations List. The description of this feature may be found at: http://issues.collectionspace.org/browse/PAHMA-832
- Clone or fork the Tools GitHub repo.
- Navigate to Tools / webapps / cfg /
- Edit the prohibitedLocations.csv file to add or subtract locations (NB: there are currently 16 prohibited locations)
- Save the file
- Commit the change back to GitHub, with apppriate notes
- ssh to pahma-dev.cspace.berkeley.edu
- Clone or fork the Tools GitHub repo.
git clone ....
- Copy prohibitedLocations.csv to /var/www/cgi-bin;
- Modify the list with your favorite text editor. One location per line (for now).
- Deploy the file to development for testing.
scp prohibitedLocations.csv ...
- Test it. (how?)
- When you are satisfied the list is correct and functions properly, upload it to production:
scp prohibitedLocations.csv ...
- 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
- How to maintain the .cfg files used by the CGI webapps
- 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: