Difference between revisions of "Service/wiki"

From Sugar Labs
Jump to navigation Jump to search
(18 intermediate revisions by 4 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]
 +
* [http://cl.sugarlabs.org cl.sugarlabs.org]
 +
* [http://co.sugarlabs.org co.sugarlabs.org]
 +
* [http://ar.sugarlabs.org ar.sugarlabs.org]
  
 
== Hosted on ==
 
== Hosted on ==
Line 16: Line 20:
  
 
<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/index.php?title=Special:UserLogin&type=signup
 +
 +
== Local Labs contacts ==
 +
 +
* Peru: [[User:Sebastian|Sebastian Silva]]
 +
* Colombia: Cristian Paul Peñaranda Rojas
 +
* Argentina: Gustavo Ibarra
 +
 +
Local labs, please confirm contacts and add links.
  
 
== 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
 +
* [[User:Sebastian|Sebastian Silva]] for the Local Labs wikis
  
== Notes ==
+
== Wiki instances ==
  
The main wiki  
+
The main wiki lives here at <code>/srv/www-sugarlabs/wiki/</code>
  
/srv/www-sugarlabs/wiki/
+
Except for trivial changes, work on the wiki should be carried on
 +
in the parallel wiki-devel instance before landing onto the production instance.
  
Except for trivial changes, work on the wiki should be carried on
+
{{Highlight|'''Note:''' The devel wiki has an outdated snapshot of the page database and its own slightly different server configuration.}}
in the wiki-devel instance, then moved to wiki-testing for feedback
 
before putting it into the production instance.
 
  
Sometimes the devel and testing instances contain interim work
+
Sometimes the devel instance contains interim work performed by various wiki helpers. Do not sync changes blindly to the
performed by various wiki helpers. Do not sync changes blindly to the
 
 
production wiki!
 
production wiki!
   
+
 
 +
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).
 +
 
 +
== Creating a Local Labs wiki ==
 +
 
 +
* Add a group for the wiki (vigr)
 +
 
 +
  cd /srv/www-sugarlabs
 +
cp -a co.sugarlabs.org pe.sugarlabs.org
 +
chown -R icarito:sugarwiki-pe pe.sugarlabs.org
 +
cd pe.sugarlabs.org/wiki
 +
rm -r images/*
 +
vim LocalSettings.php
 +
vim SecretSettings.php
 +
 
 +
* Create apache virtual host:
 +
 
 +
  cp -a /etc/apache2/sites-available/pe.sugarlabs.org /etc/apache2/sites-available/ar.sugarlabs.org
 +
  vim /etc/apache2/sites-available/ar.sugarlabs.org
 +
  a2ensite ar.sugarlabs.org
 +
 
 +
* Create DB with some clever trick. I reused <code>config/index.php</code> to setup a new MediaWiki instance and then I've thrown away the generated <code>LocalConfig.php</code>:
 +
 
 +
  mv LocalConfig.php LocalConfig.good
 +
  cp -a /srv/www-sugarlabs/co.sugarlabs.org/config .
 +
  (go to http://ar.sugarlabs.org/wiki/config/index.php)
 +
  rm -r config LocalConfig.php
 +
  mv LocalConfig.good LocalConfig.php
 +
 
 +
* Create tables for OpenID:
 +
 
 +
mysql -u root -p pe_sugarlabswiki < extensions/OpenID/openid_table.sql
 +
 
 +
== Installation ==
 +
 
 +
Our MediaWiki instances are installed from git to allow easy rebasing of our changes on upgrades.
 +
 
 +
git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git 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
 +
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
 +
 
 +
== Visual Editor ==
 +
 
 +
This wiki has the VisualEditor extension.
 +
 
 +
In order to do that, we need the parsoid node js service.  Since Sunjammer is running too old of a version, this service is hosted on freedom.  It can be started using:
 +
container.yml start /home/sam/parsoid -d
 +
And is accessed at http://freedom.sugarlabs.org:8001/
 +
 
 
== Upgrade notes ==
 
== Upgrade notes ==
  
Our Mediawiki instances are installed from Subversion. We update them by simply switching
+
We update our MediaWiki instances by simply pulling from the remote git repo and then switching to a
to a different stable branch.
+
different stable branch:
 +
 
 +
git pull
 +
git checkout -b REL1_xx remotes/origin/REL1_xx
  
Because the "extensions" directory comes from a different
+
The "extensions-all" directory contains a bunch of git repositories stitched together with 'git submodule'.
repository, we need to take care not to confuse Subversion's little mind when it sees it.
+
To update it:
Hence, we keep around a copy of the original extensions directory from the main repository.
 
  
mv extensions extensions.keep
+
  cd extensions-all
mv extensions.orig extensions
+
  git submodule update
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:
+
Now run update script:
  
  cd maintenance
+
  php maintenance/update.php
  php 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 w)
  
 
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:
Line 63: Line 137:
 
  cd extensions/SemanticMediaWiki/maintenance
 
  cd extensions/SemanticMediaWiki/maintenance
 
  php SMW_setup.php
 
  php SMW_setup.php
 
== See also ==
 
 
* [[Sysadmin/Add_wiki]], adding Local Labs wikis
 
* [[Sysadmin/Update_wiki]], upgrade procedure
 

Revision as of 20:09, 9 July 2016


Statistics: http://stats.sugarlabs.org/wiki.sugarlabs.org/

Hostnames

Hosted on

Machine/sunjammer

Administrative contact

<webmaster at sugarlabs.org>

Account Creation

Local Labs contacts

  • Peru: Sebastian Silva
  • Colombia: Cristian Paul Peñaranda Rojas
  • Argentina: Gustavo Ibarra

Local labs, please confirm contacts and add links.

Sysadmins

Wiki instances

The main wiki lives here at /srv/www-sugarlabs/wiki/

Except for trivial changes, work on the wiki should be carried on in the parallel wiki-devel instance before landing onto the production instance.

Note: The devel wiki has an outdated snapshot of the page database and its own slightly different server configuration.

Sometimes the devel instance contains interim work performed by various wiki helpers. Do not sync changes blindly to the production wiki!

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).

Creating a Local Labs wiki

  • Add a group for the wiki (vigr)
cd /srv/www-sugarlabs
cp -a co.sugarlabs.org pe.sugarlabs.org
chown -R icarito:sugarwiki-pe pe.sugarlabs.org
cd pe.sugarlabs.org/wiki
rm -r images/*
vim LocalSettings.php
vim SecretSettings.php
  • Create apache virtual host:
 cp -a /etc/apache2/sites-available/pe.sugarlabs.org /etc/apache2/sites-available/ar.sugarlabs.org
 vim /etc/apache2/sites-available/ar.sugarlabs.org
 a2ensite ar.sugarlabs.org
  • Create DB with some clever trick. I reused config/index.php to setup a new MediaWiki instance and then I've thrown away the generated LocalConfig.php:
 mv LocalConfig.php LocalConfig.good
 cp -a /srv/www-sugarlabs/co.sugarlabs.org/config .
 (go to http://ar.sugarlabs.org/wiki/config/index.php)
 rm -r config LocalConfig.php
 mv LocalConfig.good LocalConfig.php
  • Create tables for OpenID:
mysql -u root -p pe_sugarlabswiki < extensions/OpenID/openid_table.sql

Installation

Our MediaWiki instances are installed from git to allow easy rebasing of our changes on upgrades.

git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git 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
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

Visual Editor

This wiki has the VisualEditor extension.

In order to do that, we need the parsoid node js service. Since Sunjammer is running too old of a version, this service is hosted on freedom. It can be started using:

container.yml start /home/sam/parsoid -d

And is accessed at http://freedom.sugarlabs.org:8001/

Upgrade notes

We update our MediaWiki instances by simply pulling from the remote git repo and then switching to a different stable branch:

git pull
git checkout -b REL1_xx remotes/origin/REL1_xx

The "extensions-all" directory contains a bunch of git repositories stitched together with 'git submodule'. To update it:

cd extensions-all
git submodule update

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 w)

If the SemanticMediaWiki extension is enabled (we don't use it), also refresh its tables:

cd extensions/SemanticMediaWiki/maintenance
php SMW_setup.php