~azzar1/unity/add-show-desktop-key

1164.2.7 by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst.
1
.. IVLE - Informatics Virtual Learning Environment
2
   Copyright (C) 2007-2009 The University of Melbourne
3
4
.. This program is free software; you can redistribute it and/or modify
5
   it under the terms of the GNU General Public License as published by
6
   the Free Software Foundation; either version 2 of the License, or
7
   (at your option) any later version.
8
9
.. This program is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
   GNU General Public License for more details.
13
14
.. You should have received a copy of the GNU General Public License
15
   along with this program; if not, write to the Free Software
16
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18
.. _ref-configuring-ivle:
19
20
****************
21
Configuring IVLE
22
****************
23
1345 by David Coles
Documentation of Apache configuration options.
24
This page describes the configuration of IVLE. This consists of populating the 
25
:file:`ivle.conf` file and configuring Apache to serve the IVLE webapp and 
26
Subversion repositories.
1164.2.7 by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst.
27
1363 by David Coles
Admin documentation of the admin scripts
28
.. _ref-configuration-options:
29
1164.2.7 by Matt Giuca
Added doc/man/(config|install).rst. Bit more of man/index.rst.
30
Configuration options
31
=====================
32
1345 by David Coles
Documentation of Apache configuration options.
33
Most of the configuration of IVLE is done by editing the file 
34
:file:`ivle.conf`, located by default in :file:`/etc/ivle/ivle.conf`. These 
1348 by David Coles
Configuration documentation - fixing a few references
35
settings are required as part of the :ref:`install process <ref-install>` and 
36
for actual running of IVLE.
37
38
It uses the `ConfigObj`_ text format which is heavily based on the 'INI' text 
39
format.
40
41
.. _ConfigObj: http://www.voidspace.org.uk/python/configobj.html
1345 by David Coles
Documentation of Apache configuration options.
42
1342 by David Coles
Documentation for ivle.conf configuration file.
43
[urls]
44
------
45
Configuration of URLs used by the IVLE webapp.
46
47
.. describe:: root
48
49
    :type: string(default="/")
50
51
    Path on HTTP server that IVLE is served from.
52
53
.. describe:: public_host
54
55
    :type: string
56
57
    The server goes into "public mode" if the browser sends a request with 
58
    this host. This is for security reasons - we only serve public student 
59
    files on a separate domain to the main IVLE site.
60
    Public mode does not use cookies, and serves only public content.
61
    Private mode (normal mode) requires login, and only serves files relevant 
62
    to the logged-in user. e.g. 'public.ivle.org'
63
64
.. describe:: svn_addr
65
66
    :type: string
67
68
    The base url for accessing subversion repositories. e.g.  
69
    'http://svn.ivle.org'
70
71
[paths]
72
-------
73
Configuration for IVLE installation and data paths.
74
75
.. describe:: prefix
76
77
    :type: string(default="/usr/local")
78
79
    The prefix that is prepended to installation paths.
80
81
.. describe:: data
82
83
    :type: string(default="/var/lib/ivle")
84
85
    Directory where IVLE data such as user jails will be stored.
86
87
.. describe:: logs
88
89
    :type: string(default="/var/log/ivle")
90
91
    Directory where IVLE log files such as :file:`ivle_error.log` will be 
92
    saved.
93
.. describe:: share
94
95
    :type: string(default="${prefix}/share/ivle")
96
97
    Directory where IVLE shared data such as ``usrmgt-server``, 
98
    ``python-console`` and services will be installed.
99
100
.. describe:: lib
101
102
    :type: string(default="${prefix}/lib/ivle")
103
104
    Directory where IVLE libraries such as ``trampoline`` and ``timount`` will 
105
    be installed.
106
107
[[jails]]
108
~~~~~~~~~
109
Configuration paths for user `Jails <ref-jail>`_.
110
111
.. describe:: mounts
112
113
    :type: string(default="${data}/jailmounts"))
114
115
    Directory where complete jails will be mounted.
116
117
118
.. describe:: src
119
120
    :type: string(default="${data}/jails")
121
122
    Directory where user specific jail content will be stored.
123
124
.. describe:: template
125
126
    :type: string(default="${src}/__base__")
127
128
    Directory where template file system for each jail will be stored.
129
130
.. describe:: template_build
131
132
    :type: string(default="${src}/__base_build__")
133
134
    Directory where template file system will be built before being moved to 
135
    the ``template`` directory.
136
137
[[svn]]
138
~~~~~~~
139
Configuration paths for Subversion repositories.
140
141
.. describe:: base
142
143
    :type: string(default="${data}/svn")
144
145
    Directory where Subversion data will be stored
146
147
.. describe:: conf
148
149
    :type: string(default="${base}/svn.conf")
150
151
    Location of Subversion WebDAV AuthzSVNAccessFile configuration file for 
152
    user repositories will be stored.
153
154
.. describe:: group_conf
155
156
    :type: string(default="${base}/svn-group.conf")
157
158
    Location of Subversion WebDAV AuthzSVNAccessFile configuration file for 
159
    group repositories will be stored.
160
161
.. describe:: repo_path
162
163
    :type: string(default="${base}/repositories")
164
165
    Location where user and group repositories will be stored.
166
167
.. describe:: auth_ivle
168
169
    :type: string(default="${base}/ivle.auth")
170
171
    Location where Subversion WebDAV AuthUserFile password hash file will be 
172
    stored.
173
174
[media]
175
-------
176
Configuration of `media serving <ref-media-serving>`_.
177
178
.. describe:: version
179
180
    :type: string(default=None)
181
182
    Media files such as images, CSS and JavaScript are aggressively cached in 
183
    IVLE. If this value is set then IVLE will send media URLs containing this 
184
    version number and content will be served with an ``Expires`` header set a 
185
    year in the future. This means that the client should only request a media 
186
    URL once and use the cached copy from then on.  This version number should 
187
    be incremented each time any media is changed (typically this should just 
188
    be set to the IVLE release number) so that updated media will be sent to 
189
    clients.
190
191
    If not provided or set to :const:`None`, IVLE will use standard browser 
192
    caching.
193
194
[[externals]]
195
~~~~~~~~~~~~~
196
Configuration details for external media dependencies used by IVLE.
197
198
.. describe:: jquery
199
200
    :type: string(default="/usr/share/javascript/jquery")
201
202
    Directory where jQuery library is installed.
203
204
205
[database]
206
----------
207
Configuration for the PostgreSQL database that IVLE uses.
208
209
.. describe:: host
210
211
    :type: string(default="localhost")
212
213
    Hostname of database IVLE server.
214
215
.. describe:: port
216
217
    :type: integer(default=5432)
218
219
    Port the database runs on.
220
221
.. describe:: name
222
223
    :type: string(default="ivle")
224
225
    Name of the IVLE database on the database server.
226
227
.. describe:: username
228
229
    :type: string
230
231
    Username which IVLE uses on the database server.
232
233
.. describe:: password
234
235
    :type: string
236
237
    Password which IVLE uses for authentication with the database server.
238
239
[auth]
240
------
241
Settings for configuring external user authentication with `authentication 
242
modules <ref-auth-modules>`_ and automatic subject enrollment with `subject 
243
pulldown modules <ref-subject-pulldown-modules>`_.
244
245
.. describe:: modules
246
247
    :type: string_list(default=list())
248
249
    List of `authentication modules <ref-auth-modules>`_ to attempt to 
250
    authenticate with if a user does not have a password set in the local 
251
    database.
252
253
.. describe:: ldap_url
254
255
    :type: string(default=None)
256
257
    URL of the LDAP server to be used by authentication modules.
258
259
.. describe:: ldap_format_string
260
261
    :type: string(default=None)
262
263
264
.. describe:: subject_pulldown_modules
265
266
    :type: string_list(default=list())
267
268
    List of `subject pulldown modules <ref-subject-pulldown-modules>`_ to be 
269
    checked when a user signs into IVLE to see what subjects a student is 
270
    enrolled in.
271
272
[usrmgt]
273
--------
274
Settings for the `User Management Server <ref-usrmgt-server>`_.
275
276
.. describe:: host
277
278
    :type: string(default="localhost")
279
280
    The hostname where the User Management Server is running.
281
282
.. describe:: port
283
284
    :type: integer(default=2178)
285
286
    The port that the User Management Server is running on.
287
288
.. describe:: magic
289
290
    :type: string
291
292
    The shared secret used to secure communication between IVLE Web 
293
    Application and the User Management Server.
294
295
[jail]
296
------
297
Options that control how the `Jail <ref-jail>`_ is built.
298
299
.. describe:: devmode
300
301
    :type: boolean(default=False)
302
303
    If set, copies IVLE files from the local machine into the jail rather than  
304
    installing them from a package.
305
306
    .. note::
307
308
        If the Python site packages directory differs between the local 
309
        machine and the jail (such as if different versions of Python are 
310
        installed) you will need to supply the site packages to be installed 
311
        with the ``--python-site-packages`` option to ``ivle-buildjail``.
312
313
.. describe:: suite
314
315
    :type: string(default="hardy")
316
317
    Which suite the jail will build with. This need not be the same as what 
318
    the local machine is running.
319
320
.. describe:: mirror
321
322
    :type: string(default="http://archive.ubuntu.com/ubuntu")
323
324
    The location of a HTTP mirror containing the specified suite.
325
326
.. describe:: extra_sources
327
328
    :type: string_list(default=list())
329
330
    A list of extra source locations to be added to the jail builder (such as 
331
    for site specific packages).
332
333
.. describe:: extra_packages
334
335
    :type: string_list(default=list())
336
337
    A list of extra packages to be installed in addition to the core packages 
338
    required for IVLE.
339
340
.. FIXME: Is this correct. Is it extra user packages (such as
341
    python-scipy) or all packages that aren't in a standard debootstrap build 
342
    (such as python-svn and python-cjson)?.
343
344
.. describe:: extra_keys
345
346
    :type: string(default=None)
347
348
    Any extra package signing keys to accept as correctly validate installed 
349
    packages.  Typically used for validating ``extra_sources`` packages.
350
    
351
    .. note:: Cannot have triple-quoted list members.
352
353
354
[user_info]
355
-----------
356
User specific settings that are added to a user's :file:`ivle.conf` file 
357
inside their jail.
358
359
.. warning::
360
361
    This should be in a user-specific place but since we're worried a user
362
    may delete his/her .conf file, we put it here for now). These properties 
363
    **should not** be set in the server's :file:`/etc/ivle/ivle.conf`.
364
365
.. describe:: login
366
367
    :type: string(default=None)
368
369
    The login name of the user.
370
371
.. describe:: svn_pass
372
373
    :type: string(default=None)
374
375
    The key used to access repositories on the Subversion server.
376
377
1164.2.9 by Matt Giuca
doc/man: More headings!
378
Apache configuration
379
====================
1345 by David Coles
Documentation of Apache configuration options.
380
Apache is used in IVLE for hosting of the IVLE web application and hosting 
381
Subversion repositories over WebDAV. Typically the Subversion repository will 
382
run on the Master server and the Web Application will be run on a collection 
383
of slaves.  It is also possible to combine the two function together to run as 
384
a standalone server.
385
386
387
Web Application
388
---------------
389
The IVLE web application runs on Apache using ``mod_python``. An example 
390
configuration is provided in the file :file:`examples/config/apache.conf`.
391
392
At minimum the following settings must be specified:
393
394
.. describe:: ServerName
395
396
    Should be the formal hostname of the server, typically one that users will 
397
    use to access IVLE. For example, 'ivle.org'.
398
399
.. describe:: ServerAlias
400
401
    Should be set to the value of ``[urls] public_host`` that is specified in 
402
    :file:`ivle.conf`. This is to ensure that Apache will correctly handle 
403
    requests for the public content.
404
405
.. describe:: SetHandler
406
407
    Must be ``mod_python``
408
409
.. describe:: PythonHandler
410
411
    Must be ``ivle.dispatch``
412
413
.. describe:: PythonOption mod_python.file_session.database_directory
414
415
    Session directory for mod_python. This must be a shared directory between 
416
    all Slave servers, in particular when operating through a load balancer.  
417
    If not provided then users will encounter inconsistent behavior such as 
418
    being thrown back to the login screen after logging in.
419
420
Optional settings are:
421
422
.. describe:: PythonOption mod_python.session.cookie_name
423
424
    The name to be set for cookies rather than the one automatically generated 
425
    by mod_python. For example, 'ivle'.
426
427
.. describe:: PythonDebug
428
429
    If this option is set, any uncaught errors from mod_python will be sent to 
430
    the browser rather than being sent to the error log. It is recommended 
431
    that this setting is only used for development or debugging.
432
433
Subversion Repository
434
---------------------
435
IVLE also uses Apache to provide HTTP access to user's Subversion repositories 
436
using ``mod_dav_svn``. Typically this is run on a single, stand alone server; 
437
though it may be run in conjunction with the Web Application.  An example 
438
configuration is provided in the file :file:`examples/config/apache-svn.conf`.  
439
IVLE will automatically generate password hash and repository permission files 
440
that are used to control access to the repositories.
441
442
IVLE expects to find the paths ``users/`` and ``groups/`` at the URL provided 
443
by the value of ``[urls] svn_addr`` set in :file:`ivle.conf`. Thus there 
444
should be two ``Location`` clauses configured, one for users and one for 
445
groups.
446
447
User Repositories
448
~~~~~~~~~~~~~~~~~
449
450
.. describe:: DAV
451
452
    Must be ``svn``
453
454
.. describe:: SVNParentPath
455
456
    Directory where user repositories are stored. Should be the value of 
457
    ``[path] [[svn]] repo_path`` in :file:`ivle.conf` with 'users' appended.  
458
    For example, '/var/lib/ivle/svn/repositories/users'.
459
460
.. describe:: AuthzSVNAccessFile
461
462
    Location of the configuration file used to assign permissions to user 
463
    repositories. Should be the same value as ``[path] [[svn]] conf`` in 
464
    :file:`ivle.conf`.
465
466
.. describe:: Require
467
468
    Must be ``valid-user``
469
470
.. describe:: AuthType
471
472
    Must be ``Basic``
473
474
.. describe:: AuthName
475
476
    The name that should appear on authentication requests. For example, 'IVLE 
477
    Subversion repository'.
478
479
.. describe:: AuthUserFile
480
481
    Location of the password hash file for Subversion users. Should be the 
482
    same as the value of ``[path] [[svn]] auth_ivle``. For example, 
483
    '/var/lib/ivle/svn/ivle.auth'.
484
485
Group Repositories
486
~~~~~~~~~~~~~~~~~~
487
488
.. describe:: DAV
489
490
    Must be ``svn``
491
492
.. describe:: SVNParentPath
493
494
    Directory where user repositories are stored. Should be the value of 
495
    ``[path] [[svn]] repo_path`` in :file:`ivle.conf` with 'groups' appended.  
496
    For example, '/var/lib/ivle/svn/repositories/groups'.
497
498
.. describe:: AuthzSVNAccessFile
499
500
    Location of the configuration file used to assign permissions to group 
501
    repositories. Should be the same value as ``[path] [[svn]] group_conf`` in 
502
    :file:`ivle.conf`.
503
504
.. describe:: Require
505
506
    Must be ``valid-user``
507
508
.. describe:: AuthType
509
510
    Must be ``Basic``
511
512
.. describe:: AuthName
513
514
    The name that should appear on authentication requests. For example, 'IVLE 
515
    Subversion repository'.
516
517
.. describe:: AuthUserFile
518
519
    Location of the password hash file for Subversion users. Should be the 
520
    same as the value of ``[path] [[svn]] auth_ivle``. For example, 
521
    '/var/lib/ivle/svn/ivle.auth'.