Skip to content

Commit 82380e5

Browse files
committed
Updated the README-CDN file.
- Legacy-Id: 9972
1 parent 11411d2 commit 82380e5

1 file changed

Lines changed: 26 additions & 65 deletions

File tree

README-CDN.rst

Lines changed: 26 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ externals, and how deployment is done.
2020
Serving Static Files via CDN
2121
============================
2222

23+
Production Mode
24+
---------------
25+
2326
If resources served over a CDN and/or with a high max-age don't have different
2427
URLs for different versions, then any component upgrade which is accompanied
2528
by a change in template functionality will have a long transition time
@@ -45,10 +48,28 @@ The result is that all static files collected via the ``collectstatic``
4548
command will be placed in a location served via CDN, with the release
4649
version being part of the URL.
4750

51+
Development Mode
52+
----------------
53+
4854
In development mode, ``STATIC_URL`` is set to ``/static/``, and Django's
4955
``staticfiles`` infrastructure makes the static files available under that
50-
local URL root.
51-
56+
local URL root (unless you set
57+
``settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE`` to ``False``). It is not
58+
necessary to actually populate the ``static/`` directory by running
59+
``collectstatic`` in order for static files to be served when running
60+
``ietf/manage.py runserver`` -- the ``runserver`` command has extra support
61+
for finding and serving static files without running collectstatic.
62+
63+
In order to work backwards from a file served in development mode to the
64+
location from which it is served, the mapping is as follows::
65+
66+
============================== ==============================
67+
Development URL Working copy location
68+
============================== ==============================
69+
localhost:8000/static/ietf/* ietf/static/ietf/*
70+
localhost:8000/static/secr/* ietf/secr/static/secr/*
71+
localhost:8000/static/* ietf/externals/static/*
72+
============================== ==============================
5273

5374
Handling of External Javascript and CSS Components
5475
==================================================
@@ -156,67 +177,7 @@ During deployment, it is now necessary to run the management command::
156177

157178
$ ietf/manage.py collectstatic
158179

159-
before activating a new release. The deployment README file has been updated
160-
accordingly, and now reads as follows::
161-
162-
In order to fetch a new release of the django datatracker code, simply
163-
check out the appropriate tag from svn:
164-
165-
svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber
166-
167-
Don't forget to copy $releasenumber/ietf/settings_local.py from the
168-
old release to the new one; otherwise it won't work!
169-
170-
cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/
171-
172-
Change into the new directory:
173-
174-
cd $releasenumber
175-
176-
Next, upgrade pip and install requirements:
177-
178-
pip install --upgrade pip
179-
pip install -r requirements.txt
180-
181-
Run migrations:
182-
183-
ietf/manage.py migrate
184-
185-
* NEW *
186-
Move static files to the appropriate directory for serving via CDN:
187-
188-
ietf/manage.py collectstatic
189-
190-
* NEW *
191-
Run some basic datatracker system checks:
192-
193-
ietf/manage.py check
194-
195-
Change back out to the parent directory:
196-
197-
cd ..
198-
199-
and then re-point the 'web' symlink:
200-
201-
rm ./web; ln -s $releasenumber web
202-
203-
and finally restart apache:
204-
205-
sudo /etc/init.d/apache2 restart
206-
207-
It's now also a good idea to go to the datatracker front page:
208-
209-
http://datatracker.ietf.org/
210-
211-
to check that it's alive and kicking, and displaying the new release
212-
number at the bottom of the left-side menubar :-) -- if not, revert the
213-
symlink step, re-pointing the symlink to the release that was running
214-
before the new release, and restart apache again to roll back to that.
215-
216-
Finally, make sure the datatracker rsyncs over to IETFB, and then run the
217-
PIP commands on ietfb as well:
218-
219-
ssh ietfb
220-
pip install --upgrade pip
221-
pip install -r requirements.txt
180+
before activating a new release.
222181

182+
The deployment ``README`` file at ``/a/www/ietf-datatracker/README`` has been
183+
updated accordingly.

0 commit comments

Comments
 (0)