Skip to content

Commit 37955bf

Browse files
committed
Added an INSTALL file which holds a record of general and version-specific actions needed to install.
- Legacy-Id: 5304
2 parents 1fbcd78 + 3dccf59 commit 37955bf

3 files changed

Lines changed: 161 additions & 2 deletions

File tree

INSTALL

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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+
36+
Installing from Scratch
37+
=======================
38+
39+
In addition to the new release deployment instructions above, the settings_local.py
40+
file has to be set up properly, and Apache has to be configured. Since the IETF
41+
datatracker is only intended to be deployed from scratch once, these instructions
42+
don't cover this. The general Django depoloyment instructions are relevant, however.
43+
44+
45+
Additional Version-Specific Instructions
46+
========================================
47+
48+
Version 4.40
49+
------------
50+
51+
- (DONE) Add ianasync user with an auth role in the "iana" group and an
52+
rfceditorsync user with an auth role in the "rfceditor" group (don't
53+
think Group(acronym="rfceditor") exists yet); IANA and RFC Editor need
54+
to know the passwords for the poke mechanism
55+
56+
57+
- (DONE) Make sure mailing list for iab-stream@iab.org is up (since we're now
58+
emailing that)
59+
60+
- Set rfc_must_published_later_than date in bin/iana-protocols-updates to today
61+
62+
- Run the 3 new doc South migrations
63+
64+
- New polling scripts, to be run every hour::
65+
66+
web/ietf/bin/iana-changes-updates
67+
web/ietf/bin/iana-protocols-updates
68+
web/ietf/bin/rfc-editor-index-updates (replaces mirror_rfc_index)
69+
web/ietf/bin/rfc-editor-queue-updates (replaces mirror_rfc_queue)
70+
71+
- Import old events from IANA::
72+
73+
bin/iana-changes-updates --from="2005-01-01 00:00:00" --to="2013-01-31 00:00:00" --no-email
74+
75+
- Pipe IANA review emails to the datatracker. There used to be an action to pipe
76+
such mails to henrik@levkowetz.com, for testing this feature, but I haven't seen
77+
any in a little while, so I don't know if this has broken. Anyway, the iana review
78+
emails should be piped into::
79+
80+
/www/ietf-datatracker/web/ietf/bin/iana-review-email
81+
82+
83+
- Tell IANA we're doing this for real now:
84+
85+
* Probably need another URL in sync/iana.py instead of the :8080 test one
86+
87+
* Need them to provide a real IANA sync password for auth with their
88+
server (put that in settings_local.py)
89+
90+
* They need to poke the live server rather than my test server
91+
92+
* Tell Michelle Cotton that we are now processing emails so they don't
93+
have to enter comments manually
94+
95+
* Also, they never explained what to do about the review states (IANA
96+
OK/not OK). So it's not automatically updated (no source to update
97+
from) and I didn't disable it. But they can set it manually for the
98+
time being, e.g.::
99+
100+
http://statesync.ietf.beta.iola.dk/doc/draft-ietf-geopriv-policy-uri/edit/state/iana-review/
101+
102+
* Once a draft has a IANA review state, it turns into an edit link (if
103+
you're in IANA or the Secretariat), so it should merely be a question
104+
of going to the draft page, clicking the link and saving the new
105+
state. Drafts automatically get a IANA Review Needed state in the
106+
future.
107+
108+
109+
Version 4.34
110+
------------
111+
112+
The migration step you do as a part of the release sequence is going to take
113+
quite some time -- probably minutes. It will generate some output while it's
114+
working, too. As long as it doesn't halt and say that something failed or
115+
gave an error, this is as expected, and when it terminates, you should be OK
116+
to continue.
117+
118+
Version 4.21
119+
------------
120+
121+
This release will you to run migrations before moving the link to the new
122+
version and doing the apache reload. I know you have a routine for the steps
123+
needed to deploy a new release by now, but thought I'd mention it, anyway.
124+
125+
If there is any problem at all doing the migrations, then you'll need to
126+
do a fake initial migration, as follows::
127+
128+
web $ PYTHONPATH=PWD ietf/manage.py migrate --fake meeting 0001
129+
130+
and then to the regular migration again.
131+
132+
Version 4.20
133+
------------
134+
135+
Some one-time actions that need to be taken are as follows::
136+
137+
Assuming that the release has been checked out in /a/www/ietf-datatracker/4.20:
138+
139+
cd /a/www/ietf-datatracker/4.20
140+
141+
PYTHONPATH=$PWD ietf/manage.py migrate --fake doc 0001
142+
PYTHONPATH=$PWD ietf/manage.py migrate --fake name 0001
143+
144+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< "delete from django_content_type where app_label='doc' and model='groupballotpositiondocevent';"
145+
146+
PYTHONPATH=$PWD ietf/manage.py migrate doc || { \
147+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'CREATE TABLE `doc_groupballotpositiondocevent` (`block_comment` longtext NOT NULL, `comment` longtext NOT NULL, `ad_id` integer NOT NULL, `comment_time` datetime NULL, `block_comment_time` datetime NULL, `pos_id` varchar(8) NOT NULL DEFAULT "norecord", `docevent_ptr_id` integer NOT NULL PRIMARY KEY);'
148+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype` CASCADE;'
149+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype_positions` CASCADE;'
150+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballotdocevent` CASCADE;'
151+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'ALTER TABLE `doc_ballotpositiondocevent` DROP COLUMN `ballot_id` CASCADE;'
152+
}
153+
154+
PYTHONPATH=$PWD ietf/manage.py migrate doc
155+
PYTHONPATH=$PWD ietf/manage.py migrate name
156+
PYTHONPATH=$PWD python ietf/wgcharter/migrate.py | tee -a ~/charter-migration.log
157+
158+

ietf/sync/iana.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def update_history_with_changes(changes, send_email=True):
201201

202202

203203
def parse_review_email(text):
204-
msg = email.message_from_string(text)
204+
msg = email.message_from_string(text.encode("utf-8"))
205205

206206
# doc
207207
doc_name = ""

ietf/sync/tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def test_iana_review_mail(self):
127127
msg = """From: "%(person)s via RT" <drafts-lastcall@iana.org>
128128
Date: Thu, 10 May 2012 12:00:00 +0000
129129
Subject: [IANA #12345] Last Call: <%(draft)s-%(rev)s.txt> (Long text) to Informational RFC
130+
130131
(BEGIN IANA LAST CALL COMMENTS)
131132
132133
IESG:
@@ -440,7 +441,7 @@ def test_rfceditor_undo(self):
440441
self.assertEquals(draft.get_state("draft-rfceditor"), None)
441442

442443
# let's just test we can recover
443-
e = DeletedEvent.objects.all().order_by("-time")[0]
444+
e = DeletedEvent.objects.all().order_by("-time", "-id")[0]
444445

445446
e.content_type.model_class().objects.create(**json.loads(e.json))
446447
self.assertTrue(StateDocEvent.objects.filter(desc="First", doc=draft))

0 commit comments

Comments
 (0)