Index: trunk/testing/installer/QUICKSTART |
— | — | @@ -2,6 +2,10 @@ |
3 | 3 | |
4 | 4 | Quickstart guide: |
5 | 5 | |
| 6 | +============ |
| 7 | +Installation |
| 8 | +============= |
| 9 | + |
6 | 10 | INSTALLER |
7 | 11 | 1. svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/testing/ |
8 | 12 | 2. cd testing/installer |
— | — | @@ -16,17 +20,24 @@ |
17 | 21 | |
18 | 22 | testing can still use a lot of coding work. |
19 | 23 | |
| 24 | +==================== |
| 25 | +USING THE INSTALLER: |
| 26 | +==================== |
20 | 27 | |
| 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. :-) |
21 | 33 | |
| 34 | +-------------- |
| 35 | +Basic commands |
| 36 | +--------------- |
22 | 37 | |
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 | | - |
27 | 38 | basic commands are: |
28 | | -ls |
29 | | -install |
30 | | -uninstall |
| 39 | + ls |
| 40 | + install |
| 41 | + uninstall |
31 | 42 | |
32 | 43 | to see what you can install: |
33 | 44 | -mediawiki revisions |
— | — | @@ -47,10 +58,23 @@ |
48 | 59 | |
49 | 60 | And that's basically it! |
50 | 61 | |
51 | | -Why is this handy at all? |
| 62 | +=========================== |
| 63 | +But what was it for, again? |
| 64 | +============================ |
52 | 65 | |
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. |
54 | 70 | |
| 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 | + |
55 | 79 | 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 |
56 | 80 | |
57 | 81 | if you hadn't uninstalled your first wiki yet: |
— | — | @@ -59,17 +83,93 @@ |
60 | 84 | |
61 | 85 | 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. |
62 | 86 | |
| 87 | +---------------------------- |
| 88 | +Calling from bash, elsewhere |
| 89 | +---------------------------- |
63 | 90 | |
64 | 91 | |
65 | 92 | calling from bash is easy too |
66 | 93 | |
67 | 94 | ./installer.py install mediawiki:latest as cuttingedgedude |
68 | 95 | |
69 | | -For examples of some ready made scripts, see ../util/environment/ |
70 | 96 | |
| 97 | +Once again, |
| 98 | + example scripts can be found at ../util/environment |
71 | 99 | |
72 | 100 | |
| 101 | +============================================ |
| 102 | +What if my mediawiki extension is special? |
| 103 | +============================================ |
73 | 104 | |
| 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/ |
74 | 110 | |
| 111 | +if the name of the primary .php script is the same as the extension name |
75 | 112 | |
| 113 | +(near future: and if your script can do its setup when /YOURWIKI/maintenance/update.php is called) |
76 | 114 | |
| 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 | + |