MoinMoin Information and Upgrade Procedures
This wiki is powered by a python based wiki system called MoinMoin. This document describes how it is setup and what to do to upgrade it. At the time of this writing, we had just upgraded MoinMoin from version 1.5.2 to 1.6.3. We have moved the wiki off of copperhead and we are now running version 1.7.3 (as of 10/19/2009) on the ubuntu server Sunfire. A more in-depth discussion of some of the files and settings can be viewed at:
About the Support MoinMoin Installation - Information about the setup and maintenance of MoinMoin.
How its setup
The MoinMoin wiki package is installed and hosted from sunfire. Our installation is separated into two sections (Static Content and Wiki Content)
Static Content
The static content (CSS and images for themes) are located on copperhead in /usr/share/moin/
We are using a combination of both:
The support theme (/usr/local/share/moin/htdocs/support/)
The balanced theme (/usr/local/share/moin/htdocs/balanced/)
These are essentially the same theme, but the admin pages are still calling the older support theme for some reason (which needs to be fixed to only use balanced).
Wiki Content
The wiki content is the main area containing the configuration, plugins, pages, and theme files. Our wiki is located in /web/cis-new-support2 with most of the important files being located in the wiki sub-directory. Files within the wiki directory must be accessed from avenger.
List of Important Files & Directories:
/web/cis-new-support2/wiki/wikiconfig.py - This is the main configuration file for the wiki (contains user permissions, file locations, etc)
/web/cis-new-support2/wiki/cgi-bin/moin.cgi - The CGI launch script
/web/cis-new-support2/wiki/data/plugin/theme/balanced.py - Balanced Theme File (builds the actual theme from content in the balanced static content directory)
/web/cis-new-support2/wiki/data/plugin/theme/support.py - Support Theme File (builds the actual theme from content in the support static content directory)
User Permissions
You can add or remove users and change their permissions in the main configuration file:
/web/cis-new-support2/wiki/wikiconfig.py
Find this section:
acl_rights_before = u"leoj:read,write,delete,revert,admin markpe:read,write,delete,revert,admin kuffs:read,write,delete,revert,admin sgsax:read,write,delete,revert,admin earl:read,write,delete,revert,admin tedk:read,write,delete,revert,admin brycej2:read,write,delete,revert,admin mozes:read,write,delete,revert,admin"
Add the new user's eID and permissions at the end of the current string. A space should be between each user in the list.
Upgrading
Backup Essential Files & Directories
The one containing the MoinMoin code files (e.g. /usr/local/lib/python2.6/site-packages/MoinMoin/)
The one containing our data - /web/cis-new-support2/wiki/data
The wiki configuration file - /web/cis-new-support2/wiki/wikiconfig.py
The moin.cgi launch script - /web/cis-new-support2/wiki/cgi-bin/moin.cgi
The underlay directory - /web/cis-new-support2/wiki/underlay (mainly in-case a rollback is needed)
- The web server config files:
Support Wiki virtual host config file - /etc/apache2/sites-available/10_support_vhost.conf
Support Wiki SSL virtual host config file - /etc/apache2/sites-available/10_support_ssl_vhost.conf
support.ksu.edu SSL Cert files - /etc/apache2/ssl/server.* (.crt, .csr, and .key)
Procedure for upgrading MoinMoin
Be aware that there will be some downtime while you are upgrading and will likely run into errors after upgrading the MoinMoin package. Begin this only when you have ample time to troubleshoot any issues that may arise during the process.
Download and unpack the new MoinMoin archive (make sure it is the same version as the newest version contained in portage)
Read the files docs/CHANGES and docs/README.migration contained in the moin distribution archive for details on what changed and how to upgrade (very important). You will likely have to run a migration script on the /web/cis-new-support2/wiki/data directory. If you choose to store the migrated data directory it creates in another location, remember to replace the data directory in /web/cis-new-support2/wiki/ with the newly migrated data directory.
- Open the backed up data directory and note the locations of files and setup the new data directory to match this structure.
Copy the settings from the backed up wikiconfig.py and moin.cgi to the new versions of these files from the MoinMoin archive, but be careful not to overwrite imports. You should closely compare any differences in similiar function calls, and adjust accordingly.
- Delete the /usr/local/lib/python2.6/site-packages/MoinMoin/ directory (make sure this has been backed up) to avoid having old code files there that are not overwritten by the new code, but maybe interfering with it
After you follow the docs instructions on migrating the wiki data to be compatible with the new version and have completed all the steps shown above, you can upgrade moin:(DEPRECATED, old gentoo instructions)
emerge -1av moinmoin (DEPRECATED, old gentoo instructions)
Problems & Errors
Problems can arise from a number of areas, mainly from either:
An improperly configured wikiconfig.py
A Theme file (balanced.py, or support.py) or Plugin file (e.g. plugins/parser/bash.py) using deprecated function calls or trying to import a module from the wrong location
If you have any errors that you could not fix by comparing the file(s) causing errors with the new versions contained in the MoinMoin archive, make sure you look at the traceback on the error page in question, and note the error. Search for the error message, function call, or module name in the offcial MoinMoin Wiki or fire up irssi and go to #moin on freenode and ask about it there. The guys in #moin are usually really helpful.