[Pkg-mediawiki-devel] Multi-Instance script for MediaWiki

Dominik George nik at naturalnet.de
Tue Apr 3 01:37:25 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi MediaWiki maintainers,

during a help thread on a local Debian forum, I ahve put together a
simple, but cool script that allows for the automated management and
update of multiple MediaWiki instances.

The idea is that, with the MediaWiki instance from the mediawiki package
residing in /var/lib/mediawiki with symlinks to /usr/share, there is no
(obvious) way of multiplying it and still having it properly updated by
dpkg.

Of course, it is very easy to copy it and create several instances while
still symlinking to /usr/share/mediawiki, but this becomes a mess when
running a large-scale install and i nthe worst case, something changes
in /var/lib/mediawiki.

The attached script is capable of

- - creating a config in /etc/mediawiki/multiinstance.conf
- - Adding and deleting instances below a parent directory
- - Updating these instances from the "template" in /var/lib/mediawiki
- - Manage and properly symlink seperate MediaWiki configs in
/etc/mediawiki/wikis.d

An exampel isntallation looks like this:

# apt-get install mediawiki
# mediawiki-multiinstance add wiki1
Configuration for this script does not exist. Creating!
Where do you want to keep your wiki instances? [/var/www/wikis]
Where does the template isntance reside? [/var/lib/mediawiki]
Wrote /etc/mediawiki/multiinstance.conf.
Wiki root and configspace created. Now run the installtool, then
run mediawiki-multiinstance config wiki1!
# links http://localhost/wikis/wiki1
  # Run installtool for this instance
# mediawiki-multiinstance config wiki1
Do you really want to copy new config for wiki wiki1? If so, type YES: YES
Config for wiki wiki1 updated from installtool output.
# mediawiki-multiinstance apache >/etc/mediawiki/apache.conf
  # Outputs an Apache config snippet for the wiki space

This can be repeated for as many wikis as the user desires (of yourse,
the initial config questions are not asked again).

In the case that a package update comes in, the following command takes
care of updating the wikis:

# mediawiki-multiinstance update


Of course, the script has to undergo many improvements. What I want to
know is if there is interest to include it in the mediawiki package for
shipping with Debian.

It could, in the best case, be called from the postinst script as

test -f /etc/mediawiki/multiinstance.conf &&
/usr/bin/mediawiki-multiinstance

to update the users' Wiki spaces, but only if multiinstance is configured.


The script can also be found at
http://shore.naturalnet.de/~nik/mediawiki-multiinstance .

Any thoughts/feedback ;)?

Cheers,
Nik

- -- 
PGP-Fingerprint: 8BC7 ABAB C2F2 4D5E 24FC
                 FC1C DB0E A4BC E210 7412

Please contact me for a face-to-face meeting
if you wish to exchange signatures with me.

Signature Policy: https://www.dominik-george.de/gpg-policy.txt.asc
Public key:       https://www.dominik-george.de/gpg.asc

X.509 certificate fingerprint for key download:
51:D8:36:36:7E:20:3F:E7:AB:EF:B8:83:25:A6:BB:74:48:03:3D:F0

FYI, I cannot read HTML mail. Really, I can't. Claws doesn't
implement it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQHOBAEBAgA4BQJPelRMMRpodHRwczovL3d3dy5kb21pbmlrLWdlb3JnZS5kZS9n
cGctcG9saWN5LnR4dC5hc2MACgkQ2w6kvOIQdBJc9QwAi5WyKCYVaPZytcwCXHWw
pDLQKnsqFl3GCZJ7e/BDHEhvzNafsASVllozIE1TkUylKol6AXWEAtP1p+0ibCTE
0PrYfWz9DqO3ukHk/QM+eJrWkACGp/ymDuBzXMO9nHYtZPZveNHGUbGc/m0H09nr
VEx3ea3FU49UxO6xmBaRhcSdyK33DvSpNDL9av3Hp2nsEhg4Sqr+D9KyHg2DkkuV
7em8qQU9IFNKgm2TAyroG5rmvq71RGXfnd2/xkQJE6wp3sXmFqC1RO7fo+EnV9qb
Pr9WpxdRXuNKsFyK2d9qrniq9Q2GDFBRahB/jmBFHvw5FJox6piEnkkcEUlt755e
XrOMEQKCgKCdajCr7K25xGswihJCEuPrhm6TA/H4/SLidi3jqgBiSM1FIIXq7fjF
aFOjeo8+MEPXFI1c6huzhsPGKgcnVrUjceeFG7mYcZcRKgVSN3/o4M7mKOI1phEe
IgVecn34Lis8a4LC3Q4Um46LZsWNtogaCZ8eAXlhWj8m
=GoWv
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mediawiki-multiinstance
URL: <http://lists.alioth.debian.org/pipermail/pkg-mediawiki-devel/attachments/20120403/063dcaac/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mediawiki-multiinstance.sig
Type: application/pgp-signature
Size: 465 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mediawiki-devel/attachments/20120403/063dcaac/attachment-0001.pgp>


More information about the Pkg-mediawiki-devel mailing list