forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
101 lines (60 loc) · 3.17 KB
/
INSTALL
File metadata and controls
101 lines (60 loc) · 3.17 KB
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
==============================================================================
IETF Datatracker
==============================================================================
------------------------------------------------------------------------------
Installation Instructions
------------------------------------------------------------------------------
General Instructions for Deployment of a New Release
====================================================
1. Make a directory to hold the new release::
sudo su - -s /bin/bash wwwrun
mkdir /a/www/ietf-datatracker/${releasenumber}
cd /a/www/ietf-datatracker/${releasenumber}
2. Fetch the release tarball from github
(see https://github.com/ietf-tools/datatracker/releases)::
wget https://github.com/ietf-tools/datatracker/archive/refs/tags/${releasenumber}.tar.gz
tar xzvf ${releasenumber}.tar.gz
3. Copy ietf/settings_local.py from previous release::
cp ../web/ietf/settings_local.py ietf/
4. Setup a new virtual environment and install requirements::
python3.6 -mvenv env
source env/bin/activate
pip install --upgrade setuptools
pip install -r requirements.txt
5. Run system checks (which patches the just installed modules)::
ietf/manage.py check
6. Move static files into place for CDN (/a/www/www6s/lib/dt):
ietf/manage.py collectstatic --noinput --ignore=bower.json --ignore='README.*' --ignore=rev | grep -v "Found another file with the destination path"
7. Run migrations:
ietf/manage.py migrate
8. Back out one directory level, then re-point the 'web' symlink::
cd ..
rm ./web; ln -s ${releasenumber} web
9. Reload both apache and the datatracker service ::
exit # or CTRL-D, back to root level shell
systemctl restart apache2 datatracker.service
10. Verify operation:
http://datatracker.ietf.org/
11. If install failed, revert web symlink and repeat the restart in step 9.
Patching a Production Release
=============================
Sometimes it can prove necessary to patch an existing release.
The following process should be used:
1. Code and test the patch on an copy of the release with any
previously applied patches put in place.
2. Produce a patch file, named with date and subject::
$ git diff > 2013-03-25-ballot-calculation.patch
3. Move the patch file to the production server, and place it in
'/a/www/ietf-datatracker/patches/'
4. Make a recursive copy of the production code to a new directory, named with a patch number.
/a/www/ietf-datatracker $ rsync -a web/ ${releasenumber}.p1/
5. Apply the patch::
/a/www/ietf-datatracker $ cd ${releasenumber}.p1/
/a/www/ietf-datatracker/${releasnumber}.p1 $ patch -p1 \
< ../patches/2013-03-25-ballot-calculation.patch
This must not produce any messages about failing to apply any chunks;
if it does, go back to 1. and figure out why.
6. Edit ``.../ietf/__init__.py`` in the new patched release to indicate the patch
version in the ``__patch__`` string.
7. Change the 'web' symlink, reload etc. as described in
`General Instructions for Deployment of a New Release`_.