Changes

1,328 bytes added ,  10:57, 6 June 2020
no edit summary
Line 37: Line 37:     
* [[Wiki Team/Contacts]] for wiki content and user accounts
 
* [[Wiki Team/Contacts]] for wiki content and user accounts
* [[User:Bernie|Bernie Innocenti]] for hosting issues
+
* [[User:Bernie|Bernie Innocenti]] for hosting issues - I'M NO LONGER ACTIVELY MAINTAINING THIS
 
* [[User:Sebastian|Sebastian Silva]] for the Local Labs wikis
 
* [[User:Sebastian|Sebastian Silva]] for the Local Labs wikis
   Line 44: Line 44:  
The main wiki lives here at <code>/srv/www-sugarlabs/wiki/</code>
 
The main wiki lives here at <code>/srv/www-sugarlabs/wiki/</code>
   −
Except for trivial changes, work on the wiki should be carried on
+
Except for trivial changes, work on the wiki should be carried in the parallel wiki-devel instance before landing onto the production instance.
in the parallel wiki-devel instance before landing onto the production instance.
      
{{Highlight|'''Note:''' The devel wiki has an outdated snapshot of the page database and its own slightly different server configuration.}}
 
{{Highlight|'''Note:''' The devel wiki has an outdated snapshot of the page database and its own slightly different server configuration.}}
Line 89: Line 88:     
Our MediaWiki instances are installed from git to allow easy rebasing of our changes on upgrades.
 
Our MediaWiki instances are installed from git to allow easy rebasing of our changes on upgrades.
 +
For the full details on this installation method, see http://www.mediawiki.org/wiki/Download_from_Git
 +
 +
The initial setup process (probably outdated now) lookd like this:
   −
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git wiki-devel
+
  git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_34 wiki-devel
 
  cd wiki-devel
 
  cd wiki-devel
git checkout -b REL1_19 remotes/origin/REL1_19
  −
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions.git extensions-all
  −
cd extensions-all
   
  git submodule update --init
 
  git submodule update --init
cd ../extensions
  −
# for each needed extensions
  −
ln -s ../extensions-all/EXT
     −
For the full details on this installation method, see http://www.mediawiki.org/wiki/Download_from_Git
+
Checkout additional extensions we wish to enable. For ease of management, check them out into extensions-all and then symlink them from extensions/
 +
 
 +
EXTENSIONS=CheckUser ContributionScores HTMLets LastUserLogin LdapAuthentication MobileFrontend TimedMediaHandler UniversalLanguageSelector UserMerge VisualEditor Widgets
 +
 
 +
mkdir extensions-all
 +
for i in EXTENSIONS; do
 +
  git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/$i extensions-all/$i --branch REL1_34;
 +
  (cd extensions && ln -s ../extensions-all/$i);
 +
done
    
== Visual Editor ==
 
== Visual Editor ==
Line 112: Line 116:  
== Upgrade notes ==
 
== Upgrade notes ==
   −
We update our MediaWiki instances by simply pulling from the remote git repo and then switching to a
+
'''Note:''' Before blindly following the procedure below, check the official documentation for anything that might have changed:
different stable branch:
+
https://www.mediawiki.org/wiki/Download_from_Git#Keeping_up_to_date
   −
  git pull
+
We update our MediaWiki instances by simply pulling from the remote git repo and then switching to a different stable branch:
  git checkout -b REL1_xx remotes/origin/REL1_xx
+
 
 +
git fetch
 +
  git branch -a | grep REL | sort -V
 +
  git checkout -b REL1_XX origin/REL1_XX
 +
git submodule update --init
 +
 
 +
The skins also need to be updated from time to time (particularly after a major release). Instead of checking out hundreds od skins with the official process, we can update only the skins we have installed:
 +
 
 +
cd skins
 +
for i in MonoBook Timeless Vector; do
 +
  (cd $i && git fetch && git checkout -b REL1_34 origin/REL1_34)
 +
done
 +
 
 +
As of this writing, only Vector is enabled in LocalSettings.php, but it's always best to keep the skins in sync in case we want to test them.
    
The "extensions-all" directory contains a bunch of git repositories stitched together with 'git submodule'.
 
The "extensions-all" directory contains a bunch of git repositories stitched together with 'git submodule'.
Line 122: Line 139:     
  cd extensions-all
 
  cd extensions-all
  git submodule update
+
  for ext in *; do (cd $ext && git fetch && git checkout -b REL1_XX origin/REL1_XX); done
 +
 
 +
You also need to update some dependencies using a PHP manager called 'composer':
 +
 
 +
composer update --no-dev
    
Now run update script:
 
Now run update script:
Line 128: Line 149:  
  php maintenance/update.php
 
  php maintenance/update.php
   −
In the case of Local Labs wikis the correct command for performing the updates is:
+
In the case of Local Labs wikis, the correct command for performing the updates is:
    
  php maintenance/update.php --conf /srv/www-sugarlabs/pe.sugarlabs.org/wiki/LocalSettings.php
 
  php maintenance/update.php --conf /srv/www-sugarlabs/pe.sugarlabs.org/wiki/LocalSettings.php
  (replace pe.sugarlabs.org for the correct path for your local lab w)
+
  (replace pe.sugarlabs.org for the correct path for your local lab)
    
If the SemanticMediaWiki extension is enabled (we don't use it), also refresh its tables:
 
If the SemanticMediaWiki extension is enabled (we don't use it), also refresh its tables: