[support-prod] Put static/ on CDN and update STATIC_URL

VERIFIED FIXED

Status

Infrastructure & Operations
WebOps: Other
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: rrosario, Assigned: cturra)

Tracking

Details

(Reporter)

Description

5 years ago
We currently have media/ being served from the CDN. We are now using static/ to serve the static files so we should get our static/ directory hooked up to the CDN. Once that is done, STATIC_URL should be updated in settings_local.py to:

STATIC_URL = '//support.cdn.mozilla.net/static/'

Thanks!
(Reporter)

Comment 1

5 years ago
To clarify, media/ still contains all user uploaded files so it should stay on the CDN as it is today.
(Assignee)

Comment 2

5 years ago
roger that. i have completed the push to prod as requested.

[root@genericadm.private.phx1 treestatus.mozilla.org]# bash -x update
+ CODE_DIR=/data/genericrhel6/src/treestatus.mozilla.org/tree-status
+ VENDOR_DIR=/data/genericrhel6/src/treestatus.mozilla.org/tree-status/vendor
+ update_code
+ echo -e 'Updating code...'
Updating code...
+ cd /data/genericrhel6/src/treestatus.mozilla.org/tree-status
+ git pull -q
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ git submodule sync -q
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ git submodule update --init --recursive -q
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ echo -e 'Updating vendor submodules...'
Updating vendor submodules...
+ git submodule update --init --recursive
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ echo -e 'Cleaning gitignore and pyc files...'
Cleaning gitignore and pyc files...
+ cd /data/genericrhel6/src/treestatus.mozilla.org/tree-status
+ find . -type f -name .gitignore -or -name '*.pyc' -delete
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ echo -e 'Storing revision information...'
Storing revision information...
+ cd /data/genericrhel6/src/treestatus.mozilla.org/tree-status
+ git rev-parse HEAD
+ checkretval
+ retval=0
+ [[ 0 -gt 0 ]]
+ touch /data/genericrhel6/src/treestatus.mozilla.org/tree-status/treestatus.wsgi
+ echo -e 'Deploying code...'
Deploying code...
+ '[' xterm == dumb ']'
+ /data/genericrhel6/deploy treestatus.mozilla.org
[2013-06-05 14:04:31] Running rsync_project
[2013-06-05 14:04:31] [localhost] running: /usr/bin/rsync -aq --include '.gitkeep' --exclude '.git*' --exclude '.hg*' --exclude '.svn*' --exclude 'CVS' --exclude '.bzr*' --delete /data/genericrhel6/src/treestatus.mozilla.org/ /data/genericrhel6/www/treestatus.mozilla.org/
[2013-06-05 14:04:32] [localhost] finished: /usr/bin/rsync -aq --include '.gitkeep' --exclude '.git*' --exclude '.hg*' --exclude '.svn*' --exclude 'CVS' --exclude '.bzr*' --delete /data/genericrhel6/src/treestatus.mozilla.org/ /data/genericrhel6/www/treestatus.mozilla.org/ (1.181s)
[2013-06-05 14:04:32] Finished rsync_project (1.182s)
[2013-06-05 14:04:32] Running commit_www
[2013-06-05 14:04:32] [localhost] running: cd /data/genericrhel6/www && /usr/bin/git add .; /usr/bin/git commit -a -m 'deploy ['treestatus.mozilla.org']'
[2013-06-05 14:04:38] [localhost] finished: cd /data/genericrhel6/www && /usr/bin/git add .; /usr/bin/git commit -a -m 'deploy ['treestatus.mozilla.org']' (5.293s)
[localhost] out: [master eb5fc39] deploy [treestatus.mozilla.org]
[localhost] out: 5 files changed, 127 insertions(+), 39 deletions(-)
[2013-06-05 14:04:38] Finished commit_www (5.293s)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

5 years ago
hah! this is the results of working on too many bugs at once. comment above is for bug 879732. sorry about that!!

this one is queued up next.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

5 years ago
lets try this again...

i have confirmed the CDN configurations are in place for /static and have pushed the config update to production. per our discussion on irc, lets give it a test :)
Assignee: server-ops-webops → cturra
(Assignee)

Comment 5

5 years ago
lookin' good to me \o/

$ curl -I https://support.cdn.mozilla.net/static/img/firefox-512.png
HTTP/1.1 200 OK
Server: Apache
X-Backend-Server: support3.webapp.phx1.mozilla.com
Content-Type: image/png
Accept-Ranges: bytes
ETag: "4de6d6ceb3cc0"
Last-Modified: Wed, 05 Jun 2013 19:44:27 GMT
Content-Length: 195147
X-Cache-Info: cached
Cache-Control: max-age=2591726
Expires: Fri, 05 Jul 2013 21:10:44 GMT
Date: Wed, 05 Jun 2013 21:15:18 GMT
Connection: keep-alive
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

5 years ago
Site looking good and fast. Thanks!
Status: RESOLVED → VERIFIED
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.