Forum OpenACS Q&A: Re: Proper package upgrade method

Collapse
Posted by Dave Bauer on
OpenACS has a reasonably reliable upgrade system for released packages.

You can visit /acs-admin/install for the friendly installer, or /acs-admin/apm/packages-install for the developer's installer which let's who choose which SQL scripts to run and override dependencies etc.

Every package is supposed to inclde upgrade scripts that will take your existing packgae version and update it to the new version.

Of course, always backup your database before you do this, because you never know :) One of the steps of the release process for OpenACS requires testing of upgrades, but it is impossible to test every combination of packages and custom code, so it is a good idea to test upgrades on a staging server before updating your production system.

If you maintain a local CVS repository there is a recommended technique to merge the new OpenACS code into your repository https://openacs.org/doc/openacs-5-2/upgrade-openacs-files.html

That also documents getting new code if you site is not in CVS.

More options are documented here https://openacs.org/doc/openacs-5-2/upgrade-5-0-dot.html

Collapse
Posted by Ryan Gallimore on
Thanks, daveb. Very helpful.

Must you delete an older package before upgrading? Do upgrade scripts respect existing data?

And on a related note: I understand the best way to remove a package instance from a subsite is to unmount it and then delete it. Doing this before deleting an application from the APM is a must.

1. Why doesn't the APM on uninstalling a package, unmount all instances? Actually, I think XoWiki does do this, but it's the only example I've seen.

2. Are there any standards for package creation, deployment, and upgrade support?

3. Can we remove the little trash can delete buttons from the Applications admin tab, as they almost never work, or include the code from the unmount/delete site node process in that functionality?

Cheers.

Collapse
Posted by Dave Bauer on
No upgrading means you don't have to delete anything. All your existing data will stay where it is. (But backup first, of course.)

Uninstall of packages just hasn't seen as much attention as installing. Basically on the real systems most OpenACS developers work on, packages aren't deleted so its not a huge issue.

On experimental systems, I just reinstall. It doesn't take that long.

There _is_ a way to have all packages uninstall/delete themselves cleanly. Every package may implement an unmount/delete instance/uninstall package callback that runs custom code for each package when these events occur.

Not all packages have been updated to use these callbacks for uninstall type events yet. In general, as I said, most sites do not require deleting of data, so this area is neglected.