Changes between Version 31 and Version 32 of OSLMigration

Show
Ignore:
Author:
kuechlej (IP: 128.193.38.114)
Timestamp:
07/13/09 14:57:24 (4 months ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OSLMigration

    v31 v32  
    22The Open Source Lab environment is drastically different from our solution with Central Web Services. The largest problem we ran into was bugs that used a managed postgres cluster as oppose to running the server locally. It took a lot of time to understand which permissions were needed, since we normally use superuser access on the current local server.   
    33 
    4 Another difference was that the OSL uses WSGI instead of mod_python for Apache. This required us to change our configurations around for the vhosts, but wasn't too big of a deal.  
    5  
    6 Because of the managed environment, we had to change our file structure a bit, and change where things are located. These have been taken care of for the most part with symlinks, but a few paths are still a bit different.  
     4The OSL also uses WSGI instead of mod_python for Apache. This required us to change our configurations around for the vhosts, but wasn't too big of a deal.  
     5 
     6Because of the managed environment, we had to change our file structure as well as change where '''things''' are located. These have been solved with symlinks for the most part, but a few paths are still a bit different.  
    77 
    88== OSL Environment == 
    4444 
    4545=== Apache === 
    46 For our Apache setup, we have two separate vhosts. These are for beaversource.oregonstate.edu and code.oregonstate.edu. The first vhost(beaversource) handles all of the web frontend including Elgg, Trac, and Django. The second vhost(code) is specifically for handling the SVN repositories. The working vhosts are included below.  
     46For our Apache setup, we have two separate vhosts. These are for beaversource.oregonstate.edu and code.oregonstate.edu. The first vhost(beaversource) handles all of the web front-end including Elgg, Trac, and Django. The second vhost(code) is specifically for handling the SVN repositories. The working vhosts are included below.  
    4747 
    4848beaversource.oregonstate.edu vhost: 
    161161 
    162162=== Subversion === 
    163 We implement hooks in each project repository in order to do things like limit the size of commits, enforce permissions, and let Trac interact with commits. With hardened Gentoo, we ran into issues with grsec not letting use execute the chain of scripts for each hook because the absolute path to the interpreter wasn't included in the hook script(thusly relying on 'shebangs' to identify interpreters). In order to solve this problem, we first needed to ensure that the chain of hook scripts were all in a single language(purely for simplicity), and then had to append the path to that interpreter. Since the majority of our scripts were Python(all but one), we rewrote the one script in Python, and appended the path to the Python interpreter in each hook(/usr/bin/python in our case). This was done for all existing repositories with the following script, which was run from /data/svn with root privileges. 
     163We implement hooks in each project repository in order to manage the size limits of commits, enforce permissions, and let Trac interact with commits. With hardened Gentoo, we ran into issues with grsec that wouln't let us execute the chain of scripts for each hook because the absolute path to the interpreter wasn't included in the hook script(thusly relying on 'shebangs' to identify interpreters). In order to solve this problem, we first needed to ensure that the chain of hook scripts were all in a single language (purely for simplicity), and then had to append the path to that interpreter. Since the majority of our scripts were Python (all but one), we rewrote '''the one''' script in Python, and appended the path to the Python interpreter in each hook (/usr/bin/python in our case). This was done for all existing repositories with the following script, which was run from /data/svn with root privileges. 
    164164{{{ 
    165165#!/bin/bash 
    174174}}} 
    175175 
    176 We also need to ensure that all new projects have their hooks created properly, so we edited beaversource.py to append the path when hooks are created. 
     176We also needed to ensure that all new projects have their hooks created properly, so we edited beaversource.py to append the path when hooks were later created. 
    177177 
    178178=== Elgg === 
    179 Setting up Elgg is pretty straight forward, and didn't change much with the migration
    180  
    181 First thing we need to do is check out the latest Elgg tag from the admin projects source repository into the right directory: 
     179Elgg didn't change much with the migration; the Elgg setup was pretty straightforward
     180 
     181First thing we needed to do was checkout the latest Elgg tag from the admin projects source repository into the right directory: 
    182182{{{ 
    183183$ cd /var/www/beaversource.oregonstate.edu 
    185185}}} 
    186186 
    187 With Elgg checked out, we can now create the settings file. We do this by copying the example file into place. 
     187With Elgg checked out, we could then create the settings file. We did this by copying the example file into place. 
    188188{{{ 
    189189$ cp config-dist.php config.php 
    190190}}} 
    191191 
    192 The configuration file Beaversource uses is quite a bit different than the standard file that ships with Elgg. An example has been included below. 
     192The configuration file Beaversource uses is significantly different than the standard file that ships with Elgg. An example has been included below. 
    193193 
    194194Elgg Configuration: 
    233233A few notes on the Beaversource Elgg configuration: 
    234234 * We are using Postgres8, but the config still requires that we put 'postgres7' 
    235  * The added config options are for both SSO and connecting to the project meta data(Django). These are VERY IMPORTANT
     235 * The added config options are for both SSO and connecting to the project meta data(Django). These are '''VERY IMPORTANT'''
    236236 
    237237Apache Vhost: 
    285285 * Django 1.0 is installed and managed by the OSL. 
    286286 
    287 With Django installed, we need to checkout the webmanagement project from subversion.  
     287With Django installed, we needed to checkout the webmanagement project from subversion.  
    288288{{{ 
    289289$ cd /data/django/webmanagement 
    291291}}} 
    292292 
    293 With the project in place, it is important to put the settings file in place. 
     293With the project in place, it was important to put the settings file in place. 
    294294{{{ 
    295295$ cp settings.py.dist settings.py 
    296296}}} 
    297297 
    298 With your favorite text editor, open settings.py and edit the pertinent information(Email addresses, DB info, file paths). I've included an example settings file that works below. 
     298You can edit this file with a text editor. Open settings.py and edit the pertinent information (Email addresses, DB info, file paths). I've included an example settings file that works below. 
    299299 
    300300One of the few differences that using WSGI causes effects the urls file. Since WSGI interprets the url we want to use(/request in this case) as the root mountpoint(/), its important to remove the 'request' from our urlconf. You can see this in the following diff: 
    309309}}} 
    310310 
    311 The last thing to make sure the webmanagement Django project is working properly is SSO. When you checked out webmanagement from svn, you also pulled in the SSO middleware that was written to handle OregonState SSO auth. This should all work out of the box once you place trac.ini into /data/management. This should be completed when you get the Trac environment up and running. 
     311SSO is the last component to check that will verify that the webmanagement Django project is working properly. When you checked out webmanagement from svn, you also pulled in the SSO middleware that was written to handle OregonState SSO auth. This should all work out of the box once you place trac.ini into /data/management. This should be completed when you get the Trac environment up and running. 
    312312 
    313313I've included the sections of the Apache config and the WSGI script we use for Django.