Changes between Version 31 and Version 32 of OSLMigration
- Timestamp:
- 07/13/09 14:57:24 (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OSLMigration
v31 v32 2 2 The 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. 3 3 4 Another difference was that the OSLuses 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.4 The 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 6 Because 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. 7 7 8 8 == OSL Environment == 44 44 45 45 === 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 front end including Elgg, Trac, and Django. The second vhost(code) is specifically for handling the SVN repositories. The working vhosts are included below.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 front-end including Elgg, Trac, and Django. The second vhost(code) is specifically for handling the SVN repositories. The working vhosts are included below. 47 47 48 48 beaversource.oregonstate.edu vhost: 161 161 162 162 === 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.163 We 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. 164 164 {{{ 165 165 #!/bin/bash 174 174 }}} 175 175 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 arecreated.176 We 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. 177 177 178 178 === 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 checkout the latest Elgg tag from the admin projects source repository into the right directory:179 Elgg didn't change much with the migration; the Elgg setup was pretty straightforward. 180 181 First thing we needed to do was checkout the latest Elgg tag from the admin projects source repository into the right directory: 182 182 {{{ 183 183 $ cd /var/www/beaversource.oregonstate.edu 185 185 }}} 186 186 187 With Elgg checked out, we c an now create the settings file. We dothis by copying the example file into place.187 With Elgg checked out, we could then create the settings file. We did this by copying the example file into place. 188 188 {{{ 189 189 $ cp config-dist.php config.php 190 190 }}} 191 191 192 The configuration file Beaversource uses is quite a bitdifferent than the standard file that ships with Elgg. An example has been included below.192 The configuration file Beaversource uses is significantly different than the standard file that ships with Elgg. An example has been included below. 193 193 194 194 Elgg Configuration: 233 233 A few notes on the Beaversource Elgg configuration: 234 234 * 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'''. 236 236 237 237 Apache Vhost: 285 285 * Django 1.0 is installed and managed by the OSL. 286 286 287 With Django installed, we need to checkout the webmanagement project from subversion.287 With Django installed, we needed to checkout the webmanagement project from subversion. 288 288 {{{ 289 289 $ cd /data/django/webmanagement 291 291 }}} 292 292 293 With the project in place, it is important to put the settings file in place.293 With the project in place, it was important to put the settings file in place. 294 294 {{{ 295 295 $ cp settings.py.dist settings.py 296 296 }}} 297 297 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.298 You 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. 299 299 300 300 One 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: 309 309 }}} 310 310 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.311 SSO 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. 312 312 313 313 I've included the sections of the Apache config and the WSGI script we use for Django.

