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

« back to all changes in this revision

Viewing changes to doc/man/install.rst

  • Committer: William Grant
  • Date: 2009-12-14 04:17:46 UTC
  • Revision ID: me@williamgrant.id.au-20091214041746-eurw04xssf4cvszc
Add ivle-dev-setup, a script to do most of the heavy lifting when setting up a new dev installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
might work too. Debian/Ubuntu package names are given after the name of the
29
29
software.
30
30
 
31
 
.. If this list changes, you also need to change the list below, and
32
 
   the list in bin/ivle-dev-setup.
 
31
.. If this list changes, you also need to change the list below.
33
32
 
34
33
* Ubuntu 8.04 or later (other distros should work with some tweaking, but are untested)
35
34
* Apache 2.x (``apache2``) with modules:
55
54
Master versus slave servers
56
55
===========================
57
56
 
58
 
IVLE is normally deployed in a cluster of several machines, split into
59
 
two different roles: master and slave.
60
 
 
61
 
There must be exactly one master server per cluster. The master normally
62
 
runs the PostgreSQL database server, the Subversion server, and the IVLE User
63
 
Management Server (``ivle-usrmgt-server``). It might also export shared data
64
 
directories to the slaves over NFS.
65
 
 
66
 
There may be any number of slaves in a cluster. They run the IVLE web
67
 
application, which also starts console host processes. Each slave makes use
68
 
of the shared services on the master.
69
 
 
70
 
For a small instance a slave may be run on the same machine as the master.
71
 
This is the setup described on this page.
72
 
 
73
 
 
74
57
Installing from a Debian package
75
58
================================
76
59
 
77
60
.. _database-setup:
78
61
 
79
 
 
80
62
Installing from source
81
63
======================
82
64
 
83
 
When setting up a development IVLE environment on Ubuntu 9.04 or later,
84
 
there are scripts to automate most of the process. First get and extract
85
 
a release, or check out the latest code from the bzr branch: ::
86
 
 
87
 
   bzr get lp:ivle
88
 
 
89
 
This will create a new directory, ``ivle``, containing a pristine
90
 
source tree. The remaining steps assume that you are in this new
91
 
directory.
92
 
 
93
 
The ``ivle-dev-setup`` script will configure PostgreSQL, Apache, IVLE
94
 
and the filesystem to cooperate, getting you most of the way to a
95
 
working system in just one step: ::
96
 
 
97
 
   bin/ivle-dev-setup
98
 
 
99
 
.. warning::
100
 
   This reconfigures parts of your system, and has the potential to
101
 
   break other applications using Apache or PostgreSQL. It may also
102
 
   fail to execute if you have existing incompatible configurations
103
 
   of those services.
104
 
   
105
 
 
106
 
This may take a few minutes, and will ask you to confirm installation
107
 
of the dependency packages.
108
 
 
109
 
Upon completion, you must build a self-contained jail in which to run
110
 
untrusted user code. ``ivle-dev-setup`` will have configured most of
111
 
the necessary settings, but you may wish to use a local Ubuntu mirror
112
 
to improve speed or minimise download costs. If you don't wish to use
113
 
a special mirror, you may omit the first step. ::
114
 
 
115
 
   sudo ivle-config --jail/mirror http://url.to.mirror/ubuntu
116
 
   sudo ivle-buildjail -r
117
 
 
118
 
.. warning::
119
 
   ``ivle-buildjail`` will download a large volume of package data --
120
 
   potentially some hundreds of megabytes.
121
 
 
122
 
``ivle-buildjail`` will download, unpack and install a minimal Ubuntu
123
 
system and configure it for IVLE usage. This could take a while.
124
 
 
125
 
Once the jail has been successfully built, IVLE is up and running,
126
 
but with no user accounts or other data in place. For development
127
 
or demonstration purposes, sample data (including fictitious users,
128
 
subjects, and projects) can be loaded.
129
 
 
130
 
For other environments, it may be more appropriate to start with an
131
 
empty database and just create users as required.
132
 
 
133
 
To load the sample data: ::
134
 
 
135
 
   sudo ivle-loadsampledata examples/db/sample.sql
136
 
 
137
 
.. warning::
138
 
   If you answer 'yes' to the ``ivle-loadsampledata`` prompt, any
139
 
   existing data in your IVLE database will be **permanently
140
 
   destroyed**.
141
 
 
142
 
... or to add a new admin user: ::
143
 
 
144
 
   sudo ivle-adduser --admin -p password username 'Full Name'
145
 
 
146
 
You should then be able to browse to http://ivle.localhost/, and
147
 
log in with username ``admin`` and password ``password``, or the
148
 
username and password that you gave to ``ivle-adduser``.
149
 
 
150
 
 
151
 
Manual steps
152
 
------------
153
 
 
154
 
If the automatic installation scripts do not work, or if you want more
155
 
control over the whole process, these manual steps are probably for
156
 
you. But you need not read this section at all if you were able to log
157
 
in after following the steps above.
158
 
 
159
 
.. If this list changes, you also need to change the list above, and
160
 
   the command in bin/ivle-dev-setup.
 
65
.. If this list changes, you also need to change the list above.
161
66
 
162
67
If you want to grab all of the required packages in one command, use::
163
68
 
250
155
IVLE makes use of two Apache virtual hosts: one for the application itself,
251
156
and one for the Subversion services. There are example configuration files
252
157
in ``examples/config/apache.conf`` and ``examples/config/apache-svn.conf``,
253
 
which will run IVLE at http://ivle.localhost/.
 
158
which will run IVLE at ``http://ivle.localhost/``.
254
159
 
255
160
On a Debian or Ubuntu system, just copy those two files into
256
161
``/etc/apache2/sites-available`` under appropriate names (eg. ``ivle`` and
302
207
 
303
208
   sudo ivle-adduser --admin -p password username 'Full Name'
304
209
 
305
 
You should then be able to browse to http://ivle.localhost/, and
 
210
You should then be able to browse to ``http://ivle.localhost/``, and
306
211
log in with that username and password.
307
212
 
308
213
*Alternatively*, you may wish to import the IVLE sample data, for a complete