The original version(s) of GLASS took a ‘kitchen-sink’ approach Seaside–everything was included, including available add-ons (such as Pier) and samples (such as the sushi store). This made it very easy to start playing with Seaside on GemStone, but makes upgrades rather awkward since it isn’t always clear which versions of which packages should be loaded together. And this is the problem that Metacello was designed to solve.
Starting with GemStone 18.104.22.168, the provided image (extent0.seaside.dbf) does not have Seaside loaded, but loading either Seaside 2.8 or Seaside 3.0 is relatively easy. The problem, is that there may be many packages you wish to unload to achieve the ‘tidy’ approach now encouraged by Metacello.
This blog post describes one such path to upgrading that I’ve used successfully.
- Make a backup of your system and test the following on a copy of your production system.
- Log in to GemStone and stop other sessions (‘System stopUserSessions’).
- Add http://seaside.gemstone.com/ss/GLASS to your list of Monticello repositories.
- Load the UpgradeTool package, giving you the UpgradeTool class.
- Copy the shell script in the #’shellScriptForInstallGLASS’ method.
- In a workspace, execute ‘UpgradeTool new doRemoveTasks’ to remove GLASS-related classes and methods.
- Log out of GemStone.
- In a bash shell, set the GEMSTONE environment variable (and PATH to include $GEMSTONE/bin), then paste the shell script code copied earlier.
- Review the log file to see that the script ended with an errorCount of zero (0).
- Log in to GemStone and turn off auto-migrate (we will do a bulk-migrate later).
- Re-add the GLASS repository as well as any of your application repositories.
- Load the UpgradeTool package as well as all of your application packages. The load should not change any code, but will add the packages to the list of loaded packages.
- In a workspace, execute ‘UpgradeTool new loadSeaside28’ to load the base Seaside.
- Load any other add-on packages (for example, SeasideAsync.g).
- Seaside 2.8 is now loaded, but your existing subclasses still have the old superclass. In a workspace, execute ‘UpgradeTool new doCleanupTasks’ to recompile classes and migrate instances.
- Check UndefinedSymbols to see that the size is only one (1)–the dictionary itself. If there are other names present, then you probably need to load additional packages and repeat the cleanup step.
- Initialize your Seaside applications to reregister them as visible applications.
- Restart the web server (Hyper or FastCGI) and try things out!
This should give you a database with your classes and data still present, but the surrounding Seaside framework should be much cleaner. Now you can start thinking about migrating to Seaside 3.0 (more on this later!).