Drupal Upgrade Plan 2010

Previous upgrade notes: Drupal Upgrade Plan --
 * These notes are mostly just a copy of the previous upgrade, but are being modified still :)

Upgrading the OSGeo Drupal CMS is a complicated task further complicated by the use of multi-site configuration. To upgrade from current 5.3 (??) to the newest 6.x (??) version the following steps should be taken (doubles as a check list):

= Time estimation = I estimate that the total read-only time for the OSGeo sites will be around 1 day if everything goes according to plan, this does not include the preliminary tasks which have to be completed prior to doing the upgrade.

= Preliminary tasks =

DNS Changes
Redirect any *test* instances?

Debian Package Installation
osgeo3/4 run debian linux OS. The server has no apache, drupal or any other packages already installed. Here is the list of packages to be installed to get support for our Drupal sites up and running:
 * apache2

UPDATE 6-Oct-10: The following packages have been installed: apache2 mysql5.1 php5-gd php5 php5-mysql php-5-cli

Review Module Availability

 * Which modules needed - check that all are available in 6.x

Current modules
Items marked with * are most important. Ones that are striked out are no longer needed.

Current modules
...

Theme upgrade
Wave a magic wand to complete this step.

web.osgeo.org server tasks

 * 1) install packages
 * 2) setup webroot like this:
 * 3) * /var/www/drupal -> drupal-version
 * 4) * /var/www/site.osgeo.org (most of /var/www/drupal stuff symlinked here)
 * 5) * This way all sites have their own files directory for uploads and images)
 * 6) install drupal (old version) - copy over from current site (v5.3)
 * 7) copy all sites over
 * 8) * all
 * 9) * default
 * 10) * osgeo.org
 * 11) * fdo.osgeo.org
 * 12) * mapguide.osgeo.org


 * 1) upgrade to Drupal 6 (more details later) detailed guide here

Steps
- To v6.x
 * 1) setup webroot as above
 * 2) copy osgeo1:/var/www/html over
 * 3) copy osgeo1:/var/www/*sites* over - HUGE
 * 4) osgeo1: mysqldump main site
 * 5) osgeo1: mysqldump multi sites
 * 6) create mysql db's
 * 7) import mysql dumps
 * 8) Test site works as currently
 * 9) check file perms
 * 10) Disable modules
 * 11) Upgrade to latest v5.x core files  5.23
 * 12) Upgrade module files as needed to latest v5.x
 * 13) run site.osgeo.org/update.php on each v5 site
 * 14) re-enable modules
 * 15) Test site works as currently
 * 1) change main drupal symlink to v6.x
 * 2) update module files to v6.x
 * 3) set up v6 sites folder for symlinks to /var/www/*sites*
 * 4) run update.php for each site as needed

osgeo2 server tasks

 * 1) download Drupal 4.7.8
 * 2) Download Drupal 5.3 and modules:
 * 3) * captcha
 * 4) * content (CCK)
 * 5) ** date
 * 6) ** imagefield
 * 7) ** number (comes with CCK)
 * 8) ** link (comes with CCK)
 * 9) ** optionwidgets (comes with CCK)
 * 10) ** text (comes with CCK)
 * 11) * diff
 * 12) * event
 * 13) ** basicevent
 * 14) * feedback
 * 15) * image
 * 16) ** image_gallery (part of image)
 * 17) * insert_block
 * 18) * LDAP Integration consists of:
 * 19) ** ldapauth
 * 20) ** ldapdata
 * 21) ** ldapgroups
 * 22) * locale
 * 23) ** localizer
 * 24) *** localizerblock
 * 25) *** localizermenu
 * 26) *** localizernode
 * 27) *** localizertaxonomy
 * 28) *** localizeruser
 * 29) *** localizerviews
 * 30) * path_image
 * 31) * pearwiki_filter
 * 32) * recent_changes
 * 33) * syndication
 * 34) * tinymce
 * 35) ** imce
 * 36) * views
 * 37) ** views_rss
 * 38) ** views_theme_wizard
 * 39) ** views_ui
 * 40) * webfm
 * 41) Build a new osgeo theme, visually the same as the old theme. Based on 5.3 bluemarine

These items still need doing


 * 1) create new directory structure
 * 2) * /var/www/drupal-5.3 (extracted from the tarball)
 * 3) * /var/www/drupal (symlnk to above)
 * 4) * /var/www/osgeo (symlink contents of drupal here)
 * 5) ** /var/www/osgeo/files
 * 6) * /var/www/fdo (like osgeo)
 * 7) * /var/www/mapguide
 * 8) * /var/www/mapbender

= Actual Upgrade sequence =

osgeo1

 * 1) Make a Backup of all 4 Drupal databases and the files.
 * 2) Make all Drupal sites read-only by taking away write access
 * 3) * http://osgeo.org/
 * 4) * http://fdo.osgeo.org/
 * 5) * http://mapguide.osgeo.org/
 * 6) * http://mapbender.osgeo.org/

osgeo2

 * 1) Extract osgeo1 files to /var/www/drupal
 * 2) Create a new databases for the sites
 * 3) * drupal_osgeo
 * 4) * drupal_fdo
 * 5) * drupal_mapguide
 * 6) * drupal_mapbender
 * 7) Move old drupal test.osgeo.net to run on dev.osgeo.net
 * 8) Add dev.osgeo.conf to Apache
 * 9) Point osgeo.conf to /var/www/drupal
 * 10) Point fdo.conf to /var/www/drupal
 * 11) Point mapguide.conf to /var/www/drupal
 * 12) Point mapbender.conf to /var/www/drupal
 * 13) Upgrade Drupal to 4.7.8
 * 14) Untar drupal-4.7.8 to /var/www/drupal-4.7.8
 * 15) Log in as 'admin' to osgeo site
 * 16) Log in as 'admin' to fdo site
 * 17) Log in as 'admin' to mapguide site
 * 18) Log in as 'admin' to mapbender site
 * 19) Disable all non-core modules on osgeo (with mysql update) [see below]
 * 20) Disable all non-core modules on fdo (with mysql update) [see below]
 * 21) Disable all non-core modules on mapguide (with mysql update) [see below]
 * 22) Disable all non-core modules on mapbender (with mysql update) [see below]
 * 23) Switch to bluemarine theme (Drupal standard) on osgeo (with mysql update) [see below]
 * 24) Switch to bluemarine theme (Drupal standard) on fdo (with mysql update) [see below]
 * 25) Switch to bluemarine theme (Drupal standard) on mapguide (with mysql update) [see below]
 * 26) Switch to bluemarine theme (Drupal standard) on mapbender (with mysql update) [see below]
 * 27) point browser to test.drupal.org/update.php
 * 28) point browser to fdo-test.drupal.org/update.php
 * 29) point browser to mapguide-test.drupal.org/update.php
 * 30) point browser to mapbender-test.drupal.org/update.php
 * 31) Upgrade to 5.3
 * 32) log in as admin
 * 33) Untar drupal-5.3 to /var/www/drupal-5.3
 * 34) point browser to test.drupal.org/update.php
 * 35) point browser to fdo-test.drupal.org/update.php
 * 36) point browser to mapguide-test.drupal.org/update.php
 * 37) point browser to mapbender-test.drupal.org/update.php
 * 38) install missing modules
 * 39) enable required modules
 * 40) enable the osgeo theme on osgeo
 * 41) enable the osgeo theme on fdo
 * 42) enable the osgeo theme on mapguide
 * 43) enable the osgeo theme on mapbender
 * 44) dump databases and tar files and move the new site over to osgeo1
 * 1) install missing modules
 * 2) enable required modules
 * 3) enable the osgeo theme on osgeo
 * 4) enable the osgeo theme on fdo
 * 5) enable the osgeo theme on mapguide
 * 6) enable the osgeo theme on mapbender
 * 7) dump databases and tar files and move the new site over to osgeo1

osgeo1

 * 1) load the new site files and databases
 * 2) edit apache config files to point to new sites.
 * 3) * www.drupal.org
 * 4) Point osgeo.conf to /var/www/drupal
 * 5) Point fdo.conf to /var/www/drupal
 * 6) Point mapguide.conf to /var/www/drupal
 * 7) Point mapbender.conf to /var/www/drupal

dev.osgeo.conf
 ServerName dev.osgeo.net DocumentRoot /var/www/html ErrorLog /var/log/httpd/osgeo-error_log CustomLog /var/log/httpd/osgeo-access_log common  Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all  

edu.osgeo.conf
 ServerName edu.osgeo.net DocumentRoot /var/www/moodle ErrorLog /var/log/httpd/osgeo-error_log CustomLog /var/log/httpd/osgeo-access_log common  Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all  

fdo-test.osgeo.conf
 ServerName fdo-test.osgeo.net DocumentRoot /var/www/fdo ErrorLog /var/log/httpd/osgeo-error_log CustomLog /var/log/httpd/osgeo-access_log common  Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all  

mapbender.osgeo.conf
 ServerName mapbender-test.osgeo.net DocumentRoot /var/www/mapbender ErrorLog /var/log/httpd/osgeo-error_log CustomLog /var/log/httpd/osgeo-access_log common  Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all  

mapguide.osgeo.conf
 ServerName mapguide-test.osgeo.net DocumentRoot /var/www/mapguide ErrorLog /var/log/httpd/osgeo-error_log CustomLog /var/log/httpd/osgeo-access_log common <Directory "/var/www/mapguide"> Options Indexes FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> </VirtualHost>

SQL to disable all non-core modules
alter table system set status=0 where where name != 'aggregator' and name != 'block' and name != 'blog' and name != 'blogapi' and name != 'book' and name != 'comment' and name != 'contact' and name != 'drupal' and name != 'filter' and name != 'forum' and name != 'help' and name != 'legacy' and name != 'locale' and name != 'menu' and name != 'node' and name != 'path' and name != 'ping' and name != 'poll' and name != 'profile' and name != 'search' and name != 'statistics' and name != 'taxonomy' and name != 'throttle' and name != 'tracker' and name != 'upload' and name != 'user' and name != 'watchdog' and name != 'bluemarine';

SQL to set bluemarine as the default theme
alter table variable set value='s:10:"bluemarine";' where name='theme_default'; delete from cache;