Go to file
Anders Kaseorg c0bf02b4c2 zanitizer: Support renaming files
(imported from commit 6a094177d652a267b53aa5042110b39fcbf21b42)
2015-09-24 18:10:02 -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 docs: Cleanup new feature tutorial and note unfinished. 2015-09-22 22:38:55 -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 zanitizer: Support renaming files 2015-09-24 18:10:02 -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.md Markdownify README files and add contribution documentation in README.md. 2015-09-22 21:43:54 -07:00
README.prod.md Markdownify README files and add contribution documentation in README.md. 2015-09-22 21:43:54 -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.md

Installing the Zulip Development environment

Using Vagrant

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

Once that's done, simply change to your zulip directory and run vagrant up in your terminal. That will install the development server inside a Vagrant guest.

Once that finishes, you can run the development server as follows: vagrant ssh -- -L9991:localhost:9991

Now inside the container

cd /srv/zulip source /srv/zulip-venv/bin/activate ./tools/run-dev.py

You can now visit http://localhost:9991/ in your browser. To get shell access to the virtual machine running the server, use vagrant ssh.

The run-dev.py console output will show any errors your Zulip development server encounters. It runs on top of Django's "manage.py runserver" tool, which will automatically restart the Zulip server whenever you save changes to Python code.

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 of test databases: ./tools/postgres-init-test-db ./tools/do-destroy-rebuild-test-database

Run all tests: ./tools/test-all

This runs the linter plus all of our test suites; they can all be run separately (just read tools/test-all to see them). You can also run individual tests, e.g.: ./tools/test-backend zerver.test_bugdown.BugdownTest.test_inline_youtube ./tools/test-js-with-casper 10-navigation.js

Possible issues

The Casper tests are flaky on the Virtualbox environment (probably due to some performance-sensitive races). Until this issue is debugged, you may need to rerun them to get them to pass.

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.

Contributing to Zulip

Zulip welcomes all forms of contributions!

Before a pull request can be merged, you need to to sign the Dropbox Contributor License Agreement.

Also, you should run the tests and lint rules to make sure that they all pass. The development server configuration automatically sets up tools/lint-all to run as a pre-commit hook.

Zulip also has a development discussion mailing list

Running Zulip in production

This is documented in https://zulip.org/server.html and README.prod.md.