Commit Graph

18 Commits

Author SHA1 Message Date
Tim Abbott 4f8f46544c [manual] Add additional zulip hosts to nginx config.
We'll need to do a puppet apply on prod for this to take effect.

(imported from commit 764926317712ed8abebc429fb13d43c755e0f130)
2013-07-25 17:27:45 -04:00
Luke Faraone 1f811133d1 Serve static /dist/ content on app servers when hostname zulip.com is used
(imported from commit cc78ffafdffe5df2baf08bdd70a219dbb694337d)
2013-07-15 16:49:55 -04:00
Luke Faraone 9bef61ad87 Interpret X-Forwarded-For on app servers' nginx.
See:
    http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from

(imported from commit adc4ebf46aefd1c71bda187d84519d8c31f6c590)
2013-07-15 16:49:55 -04:00
Luke Faraone 44b49b3bf8 Puppet configuration and associated nginx files for lb0.zulip.net.
lb0.zulip.net will proxy connections to the relevant backend servers.

Depressingly, SSL certificate verification of the backend servers is not
performed at this time, see:
    <http://trac.nginx.org/nginx/ticket/13>

The above-mentioned bug has existed since 2011, but a CVE was not
allocated until January. The nginx developers don't seem to care. Sigh.

In any case, this is of somewhat limited impact at Humbug, since we can
have reasonable confidence that communications within AWS are not
subject to active MITMs. Passive MITM is not a concern, because the
traffic *is* in fact encrypted.

(imported from commit c96e1235fc17192c7452e0417a1309cfcda62de2)
2013-07-15 16:49:55 -04:00
Luke Faraone 1be1cb121c nginx / Puppet configuration for staging.zulip.com
We create a new sites-available entry which is essentially a duplicate of
sites-available/humbug-staging with s/humbug/zulip, and add the associated
symlink directive in Puppet.

(imported from commit febcb585ce93c21c6849d96458cc2bd096b30538)
2013-07-02 12:04:56 -04:00
Tim Abbott 3bdd446651 puppet: Fix nginx configuration for api.humbughq.com.
(imported from commit d8b535b666a3b3d758a62812a118413c619c09a5)
2013-06-28 15:57:28 -04:00
Tim Abbott 400db86008 [manual] nginx: Pass post-rewrite URIs to FastCGI.
This requires us to do a puppet apply when it is deployed to each of
staging and prod.

(imported from commit eed631ce10340e7fe3252cd8a4f05fd59ef3c942)
2013-06-25 16:34:43 -04:00
Tim Abbott ae89b25d69 nginx: Add fastcgi_params to puppet.
(imported from commit 12e6b02cd2cb411ab83a29a486053df6dff9ebb8)
2013-06-25 16:34:43 -04:00
Zev Benjamin a9e4441bee [manual] Serve static files from the same location across prod deploys
This only affects DEPLOYED installations.

This does not take care of removing old versions of static files from
that directory.  The problem is that staticfiles is clever and
doesn't copy files that are already there, so we can't depend on
mtime for detecting which files we no longer need.  Hopefully that
won't be too much of a problem for now.

(imported from commit 4341460dd5bc6544086fd445014ebdac58192910)
2013-06-12 17:46:38 -04:00
Luke Faraone 8570f5fe55 [manual] Configure prod to use our wildcard cert.
These changes can be applied with "puppet apply".

(imported from commit 999611539e81f452dd605bb98f70436737747c29)
2013-05-29 15:36:47 -04:00
Michael McCanna 0e77082873 [manual] Bump Nginx buffers, don't use fastcgi temp files
Nginx's fastcgi buffers default to 8 pages (32KB). I've bumped it to 4MB,
as queries like get_old_messages take something like 130KB, and was
being ferried off to disk. In case this change to the buffers parameters isn't
enough, we explicitly set the maximum temporary file size to 0; if the fastcgi
request goes over the buffers allocated, the request will be handled synchronously,
and never go out to disk on nginx's fastcgi requests.

The manual step that must be done is to apply changes to /etc/nginx/humbug-include/app
from servers/puppet/modules/humbug/files/nginx/humbug-include/app.
The nginx process can be reloaded with `/etc/init.d/nginx restart`.
This must be done for both staging and prod.

(imported from commit 99c1bd6989c54b7e230b7c04f2fdf09be7423352)
2013-05-28 18:13:45 -04:00
Zev Benjamin cce8dfab84 [manual] Use the same socket across server restarts
We let supervisor create the socket for us by making humbug-django a
fcig-program.  Unfortunately, supevisor doesn't support putting
fcgi-programs in groups (see
https://github.com/Supervisor/supervisor/issues/148), so we have to
restart tornado and django separately.

To deploy, copy the config files over and restart nginx and
supervisor (via stopping and then starting it because restart is
broken).  I believe the automated restart as part of
update-deployment will fail because of the way supervisor treats
programs in groups.  If so, after restarting supervisor, you will
also need to run restart-server manually to fill the caches and then
delete the lock directory in humbug-deployments.

(imported from commit bfb5db7dd42dcbc4bfefa2944355b3cbb2ef9104)
2013-05-23 00:19:17 -04:00
Luke Faraone c3421b31b9 Include certificate configuration for www.humbughq.com via Comodo
This expires in on Aug 11 23:59:59 2013 GMT.

I've set a calendar event for this :)

(imported from commit fb426b703c88dd255536e10285375dc997e47b01)
2013-05-17 01:02:32 -04:00
Tim Abbott 1b8cf16988 [manual] Update deployment process to run atomically.
This requires manual steps on deploy to each of staging and prod:
(1) Run the new update-deployment code to setup the initial deployment directory.
(2) Restart all the programs running in screen sessions.
(3) Deploy the nginx changes and restart nginx.

(imported from commit 1ffe27933ee79274dc0a93d35c9938712de0ef36)
2013-04-12 11:54:50 -04:00
Luke Faraone 00900b99fe Bump nginx max file upload limit to 25M.
(imported from commit f8f82e718aeab52a0ea228737d144487c49fa706)
2013-04-05 13:07:17 -07:00
Zev Benjamin 401fa6063e [manual] Add get_events URL routing
The new nginx configuration file needs to be copied to
/etc/nginx/humbug-include and nginx needs to be restarted when this
commit is deployed.

(imported from commit 6c43f3c2c7a6acee6a852c672c96a38bda01dd0d)
2013-03-28 16:48:52 -04:00
Luke Faraone 0d51e59fd5 Implement URLs for API redesign.
(imported from commit 2020491a737ec4c1e99a63f84eb6cfc594a2dd56)
2013-03-28 07:57:38 -07:00
Zev Benjamin da95bb2988 puppet: Move all puppetized config files to the humbug module and reference them with puppet URLs
(imported from commit f0f325bbad381b87c12c6f7888f4dd5d6989f09f)
2013-02-08 16:06:34 -05:00