Go to file
Luke Faraone e8ea761fbe Initial attempt at Vagrantization
This is slightly hacky; it doesn't support as many arches as I'd like, but it works.

(imported from commit 5993014b0518d6d6dd2856fbf73180830e934b5f)
2015-08-17 09:45:51 -07:00
analytics Fix comment in meets_goal() function in activity reports. 2014-02-03 13:30:49 -05:00
api Handle platform.system() throwing an IOError 2014-05-20 17:29:29 -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 Use settings.EXTERNAL_HOST when sending activation emails 2014-07-03 12:28:29 -04:00
corporate Modify /hello to go to register instead of signup on Enterprise 2013-11-22 13:50:24 -05: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 Give root higher nofile limits in limits.conf. 2015-08-16 13:39:48 -07:00
scripts Allow configure-rabbitmq to be run w/o sudo 2015-08-16 16:45:07 -07:00
static Remove "More messages below" indicator 2015-03-30 15:44:36 -07:00
templates Remove "More messages below" indicator 2015-03-30 15:44:36 -07:00
tools Fix broken shebang in postgres-init-test-db 2015-08-16 21:36:36 -07:00
zerver Skip S3 write/read test cases 2015-08-16 16:45:15 -07:00
zilencer Update default api/site URLs to prod 2015-02-05 22:46:31 -08:00
zproject Add dummy secrets for use in development. 2015-08-16 21:35:34 -07:00
.gitattributes enterprise: Don't include templates/zilencer in our tarballs 2013-11-15 11:53:49 -05:00
.gitignore gitignore *.DS_Store instead of .DS_Store 2014-05-07 14:06:59 -07:00
LICENSE Add license not referring to Zulip Enterprise license agreement. 2013-11-14 11:16:15 -05:00
README.dev Initial attempt at Vagrantization 2015-08-17 09:45:51 -07:00
Vagrantfile Initial attempt at Vagrantization 2015-08-17 09:45:51 -07:00
manage.py logging: Log management commands that are run. 2013-11-20 14:31:08 -05:00
provision.py Initial attempt at Vagrantization 2015-08-17 09:45:51 -07:00
requirements.txt Initial attempt at README.dev and requirements.txt 2015-08-16 16:46:17 -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, but is only supported on Ubuntu 14.04.

  sudo apt-get install vagrant lxc lxc-templates cgroup-lite redir
  vagrant plugin install vagrant-lxc
  vagrant up --provider=lxc
  vagrant ssh
  # Now inside the container
  sudo apt-get update
  sudo apt-get install python-pbs
  cd /srv/zulip && python provision.py

To run the development server:
  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.

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: TBD

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.