Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki_administration [2011/02/05 01:18] – [Badgrads Wiki Administration] pkwillwiki_administration [2017/08/04 22:00] (current) jwang
Line 3: Line 3:
 This Wiki was set up in 2006 by Marshall Perrin, with input and suggestions from Jason Wright and Conor Laver. Its maintenance is the job of the current Student Webmaster. This Wiki was set up in 2006 by Marshall Perrin, with input and suggestions from Jason Wright and Conor Laver. Its maintenance is the job of the current Student Webmaster.
  
-Use the [[talk:wiki_administration|talk page]] for discussing wiki-administration-related ideas. Hello [[tmptmptest]].+Use the [[talk:wiki_administration|talk page]] for discussing wiki-administration-related ideas.
  
 ===== Hardware ===== ===== Hardware =====
  
-Everything is currently on ''serpens.berkeley.edu'', AKA ''badgrads.berkeley.edu''It lives in the back corner of 644 (James Graham's lab) without a monitor or keyboard attached. It serves various miscellaneous functions for Jamesgroup and so hopefully will be maintained by Central for the most part. Insofar as the University is concernedis the computer itself belongs to James Graham's group.+Everything is currently on ''serpens.astro.berkeley.edu''If you're the webmasterask Bill to get permission to edit the wiki
  
-===== Software ====+===== Software =====
  
-The webserver files are in ''/usr/local/apache2'' and the DokuWiki files are in ''/celt/htdocs''. (The latter directory is available over NFS and so can be seen from any Astro cluster computer.) The DokuWiki installation has the "Monobook" plugin/template/style/whatever installed which gives it MediaWiki-like appearance and styleFor more info on Monobook, see [[http://tatewake.com/wiki/projects:monobook_for_dokuwiki|here]].+The DokuWiki files are in ''/export/astroweb/badgrads'', which does not seem to be network-accessible right now. They are version-controlled in a Git repository with some site-specific customizationsSee below for more details on how the repository works.
  
-^ Component ^ Current Installed Version ^ Location ^  +The file permissions setup is a little complicatedThe reason for this is that multiple administrator uses **and** the webserver all need to be able to write files in the DokuWiki treeThe tree is owned by group ''badgrads'' with group write bits activeThe directories have their setgid bits set so that files created within them get put in the ''badgrads'' group regardless of who creates themIf you're going to modify the files, you obviously need to be a member of ''badgrads''You also need to set your umask to 002, so that files you create are group-writeable and other administrators can modify themThe permissions on the DokuWiki installation have been set up to create files with the right modes.
-| [[http://httpd.apache.org/|Apache HTTPD]] | 2.2.0 | ''serpens:/usr/local/apache2'' +
-| [[http://www.php.net/|PHP]] | 4.4.2 | ''serpens:/usr/local/apache2/modules/libphp4.so'' +
-| [[http://www.dokuwiki.org/|DokuWiki]] | 2009-02-14 | ''/celt/htdocs''+
-| [[http://www.tatewake.com/wiki/projects:display_wiki_page_for_dokuwiki|Display Wiki Page]] | 02152007 | ''/celt/htdocs/lib/plugins/displaywikipage'' +
-| [[http://www.tatewake.com/wiki/projects:monobook_for_dokuwiki|MonoBook]] | 2008-07-30 | ''/celt/htdocs/lib/tpl/monobook'' |  +
-| [[doku>plugin:actionlink|ActionLink Plugin]] | 2006-05-26 | ''/celt/htdocs/lib/plugins/actionlink''+
-| [[doku>plugin:pagemove|PageMove Plugin]] | 0.9.15a 07/22/2007 | ''/celt/htdocs/lib/plugins/pagemove''+
-| [[doku>plugin:google_cal|Google Calendar Plugin]] | 2007-05-1 | ''/celt/htdocs/lib/plugins/google_cal''+
-| [[doku>plugin:definitionlist|Definition List Plugin]] | 2008-08-13 | ''/celt/htdocs/lib/plugins/definitionlist''+
-| [[doku>plugin:sortablejs|Sortable Tables Plugin]] | 2.2a (2009-01-27) | ''/celt/htdocs/lib/plugins/sortablejs''+
-| [[doku>plugin:jsmath|JSMath Plugin]] | 2009-03-31 | ''/celt/htdocs/lib/plugins/jsmath''+
-| [[http://www.math.union.edu/~dpvc/jsMath/|jsMath]] | 3.6b | ''/celt/htdocs/jsMath''+
-| [[http://www.math.union.edu/~dpvc/jsMath/|jsMath Image Fonts]] | 1.3 | ''/celt/htdocs/jsMath/fonts'' |+
  
-The following customizations have been made to the install from the bare packages listed above. References are to DokuWiki files unless otherwise noted. +The DokuWiki installation has the "Monobook" plugin/template/style/whatever installed which gives it MediaWiki-like appearance and styleFor more info on Monobooksee [[http://tatewake.com/wiki/projects:monobook_for_dokuwiki|here]].
-  * ''inc/html.php:html_register()'' is modified to print whether registration will be allowed +
-  * ''inc/auth.php:register()'' is modified to prohibit registration by foreign IP addresses. +
-  * ''inc/lang/en/register.txt'' is modified to have note about the IP restrictions. +
-  * ''lib/tpl/monobook/user/logo.png'' is replaced with the BADGrads logowhich is stored as ''logo.png.badgrads'' in that directory. +
-  * ''lib/exe/js.php'' is modified to not emit an error in its JavaScript output (should be brought to attention of upstream). +
-  * ''lib/plugins/jsmath/script.js'' to give the correct base URL for the install_js.php file, given that for us DOKU_BASE = /. Should be upstreamed. +
-  * ''modsecurity_rules/modsecurity_crs_20_protocol_violations.conf'' in the Apache tree has had the "URL Encoding Abuse Attack Attempt" rule commented out to allow pages with percent signs to be uploaded.+
  
-Unified diffs of the changes made are stored in the DokuWiki install directory in files named 'foo.badgrads-diff'.+**Note on updating the wiki: Our hack to only allow users to register that are on computers in Campbell Hall will get overwritten if you do a simple update of the dokuwiki backend. You must preserve the ~5 lines of code in inc/auth.php in the register() function around line 920 (can be grepped with "BADGrads modification"). Thus, it is recommended you copy/merge dokuwiki updates (i.e. download new dokuwiki backend, modify it's inc/auth.php with the ~5 lines, then copy them over to the live badgrads server). Otherwise, lifting the IP restriction will cause spambots to spam the wiki.** 
 + 
 +==== Git Repository Setup (old) ==== 
 + 
 +The files in the live site are backed by a Git repository. As part of the DokuWiki directory tree, the ''.git'' directory is subject to the file ownership scheme described above. 
 + 
 +The repository has three branches: ''master'', ''dw-releases'', and ''plugin-releases''. The master branch contains the source for the live site and is the one that should be left checked out. ''dw-releases'' tracks pristine unpacks of DokuWiki release tarballs. ''plugin-releases'' is built on top of ''dw-releases'' and adds pristine unpacks of various DokuWiki plugins. ''master'' builds on top of ''plugin-releases'', adding site-specific customizations. As described below, this setup allows us to safely update the different components of the software without worrying about losing local modifications. It does require some comfort with Git, though. 
 + 
 +To make a change in the site-specific customizations, you should just modify the files in ''master'' and make a commit. 
 + 
 +To upgrade a plugin, or install a new one, you should check out ''plugin-releases'', unpack the new plugin, and commit it. (If the plugin is being upgraded, check if any existing files were deleted in the new version.) Look at the commit history of ''plugin-releases'' to see how this works. Then checkout ''master'' and merge ''plugin-releases''. If there are any site-specific customizations to be made, make them in the post-merge master branch. If there are any merge conflicts, one of the site-specific hacks apparently needs to by synced with the new plugin. 
 + 
 +To upgrade the base DokuWiki install, check out ''dw-releases'' and unpack the new release. Check ''data/deleted.files'' for a list of files that were deleted in the release, and ''git rm'' them. Commit everything. Check out ''plugin-releases'', and merge in ''dw-releases''. Check out ''master'', and merge in ''plugin-releases''. If there are any conflicts, one of the site-specific hacks needs fixing. 
 + 
 +''git log plugin-releases'' shows the plugins that we've installed. ''git log plugin-releases..master'' shows the site-specific modifications that have been made.
  
 ====== Known Bugs / Improvement Requests ====== ====== Known Bugs / Improvement Requests ======