@@ -7,48 +7,88 @@ General Instructions for Deployment of a New Release
77====================================================
88
99
10- In order to fetch a new release of the django datatracker code, simply
11- check out the appropriate tag from svn::
10+ 1. In order to fetch a new release of the django datatracker code, simply
11+ check out the appropriate tag from svn::
1212
13- svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber
13+ svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber
1414
15- Don't forget to copy $releasenumber/ietf/settings_local.py from the
16- old release to the new one; otherwise things won't work!
17- ::
15+ 2. Don't forget to copy $releasenumber/ietf/settings_local.py from the
16+ old release to the new one; otherwise things won't work!
17+ ::
1818
19- cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/
19+ cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/
2020
21- Change into the directory of the new release and run migrations::
21+ 3. Change into the directory of the new release and run migrations::
2222
23- cd $releasenumber
24- PYTHONPATH=$PWD ietf/manage.py migrate
25- cd ..
23+ cd $releasenumber
24+ PYTHONPATH=$PWD ietf/manage.py migrate
25+ cd ..
2626
27- and then re-point the 'web' symlink::
27+ 4. Then re-point the 'web' symlink::
2828
29- rm ./web; ln -s $releasenumber web
29+ rm ./web; ln -s $releasenumber web
3030
31- and finally restart apache::
31+ 5. Restart apache::
3232
33- sudo /etc/init.d/apache2 restart
33+ sudo /etc/init.d/apache2 restart
3434
35- It's now also a good idea to go to the datatracker front page: :
35+ 6. It's now also a good idea to go to the datatracker front page:
3636
37- http://datatracker.ietf.org/
37+ http://datatracker.ietf.org/
3838
39- to check that it's alive and kicking, and displaying the new release
40- number at the bottom of the left-side menubar :-) -- if not, revert the
41- symlink step, re-pointing the symlink to the release that was running
42- before the new release, and restart apache again to roll back to that.
39+ to check that it's alive and kicking, and displaying the new release
40+ number at the bottom of the left-side menubar :-)
41+
42+ 7. If things **aren't** cool, revert the symlink step, re-pointing the
43+ symlink to the release that was running before the new release, and restart
44+ apache again to roll back to that.
4345
4446
4547Installing from Scratch
4648=======================
4749
48- In addition to the new release deployment instructions above, the settings_local.py
49- file has to be set up properly, and Apache has to be configured. Since the IETF
50- datatracker is only intended to be deployed from scratch once, these instructions
51- don't cover this. The general Django depoloyment instructions are relevant, however.
50+ In addition to the new release deployment instructions above, the
51+ settings_local.py file has to be set up properly, and Apache has to be
52+ configured. Since the IETF datatracker is only intended to be deployed from
53+ scratch once, these instructions don't cover this scenario in any more detail.
54+ The general Django depoloyment instructions are relevant, however.
55+
56+
57+ Patching a Production Release
58+ =============================
59+
60+ Sometimes it can prove necessary to patch an existing release. The following
61+ process should be used:
62+
63+ 1. Code and test the patch on a development system copy of the production
64+ release which has no other code changes (or on trunk, with no uncommitted
65+ code changes, if it's sufficiently close).
66+
67+ 2. Produce a patch file, named with date and subject::
68+
69+ ~/src/ietfdb/working $ svn diff > 2013-03-25-ballot-calculation.patch
70+
71+ 3. Move the patch file to the production server, and place it in
72+ '/a/www/ietf-datatracker/patches/'
73+
74+ 4. Make a recursive copy of the production code to a new directory, named
75+ with a patch number. Assuming the production code is in 4.43/, and we
76+ have web -> 4.43/::
77+
78+ /a/www/ietf-datatracker $ rsync -a web/ 4.43.p1/
79+
80+ (you could use 'cp -rp' instead, but rsync seems to do this faster).
81+
82+ 5. Apply the patch::
83+
84+ /a/www/ietf-datatracker $ cd 4.43.p1/
85+ /a/www/ietf-datatracker/4.43.p1 $ patch -p0 < ../patches/2013-03-25-ballot-calculation.patch
86+
87+ This should not produce any messages about failing to apply any chunks;
88+ if it does, you probably should go back to 1. and figure out why ...
89+
90+ 6. Change the 'web' symlink, reload etc. as described in
91+ `General Instructions for Deployment of a New Release`_ .
5292
5393
5494Installing a Secretariat Release
0 commit comments