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
- 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.
- 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.
- 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).
- 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.
- 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
- 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.
- 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.
- Usability:
- The upgrade must not negatively impact the user experience.
- Existing wiki templates and layouts should render correctly after the upgrade.
- 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.
- 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
- 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.
- Content Contributors:
- No loss of content or functionality during the upgrade.
- Continued ability to create and edit content after the upgrade.
- 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:
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.
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.
- The uploaded files from
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
Rename icannwiki to icannwiki-1.44:
aws rds modify-db-instance \ --db-instance-identifier icannwiki \ --new-db-instance-identifier icannwiki-1.44 \ --apply-immediately
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)
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'.
Restore Files:
Restore the
/srvdirectory 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
Revert Configuration:
- Revert any configuration changes made during the upgrade process.
- Ensure that the
LocalSettings.phpfile is reverted to its previous state.
Restart Services:
Start PHP-FPM to resume processing requests.
sudo systemctl start php8.2-fpm
Start the web server (nginx).
sudo systemctl start nginx
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.
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.
ICANNWiki resources: Special Pages | Content Guide | Documentation | Development || Maintenance: Articles needing attention | Candidates for deletion || Projects: Internet & Digital Governance Library