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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.. IVLE - Informatics Virtual Learning Environment
   Copyright (C) 2007-2010 The University of Melbourne

.. This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

.. This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

.. You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

********
Upgrades
********

Follow these instructions to upgrade your IVLE installation. In the case of a
multi-node installation, follow each instruction on every node unless
otherwise specified.


Shutting down
=============

Before commencing the main upgrade process, ensure that the slave web servers
are inaccessible -- stopping Apache is a good way to be sure. ::

   sudo /etc/init.d/apache2 stop

You should then check for and kill any ``python-console`` process on the
slaves. These are the console backend processes, and may hold resources open
across the upgrade -- that could end badly.


Unmounting user jails
=====================

An upgrade is a good opportunity to purge obsolete jail mounts on each slave.
Unmounting the jails will also reduce the likelihood of problems during the
later jail rebuilds. Take heed of any ``Device busy`` errors -- that normally
indicates that a ``python-console`` process is still running. ::

   sudo ivle-mountallusers -u


Upgrading the code
==================

The next stage of the IVLE upgrade process depends on the installation mode.


Upgrading a source installation
-------------------------------

To upgrade a source installation, update your checkout or extract a new
release tarball.

Then build and install the updated code: ::

   ./setup.py build
   sudo ./setup.py install


Upgrading a packaged installation
---------------------------------

To upgrade an installation from the Ubuntu package, a normal apt upgrade
is sufficient. ::

   sudo apt-get update
   sudo apt-get upgrade


Patching the database
=====================

If the new version has additional database patches, apply each in order on
the master with something like this: ::

   sudo -u postgres psql -d ivle -f userdb/migrations/YYYYMMDD-XX.sql


Upgrading the jail
==================

The code inside the jail will normally need to be kept in sync with that
on the master and slaves. On the upgraded master: ::

   sudo ivle-buildjail -u


Rebuilding user jails
=====================

To ensure that any configuration or structural updates are pushed into the
jails, rebuild them all on the master. ::

   sudo ivle-remakeuser -a

This will preserve the user files (in ``/home/USERNAME``), but rebuild the
external configuration files and filesystem structure.


Changing the media version
==========================

If you've set a media version (in ``ivle.conf``, the ``media`` section's
``version`` value), you'll need to update it on each slave. Set it to a value
that hasn't been used before -- the IVLE version number, for example. Ensure
that it is the same on all slaves.


Restarting the user management server
=====================================

The master's user management server should be restarted after each upgrade. ::

   sudo /etc/init.d/ivle-usrmgt-server restart


Starting everything back up
===========================

Now that the upgrade is done, Apache can be restarted on the slaves. This
should bring IVLE back into service. ::

   sudo /etc/init.d/apache2 start