Jump to content

ICANNWiki:Upgrade to MediaWiki 1.44

This project involves upgrading an existing MediaWiki installation from version 1.43 to version 1.44. Mark D. has requested certain features and these are only available in 1.44 or later. The primary objective is to ensure a smooth transition to the latest stable version, leveraging bug fixes, security enhancements, and potential new features provided by MediaWiki 1.44. The expected outcome is a functional, stable, and secure MediaWiki installation operating on version 1.44, with minimal disruption to existing content and functionality.

  • User:MarkWD: Our weakest days are between later Fridays and earlier Mondays, so timing-wise that window would be the best, in case that is possible.

Scope of Work

In Scope:

  • Upgrading the core MediaWiki software to version 1.44.
  • Updating all installed extensions to versions compatible with MediaWiki 1.44.
  • Database schema updates required by the upgrade process.
  • Configuration adjustments to align with MediaWiki 1.44 best practices.
  • Thorough testing of core functionality and extensions after the upgrade.
  • Documentation of the upgrade process and any configuration changes.
  • Backups of the existing MediaWiki installation and database prior to the upgrade.

Out of Scope:

  • Major redesign of the wiki's appearance or information architecture.
  • Development of new extensions or significant modifications to existing ones. (Compatibility updates are in scope).
  • Migration to a different hosting environment.
  • Content migration or data cleansing.
  • Training for wiki users on new features (though documentation will be provided).

Functional Requirements

  1. Core Functionality: The upgraded wiki must retain all core MediaWiki functionality, including:
    • Article creation, editing, and viewing.
    • User account management (account requests, account approvals, login, permissions).
    • Search functionality.
    • Revision history and rollback capabilities.
    • Category and template functionality.
  2. Extension Compatibility: All currently installed extensions must be compatible with MediaWiki 1.44.
    • Each extension must be updated to a version that supports MediaWiki 1.44.
    • If a compatible version of an extension is not available and the implementer determines that adapting the current extension to the new MediaWiki release is untenable, a suitable alternative must be identified and implemented (with stakeholder approval).
      • User:MarkWD: Approved Revs is not in use and since it deals with data display, it could be disabled ahead of the update to shorten the list of content-affecting extensions.✔ AR is disabled.
  3. Database Upgrade: The database schema must be successfully upgraded to be compatible with MediaWiki 1.44.
    • The upgrade process must not result in data loss.
    • The upgrade process must be completed within a reasonable timeframe (defined in the Performance section).
  4. Configuration: The wiki configuration must be updated to reflect best practices for MediaWiki 1.44.
    • All critical configurations (e.g., database connection, site URL) must be verified.
    • Any deprecated configuration options must be addressed.
  5. Backup and Restore: A verified backup and restore process must be available in case of upgrade failure.
    • The backup must include the uploaded files, the database, and the deployed wiki configuration, including versions.
    • The restore process must be tested to ensure data integrity.

Non-Functional Requirements

  1. Performance:
    • The upgrade process must be completed within an acceptable downtime window (e.g., less than 2 hours). This will need to be confirmed based on the size of the wiki and database.
    • The upgraded wiki must maintain acceptable page load times (less than 3 seconds for common pages).
    • Database queries must not experience significant performance degradation after the upgrade.
  2. Security:
    • The upgrade must address any known security vulnerabilities present in MediaWiki 1.43.
    • The upgraded wiki must adhere to security best practices for MediaWiki 1.44.
    • Access control mechanisms must remain fully functional after the upgrade.
  3. Usability:
    • The upgrade must not negatively impact the user experience.
    • Existing wiki templates and layouts should render correctly after the upgrade.
  4. Compatibility:
    • The upgraded wiki must be compatible with currently supported web browsers (Chrome, Firefox, Safari, Edge).
    • The wiki must be compatible with the existing server operating system and web server software.
  5. Maintainability:
    • The upgrade process should be well-documented to facilitate future upgrades and maintenance.

Assumptions and Dependencies

Assumptions:

  • A current and valid backup of the wiki files and database exists.
  • Sufficient server resources (CPU, memory, disk space) are available for the upgrade process.
  • Administrator access to the server and database is available.
  • A test environment mirroring the production environment is available for pre-upgrade testing.

Dependencies:

  • Access to the MediaWiki 1.44 software package.
  • Compatibility information for all installed extensions.
  • Database server access credentials.
  • Server administrator access for configuration changes.

Stakeholder Requirements

  1. Wiki Administrators:
    • A smooth and seamless upgrade process with minimal downtime.
    • Comprehensive documentation of the upgrade process and configuration changes.
    • Ability to easily restore the previous version in case of failure.
  2. Content Contributors:
    • No loss of content or functionality during the upgrade.
    • Continued ability to create and edit content after the upgrade.
  3. Wiki Users:
    • Continued access to the wiki content after the upgrade.
    • Minimal disruption to the user experience.

Acceptance Criteria

  • All the functional requirements are met.
  • All non-functional requirements are met.
  • The upgraded wiki passes all predefined test cases.
  • All installed extensions are functioning correctly after the upgrade.
  • The upgrade process is fully documented.
  • Stakeholder sign-off is received.
  • Successful completion of a User Acceptance Test (UAT).

Appendices

List of Installed Extensions:

name type version git
Vector skin 1.0.0 fe7e6cc491cbab71e2111b992201bced05d9025b
MinervaNeue skin e08046c12cb1850b839c8247b0045c18305651bb
Abuse Filter antispam 3e669c0db2ba16b4e7a0439d6fb0eac123f7825d
ConfirmEdit antispam 1.6.0 2f294abb3ece8c1ec7346c32490202c00aadbfe6
SpamBlacklist antispam 0f17508df4880a391412d5d4c56cdd06ec860812
Approved Revs hook 2.1 bd78e18f4cf075807ff49fbccd8fe5e262e71a60
Arrays parserhook 2.2.1 96357a3708ec36ae4b6deebb63991c86268d0e2a
CategoryTree parserhook e0a01c706bd24667b1d2f2f2bc855eb3cb455a22
CharInsert parserhook ee7b17910ece1ebaf6ad53857926d797b0ff374d
Chart parserhook bf0e91dc361209cdf488c9fa3592c816e1be0603
Cite parserhook 624166e3a8460b70e9a5cf403c71cc53c675ef14
DynamicPageList3 parserhook 3.6.1 81028602be787fa523dbb66c648289e7366127b8
EmbedVideo parserhook 3.4.2 3d8124738d3f1696b42b6eba1d11e9aeae660551
External Data parserhook 3.4-alpha f179f1fb22a4bd764630aef6d20aa8d9745af367
ImageMap parserhook 79690f8084928f91947001f529ee6497b99cfb3c
InputBox parserhook 0.3.0 a521f64a42eecec3207df54103250a8aa7d41967
Lingo parserhook 3.2.3 27893843b7529951deed9a3ef9fc25c778934eea
Math parserhook 3f72fd6642372c5b332c8837bde97b800efeeeff
OpenGraphMeta parserhook 0.5.6 601e9a0bd9affff5aec8d774b6d6f00e5a24c261
ParserFunctions parserhook 1.6.1 6387ede95fc8450647cccd5cfbc91716c4ddcea3
Scribunto parserhook 042fdcf9d7d09e6776233d9ce7f64b87fe5f0a52
SyntaxHighlight parserhook 2.0 b9a2496a5eb75d58957087bd30d9439229f837c7
TemplateData parserhook 0.1.2 2cdea62143424b7d2622f8030924bbb4279e878e
CLDR other 4.15.0 ebb268ca533075369aeb8055bea1ec979be59b8c
Clean Changes other 2024-07-16 a365d138237c40e1655f1ee6301d4e40ac3ebb8c
Description2 other 0.4.1 f03d14ea2c947d54cad968829c5bd27ec2c3b1d5
Gadgets other 3ac4f1e1d7e37c937f17cd2c820a87fe23e915ec
JsonConfig other 1.2.0 ccb4202f5f7de83e1456e762f531bf404e1d84a8
MobileFrontend other 2.4.1 a44f2808aa9e051f6a56215ce1320018db723808
MultimediaViewer other ce55147eb2e73caf5d1c2021241a519e370fc233
OATHAuth other 0.5.0 cf58ea1bad23eb7d21ec85ca7023bbbff4bff8f9
PageNotice other b9a146ce156ce7a04c1ef3865853cfdb471106c1
SecureLinkFixer other 2435a55c6bee4c23b8face5d53b6cb9c2d2680d2
TextExtracts other 7ddd684ed118a2980de8710f21ec969ece818896
TitleKey other 1.0 f46480840a661e423d06c00630ec41cee034ea69
Upload Wizard other 1.5.0 16b2d111e4f5a1f30249d78965c536a592305caf
UserInformation other 1.0.0 9ea9dbf4c1b59c921ae69cc02d5de87207152918
CheckUser specialpage 2.5 53f7c98d3fd003aef8faf95dd08ee05139079fab
CiteThisPage specialpage be88e771adeb01e8eb6ef686cb4de207874daccb
Confirm User Accounts specialpage 91d3e26bb69a4716cece2f67757d90bb76e5fd16
DeleteBatch specialpage 1.8.1 55ec7006ba073f16942ffa91620485b8f6cfc241
Echo specialpage 60c6c007e62183ab95dfbf9913731c28c809a3f7
Interwiki specialpage 3.2 94a99a1da1b043632dc4ae7b5c1e079c25eb6d5a
Nuke specialpage cf314100c655b8b983d9217ad5510b3c61dfc098
Renameuser specialpage e7b2820bf74bbc6a6c0e0969b08bc30c039b1ab1
Replace Text specialpage 1.8 0707542f7fdaa46787813ba701071b78324b2a6b
SimpleBatchUpload specialpage 2.0.1 1e53b5b50e7fbc6c96c749bfdf3b807f62836c30
CodeEditor editor 5bf3e7730a95a20f0291aa5b9b21eb0876dc5210
HotCat editor 2.43 d68e7553faffa6d68257b8bf5d8850ceeb54aa55
VisualEditor editor 939d18b1d3cbb26e2092c5a7079aba06b22e5145
WikiEditor editor 0.5.4 8e3dcab81e2344c1d4ccecd519350ea855bb31f2
HitCounters variable 0.4 3cdfa2110bedd281840c2509eb404b666695c793
PageImages api b6cc577144bb04574f7c1a3ecec524cbad1f44d2
PDF Handler media 271686bd316e90e87e57754b20d6ee3fefcd07b4
VipsScaler media ff06c4e4a98567e415436a1ba1e115b3a2197dc0
SemanticDrilldown semantic 4.0.0-beta4 464fd5261f709c3805e4d0c76350d7b69025d6c0
SemanticMediaWiki semantic 5.0.0 88189dc70021354e15abe3c7b69e79e6b5b3ee99
SemanticResultFormats semantic 5.0.0-alpha 5167efb60c534189650dcb583d780eb3cd476554
SemanticScribunto semantic 2.3.2 9bf8857c4c199acd589f836b4b7c454e708d99ee

Test Plan

TBD

Rollback Plan

The rollback plan outlines the steps to revert to the previous version of MediaWiki (version 1.43) in case the upgrade fails or issues arise.

  1. Pre-Rollback Preparation:

    • Ensure that all backups taken before the upgrade are complete and accessible.
    • Verify that the backup files include:
      • The uploaded files from /srv.
      • The database snapshots.
      • The deployed wiki configuration, including versions.
  2. Stop Services:

    • Stop the web server (nginx) to prevent any further changes to the live environment.

      sudo systemctl stop nginx
      
    • Stop PHP-FPM to ensure no new requests are processed.

      sudo systemctl stop php8.2-fpm
      
  3. Rename icannwiki to icannwiki-1.44:

    aws rds modify-db-instance \
      --db-instance-identifier icannwiki \
      --new-db-instance-identifier icannwiki-1.44 \
      --apply-immediately
    
  4. Restore Database:

    • Restore the database from the latest snapshot taken before the upgrade.

      aws rds restore-db-instance-from-db-snapshot \
        --db-instance-identifier icannwiki \
        --db-snapshot-identifier icannwiki-backup-$(date +%Y%m%d)
      
  5. Monitor Restoration Status: Monitor the status of the restoration process until it is complete.

    aws rds describe-db-instances --db-instance-identifier icannwiki | jq -r '.DBInstances[0].DBInstanceStatus'
    

    Repeat this command periodically until the output is 'available'.

  6. Restore Files:

    • Restore the /srv directory from the backup snapshot.

      aws ec2 restore-snapshot \
        --snapshot-id snap-0123456789abcdef0 \
        --volume-size 20 \
        --availability-zone us-west-2a
      
    • Attach the restored volume to the EC2 instance and mount it.

      sudo mount /dev/sdh /srv
      
  7. Revert Configuration:

    • Revert any configuration changes made during the upgrade process.
    • Ensure that the LocalSettings.php file is reverted to its previous state.
  8. Restart Services:

    • Start PHP-FPM to resume processing requests.

      sudo systemctl start php8.2-fpm
      
    • Start the web server (nginx).

      sudo systemctl start nginx
      
  9. Verify Rollback:

    • Verify that the MediaWiki installation is running on version 1.43.
    • Check that all core functionality and extensions are working as expected.
    • Ensure that there is no data loss or corruption.
  10. Post-Rollback Actions:

    • Document any issues encountered during the rollback process.
    • Review and update the upgrade plan to prevent similar issues in future upgrades.
    • Communicate with stakeholders about the rollback and its impact on the wiki.