Service/wiki: Difference between revisions

No edit summary
Account Creation: update link
 
(28 intermediate revisions by 5 users not shown)
Line 3: Line 3:
[[Category:Service|wiki]]
[[Category:Service|wiki]]
</noinclude>
</noinclude>
Statistics: http://stats.sugarlabs.org/wiki.sugarlabs.org/
== Hostnames ==
== Hostnames ==


* [http://wiki.sugarlabs.org wiki.sugarlabs.org]
* [http://wiki.sugarlabs.org wiki.sugarlabs.org]
* [http://wiki-devel.sugarlabs.org wiki-devel.sugarlabs.org]
* [http://wiki-devel.sugarlabs.org wiki-devel.sugarlabs.org]
* [http://wiki-testing.sugarlabs.org wiki-testing.sugarlabs.org]
* [http://pe.sugarlabs.org pe.sugarlabs.org] - Peru Local Lab (in maintenance mode)


== Hosted on ==
== Hosted on ==
Line 16: Line 17:


<webmaster ''at'' sugarlabs.org>
<webmaster ''at'' sugarlabs.org>
== Account Creation ==
* See https://www.mediawiki.org/wiki/Manual:Preventing_access#Restrict_account_creation
* Create account page: https://wiki.sugarlabs.org/go/Special:CreateAccount
== Local Labs contacts ==
* Peru: [[User:Sebastian|Sebastian Silva]] (in maintenance mode)


== Sysadmins ==
== Sysadmins ==


* [[Wiki Team/Contacts]] for wiki content and access
* [[Wiki Team/Contacts]] for wiki content and user accounts
* [[User:Bernie|Bernie Innocenti]] for host issues
* [[User:Bernie|Bernie Innocenti]] for hosting issues - '''EMERITUS - PLEASE DON'T EXPECT SUPPORT'''
* [[User:Srevin03|Srevin Saju]] ('''srevinsaju''' on #sugar) for MediaWiki issues
* [[User:Sebastian|Sebastian Silva]] for the Local Labs wikis


== Wiki instances ==
== Wiki instances ==


The main wiki lives here:
The main wiki lives here at <code>/srv/www-sugarlabs/wiki/</code>
 
Except for trivial changes, work on the wiki should be carried in the parallel wiki-devel instance before landing onto the production instance.
 
{{Highlight|'''Note:''' The devel wiki has an out of date snapshot of the DB and a slightly different LocalConfig.php.}}
 
{{Highlight|'''Note:''' Often, the devel instance contains changes performed by various wiki admins to test extensions and configuration options. Do not sync LocalConfig.php blindly to the production wiki! Use vimdiff.}}
 
Before overwriting the page database, please
* observe http://wiki-devel.sugarlabs.org/go/Category:Under_construction
* announce the plan on systems@ and to any collaborators who have signed their 'Under construction' pages in the template (such as by using the 'E-mail this user' link in the sidebar for the wiki user's page, even when it is a red link or not yet created).
 
== Installation ==
 
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/mediawiki/core.git --branch REL1_34 wiki-devel
cd wiki-devel
git submodule update --init
 
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);
  composer update --no-dev
done
 
== Upgrading ==
 
'''Note:''' Before blindly following the procedure below, check the official documentation for anything that might have changed:
https://www.mediawiki.org/wiki/Download_from_Git#Keeping_up_to_date
 
We update our MediaWiki instances by simply pulling from the remote git repo and then switching to a different stable branch:
 
git fetch
git branch -a | grep REL | sort -V
git checkout -b REL1_XX origin/REL1_XX
git submodule update --init --recursive
 
The "extensions-all" directory contains a bunch of git repositories stitched together with 'git submodule'.
To update it:
 
cd extensions-all
for ext in *; do (cd $ext && git fetch && git checkout -b REL1_XX origin/REL1_XX); done
 
Along with the extensions, we would also need to update the skins to the latest release. We officially use Vector (fro Desktop) and Minerva Neue (for Mobiles, v1.35+, Minerva Neue is the official responsive theme used by Wikipedia).
 
cd skins
for skin in *; do (cd $skin && git fetch && git checkout -b REL1_XX origin/REL1_XX); done
 
Please revise if the following steps are still needed:
 
You also need to update some dependencies using a PHP manager called 'composer':
 
composer update --no-dev
 
Now run update script:
 
php maintenance/update.php
 
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
(replace pe.sugarlabs.org for the correct path for your local lab)
 
== Obsolete documentation ==
 
=== SemanticMediaWiki ===
 
If the SemanticMediaWiki extension is enabled (we don't use it), also refresh its tables:
 
cd extensions/SemanticMediaWiki/maintenance
php SMW_setup.php
 
=== Skins ===
 
As of this writing, the default skin vector is integrated into MediaWiki, and we don't load other skins in LocalSettings.php.


/srv/www-sugarlabs/wiki/
The skins also need to be updated from time to time (particularly after a major release). Instead of checking out hundreds od skins using the official process, we refresh only the skins that are installed:


Except for trivial changes, work on the wiki should be carried on
cd skins
in the wiki-devel instance, then moved to wiki-testing for feedback
for i in MonoBook Timeless; do
before putting it into the production instance.
  (cd $i && git fetch && git checkout -b REL1_34 origin/REL1_34)
done


Sometimes the devel and testing instances contain interim work
performed by various wiki helpers. Do not sync changes blindly to the
production wiki!


== Creating a Local Labs wiki ==
=== Creating a Local Labs wiki ===


* Add a group for the wiki (vigr)
* Add a group for the wiki (vigr)
Line 65: Line 158:


  mysql -u root -p pe_sugarlabswiki < extensions/OpenID/openid_table.sql
  mysql -u root -p pe_sugarlabswiki < extensions/OpenID/openid_table.sql
== Upgrade notes ==
Our Mediawiki instances are installed from Subversion. We update them by simply switching
to a different stable branch.
Because the "extensions" directory comes from a different
repository, we need to take care not to confuse Subversion's little mind when it sees it.
Hence, we keep around a copy of the original extensions directory from the main repository.
mv extensions extensions.keep
mv extensions.orig extensions
svn switch http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_16/phase3
mv extensions extensions.orig
mv extensions.new extensions
cd extensions
svn switch http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_16/extensions
cd ..
Now run update scripts:
cd maintenance
php update.php
If the SemanticMediaWiki extension is enabled (we don't use it), also refresh its tables:
cd extensions/SemanticMediaWiki/maintenance
php SMW_setup.php
== See also ==
* [[Sysadmin/Add_wiki]], adding Local Labs wikis