Commit Graph

69 Commits

Author SHA1 Message Date
acrefoot 4c88a909cb If EMAIL_HOST is unset or blank, don't send email via django.core.mail
It will instead use the dummy EmailBackend

(imported from commit 6faec7f3e087901226a120b9268cf687ed165c05)
2013-11-06 17:36:41 -05:00
Steve Howell bdbd8d006a Exclude analytics and zilencer from LOCAL_SERVER INSTALLED_APPS.
(imported from commit f055ff18166d73b3531d27ccef7f5d457cd89017)
2013-11-06 16:56:10 -05:00
Steve Howell 64fb17f9c2 Move management commands to the analytics app.
Move commands related to stats collection and reporting from
zilencer to analytics.  To do this, we had to make "analytics"
officially an app.

(imported from commit 63ef6c68d1b1ebb5043ee4aca999aa209e7f494d)
2013-11-06 16:51:08 -05:00
Leo Franchi 83679b14a6 Fix settings.py to work when no args are passed to manage.py
(imported from commit bdcfa78464322624c36fc59797906f2dd3624aef)
2013-11-06 13:39:00 -05:00
Luke Faraone c11b65590b SSO / REMOTE_USER support
(imported from commit 4f4fad7af5d3c6099cac95d7708338c182626d72)
2013-11-05 16:14:13 -05:00
Zev Benjamin 0073014ea9 Remove redundant EXTERNAL_HOST settings
(imported from commit dcf9709bc5c2a2c3f00410fd1b2849d3ab879fb9)
2013-11-05 14:14:19 -05:00
Zev Benjamin 787215d743 [manual] Switch over to new /etc/zulip/zulip.conf config file
Run the following commands as root before deploying this branch:
 # /root/zulip/tools/migrate-server-config
 # rm /etc/zulip/machinetype /etc/zulip/server /etc/zulip/local /etc/humbug-machinetype /etc/humbug-server /etc/humbug-local

(imported from commit aa7dcc50d2f4792ce33834f14761e76512fca252)
2013-11-05 14:14:19 -05:00
Leo Franchi 6765ec0795 Use a site-specific Zulip Admin email in django error pages
(imported from commit 2d5415d7cd81befc3051b5de3835c0cd258b6375)
2013-11-04 16:35:50 -05:00
Kevin Mehall 78b45b61fb Minify JS in the localserver upgrade tarball.
This moves the list of removed files from .gitattributes to
tools/build-local-server-tarball because static/ and tools/ are
necessary for update-prod-static, and it seemed best to keep the
entire list in one place.

(imported from commit 2a447cbde29e90d776da43bb333650a40d4d363c)
2013-11-04 13:40:43 -05:00
Tim Abbott 2844a8fb97 Enable postgres database-level autocommit.
This is something we'll want to do before we switch to Django 1.6,
since it's the default there, and I'm not aware of any significant
problems this switch will cause.

(imported from commit fadea41f09e2179735328f99a3ec55b46c92041e)
2013-11-04 07:31:11 -05:00
Leo Franchi ca8187b8cf Email gateway bot variable name changed to EMAIL_GATEWAY_BOT
(imported from commit 01c430bd9b916c9bb152ee821214495333f1d37e)
2013-11-01 16:46:17 -04:00
Leo Franchi 9b4491db6a Don't use hardcoded bots in nagios' check_send_receive
(imported from commit 82add135bf5b819bcc992af8420eec14cf829ccc)
2013-11-01 14:13:05 -04:00
Leo Franchi db6550e99a Make built-in bots come from settings.py, and allow localserver-specific ones
(imported from commit e21933e37487314ac986147562817a19227e8960)
2013-11-01 14:13:05 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Steve Howell d7d1888ce0 Add TestWorker queue processor.
TestWorker is for troubleshooting, and it simply appends lines to a file
in /tmp.

(imported from commit 96b646a193a5474f3222b41725742e359b5301ec)
2013-10-30 16:47:16 -04:00
Zev Benjamin 57bef07832 [manual] Move /etc/humbug-* files into /etc/zulip
The moved files are:
humbug-server
humbug-local
humbug-machinetype

Their new names are their old names with 'humbug-' removed.

zulip-puppet-apply must be run before this commit is deployed

(imported from commit f4eb523244d3409b5809c279301225d3fdf0c230)
2013-10-30 15:42:25 -04:00
Steve Howell 884e602185 [puppet] Handle exceptions from queue workers.
Subclasses of QueueProcessingWorker that don't override start() will
have their consume() functions wrapped by consume_wrapper(), which
will catch exceptions and log data from troublesome events to a log
file.

We need to do a puppet apply to create /var/log/zulip/queue_error.

(imported from commit 3bd7751da5fdef449eeec3f7dd29977df11e2b9c)
2013-10-29 17:45:31 -04:00
Leo Franchi 8e05f76511 Only enable analytics and dropbox on non-LOCAL_SERVER
(imported from commit 1ba877550b3afde51bec6f344762ea998800c5b6)
2013-10-29 17:33:36 -04:00
Kevin Mehall 06590f4332 Upload to local filesystem on local server.
(imported from commit 6c38a8cae721b2e7a0863470692cc56425006ecb)
2013-10-29 16:19:04 -04:00
Kevin Mehall 209ff75af8 Remove duplicate MANDRILL_API_KEY setting
(imported from commit c71928b5bfd71e9fcda1f5d57e9c7b99361ce070)
2013-10-29 15:47:13 -04:00
Tim Abbott 56e9ad230e [manual] Move our deployment scripts to scripts/.
This will require updating the post-receive code on git.zulip.net to
work.

(imported from commit 2e51fa2d7b891c1138d3f22ae534cfb8a6cf174c)
2013-10-28 10:54:48 -04:00
Steve Howell 09979252dd Add Steve's laptop to USING_RABBITMQ list.
(imported from commit 3527edd27e3f386eb8b668fe8ee7e3875282ead8)
2013-10-27 11:27:27 -04:00
Zev Benjamin 7b6f6823a5 [manual] Change references to the humbug user, schema, and database to zulip
This commit must be simultaneously deployed on both staging and
prod0.  It also requires completely taking down the app.

To deploy these changes, do:
* check out this commit at /root/zulip on postgres0, postgres1, staging, and prod0

* stop the process_fts_updates job on postgres0 and postgres1
* stop the app on staging and prod0

* do a puppet apply on postgres0, postgres1, staging, and prod0
* move the new client certificates into place on staging and app
* move the new server certificates into place on postgres0 and postgres1
* reload the database config on postgres0 and postgres1 (this might
  actually require a restart)
* run tools/migrate-db on postgres0 as root

* do a deploy through this commit on staging and prod0
* start the process_fts_updates job on postgres0 and postgres1

* do a puppet apply on nagios

(imported from commit 819bdd14326c1425e2d3041a491a8ca3b9716506)
2013-10-26 04:16:27 -04:00
Waseem Daher 66f48288b4 Rename LOCALSERVER -> LOCAL_SERVER.
(imported from commit b3abdd10d54d2ad7a9c463af9a291d2e2127707f)
2013-10-25 17:37:06 -04:00
Leo Franchi 8e21d70afe Disable statsd on local server
(imported from commit cac2c95c2de18b613a0900fe1c04fd97963b9350)
2013-10-25 16:37:29 -04:00
Leo Franchi c12a97577e Rework local_settings_template.py to be clear about what the user needs to do
(imported from commit f69ea0d57e885509abc70dc4f2bee6e36169691f)
2013-10-25 16:35:27 -04:00
Luke Faraone 81d7dd1fda [schema] Support for authenticating Deployments via the API.
Here we introduce a new Django app, zilencer. The intent is to not have
this app enabled on LOCALSERVER instances, and for it to grow to include
all the functionality we want to have in our central server that isn't
relevant for local deployments.

Currently we have to modify functions in zerver/* to match; in the
future, it would be cool to have the relevant shared code broken out
into a separate library.

This commit inclues both the migration to create the models as well as a
data migration that (for non-LOCALSERVER) creates a single default
Deployment for zulip.com.

To apply this migration to your system, run:
   ./manage.py migrate zilencer

(imported from commit 86d5497ac120e03fa7f298a9cc08b192d5939b43)
2013-10-25 14:13:30 -04:00
Leo Franchi a9b9c0ec7b Add Email Mirror default settings and error out with readable warning if not configured
(imported from commit adac321d09561b51277ec1e314a1d480dc01e0c8)
2013-10-25 11:51:13 -04:00
Zev Benjamin c13114c7e3 [manual] Change rabbitmq user to 'zulip'
Before deploying this commit, the following commands must be run:
  # rabbitmqctl add_user zulip $(tools/get-django-setting RABBITMQ_PASSWORD)
  # rabbitmqctl set_user_tags zulip administrator
  # rabbitmqctl set_permissions -p / zulip '.*' '.*' '.*'

(imported from commit 76d66fa6ac69aa39c91f55b9b5d5a954f9e94d73)
2013-10-24 16:54:27 -04:00
Zev Benjamin ec21275b19 Move rabbitmq username into settings.py
(imported from commit f9a8f80f53b8774781b8558444e601567cb59835)
2013-10-24 16:40:38 -04:00
Leo Franchi a9bd2743f0 Initialize default settings if they are missing in the setting module
(imported from commit 97eb19c603436d460ad1832827dc3ec34c36bf31)
2013-10-24 10:19:24 -04:00
Zev Benjamin ca16644152 Add client-side SockJS wrapper
The wrapper handles our RPC protocol, authentication scheme, and
reconnections.

(imported from commit 1fed2d160582c235a32de80a80b3e451c13a7b1c)
2013-10-22 18:45:11 -04:00
Zev Benjamin 5979af3a45 [manual] Add asynchronous message sender via sockjs-tornado
New dependency: sockjs-tornado

One known limitation is that we don't clean up sessions for
non-websockets transports.  This is a bug in Tornado so I'm going to
look at upgrading us to the latest version:
https://github.com/mrjoes/sockjs-tornado/issues/47

(imported from commit 31cdb7596dd5ee094ab006c31757db17dca8899b)
2013-10-22 18:45:11 -04:00
Zev Benjamin 06390de20a Load underscore before blueslip
blueslip depends on underscore.

(imported from commit 13a379d62bdb9824c052d8695ec030c69f41a5db)
2013-10-22 15:39:17 -04:00
Luke Faraone 1d9391e867 Initial local server configuration.
(imported from commit ac9b9896b74b78c6ca03af7f411d0788ae402cff)
2013-10-10 14:14:14 -04:00
Tim Abbott e11ae77ba6 [manual] Rename /home/humbug to /home/zulip.
This may require just doing an mv on the home directory, plus changing
the home directory in /etc/passwd.  It should of course be done carefully.

(imported from commit 660997d897ee6d33563af74f0fc5d4267a911755)
2013-10-08 08:57:29 -04:00
Tim Abbott 6d49a7c880 Move passwords for our localhost databases to local_settings.py.
(imported from commit 5f6dacdfdfd64fadc2995b393d7c59be0b049d79)
2013-10-08 08:57:28 -04:00
Leo Franchi 2614716fca Log slow queries to zulip so we notice them
(imported from commit 23f311ad881edda4c4495089ea3b55213470a059)
2013-09-30 17:41:56 -04:00
Steve Howell bbfc8c886a Remove force_minify flag for min/activity.js.
This has been deployed, so the current code is now properly
minified, and we don't need the force_minify flag any more.

(The flag is needed when you remove a JS file from JS_SPECS.)

(imported from commit 8b3c7ffdbc875011d59c2560034750f0077db616)
2013-09-29 11:00:26 -04:00
Zev Benjamin f6d8a01678 Move worker logging out of main server.log
(imported from commit 4590dd2a6adbf8e0e0a6bf08d90489246350cfb9)
2013-09-26 22:05:12 -04:00
Steve Howell 94cec018c0 Force-minify min/activity.js.
The minify logic doesn't have an easy way to detect that you
removed a file since the last deployment.

(imported from commit 50d05fcdad382a586073c06d29d279433d1bba81)
2013-09-26 13:55:45 -04:00
Steve Howell 9110ebd208 Improve the UI for /activity.
We are still showing the same data points, but the logic to drill
down on details for a particular realm is now all server side,
not client side, and we are smarter about omitting fields.  In
summary mode, we don't show empty Name or Email columns.  In
detailed mode, we show the realm as a headline instead of a column.

In this version you do lose the ability to see all system users in
the same view, but Waseem is ok with this.

(imported from commit edd2e646ab4cf5783ea64232d0cd621debece8d4)
2013-09-26 13:20:00 -04:00
Tim Abbott 939c5c0e00 Remove unused ERROR_LOG_DIR variable.
(imported from commit 03d054af4e74297c82e947e315f2dee954d03151)
2013-09-25 16:52:41 -04:00
Tim Abbott d7a3570c7e Move server logs to /var/log/zulip.
(imported from commit a65c4908c4a52c4abb57f299ad949c2a23dab715)
2013-09-25 16:52:41 -04:00
Tim Abbott e4496521e9 Update logging path for email-mirror.
(imported from commit 75f36dbb963b2b77ecda7ba138023f0f774047e0)
2013-09-25 16:52:41 -04:00
Tim Abbott fff4244b54 Move various settings into local_settings.py.
(imported from commit 03c4a61383f3f8cf8207050d68d5ce870e12fcca)
2013-09-25 15:40:21 -04:00
Steve Howell 4d5842cdcd Add summary view to the /activity report.
When you load the activity report, it will just show summary
counts for realms, but if you click on a realm, you will see
details about users in the realms.  You can also click "Show all"
to see an interleaved view of realms and users.

(imported from commit b106557b1fae64d525071afc124b5a8aed319086)
2013-09-25 11:33:11 -04:00
Leo Franchi 8e6c7146f4 Move alert_words and alert_words_ui to before zulip.js in load order
(imported from commit b169622bc615b3e96fb18724c57887b030aca6f7)
2013-09-20 14:59:42 -04:00
Zev Benjamin 3419619234 Include compiled handlebar templates before our code
I believe this was the source of the "Handlebars.compile is not a
function" errors, though I don't know why so few users got it.

(imported from commit f4a72e35bf25f679461d3c9e6938d118fec30278)
2013-09-18 14:19:12 -04:00
Steve Howell b4b6fa14d3 Persist muting preferences to the back end
(imported from commit db2d4362a0601f35a75b798cf6945556e44532fb)
2013-09-11 16:47:37 -04:00