Go to file
Tim Abbott 485c907721 Return to recommending running run-dev.py manually.
(imported from commit f050f2a8f2242dc23267c341d53517847d7fc560)
2015-09-22 21:31:54 -07:00
analytics Simplify analytics code to not filter certain low-interest users/realms. 2015-09-19 23:42:28 -07:00
api Change API example usernames to use example.com domain. 2015-09-19 18:12:02 -07:00
assets Allow enterprise deployments to disable the use of Gravatar. 2013-11-18 11:48:53 -05:00
bin logging: Log management commands that are run. 2013-11-20 14:31:08 -05:00
bots Remove certain hardcoded email addresses in Zephyr mirroring. 2015-09-20 00:36:12 -07:00
confirmation enterprise => voyager 2015-08-21 10:33:35 -07:00
corporate Remove corporate beta signup form 2015-08-20 18:40:34 -07:00
docs Rename build-voyager-tarball to build-release-tarball and document. 2015-09-22 21:22:11 -07:00
node_modules Upgrade handlebars to 1.3.0. 2014-01-15 16:07:20 -05:00
puppet Fix existing tab-based whitespace in the codebase. 2015-09-19 23:23:02 -07:00
scripts Move prod README to root of repository. 2015-09-22 21:22:11 -07:00
static Clarify the left_side_userlist comment. 2015-09-19 23:39:54 -07:00
templates Make clear the meaning of the colors in Zulip Dev Login. 2015-09-22 21:21:43 -07:00
tools Rename build-voyager-tarball to build-release-tarball and document. 2015-09-22 21:22:11 -07:00
zerver Add support for emphasize_branch_in_topic feature. 2015-09-20 15:21:12 -07:00
zilencer Modernize management command for deactivating a realm. 2015-09-19 19:10:27 -07:00
zproject Move API super users configuration into the database. 2015-09-20 11:13:20 -07:00
.gitattributes enterprise: Don't include templates/zilencer in our tarballs 2013-11-15 11:53:49 -05:00
.gitignore Add dev-secrets.conf generated by latest version of dev VM to gitignore 2015-08-20 17:33:17 -07:00
LICENSE Add license not referring to Zulip Enterprise license agreement. 2013-11-14 11:16:15 -05:00
README.dev Return to recommending running run-dev.py manually. 2015-09-22 21:31:54 -07:00
README.prod Reorganize README.prod to not emphasize SSO so much. 2015-09-22 21:22:16 -07:00
Vagrantfile Run provision.py as a provisioner. 2015-08-19 21:07:22 -07:00
manage.py logging: Log management commands that are run. 2013-11-20 14:31:08 -05:00
provision.py Return to recommending running run-dev.py manually. 2015-09-22 21:31:54 -07:00
requirements.txt Remove OpenID authentication 2015-08-20 23:52:48 -07:00
zulip_tools.py Move su_to_zulip into zulip_tools.py 2013-11-13 16:56:59 -05:00

README.prod

This documents the process for installing Zulip in a production environment.

Recommended requirements:

* Server running Ubuntu Precise or Debian Wheezy
* At least 2 CPUs for production use
* At least 4GB of RAM for production use
* At least 100GB of free disk for production use
* HTTP(S) access to the public Internet (for some features;
  discuss with Zulip Support if this is an issue for you)
* SSL Certificate for the host you're putting this on
  (e.g. https://zulip.example.com)
* Email credentials for the service to send outgoing emails to users
  (e.g. missed message notifications, password reminders if you're not
  using SSO, etc.).

=======================================================================

How to install Zulip in production:

These instructions should be followed as root.

(1) Install the SSL certificates for your machine to
  /etc/ssl/private/zulip-enterprise.key
  and
  /etc/ssl/certs/zulip-enterprise.combined-chain.crt

(2) download zulip-server.tar.gz, and unpack to it /root/zulip, e.g.
tar -xf zulip-server-1.1.3.tar.gz
mv zulip-server-1.1.3 /root/zulip

(3) run /root/zulip/scripts/setup/install

This may take a while to run, since it will install a large number of
packages via apt.

(4) Configure the Zulip server instance by filling in the settings in
/etc/zulip/settings.py

(5) su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database

This will report an error if you did not fill in all the mandatory
settings from /etc/zulip/settings.py.  Once this completes
successfully, the main installation process will be complete, and if
you are planning on using password authentication, you should be able
to visit the URL for your server and register for an account.

(6) Subscribe to
https://groups.google.com/forum/#!forum/zulip-announce to get
announcements about new releases, security issues, etc.

=======================================================================

Maintaining Zulip in production:

* To upgrade to a new version, download the appropriate release
  tarball from https://www.zulip.org, and then run as root

  /home/zulip/deployments/current/scripts/upgrade-zulip <tarball>

  The upgrade process will shut down the service, run `apt-get
  upgrade` and any database migrations, and then bring the service
  back up.  This will result in some brief downtime for the service,
  which should be under 30 seconds unless there is an expensive
  transition involved.  Unless you have tested the upgrade in advance,
  we recommend doing upgrades at off hours.

  You can create your own release tarballs from a copy of this
  repository using `tools/build-release-tarball`.

* To update your settings, simply edit /etc/zulip/settings.py and then
  run /home/zulip/deployments/current/scripts/restart-server to
  restart the server

* You are responsible for running "apt-get upgrade" on your system on
  a regular basis to ensure that it is up to date with the latest
  security patches.

* To use the Zulip API with your Zulip server, you will need to use the
  API endpoint of e.g. "https://zulip.yourdomain.net/api".  Our Python
  API example scripts support this via the
  "--site=https://zulip.yourdomain.net" argument.  The API bindings
  support it via putting "site=https://zulip.yourdomain.net" in your
  .zuliprc.

* Similarly, you will need to instruct your users to specify the URL
  for your Zulip server when using the Zulip desktop and mobile apps.

* As a measure to mitigate the impact of potential memory leaks in one
  of the Zulip daemons, the service automatically restarts itself
  every Sunday early morning.  See /etc/cron.d/restart-zulip for the
  precise configuration.


=======================================================================

SSO Authentication:

Zulip supports integrating with a corporate Single-Sign-On solution.
There are a few ways to do it, but this section documents how to
configure Zulip to use an SSO solution that best supports Apache and
will set the REMOTE_USER variable:

(0) Check that /etc/zulip/settings.py has
"zproject.backends.ZulipRemoteUserBackend" as the only enabled value
in the "AUTHENTICATION_BACKENDS" list, and that "SSO_APPEND_DOMAIN" is
correct set depending on whether your SSO system uses email addresses
or just usernames in REMOTE_USER.

Make sure that you've restarted the Zulip server since making this
configuration change.

(1) Edit /etc/zulip/zulip.conf and change the puppet_classes line to read:

puppet_classes = zulip::enterprise, zulip::apache_sso

(2) As root, run

/home/zulip/deployments/current/scripts/zulip-puppet-apply

to install our SSO integration.

(3) To configure our SSO integration, edit
/etc/apache2/sites-available/zulip-sso.example and fill in the
configuration required for your SSO service to set REMOTE_USER and
place your completed configuration file at

/etc/apache2/sites-available/zulip-sso

(4) Run

a2ensite zulip-sso

To enable the Apache integration site.

Now you should be able to visit https://zulip.yourdomain.net/ and
login via the SSO solution.