Child pages
  • mSub at the University of Western Ontario
Skip to end of metadata
Go to start of metadata

Description

This document describes how the University of Western Ontario's mSub was set up and organized. You can find our mSub at

https://source.sakaiproject.org/svn/msub/uwo.ca

Structure

Western's implementation of Sakai

Western's implementation of Sakai is called OWL. At the root of our mSub we have a directory called "owl", and underneath that we have "trunk", "branches", and "tags", like so:

  • .../svn/msub/uwo.ca
    • /owl
      • /trunk
      • /branches
      • /tags

The trunk, branches, and tags are essentially "virtual". There is no actual code in these directories, only references in a .externals file to other areas of the repository. A .externals file looks something like this (many lines omitted):

access https://source.sakaiproject.org/svn/access/branches/sakai-2.8.x
alias https://source.sakaiproject.org/svn/alias/branches/sakai-2.8.x
announcement https://source.sakaiproject.org/svn/announcement/branches/sakai-2.8.x
archive https://source.sakaiproject.org/svn/archive/branches/sakai-2.8.x
assignment https://source.sakaiproject.org/svn/assignment/branches/sakai-2.8.x
authz https://source.sakaiproject.org/svn/authz/branches/sakai-2.8.x
calendar https://source.sakaiproject.org/svn/calendar/branches/sakai-2.8.x
...

In the example above, the file is telling subversion that the code for the access tool is actually located at https://source.sakaiproject.org/svn/access/branches/sakai-2.8.x. The same goes for the other tools.

Setting up the trunk

To set up our trunk, we first created a "trunk" directory in the mSub, then copied in the contents of https://source.sakaiproject.org/svn/sakai/branches/sakai-2.8.x/, on which our trunk was based (we could have also based it on a tag instead). Now it would look like this:

  • .../svn/msub/uwo.ca
    • /owl
      • /trunk
        • /.externals
        • /pom.xml
        • /...a few other files...
      • /branches
      • /tags

To turn this from a vanilla Sakai branch into the OWL trunk, we first had to modify the .externals file. We'll go into the details of the modifications later on, but for now we'll just outline the process:

  1. Checkout the trunk (svn co https://source.sakaiproject.org/svn/msub/uwo.ca/owl/trunk trunk)
  2. Edit the .externals file
  3. Commit the changes (svn commit .externals -m "modifying .externals")
  4. Update the svn:externals property (svn propset svn:externals -F .externals .)
  5. Commit the property change (svn commit . -m "updating svn:externals")

At this point you could run svn update and it would pull down all the code for the various tools in your Sakai implementation.

Western's custom tools

For customized tools, we use a structure where each tool has its own directory at the root, and trunk, branches, and tags directories underneath, like so:

  • .../svn/msub/uwo.ca
    • /site-manage
      • /trunk
      • /branches
      • /tags
    • /newTool1
      • /trunk
      • /branches
      • /tags

These tools might be custom versions of existing Sakai tools (ie. site-manage), or they might be brand new tools (ie. newTool1). For the site-manage tool, we copied the 2.8.x branch of the tool into our site-manage/trunk, checked it out, and committed our changes back. For newTool1, we imported code we had written from scratch into newTool1/trunk.

You've probably guessed by now that our modifications to .externals involve pointing some of the references to our custom tools. Here's how this looks:

access https://source.sakaiproject.org/svn/access/branches/sakai-2.8.x
alias https://source.sakaiproject.org/svn/alias/branches/sakai-2.8.x
...
roster https://source.sakaiproject.org/svn/roster/branches/sakai-2.8.x
rwiki https://source.sakaiproject.org/svn/rwiki/branches/sakai-2.8.x
sections https://source.sakaiproject.org/svn/sections/branches/sakai-2.8.x
site https://source.sakaiproject.org/svn/site/branches/sakai-2.8.x
#site-manage https://source.sakaiproject.org/svn/site-manage/branches/sakai-2.8.x
syllabus https://source.sakaiproject.org/svn/syllabus/branches/sakai-2.8.x
...

site-manage https://source.sakaiproject.org/svn/msub/uwo.ca/site-manage/trunk
newTool1 https://source.sakaiproject.org/svn/msub/uwo.ca/newTool1/trunk

Note that the original site-manage reference has been commented out, and our new references have been placed at the bottom.

Building

Since we used the default pom.xml from the 2.8.x branch, it doesn't know about newTool1. We added a <module> line for it under the "full" profile.

Now that the pom.xml is correct, we can build the trunk:

  1. Pull down the tool sources if you don't have them yet (svn update or svn co)
  2. cd master
  3. mvn clean install
  4. cd ..
  5. mvn clean install

Full structure

Here is how the full mSub structure might look once we have some tags:

  • .../svn/msub/uwo.ca
    • /owl
      • /trunk
      • /branches
      • /tags
        • /2.8.x-owl1
        • /2.8.x-owl2
    • /site-manage
      • /trunk
      • /branches
      • /tags
        • /2.8.x-owl1
    • /newTool1
      • /trunk
      • /branches
      • /tags
        • /1.0

Working with the code

Whenever we get down to modifying code, we are always working at the tool level in our mSub, either in the tool trunk or in a branch. We checkout the relevant tool from our mSub, make changes, and commit back. The code for any tools that we haven't modified or created remains outside of our mSub. If we need to make modifications to an existing Sakai tool we haven't touched before, we pull a copy into our mSub.

Tagging releases

We like to tag our releases before they go into production. This is easily managed by tagging individual tools and then referencing those tags in the .external of the overall OWL tag. For example, .../msub/uwo.ca/owl/tags/2.8.x-owl1/.external might look something like this:

access https://source.sakaiproject.org/svn/access/branches/sakai-2.8.x
alias https://source.sakaiproject.org/svn/alias/branches/sakai-2.8.x
...
roster https://source.sakaiproject.org/svn/roster/branches/sakai-2.8.x
rwiki https://source.sakaiproject.org/svn/rwiki/branches/sakai-2.8.x
sections https://source.sakaiproject.org/svn/sections/branches/sakai-2.8.x
site https://source.sakaiproject.org/svn/site/branches/sakai-2.8.x
#site-manage https://source.sakaiproject.org/svn/site-manage/branches/sakai-2.8.x
syllabus https://source.sakaiproject.org/svn/syllabus/branches/sakai-2.8.x
...

site-manage https://source.sakaiproject.org/svn/msub/uwo.ca/site-manage/tags/2.8.x-owl1
newTool1 https://source.sakaiproject.org/svn/msub/uwo.ca/newTool1/tags/1.0
  • No labels