Network/Roadmap/WikiMigration

From NURDspace
Revision as of 19:51, 30 July 2023 by R3boot (talk | contribs)

Summary

Move the wiki from our current hoster to a self managed system and perform an upgrade to the latest version

Architecture

This will be a straightforward mediawiki installation, hosted on an externally hosted vps managed by the bofh team.

Steps

Notify members of upcoming change

Since the wiki wont be usable during the period of the migration, a headsup must be sent to our members. This should be done via (atleast) the ML and IRC.

Prevent writes to wiki

See https://www.mediawiki.org/wiki/Manual:Preventing_access

Create backup

Fetch a copy of both the files and a database export from our current hoster, and store these

Prepare upgrade host

Install and configure a webserver + database server on the externally hosted machine

  • mariadb
  • Apache2
  • php5.6
  • php7.4

Perform upgrade

You will need two systems to perform this upgrade. First, the machine on which the upgrade is to be performed. On this, install apache, mariadb, php5.x and php7.x. The destination machine will receive a copy of all upgraded files + database, and should use php-fpm and nginx. Note that we stick with mediawiki LTS releases only.

Preparation

  • Download export of current wiki files and database
  • Create archive of mediawiki files excluding the images
  • Get a copy of the upgrade files for 1.27; mediawiki-1.27.tar.xz
  • Get a copy of the upgrade files for 1.35; mediawiki-1.35.tar.xz
  • Get a copy of the upgrade files for 1.39; mediawiki-1.39.tar.xz

Get current version working

  • Modify /etc/hosts and point nurdspace.nl to the upgrade machine
  • Import database
  • Extract archive to /var/lib/mediawiki
  • Fix database details in LocalSettings.php
  • Set wgServer to http://nurdspace.nl
  • Enable mod_php5.6
  • Test if site is working

Upgrade to mediawiki-1.27

  • Move /var/lib/mediawiki to /var/lib/mediawiki-current
  • Extract mediawiki-1.27.tar.xz to /var/lib/mediawiki
  • Copy LocalSettings.php from previous install
  • set wgDefaultSkin to Vector
  • Comment out all extensions
  • Run php maintenance/upgrade.php
  • Enable mod_php7.4
  • Test if site is working (some errors are to be expected)

Upgrade to mediawiki-1.35

  • Extract mediawiki-1.35.tar.xz to /var/lib/mediawiki
  • Copy LocalSettings.php from previous install
  • Run php maintenance/upgrade.php
  • Test if site is working (some errors are to be expected)

Upgrade to mediawiki-1.39

  • Extract mediawiki-1.39.tar.xz to /var/lib/mediawiki
  • Copy LocalSettings.php from previous install
  • Re-enable all extensions
  • Install simplesaml to /var/lib/simplesaml
  • Update wgSamlSspRoot to /var/lib/simplesaml
  • Run php maintenance/upgrade.php
  • Copy images from backup
  • Copy skins/common/images from backup
  • Test if site is working (some errors are to be expected)

Mediawiki upgrade

  • Create backup of /var/lib/mediawiki
  • Create database backup
  • Extract new version of mediawiki to /var/lib/mediawiki
  • Copy LocalSettings.php from previous version
  • Grep for installed extensions in LocalSettings.php; For each extension, run the installation procedure
  • Run php maintenance/upgrade.php

Test

Make sure that everything works as expected, use the hosts file to 'spoof' the required DNS entries to get this to work. Be sure to test authentication

Migrate the website

Swith the nurdspace.nl DNS entry to the ip address(es) of the externally managed host