Go to file
Luke Faraone 7f8ef32704 Revert "Revert "Clarify test status in README.dev""
This reverts commit 89bf83fb93d4e61dc799857571c6a7bfc6774a1c.

(imported from commit 0663832146f485a74bdf325f39c31b0a30df5f63)
2015-09-19 15:35:17 -07:00
analytics Django 1.8: declare positional arguments in management commands 2015-08-20 23:35:40 -07:00
api Fix a bunch of Zulip Voyager related comments. 2015-08-21 10:40:54 -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 Update Trac bot config 2015-02-05 22:46:30 -08: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 Add backend tests location 2015-08-22 13:08:11 -07:00
humbug Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
node_modules Upgrade handlebars to 1.3.0. 2014-01-15 16:07:20 -05:00
puppet Enterprise => Voyager. 2015-08-21 10:33:35 -07:00
scripts Connect to the zulip database correctly in postgres-init-db 2015-08-29 12:07:33 -07:00
static Removed dbx_branding flag and Dropbox corner logo 2015-09-19 15:16:42 -07:00
templates Removed dbx_branding flag and Dropbox corner logo 2015-09-19 15:16:42 -07:00
tools Update build-voyager-tarball local settings hack 2015-08-23 23:08:45 -07:00
zerver Removed dbx_branding flag and Dropbox corner logo 2015-09-19 15:16:42 -07:00
zilencer Give the realm created by populate_db a name 2015-08-21 17:02:47 -07:00
zproject Add current production IP addresses to ALLOWED_HOSTS. 2015-09-19 15:13:02 -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 Revert "Revert "Clarify test status in README.dev"" 2015-09-19 15:35:17 -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 Add puppet to provision.py 2015-08-23 21:35:14 -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.dev

Getting started
===============

Using Vagrant
-------------

This is the recommended approach, and is tested on OS X 10.10 as well as Ubuntu 14.04.

If your host is OS X, download VirtualBox from <http://download.virtualbox.org/virtualbox/4.3.30/VirtualBox-4.3.30-101610-OSX.dmg> and install it.

If your host is Ubuntu 14.04:
  sudo apt-get install vagrant lxc lxc-templates cgroup-lite redir

Once that's done, simply change to your zulip directory and run `vagrant up` in your terminal. You can now visit <http://localhost:9991/> in your browser.  To get shell access to the virtual machine running the server, use `vagrant ssh`.

By hand
-------

Install the following non-Python dependencies:
 * libffi-dev — needed for some Python extensions
 * postgresql 9.1 or later — our database (also install development headers)
 * memcached (and headers)
 * rabbitmq-server
 * libldap2-dev
 * python-dev
 * redis-server — rate limiting
 * tsearch-extras — better text search

On Debian or Ubuntu systems:
  sudo apt-get install libffi-dev memcached rabbitmq-server libldap2-dev redis-server postgresql-server-dev-all libmemcached-dev

  # If on 12.04 or wheezy:
  sudo apt-get install postgresql-9.1
  wget https://dl.dropboxusercontent.com/u/283158365/zuliposs/postgresql-9.1-tsearch-extras_0.1.2_amd64.deb
  sudo dpkg -i postgresql-9.1-tsearch-extras_0.1.2_amd64.deb

  # If on 14.04:
  sudo apt-get install postgresql-9.3
  wget https://dl.dropboxusercontent.com/u/283158365/zuliposs/postgresql-9.3-tsearch-extras_0.1.2_amd64.deb
  sudo dpkg -i postgresql-9.3-tsearch-extras_0.1.2_amd64.deb

  # If on 15.04 or jessie:
  sudo apt-get install postgresql-9.4
  wget https://dl.dropboxusercontent.com/u/283158365/zuliposs/postgresql-9.4-tsearch-extras_0.1_amd64.deb
  sudo dpkg -i postgresql-9.4-tsearch-extras_0.1_amd64.deb

  # Then, all versions:
  pip install -r requirements.txt
  ./scripts/setup/configure-rabbitmq
  ./tools/postgres-init-db
  ./tools/do-destroy-rebuild-database

To start the development server:
  ./tools/run-dev.py

… and hit http://localhost:9991/.


Running the test suite
======================

One-time setup:
  ./tools/postgres-init-test-db
  ./tools/do-destroy-rebuild-test-database

Backend tests:
  ./tools/test-backend

Frontend tests: not yet supported

Possible issues
===============

When running the test suite, if you get an error like this:
    sqlalchemy.exc.ProgrammingError: (ProgrammingError) function ts_match_locs_array(unknown, text, tsquery) does not exist
    LINE 2: ...ECT message_id, flags, subject, rendered_content, ts_match_l...
                                                                 ^
… then you need to install tsearch-extras, described above. Afterwards, re-run the init*-db and the do-destroy-rebuild*-database scripts.