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

« back to all changes in this revision

Viewing changes to doc/man/config.rst

  • Committer: David Coles
  • Date: 2009-12-09 01:40:49 UTC
  • Revision ID: coles.david@gmail.com-20091209014049-cii7hntudzuo7to9
Remove diagnostic print from ivle-config

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
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.
 
27
 
 
28
.. _ref-configuration-options:
 
29
 
 
30
Configuration options
 
31
=====================
 
32
 
 
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 
 
35
settings are required as part of the :ref:`install process <ref-install>`, 
 
36
though the :ref:`admin script <ref-admin-scripts>` :program:`ivle-config` can 
 
37
be used to propagate most of these settings.
 
38
 
 
39
It uses the `ConfigObj`_ text format which is heavily based on the 'INI' text 
 
40
format. Of particular note, lists with single items need to be terminated 
 
41
with a ',' otherwise it will be treated as a list of characters (usually not 
 
42
what is desired).
 
43
 
 
44
.. _ConfigObj: http://www.voidspace.org.uk/python/configobj.html
 
45
 
 
46
[urls]
 
47
------
 
48
Configuration of URLs used by the IVLE webapp.
 
49
 
 
50
.. describe:: root
 
51
 
 
52
    :type: string(default="/")
 
53
 
 
54
    Path on HTTP server that IVLE is served from.
 
55
 
 
56
.. describe:: public_host
 
57
 
 
58
    :type: string
 
59
 
 
60
    The server goes into "public mode" if the browser sends a request with 
 
61
    this host. This is for security reasons - we only serve public student 
 
62
    files on a separate domain to the main IVLE site.
 
63
    Public mode does not use cookies, and serves only public content.
 
64
    Private mode (normal mode) requires login, and only serves files relevant 
 
65
    to the logged-in user. e.g. 'public.ivle.org'
 
66
 
 
67
.. describe:: svn_addr
 
68
 
 
69
    :type: string
 
70
 
 
71
    The base url for accessing subversion repositories. e.g.  
 
72
    'http://svn.ivle.org'
 
73
 
 
74
[paths]
 
75
-------
 
76
Configuration for IVLE installation and data paths.
 
77
 
 
78
.. describe:: prefix
 
79
 
 
80
    :type: string(default="/usr/local")
 
81
 
 
82
    The prefix that is prepended to installation paths.
 
83
 
 
84
.. describe:: data
 
85
 
 
86
    :type: string(default="/var/lib/ivle")
 
87
 
 
88
    Directory where IVLE data such as user jails will be stored.
 
89
 
 
90
.. describe:: logs
 
91
 
 
92
    :type: string(default="/var/log/ivle")
 
93
 
 
94
    Directory where IVLE log files such as :file:`ivle_error.log` will be 
 
95
    saved.
 
96
.. describe:: share
 
97
 
 
98
    :type: string(default="${prefix}/share/ivle")
 
99
 
 
100
    Directory where IVLE shared data such as ``usrmgt-server``, 
 
101
    ``python-console`` and services will be installed.
 
102
 
 
103
.. describe:: lib
 
104
 
 
105
    :type: string(default="${prefix}/lib/ivle")
 
106
 
 
107
    Directory where IVLE libraries such as ``trampoline`` and ``timount`` will 
 
108
    be installed.
 
109
 
 
110
[[jails]]
 
111
~~~~~~~~~
 
112
Configuration paths for user `Jails <ref-jail>`_.
 
113
 
 
114
.. describe:: mounts
 
115
 
 
116
    :type: string(default="${data}/jailmounts"))
 
117
 
 
118
    Directory where complete jails will be mounted.
 
119
 
 
120
 
 
121
.. describe:: src
 
122
 
 
123
    :type: string(default="${data}/jails")
 
124
 
 
125
    Directory where user specific jail content will be stored.
 
126
 
 
127
.. describe:: template
 
128
 
 
129
    :type: string(default="${src}/__base__")
 
130
 
 
131
    Directory where template file system for each jail will be stored.
 
132
 
 
133
.. describe:: template_build
 
134
 
 
135
    :type: string(default="${src}/__base_build__")
 
136
 
 
137
    Directory where template file system will be built before being moved to 
 
138
    the ``template`` directory.
 
139
 
 
140
[[svn]]
 
141
~~~~~~~
 
142
Configuration paths for Subversion repositories.
 
143
 
 
144
.. describe:: base
 
145
 
 
146
    :type: string(default="${data}/svn")
 
147
 
 
148
    Directory where Subversion data will be stored
 
149
 
 
150
.. describe:: conf
 
151
 
 
152
    :type: string(default="${base}/svn.conf")
 
153
 
 
154
    Location of Subversion WebDAV AuthzSVNAccessFile configuration file for 
 
155
    user repositories will be stored.
 
156
 
 
157
.. describe:: group_conf
 
158
 
 
159
    :type: string(default="${base}/svn-group.conf")
 
160
 
 
161
    Location of Subversion WebDAV AuthzSVNAccessFile configuration file for 
 
162
    group repositories will be stored.
 
163
 
 
164
.. describe:: repo_path
 
165
 
 
166
    :type: string(default="${base}/repositories")
 
167
 
 
168
    Location where user and group repositories will be stored.
 
169
 
 
170
.. describe:: auth_ivle
 
171
 
 
172
    :type: string(default="${base}/ivle.auth")
 
173
 
 
174
    Location where Subversion WebDAV AuthUserFile password hash file will be 
 
175
    stored.
 
176
 
 
177
[media]
 
178
-------
 
179
Configuration of `media serving <ref-media-serving>`_.
 
180
 
 
181
.. describe:: version
 
182
 
 
183
    :type: string(default=None)
 
184
 
 
185
    Media files such as images, CSS and JavaScript are aggressively cached in 
 
186
    IVLE. If this value is set then IVLE will send media URLs containing this 
 
187
    version number and content will be served with an ``Expires`` header set a 
 
188
    year in the future. This means that the client should only request a media 
 
189
    URL once and use the cached copy from then on.  This version number should 
 
190
    be incremented each time any media is changed (typically this should just 
 
191
    be set to the IVLE release number) so that updated media will be sent to 
 
192
    clients.
 
193
 
 
194
    If not provided or set to :const:`None`, IVLE will use standard browser 
 
195
    caching.
 
196
 
 
197
[[externals]]
 
198
~~~~~~~~~~~~~
 
199
Configuration details for external media dependencies used by IVLE.
 
200
 
 
201
.. describe:: jquery
 
202
 
 
203
    :type: string(default="/usr/share/javascript/jquery")
 
204
 
 
205
    Directory where jQuery library is installed.
 
206
 
 
207
 
 
208
[database]
 
209
----------
 
210
Configuration for the PostgreSQL database that IVLE uses.
 
211
 
 
212
.. describe:: host
 
213
 
 
214
    :type: string(default="localhost")
 
215
 
 
216
    Hostname of database IVLE server.
 
217
 
 
218
.. describe:: port
 
219
 
 
220
    :type: integer(default=5432)
 
221
 
 
222
    Port the database runs on.
 
223
 
 
224
.. describe:: name
 
225
 
 
226
    :type: string(default="ivle")
 
227
 
 
228
    Name of the IVLE database on the database server.
 
229
 
 
230
.. describe:: username
 
231
 
 
232
    :type: string
 
233
 
 
234
    Username which IVLE uses on the database server.
 
235
 
 
236
.. describe:: password
 
237
 
 
238
    :type: string
 
239
 
 
240
    Password which IVLE uses for authentication with the database server.
 
241
 
 
242
[auth]
 
243
------
 
244
Settings for configuring external user authentication with `authentication 
 
245
modules <ref-auth-modules>`_ and automatic subject enrollment with `subject 
 
246
pulldown modules <ref-subject-pulldown-modules>`_.
 
247
 
 
248
.. describe:: modules
 
249
 
 
250
    :type: string_list(default=list())
 
251
 
 
252
    List of `authentication modules <ref-auth-modules>`_ to attempt to 
 
253
    authenticate with if a user does not have a password set in the local 
 
254
    database.
 
255
 
 
256
.. describe:: ldap_url
 
257
 
 
258
    :type: string(default=None)
 
259
 
 
260
    URL of the LDAP server to be used by authentication modules.
 
261
 
 
262
.. describe:: ldap_format_string
 
263
 
 
264
    :type: string(default=None)
 
265
 
 
266
 
 
267
.. describe:: subject_pulldown_modules
 
268
 
 
269
    :type: string_list(default=list())
 
270
 
 
271
    List of `subject pulldown modules <ref-subject-pulldown-modules>`_ to be 
 
272
    checked when a user signs into IVLE to see what subjects a student is 
 
273
    enrolled in.
 
274
 
 
275
[usrmgt]
 
276
--------
 
277
Settings for the `User Management Server <ref-usrmgt-server>`_.
 
278
 
 
279
.. describe:: host
 
280
 
 
281
    :type: string(default="localhost")
 
282
 
 
283
    The hostname where the User Management Server is running.
 
284
 
 
285
.. describe:: port
 
286
 
 
287
    :type: integer(default=2178)
 
288
 
 
289
    The port that the User Management Server is running on.
 
290
 
 
291
.. describe:: magic
 
292
 
 
293
    :type: string
 
294
 
 
295
    The shared secret used to secure communication between IVLE Web 
 
296
    Application and the User Management Server.
 
297
 
 
298
[jail]
 
299
------
 
300
Options that control how the `Jail <ref-jail>`_ is built.
 
301
 
 
302
.. describe:: devmode
 
303
 
 
304
    :type: boolean(default=False)
 
305
 
 
306
    If set, copies IVLE files from the local machine into the jail rather than  
 
307
    installing them from a package.
 
308
 
 
309
    .. note::
 
310
 
 
311
        If the Python site packages directory differs between the local 
 
312
        machine and the jail (such as if different versions of Python are 
 
313
        installed) you will need to supply the site packages to be installed 
 
314
        with the ``--python-site-packages`` option to ``ivle-buildjail``.
 
315
 
 
316
.. describe:: suite
 
317
 
 
318
    :type: string(default="hardy")
 
319
 
 
320
    Which suite the jail will build with. This need not be the same as what 
 
321
    the local machine is running.
 
322
 
 
323
.. describe:: mirror
 
324
 
 
325
    :type: string(default="http://archive.ubuntu.com/ubuntu")
 
326
 
 
327
    The location of a HTTP mirror containing the specified suite.
 
328
 
 
329
.. describe:: extra_sources
 
330
 
 
331
    :type: string_list(default=list())
 
332
 
 
333
    A list of extra source locations to be added to the jail builder (such as 
 
334
    for site specific packages). For example, 'deb 
 
335
    http://ppa.launchpad.net/wgrant/ivle/ubuntu/ hardy main,'.
 
336
 
 
337
.. describe:: extra_packages
 
338
 
 
339
    :type: string_list(default=list())
 
340
 
 
341
    A list of extra packages to be installed in addition to the core packages 
 
342
    required for IVLE. For example, 'python-scipy, python-networkx,'
 
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
    Keys can be provided in tripple quoted blocks. For multiple keys, simply 
 
352
    concatinate the key blocks. For example::
 
353
 
 
354
        extra_keys = '''-----BEGIN PGP PUBLIC KEY BLOCK-----
 
355
        Version: SKS 1.0.10
 
356
 
 
357
        mI0ESXMxaQEEAMdundmJeTMUcB6fRXGQ3WJH+5hlfj3ehurF3u0ubr4sQpxfJvl6/KV4UcOC
 
358
        RvK4aufNInJxKrT6xvzdMNE9z5NO/ZVZdkr2NfcRO/0Yxgmaft9qjxfV+3NEBrvJkqm8ApVO
 
359
        hsxFW6VWyeHBELSiNxNGToPp+2g3i5VAlWbtzaapABEBAAG0H0xhdW5jaHBhZCBQUEEgZm9y
 
360
        IFdpbGxpYW0gR3JhbnSIRgQQEQIABgUCSXOMJAAKCRABz5LwpyR9xeXXAJ97VdeI3lLDvyM9
 
361
        TLeb48Ylj8dWdQCfcOJDRGfjRu9PI2+ekIoV8TqaC0GItgQTAQIAIAUCSXMxaQIbAwYLCQgH
 
362
        AwIEFQIIAwQWAgMBAh4BAheAAAoJECp86x2KYmtCEBED/0aRhr7wKmA/nyX2rUN/1dpyYT2T
 
363
        khxJT0F7l91/PGRkLUdvcX81ceRcYeiiR1x8N1tL7pwrTWZwaQ/HTHF19ZAXjptnn8zaLKUc
 
364
        VwhOrUdFE2FzNo42BWpXQAuJuBCG3DeIXDDuPRvtL+sx7h8PD/DlE5RsTaztkkbWdpkMtJp9
 
365
        =5ocD
 
366
        -----END PGP PUBLIC KEY BLOCK-----
 
367
        -----BEGIN PGP PUBLIC KEY BLOCK-----
 
368
        Version: GnuPG v1.4.9 (GNU/Linux)
 
369
 
 
370
        mQGiBEFEnz8RBAC7LstGsKD7McXZgd58oN68KquARLBl6rjA2vdhwl77KkPPOr3O
 
371
        YeSBH/voUsqausJfDNuTNivOfwceDe50lbhq52ODj4Mx9Jg+4aHn9fmRkIk41i2J
 
372
        3hZiIGPACY/FsSlRq1AhBH2wZG1lQ45W/p77AeARRehYKJP9HY+1h/uihwCgrVE2
 
373
        VzACJLuZWHbDsPoJaNQjiFcEAKbUF1rMyjd1xJM7bZeXbs8c+ohUo/ywSI/OIr8n
 
374
        <SNIP>
 
375
        RwIbDAAKCRBAl26vQ30FtdxYAJsFjU+xbex7gevyGQ2/mhqidES4MwCggqQyo+w1
 
376
        Twx6DKLF+3rF5nf1F3Q=
 
377
        =PBAe
 
378
        -----END PGP PUBLIC KEY BLOCK-----
 
379
        '''
 
380
 
 
381
 
 
382
[user_info]
 
383
-----------
 
384
User specific settings that are added to a user's :file:`ivle.conf` file 
 
385
inside their jail.
 
386
 
 
387
.. warning::
 
388
 
 
389
    This should be in a user-specific place but since we're worried a user
 
390
    may delete his/her .conf file, we put it here for now). These properties 
 
391
    **should not** be set in the server's :file:`/etc/ivle/ivle.conf`.
 
392
 
 
393
.. describe:: login
 
394
 
 
395
    :type: string(default=None)
 
396
 
 
397
    The login name of the user.
 
398
 
 
399
.. describe:: svn_pass
 
400
 
 
401
    :type: string(default=None)
 
402
 
 
403
    The key used to access repositories on the Subversion server.
 
404
 
 
405
 
 
406
Apache configuration
 
407
====================
 
408
Apache is used in IVLE for hosting of the IVLE web application and hosting 
 
409
Subversion repositories over WebDAV. Typically the Subversion repository will 
 
410
run on the Master server and the Web Application will be run on a collection 
 
411
of slaves.  It is also possible to combine the two function together to run as 
 
412
a standalone server.
 
413
 
 
414
 
 
415
Web Application
 
416
---------------
 
417
The IVLE web application runs on Apache using ``mod_python``. An example 
 
418
configuration is provided in the file :file:`examples/config/apache.conf`.
 
419
 
 
420
At minimum the following settings must be specified:
 
421
 
 
422
.. describe:: ServerName
 
423
 
 
424
    Should be the formal hostname of the server, typically one that users will 
 
425
    use to access IVLE. For example, 'ivle.org'.
 
426
 
 
427
.. describe:: ServerAlias
 
428
 
 
429
    Should be set to the value of ``[urls] public_host`` that is specified in 
 
430
    :file:`ivle.conf`. This is to ensure that Apache will correctly handle 
 
431
    requests for the public content.
 
432
 
 
433
.. describe:: SetHandler
 
434
 
 
435
    Must be ``mod_python``
 
436
 
 
437
.. describe:: PythonHandler
 
438
 
 
439
    Must be ``ivle.dispatch``
 
440
 
 
441
.. describe:: PythonOption mod_python.file_session.database_directory
 
442
 
 
443
    Session directory for mod_python. This must be a shared directory between 
 
444
    all Slave servers, in particular when operating through a load balancer.  
 
445
    If not provided then users will encounter inconsistent behavior such as 
 
446
    being thrown back to the login screen after logging in.
 
447
 
 
448
Optional settings are:
 
449
 
 
450
.. describe:: PythonOption mod_python.session.cookie_name
 
451
 
 
452
    The name to be set for cookies rather than the one automatically generated 
 
453
    by mod_python. For example, 'ivle'.
 
454
 
 
455
.. describe:: PythonDebug
 
456
 
 
457
    If this option is set, any uncaught errors from mod_python will be sent to 
 
458
    the browser rather than being sent to the error log. It is recommended 
 
459
    that this setting is only used for development or debugging.
 
460
 
 
461
Subversion Repository
 
462
---------------------
 
463
IVLE also uses Apache to provide HTTP access to user's Subversion repositories 
 
464
using ``mod_dav_svn``. Typically this is run on a single, stand alone server; 
 
465
though it may be run in conjunction with the Web Application.  An example 
 
466
configuration is provided in the file :file:`examples/config/apache-svn.conf`.  
 
467
IVLE will automatically generate password hash and repository permission files 
 
468
that are used to control access to the repositories.
 
469
 
 
470
IVLE expects to find the paths ``users/`` and ``groups/`` at the URL provided 
 
471
by the value of ``[urls] svn_addr`` set in :file:`ivle.conf`. Thus there 
 
472
should be two ``Location`` clauses configured, one for users and one for 
 
473
groups.
 
474
 
 
475
User Repositories
 
476
~~~~~~~~~~~~~~~~~
 
477
 
 
478
.. describe:: DAV
 
479
 
 
480
    Must be ``svn``
 
481
 
 
482
.. describe:: SVNParentPath
 
483
 
 
484
    Directory where user repositories are stored. Should be the value of 
 
485
    ``[path] [[svn]] repo_path`` in :file:`ivle.conf` with 'users' appended.  
 
486
    For example, '/var/lib/ivle/svn/repositories/users'.
 
487
 
 
488
.. describe:: AuthzSVNAccessFile
 
489
 
 
490
    Location of the configuration file used to assign permissions to user 
 
491
    repositories. Should be the same value as ``[path] [[svn]] conf`` in 
 
492
    :file:`ivle.conf`.
 
493
 
 
494
.. describe:: Require
 
495
 
 
496
    Must be ``valid-user``
 
497
 
 
498
.. describe:: AuthType
 
499
 
 
500
    Must be ``Basic``
 
501
 
 
502
.. describe:: AuthName
 
503
 
 
504
    The name that should appear on authentication requests. For example, 'IVLE 
 
505
    Subversion repository'.
 
506
 
 
507
.. describe:: AuthUserFile
 
508
 
 
509
    Location of the password hash file for Subversion users. Should be the 
 
510
    same as the value of ``[path] [[svn]] auth_ivle``. For example, 
 
511
    '/var/lib/ivle/svn/ivle.auth'.
 
512
 
 
513
Group Repositories
 
514
~~~~~~~~~~~~~~~~~~
 
515
 
 
516
.. describe:: DAV
 
517
 
 
518
    Must be ``svn``
 
519
 
 
520
.. describe:: SVNParentPath
 
521
 
 
522
    Directory where user repositories are stored. Should be the value of 
 
523
    ``[path] [[svn]] repo_path`` in :file:`ivle.conf` with 'groups' appended.  
 
524
    For example, '/var/lib/ivle/svn/repositories/groups'.
 
525
 
 
526
.. describe:: AuthzSVNAccessFile
 
527
 
 
528
    Location of the configuration file used to assign permissions to group 
 
529
    repositories. Should be the same value as ``[path] [[svn]] group_conf`` in 
 
530
    :file:`ivle.conf`.
 
531
 
 
532
.. describe:: Require
 
533
 
 
534
    Must be ``valid-user``
 
535
 
 
536
.. describe:: AuthType
 
537
 
 
538
    Must be ``Basic``
 
539
 
 
540
.. describe:: AuthName
 
541
 
 
542
    The name that should appear on authentication requests. For example, 'IVLE 
 
543
    Subversion repository'.
 
544
 
 
545
.. describe:: AuthUserFile
 
546
 
 
547
    Location of the password hash file for Subversion users. Should be the 
 
548
    same as the value of ``[path] [[svn]] auth_ivle``. For example, 
 
549
    '/var/lib/ivle/svn/ivle.auth'.