Upgrading the OpenACS files

OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.

Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 5.1 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

Upgrading files for a site using the OpenACS.org CVS repository

  1. [$OPENACS_SERVICE_NAME ~]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs up -Pd
    (CVS feedback)
    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$

Upgrading a Production Site Safely

If you are upgrading a production OpenACS site which is on a private CVS tree, this process lets you do the upgrade without risking extended downtime or an unusable site:

  1. Declare a freeze on new cvs updates - ie, you cannot run cvs update on the production site

  2. Make a manual backup of the production site in addition to the automated backups

  3. Import the new code (for example, OpenACS 5.0.4, openacs-5-0-compat versions of ETP, blogger, and other applications) into a "vendor branch" of the $OPENACS_SERVICE_NAME CVS tree, as described in "Upgrading a local CVS repository", step 1, above. As soon as we do this, any cvs update command on production might bring new code onto the production site, which would be bad.

    Do step 2 above (merging conflicts in a $OPENACS_SERVICE_NAME-upgrade working tree).

  4. Manually resolve any conflicts in the working upgrade tree

  5. Use the upgrade script and a recent backup of the production database, to ake a new upgraded database called $OPENACS_SERVICE_NAME-upgrade. Now we have a new website called $OPENACS_SERVICE_NAME-upgrade.

  6. Test the $OPENACS_SERVICE_NAME-upgrade site

  7. If $OPENACS_SERVICE_NAME-upgrade is fully functional, do the real upgrade.

    1. Take down the $OPENACS_SERVICE_NAME site and put up a "down for maintenance" page.

    2. Repeat the upgrade with the most recent database

    3. Test the that the new site is functional. If so, change the upgraded site to respond to yourserver.net requests. If not, bring the original production site back up and return to the merge.

View comments on this page at openacs.org