CAPipedia Sandbox:Updating CAPipedia: Difference between revisions
Appearance
No edit summary |
m Protected "CAPipedia:Updating CAPipedia" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
# From the <code>sandbox.capmembers.wiki</code> directory, run the command: <pre>php maintenance/run.php update</pre> | # From the <code>sandbox.capmembers.wiki</code> directory, run the command: <pre>php maintenance/run.php update</pre> | ||
# Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors | # Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors | ||
# For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands: <pre>git pull | # For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands: <pre>git pull</pre><pre>git checkout REL[minor_version] (e.g., REL1_43)</pre> | ||
git checkout REL[minor_version] (e.g., REL1_43)</pre> | |||
# Check that the following operations work as expected: | # Check that the following operations work as expected: | ||
## Viewing pages | ## Viewing pages | ||
Line 29: | Line 28: | ||
# From the [https://panel.dreamhost.com DreamHost Web Panel], browse to '''Websites'''/'''MySQL Databases''' | # From the [https://panel.dreamhost.com DreamHost Web Panel], browse to '''Websites'''/'''MySQL Databases''' | ||
# Create a new database with a database name that matches '''capipedia-[new_version]''' and new username of <code>cap_wiki_root</code> (leave password blank) | # Create a new database with a database name that matches '''capipedia-[new_version]''' and new username of <code>cap_wiki_root</code> (leave password blank) | ||
# Upload the backup database file to the newly created database by running the command: <pre> | # Upload the backup database file to the newly created database by running the command: <pre>sh load-database.sh [new_db_name] [backup_sql_file]</pre> | ||
# Obtain the password from the <code>LocalSettings.php</code> file | # Obtain the password from the <code>LocalSettings.php</code> file | ||
# Change the <code>$wgDBname</code> variable in the <code>LocalSettings.php</code> file in the '''capipedia-[new_version]''' directory to the new database name | # Change the <code>$wgDBname</code> variable in the <code>LocalSettings.php</code> file in the '''capipedia-[new_version]''' directory to the new database name | ||
Line 39: | Line 38: | ||
# Wait for '''Updating Web Options...''' to complete | # Wait for '''Updating Web Options...''' to complete | ||
# Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors | # Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors | ||
# For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands: | # For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands: <pre>git pull</pre><pre>git checkout REL[version] (e.g., REL1_43)</pre> | ||
<pre>git pull</pre> | |||
<pre>git checkout REL[version] (e.g., REL1_43)</pre> | |||
# Place production site back in write mode by commenting the <code>$wgReadOnly</code> variable in the <code>LocalSettings.php</code> file of the '''capipedia-[new_version]''' directory | # Place production site back in write mode by commenting the <code>$wgReadOnly</code> variable in the <code>LocalSettings.php</code> file of the '''capipedia-[new_version]''' directory | ||
# Check that the following operations work as expected: | # Check that the following operations work as expected: | ||
Line 52: | Line 49: | ||
# Delete the '''mediawiki-[version]''' folder and .gz distribution file | # Delete the '''mediawiki-[version]''' folder and .gz distribution file | ||
# Delete the '''capipedia-[old_version]_backup''' .gz and .sql files | # Delete the '''capipedia-[old_version]_backup''' .gz and .sql files | ||
== Update local-attributes.sh == | |||
# Edit the <code>local-attributes.sh</code> file and change the PROD_DIR to '''capipedia-[new_version]''' and PROD_DB_NAME to the new version's database name | |||
== Final decommission of old version == | == Final decommission of old version == | ||
# After the warranty period (no less than 2 weeks), delete the '''capipedia-[old_version]''' directory and database | # After the warranty period (no less than 2 weeks), delete the '''capipedia-[old_version]''' directory and database |
Latest revision as of 15:09, 17 April 2025
Review the upgrading manual document
Review https://www.mediawiki.org/wiki/Manual:Upgrading before performing the update to note any special callouts to be considered during the update process.
Test the new version deployment prior to upgrading in production
- Download and uncompress the new version's distribution from https://mediawiki.org
- Run this command from the user home directory:
sh refresh-sandbox.sh
- Replace the distribution files using the command:
cp -pR mediawiki-[version]/* sandbox.capmembers.wiki
- From the
sandbox.capmembers.wiki
directory, run the command:php maintenance/run.php update
- Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors
- For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands:
git pull
git checkout REL[minor_version] (e.g., REL1_43)
- Check that the following operations work as expected:
- Viewing pages
- Editing pages
- Uploading a file
Backup the production site
- Place production site in read only mode by uncommenting the
$wgReadOnly
variable in theLocalSettings.php
file of the capipedia-[old_version] directory - Return to the user home directory
- Run this command:
sh backup-prod.sh
Create a new production site
- Duplicate the production folder using the command:
cp -pR capipedia-[old_version] capipedia-[new_version]
- Replace the distribution files using the command:
cp -pR mediawiki-[version]/* capipedia-[new_version]
- From the DreamHost Web Panel, browse to Websites/MySQL Databases
- Create a new database with a database name that matches capipedia-[new_version] and new username of
cap_wiki_root
(leave password blank) - Upload the backup database file to the newly created database by running the command:
sh load-database.sh [new_db_name] [backup_sql_file]
- Obtain the password from the
LocalSettings.php
file - Change the
$wgDBname
variable in theLocalSettings.php
file in the capipedia-[new_version] directory to the new database name - From the capipedia-[new_version] directory, run the command:
php maintenance/run.php update
Retarget the production hostname to the new site
- From the DreamHost Web Panel, browse to Websites/Manage Websites/Settings/Directories: Modify and change the root web directory to capipedia-[new_version]
- Wait for Updating Web Options... to complete
- Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect (version shown on the page matches the distribution) and the page fully loads without errors
- For each skin and extension that has a Git hash for its version, go to that skin or extension directory and run the following commands:
git pull
git checkout REL[version] (e.g., REL1_43)
- Place production site back in write mode by commenting the
$wgReadOnly
variable in theLocalSettings.php
file of the capipedia-[new_version] directory - Check that the following operations work as expected:
- Viewing pages
- Editing pages
- Uploading a file
Clean up server home directory
- Delete the mediawiki-[version] folder and .gz distribution file
- Delete the capipedia-[old_version]_backup .gz and .sql files
Update local-attributes.sh
- Edit the
local-attributes.sh
file and change the PROD_DIR to capipedia-[new_version] and PROD_DB_NAME to the new version's database name
Final decommission of old version
- After the warranty period (no less than 2 weeks), delete the capipedia-[old_version] directory and database