|
| 1 | +===================================== |
| 2 | +Datatracker Installation Instructions |
| 3 | +===================================== |
| 4 | + |
| 5 | + |
| 6 | +General Instructions for Deployment of a New Release |
| 7 | +==================================================== |
| 8 | + |
| 9 | + |
| 10 | +In order to fetch a new release of the django datatracker code, simply |
| 11 | +check out the appropriate tag from svn:: |
| 12 | + |
| 13 | + svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber |
| 14 | + |
| 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 | +:: |
| 18 | + |
| 19 | + cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/ |
| 20 | + |
| 21 | +Change into the directory of the new release and run migrations:: |
| 22 | + |
| 23 | + cd $releasenumber |
| 24 | + PYTHONPATH=$PWD ietf/manage.py migrate |
| 25 | + cd .. |
| 26 | + |
| 27 | +and then re-point the 'web' symlink:: |
| 28 | + |
| 29 | + rm ./web; ln -s $releasenumber web |
| 30 | + |
| 31 | +and finally restart apache:: |
| 32 | + |
| 33 | + sudo /etc/init.d/apache2 restart |
| 34 | + |
| 35 | +It's now also a good idea to go to the datatracker front page:: |
| 36 | + |
| 37 | + http://datatracker.ietf.org/ |
| 38 | + |
| 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. |
| 43 | + |
| 44 | + |
| 45 | +Installing from Scratch |
| 46 | +======================= |
| 47 | + |
| 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. |
| 52 | + |
| 53 | + |
| 54 | +Installing a Secretariat Release |
| 55 | +================================ |
| 56 | + |
| 57 | +Secretariat releases are based on a regular tagged release, but contain |
| 58 | +updated code in the ietf/secr/ tree. They are named with a trailing |
| 59 | +'.secr<N>' version number. If the tagged release is for instance 4.42, the |
| 60 | +first secretariat release based on that would have release number 4.42.secr1, |
| 61 | +and the second secretariat release based on it would be numbered 4.42.secr2. |
| 62 | + |
| 63 | +Secretariat releases are deployed in the same manner as regular releases, with |
| 64 | +the addition that patches made to the regular release needs to be picked up |
| 65 | +and applied. Assuming we'releasing 4.42.secr2, then after we've cd'd into |
| 66 | +the release diretory to run migrations, we'd also run a patch step to pick |
| 67 | +up the current patches to the current production release, which is pointed |
| 68 | +to by ../web:: |
| 69 | + |
| 70 | + /a/www/ietf-datatracker/4.42.secr2 $ svn diff ../web/ | patch -p2 |
| 71 | + |
| 72 | +Assuming that runs without error messages, the deployment is continued as |
| 73 | +usual, with re-pointing the symlink and restarting apache. |
| 74 | + |
| 75 | +Additional Version-Specific Instructions |
| 76 | +======================================== |
| 77 | + |
| 78 | +Version 4.42 |
| 79 | +------------ |
| 80 | + |
| 81 | + - In order to serve the secretariat tools static pages (such as image, css and js |
| 82 | + files) the exceptions to which urls need to be handled by the python-handler |
| 83 | + must be updated. |
| 84 | + |
| 85 | + In the datatracker test server, the following configuration has been used to |
| 86 | + make apache handle the static files, and Django the dynamic pages. The new |
| 87 | + part is the <LocationMatch/> which mentions /secr/. Adapt as needed for ietfa:: |
| 88 | + |
| 89 | + ---------------- |
| 90 | + # Logging and document root settings omitted |
| 91 | + |
| 92 | + <Location "/"> |
| 93 | + PythonPath "['/srv/www/ietfdb'] + sys.path" |
| 94 | + SetHandler python-program |
| 95 | + PythonHandler django.core.handlers.modpython |
| 96 | + SetEnv DJANGO_SETTINGS_MODULE ietf.settings |
| 97 | + PythonDebug On |
| 98 | + </Location> |
| 99 | + |
| 100 | + <LocationMatch "^/(robots.txt|favicon.ico|images|css|js|media|error)(/|$)"> |
| 101 | + SetHandler None |
| 102 | + </LocationMatch> |
| 103 | + |
| 104 | + # New for secretariat tools: |
| 105 | + <LocationMatch "^/secr/(img|css|js|error)"> |
| 106 | + SetHandler None |
| 107 | + </LocationMatch> |
| 108 | + |
| 109 | + <Location "/accounts/login/"> |
| 110 | + AuthType Digest |
| 111 | + AuthName "IETF" |
| 112 | + AuthUserFile /var/local/loginmgr/digest |
| 113 | + AuthGroupFile /var/local/loginmgr/groups |
| 114 | + AuthDigestDomain http://tools.ietf.org/ |
| 115 | + Require valid-user |
| 116 | + </Location> |
| 117 | + |
| 118 | + # Caching and compression settings omitted |
| 119 | + ---------------- |
| 120 | + |
| 121 | +Version 4.40 |
| 122 | +------------ |
| 123 | + |
| 124 | + - (DONE) Add ianasync user with an auth role in the "iana" group and an |
| 125 | + rfceditorsync user with an auth role in the "rfceditor" group (don't |
| 126 | + think Group(acronym="rfceditor") exists yet); IANA and RFC Editor need |
| 127 | + to know the passwords for the poke mechanism |
| 128 | + |
| 129 | + |
| 130 | + - (DONE) Make sure mailing list for iab-stream@iab.org is up (since we're now |
| 131 | + emailing that) |
| 132 | + |
| 133 | + - (DONE) Set rfc_must_published_later_than date in bin/iana-protocols-updates to today |
| 134 | + |
| 135 | + - (DONE) Run the 3 new doc South migrations |
| 136 | + |
| 137 | + - (DONE) New polling scripts, to be run every hour:: |
| 138 | + |
| 139 | + web/ietf/bin/iana-changes-updates |
| 140 | + web/ietf/bin/iana-protocols-updates |
| 141 | + web/ietf/bin/rfc-editor-index-updates (replaces mirror_rfc_index) |
| 142 | + web/ietf/bin/rfc-editor-queue-updates (replaces mirror_rfc_queue) |
| 143 | + |
| 144 | + - (DONE) Import old events from IANA:: |
| 145 | + |
| 146 | + bin/iana-changes-updates --from="2005-01-01 00:00:00" --to="2013-01-31 00:00:00" --no-email |
| 147 | + |
| 148 | + - (DONE) Pipe IANA review emails to the datatracker. There used to be an action to pipe |
| 149 | + such mails to henrik@levkowetz.com, for testing this feature, but I haven't seen |
| 150 | + any in a little while, so I don't know if this has broken. Anyway, the iana review |
| 151 | + emails should be piped into:: |
| 152 | + |
| 153 | + /www/ietf-datatracker/web/ietf/bin/iana-review-email |
| 154 | + |
| 155 | + |
| 156 | + - (DONE) Tell IANA we're doing this for real now. |
| 157 | + |
| 158 | + |
| 159 | +Version 4.34 |
| 160 | +------------ |
| 161 | + |
| 162 | +The migration step you do as a part of the release sequence is going to take |
| 163 | +quite some time -- probably minutes. It will generate some output while it's |
| 164 | +working, too. As long as it doesn't halt and say that something failed or |
| 165 | +gave an error, this is as expected, and when it terminates, you should be OK |
| 166 | +to continue. |
| 167 | + |
| 168 | +Version 4.21 |
| 169 | +------------ |
| 170 | + |
| 171 | +This release will you to run migrations before moving the link to the new |
| 172 | +version and doing the apache reload. I know you have a routine for the steps |
| 173 | +needed to deploy a new release by now, but thought I'd mention it, anyway. |
| 174 | + |
| 175 | +If there is any problem at all doing the migrations, then you'll need to |
| 176 | +do a fake initial migration, as follows:: |
| 177 | + |
| 178 | + web $ PYTHONPATH=PWD ietf/manage.py migrate --fake meeting 0001 |
| 179 | + |
| 180 | +and then to the regular migration again. |
| 181 | + |
| 182 | +Version 4.20 |
| 183 | +------------ |
| 184 | + |
| 185 | +Some one-time actions that need to be taken are as follows:: |
| 186 | + |
| 187 | + Assuming that the release has been checked out in /a/www/ietf-datatracker/4.20: |
| 188 | + |
| 189 | + cd /a/www/ietf-datatracker/4.20 |
| 190 | + |
| 191 | + PYTHONPATH=$PWD ietf/manage.py migrate --fake doc 0001 |
| 192 | + PYTHONPATH=$PWD ietf/manage.py migrate --fake name 0001 |
| 193 | + |
| 194 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< "delete from django_content_type where app_label='doc' |
| 195 | + and model='groupballotpositiondocevent';" |
| 196 | + |
| 197 | + PYTHONPATH=$PWD ietf/manage.py migrate doc || { \ |
| 198 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'CREATE TABLE `doc_groupballotpositiondocevent` |
| 199 | + (`block_comment` longtext NOT NULL, `comment` longtext NOT NULL, |
| 200 | + `ad_id` integer NOT NULL, `comment_time` datetime NULL, |
| 201 | + `block_comment_time` datetime NULL, `pos_id` varchar(8) NOT NULL DEFAULT "norecord", |
| 202 | + `docevent_ptr_id` integer NOT NULL PRIMARY KEY);' |
| 203 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype` CASCADE;' |
| 204 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype_positions` CASCADE;' |
| 205 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballotdocevent` CASCADE;' |
| 206 | + PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'ALTER TABLE `doc_ballotpositiondocevent` |
| 207 | + DROP COLUMN `ballot_id` CASCADE;' |
| 208 | + } |
| 209 | + |
| 210 | + PYTHONPATH=$PWD ietf/manage.py migrate doc |
| 211 | + PYTHONPATH=$PWD ietf/manage.py migrate name |
| 212 | + PYTHONPATH=$PWD python ietf/wgcharter/migrate.py | tee -a ~/charter-migration.log |
| 213 | + |
| 214 | + |
0 commit comments