system-config/doc/source/wiki.rst
Clark Boylan 90cc17950b Add Wiki upgrade process documentation.
* doc/source/wiki.rst: Document the wiki upgrade process.

Closes-Bug: #1206300
Change-Id: I31d4ef0895c25b4b3da1b2a6deb31e6b67d74e6d
2013-07-30 11:31:17 -07:00

3.2 KiB

title

Wiki

Wiki

Mediawiki is installed on wiki.openstack.org.

At a Glance

Hosts
Puppet
  • modules/mediawiki
  • modules/openstack_project/manifests/wiki.pp
Projects
Bugs

Overview

wiki.openstack.org runs off of Wikmedia Foundation deployment branches. This was done to ease the pain of managing Mediawiki extensions. The foundation branches come with git submodules that refer to known good versions of extensions. Much (but not all) of the configuration is in puppet in the openstack-infra/config repository. Mediawiki upgrades are currently performed manually.

Mediawiki Upgrades

Two versions of Mediawiki are installed with one being the active install and the other being previously used version kept as a backup. The two installs can be found at /srv/mediawiki/slot0 and /srv/mediawiki/slot1. The /srv/mediawiki/w symlink refers to active Mediawiki install slot. To perform a Mediawiki upgrade:

  1. Determine which install slot is active ls -l /srv/mediawiki/w. Once this value is known do not use /srv/mediawiki/w in your commands, doing so will break the git submodules. Always use specific slot paths eg /srv/mediawiki/slot0.
  2. Fetch the latest git content in the inactive slot cd /srv/mediawiki/$INACTIVE_SLOT && git fetch.
  3. Find the latest Wikimedia Foundation branch git branch -a. Make sure this version matches http://www.mediawiki.org/wiki/Special:Version we don't want to upgrade until that upstream is running the latest version.
  4. Create and checkout a local tracking branch for the latest upstream branch git checkout -b wmf/1.22wmf11 origin/wmf/1.22wmf11.
  5. Update the git submodules for this new branch git submodule update --init.
  6. Take stock of the current state of extensions git status. You should see several untracked dirs for things like the strapping skin and openid. Any untracked extensions that we are not using should be removed.
  7. Update the untracked extensions that we are using cd $EXTENSION_DIR && git pull origin master. Note their may be conflicts doing this if security patches or bug fixes have been applied by hand. Refer to /srv/mediawiki/NOTES for info.
  8. Run the backup script /srv/mediawiki/backup.sh. This will backup the active slot to /srv/backup.
  9. Update the DB schemas php maintenance/update.php --quick. Be sure to run this within the slot you are upgrading (the inactive slot). If you used the cd in step 2 this should be the case. Mediawiki DB schemas are backward compatible so we can upgrade it without taking down the active slot.
  10. At this point we are ready to change the /srv/mediawiki/w symlink to point to the slot we just upgraded rm -f /srv/mediawiki/w && ln -s /srv/mediawiki/$PREVIOUSLY_INACTIVE_SLOT /srv/mediawiki/w. https://wiki.openstack.org/wiki/Special:Version should report the new version now.