15
15
along with this program; if not, write to the Free Software
16
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
28
might work too. Debian/Ubuntu package names are given after the name of the
31
.. If this list changes, you also need to change the list below.
29
33
* Ubuntu 8.04 or later (other distros should work with some tweaking, but are untested)
30
* Apache 2.x with modules:
34
* Apache 2.x (``apache2``) with modules:
31
35
+ mod_python (``libapache2-mod-python``)
32
36
+ mod_dav_svn and mod_authz_svn (``libapache2-svn``)
33
* Python 2.5 or 2.6 with modules:
34
+ pysvn (``python-svn``)
37
* Python 2.5 (``python2.5``) or 2.6 (``python2.6``) with modules:
35
38
+ cjson (``python-cjson``)
36
+ Genshi (``python-genshi``)
37
39
+ ConfigObj (``python-configobj``)
38
+ Routes (``python-routes``)
39
40
+ docutils (``python-docutils``)
40
41
+ epydoc (``python-epydoc``)
42
+ FormEncode (``python-formencode``)
43
+ Genshi (``python-genshi``)
44
+ psycopg2 (``python-psycopg2``)
45
+ pysvn (``python-svn``)
46
+ Routes (``python-routes``)
41
47
+ Storm (``python-storm``)
42
+ psycopg2 (``python-psycopg2``)
43
48
* jQuery (``libjs-jquery``)
44
49
* PostgreSQL 8.3 or later (``postgresql``)
45
50
* Subversion (``subversion``)
46
51
* debootstrap (``debootstrap``)
47
53
* GCC and related build machinery (``build-essential``)
49
55
Master versus slave servers
55
61
Installing from source
56
62
======================
64
.. If this list changes, you also need to change the list above.
66
If you want to grab all of the required packages in one command, use::
68
sudo apt-get install apache2 libapache2-mod-python libapache2-svn \
69
python2.6 python-cjson python-configobj python-docutils python-epydoc \
70
python-formencode python-genshi python-psycopg2 python-svn python-routes \
71
python-storm libjs-jquery postgresql subversion debootstrap rsync \
58
74
While installing from a distribution package is often a better idea for
59
75
users, developers will need to install from a plain source tree.
74
90
Unlike the package, you will have to manually set up the database and
77
.. TODO: Separate IVLE PostgreSQL account.
79
First you must create a PostgreSQL database, and populate it with the
80
IVLE schema. You may use any name for the database. ::
82
sudo -u postgres createdb ivle
93
First, it is recommended that you create a separate database user for IVLE.
94
You may use any name for the user. ::
96
sudo -u postgres createuser ivleuser # Answer 'n' to all questions
97
sudo -u postgres psql -c "ALTER USER ivleuser WITH ENCRYPTED PASSWORD 'ivle-password';"
99
Now, you must create a PostgreSQL database, and populate it with the
100
IVLE schema. You may use any name for the database (here we use ``ivle``). ::
102
sudo -u postgres createdb -O ivleuser ivle
83
103
sudo -u postgres createlang plpgsql ivle
84
sudo -u postgres psql -d ivle < userdb/users.sql
104
psql -h localhost -W ivle ivleuser < userdb/users.sql
86
106
The configuration wizard - ``ivle-config`` - will ask you a series of
87
questions. Apart from database settings, the defaults should be correct
107
questions. You should give the database username and password as configured
108
above. Apart from database settings, the defaults should be correct
88
109
for a development system. If deploying IVLE properly - particularly on
89
110
multiple nodes - several options will need to be changed. Watching
90
111
carefully, run: ::
104
125
sudo ivle-createdatadirs
106
.. TODO: Setting jail/devmode, jail/suite, jail/extra_packages...
107
We also need to document setting of the default mirror, once
128
Configuring the jail environment
129
--------------------------------
110
131
You will require a self-contained jail environment in which to safely
111
execute student code. The creation process basically downloads a minimal
112
Ubuntu system and installs it in ``/var/lib/ivle/jails/__base__``. Note
113
that this could download a couple of hundred megabytes. You should
114
replace the URL with a good close Ubuntu mirror. ::
116
sudo ivle-buildjail -r -m http://url.to.archive/mirror
132
execute student code.
133
Before you can actually build the jail, a few configuration options are
134
needed. Open up ``/etc/ivle/ivle.conf``, and find the ``[jail]`` section
135
(**not** the ``[[jails]]`` section).
139
suite = jaunty # Replace this with the codename of your Ubuntu release.
140
mirror = http://url.to.archive/mirror # Replace with a fast Ubuntu mirror.
141
extra_packages = python-configobj, python-svn, python-cjson
143
.. TODO: Move this around a bit, as the config options required differ for
144
the packaged version.
146
Now we can actually build the jail. The creation process basically downloads
147
a minimal Ubuntu system and installs it in ``/var/lib/ivle/jails/__base__``.
148
Note that this could download a couple of hundred megabytes. ::
150
sudo ivle-buildjail -r
118
152
Configuring Apache
119
153
------------------
132
166
sudo /etc/init.d/apache2 reload
169
Configuring hostname resolution
170
--------------------------------
172
All of IVLE's hostnames need to be resolvable from the local system. For a
173
production environment, this would be done in DNS. For a development system,
174
this is usually done in ``/etc/hosts``. Add this line to that file: ::
176
127.0.1.1 ivle.localhost public.ivle.localhost svn.ivle.localhost
178
Code running inside the jail environment also needs to be able to resolve
179
those names. Add, to ``/var/lib/ivle/jails/__base_build__/etc/hosts``: ::
181
127.0.1.1 svn.ivle.localhost
183
Then refresh the active copy of the jail: ::
188
Configuring the user management server
189
--------------------------------------
191
You need to have the IVLE user management server (``usrmgt-server``) running
192
for many parts of IVLE to operate properly, so it should be configured to
193
start on boot. There is an example init script in
194
``examples/config/usrmgt-server.init``. For Debian or Ubuntu, copy it to
195
``/etc/init.d/ivle-usrmgt-server``. Start it now, and set it to start
198
sudo /etc/init.d/ivle-usrmgt-server start
199
sudo update-rc.d ivle-usrmgt-server defaults 99
202
Creating the initial user
203
-------------------------
205
The final step in getting a usable IVLE set up is creating a user. You'll
206
probably want admin privileges - if not, drop the ``--admin``. ::
208
sudo ivle-adduser --admin -p password username 'Full Name'
210
You should then be able to browse to ``http://ivle.localhost/``, and
211
log in with that username and password.
136
214
For more advanced configuration, see :ref:`Configuring IVLE
137
215
<ref-configuring-ivle>`.