r50905 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50904‎ | r50905 | r50906 >
Date:20:55, 22 May 2009
Author:kim
Status:deferred
Tags:
Comment:
More quickstart
Modified paths:
  • /trunk/testing/installer/QUICKSTART (modified) (history)

Diff [purge]

Index: trunk/testing/installer/QUICKSTART
@@ -2,6 +2,10 @@
33
44 Quickstart guide:
55
 6+============
 7+Installation
 8+=============
 9+
610 INSTALLER
711 1. svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/testing/
812 2. cd testing/installer
@@ -16,17 +20,24 @@
1721
1822 testing can still use a lot of coding work.
1923
 24+====================
 25+USING THE INSTALLER:
 26+====================
2027
 28+To get something installed. There's a REPL (command line) and you can also
 29+access the same commands from bash (or some other shell, or popen, or what have
 30+you) The interface and back end are somewhat separate (installer.py is current
 31+interface, installers.py is the basic back end), so someone might be able to
 32+create a GUI or web front end someday soon. :-)
2133
 34+--------------
 35+Basic commands
 36+---------------
2237
23 -USING THE INSTALLER:
24 -To get something installed. There's a REPL (command line) and you can also access the same commands from bash (or some other shell, or popen, or what have you)
25 -The interface and back end are somewhat separate (installer.py is current interface, installers.py is the basic back end), so someone might be able to create a GUI or web front end someday soon. :-)
26 -
2738 basic commands are:
28 -ls
29 -install
30 -uninstall
 39+ ls
 40+ install
 41+ uninstall
3142
3243 to see what you can install:
3344 -mediawiki revisions
@@ -47,10 +58,23 @@
4859
4960 And that's basically it!
5061
51 -Why is this handy at all?
 62+===========================
 63+But what was it for, again?
 64+============================
5265
53 -Well, imagine if you want to install many different wikis with slightly different settings and extensions, so you can test how things interact. (this is a testing environment, after all ;-) ) You can use this tool to script your installation procedure.
 66+------------------
 67+Why we made it.
 68+------------------
 69+Well, imagine if you want to install many different wikis with slightly different settings and extensions, so you can test how things interact. (this is a testing environment, after all ;-) ). We found that setting up tests actually took longer than the actual tests! Hence we made this tool.
5470
 71+For examples of some ready made scripts, for existing environments, see ../util/environment/
 72+
 73+Now you too can make a duplicate of the wikipedia setup (dataabase not included, though you could conceivably get one from http://download.wikimedia.org/ ), or start playing with this new faluting semantic mediawiki concept (../util/Referata.sh see also: www.referata.com) , or... etc...
 74+
 75+---------------------------
 76+What else can you use it for
 77+----------------------------
 78+
5579 It's also fairly handy for maintaining large numbers of wikis in a production environment. Or for maintaining backups of even just a single wiki
5680
5781 if you hadn't uninstalled your first wiki yet:
@@ -59,17 +83,93 @@
6084
6185 will create a clone of the first wiki, which you can either leave online and allow to grow and change by itself, or you can tar it up and pack it away someplace safe as a backup.
6286
 87+----------------------------
 88+Calling from bash, elsewhere
 89+----------------------------
6390
6491
6592 calling from bash is easy too
6693
6794 ./installer.py install mediawiki:latest as cuttingedgedude
6895
69 -For examples of some ready made scripts, see ../util/environment/
7096
 97+Once again,
 98+ example scripts can be found at ../util/environment
7199
72100
 101+============================================
 102+What if my mediawiki extension is special?
 103+============================================
73104
 105+-----------------------------------
 106+What if my extension is not special
 107+-----------------------------------
 108+if your extension is listed at
 109+ http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/
74110
 111+if the name of the primary .php script is the same as the extension name
75112
 113+(near future: and if your script can do its setup when /YOURWIKI/maintenance/update.php is called)
76114
 115+your extension is not special, and the installer will install it automagically.
 116+
 117+--------------------------------
 118+My extension is still special
 119+-------------------------------
 120+
 121+No problem. We maintain a list of exceptions in installfiles/extensions
 122+ImageMap is a plain vanilla extension, and doesn't really need an exception, but we put it there as an example. Copy over ImageMap.install and fill in the different files as you see fit.
 123+
 124+FILES
 125+
 126+is_installed.sh checks whether the extension is installed,
 127+ and echo's "true" if so, or "false" if not. Make
 128+ as sophisticated as you like.
 129+
 130+download.sh downloads the files for the extension
 131+
 132+setup.sh (not needed for imagemap): Does sundry setup. Put
 133+ anything here that doesn't go anywhere else.
 134+
 135+uninstall.sh removes the extension cleanly. (no mess left in db)
 136+
 137+update.sh reserved for future expansion (intended to use
 138+ svn update)
 139+
 140+info information about the extension, if you'd like
 141+ to provide some. (can be accessed using the
 142+ installer "info" command)
 143+
 144+
 145+VARIABLES
 146+These are environment variables that the installer passes to installation scripts.
 147+
 148+ * $DATABASE_NAME - the name of the MySQL database associated with the mediawiki instance you are working with.
 149+
 150+ eg: "minuteelectron_test1", "kim_documentationwiki", "MWE_documentation"
 151+
 152+ * $DESTINATION_DIR - the location where you're installing to. (typically the extensions directory of a particular mediawiki instance)
 153+
 154+ eg: "/home/gerardm/public_html/revisions/MWE_documenation/extensions", "/home/kim/public_html/revisions/documentationwiki/extensions", "/var/www/localhost/htdocs/revisions/test22/extensions"
 155+
 156+ * $INSTALL_DIR - the .install directory you are working from
 157+
 158+ eg:"/home/gerardm/testing/installer/installfiles/extensions/ImageMap.install"
 159+
 160+ * $MYSQL_COMMAND - A mysql command sufficient to give mysql access (ie, on your local system, it might be something like: mysql -u<user_name> -p<password> )
 161+
 162+ eg: "mysql -uroot" ; "mysql -uroot -psecret --host=db.remote.net --port=1234"
 163+
 164+ * $NAME - the name of the thing you are installing
 165+
 166+ eg: "ImageMap","SemanticMediawiki"
 167+
 168+ * $REVISION - specific (svn) revision if provided (can be blank)
 169+
 170+ eg: "48822"
 171+
 172+ * $TAG - specific (svn) tag if provided (can be blank)
 173+
 174+ eg: "REL1_12_1", "REL1_14_0"
 175+
 176+

Status & tagging log