27957
Comment: fix link
|
27957
spam
|
Deletions are marked like this. | Additions are marked like this. |
Line 37: | Line 37: |
[[BSP/2006/08/ch/Zurich]], | [[BSP/2006/10/ch/Zurich]], |
Contents
2011 - migrating moinmoin 1.7 -> 1.9+
This is a list of action for the next migration (lenny -> squeeze!) (completed).
TODO / Ideas
?? Allow Embedding objects (Ogg,PDF...), see EmbedObject
User-Agent language negotiation doesn't work
Communicate on the fact that docbook will be gone
- Do we re-enable the GUI editor ?
Actual wiki Migration steps
Pre-upgrade
Get the list of EditedSystemPages (they may need to be updated after the upgrade)
Update the links, to use <<Anchor(foo)>> instead of #head-1234567, anchors auto-generated by moinmoin's <TableOfContents> feature.
Update blockquote starting with { {{{ } followed by #!foo
Drop { {{{#!plain } Introduced during moinmoin 1.7 migration
D-day
The pages folder is quite large... make sure it's in the cache...
for x in 1 2 3 4 5 6 7 8 9 ; do ls /srv/wiki.debian.org/var/moin/data/pages > /dev/null ; done &
And Meanwhile...
Turn the wiki read-only
edit /srv/wiki.debian.org/etc/moin/wikiconfig.py and append:
page_header1 = """<table width='100%'><tr><td style="background:#ffd0d0; text-align: center;padding:15pt">wiki.debian.org is in read-only mode for a maintenance operation. We will be back in 60 minutes. </td></tr></table>""" acl_rights_default = 'Known:read All:read'
Upgrade moinmoin
aptitude install --without-recommends python-flup python-tz python-xapian python-xappy poppler-utils aptitude remove python-4suite-xml
Migrate moinmoin data (i.e update existing pages, for new syntax) :
#Estimated time for migration: ~~10minutes (continue the steps below). /srv/wiki.debian.org/bin/moin --config-dir=/srv/wiki.debian.org/etc/moin/ --wiki-url=wiki.debian.org migration data
Update WSGI application name:
Edit /srv/wiki.debian.org/bin/moin.wsgi:
import sys sys.path.insert(0, '/srv/wiki.debian.org/etc/moin') # moinmoin application name has changed between v1.7 and v1.9 #from MoinMoin.server.server_wsgi import moinmoinApp #application = moinmoinApp from MoinMoin.web.serving import make_application application = make_application(shared=True)
Publish (the new) theme using apache. Enable client-side caching.
Enable content expiration in apache (execute a2enmod expires)
Edit /srv/wiki.debian.org/etc/moin/wikiconfig.py, replace url_prefix = '/htdocs', with:
url_prefix_local = '/htdocs' # Moin (>=1.6) use a prefix like '/moin_static160' to ensure file versioning # (en therefore avoid client file caching issue). So we stop forcing the prefix. #url_prefix_static = '/htdocs'
Edit /srv/wiki.debian.org/etc/apache2/apache2.conf, add this alias
# This alias needs to be updated on wiki upgrade, according to "release_short" in # /usr/share/pyshared/MoinMoin/version.py Alias /moin_static191 /usr/share/moin/htdocs/ ExpiresActive On <Directory /usr/share/moin/htdocs> Order allow,deny Allow from all # Moinmoin use file-versioning, so we can cache agressively. ExpiresDefault "access plus 1 week" </Directory> <Directory /srv/wiki.debian.org/usr/htdocs> Order allow,deny Allow from all ExpiresDefault "access plus 1 day" </Directory>
We can get rid of the old symlinks in /srv/wiki.debian.org/usr/htdocs/:
rm /srv/wiki.debian.org/usr/htdocs/common rm /srv/wiki.debian.org/usr/htdocs/classic rm /srv/wiki.debian.org/usr/htdocs/modern rm /srv/wiki.debian.org/usr/htdocs/rightsidebar
Fix account & password pre-validation stuffs /srv/wiki.debian.org/etc/moin/wikiconfig.py ( Ideally, we should keep ?DefaultConfig.password_checker):
diff --git a/etc/moin/wikiconfig.py b/etc/moin/wikiconfig.py
index 5dea400..f53a88b 100644
--- a/etc/moin/wikiconfig.py
+++ b/etc/moin/wikiconfig.py
@@ -50,11 +50,11 @@ class Config(DefaultConfig):
# Spammers
hosts_deny = local_secrets.hosts_deny
- def password_checker(username, passwd):
+ def password_checker(request, username, passwd):
result = local_secrets.password_checker(username, passwd)
if result != None:
return result
- return DefaultConfig.password_checker(username, passwd)
+ return None
password_checker = staticmethod(password_checker)
Get rid of some obsolete configuration statements. Edit /srv/wiki.debian.org/etc/moin/wikiconfig.py
Remove acl_enabled = 1. The settings was removed (always enabled), see SettingsCleanup
Remove allowed_actions = .... The settings was removed in moin 1.5, see SettingsCleanup
Update wiki underlay:
mv /srv/wiki.debian.org/var/moin/underlay/pages/ /srv/wiki.debian.org/var/moin/underlay/pages.pre-19
cp -R /usr/share/moin/underlay/pages /srv/wiki.debian.org/var/moin/underlay/
chown -R wiki:wikiadm /srv/wiki.debian.org/var/moin/underlay/pages
chmod ug+wX /srv/wiki.debian.org/var/moin/underlay/pages
find /srv/wiki.debian.org/var/moin/underlay/pages -type d | xargs chmod g+s
A Wiki admin (with an account declared in wikiconfig.py's superuser=), And install the languages packs below (more on LanguageSetup):
Update Interwiki
mv /srv/wiki.debian.org/var/moin/data/intermap.txt /srv/wiki.debian.org/var/moin/data/intermap.pre-19
ln -s /usr/share/moin/data/intermap.txt /srv/wiki.debian.org/var/moin/data/
Cleanup moinmoin's cache
/srv/wiki.debian.org/bin/moin maint cleancache (Estimated time for migration: 5~10minutes)
Update (or Rebuild??) Xapian index:
/srv/wiki.debian.org/bin/moin index build --mode=update
Post upgrade
Update/remove/revert EditedSystemPages
Fix TableOfContents, for pages with h1. see TableOfContentsIgnoresSectionNumbersPragma
Update/use { {{{#!highlight [..] }}}}
Make sure Default front-page for installed languages exists (fr/FrontPage...)
2009 - migrating moinmoin 1.5 -> 1.7
The system hosting the wiki has been migrated to Lenny, so Moinmoin was upgraded (DebianWiki/MigratedToMoinmoin17), (see DebianWiki/History).
Remaining ideas/tasks to do:
Enable SupplementationPage (see mail) and migrate existing pages.
Authentication against ldap.d.o, alioth sql, or openid ( see doc)?
Replace <<PageList(re:^FooBar)>> macro with <<FullSearchCached(t:re:^FooBar.*)>>, because the first one now lists attachments too
Update the Category pages, based on moin 1.6's CategoryTemplate
Drop CategoryFrSomething : use FullSearch(CategorySomething + language:fr).. Looks even slower that Category searches.
2005 - migrating from wiki.debian.net
When Debian wiki became an official service in 2005, it was migrated from wiki.debian.net to wiki.debian.org (see DebianWiki/History).
Remaining ideas/tasks to do:
Deal with Licencing termscopyright.html by at least proposing a license for new content. -- FilipusKlutiero