wiki:org/operations/Infrastructure/support.torproject.org

Version 22 (modified by Sherief, 5 years ago) (diff)

typo (-an +a)

support.torproject.org

This is the deployment documentation for support.torproject.org.

Requirements

Configs

Apache2

Config location: /etc/apache2/sites-available/support.torproject.org

Example config: https://gist.githubusercontent.com/anonymous/441a27107b58b77b8a23/raw/57b26ba77913a13d1f199b9683dc9b75cae76ed0/Apache2

Redirecting the BOSH port(as shown in the config above) is required for pups to function correctly. An example sites-available config has been provided above, and will be updated with the running config once it is deployed.

Prosody

Config location: /etc/prosody/prosody.cfg.lua

Mod location: /usr/lib/prosody/modules/

Example config: https://gist.githubusercontent.com/Phoul/e8438e9169dacbf43f34/raw/e1ddb3cde25bae4da0cb919010b1eddc3c70b763/prosody.cfg.lua

The main configuration for Prosody is enabling the BOSH module, as well as having two vhosts (one for anonymous XMPP, and one for authenticated). An example config has been provided above, and will be updated with the running config once it is deployed. For pups to function correctly, you also need to install the "mod_auto_accept_subscriptions" Prosody module.

Tor Pups

Installation:

git clone https://gitweb.torproject.org/pups.git

cp pups/pups/settings.py.sample pups/pups/settings.py

python manage.py syncdb
[…]
Would you like to create one now? (yes/no): no
[…]

chown -R www-data:www-data pups/pups/databases/ 

chmod -R 770 pups/pups/databases/

python manage.py createuser USERNAME PASSWORD

vim pups/pups/settings.py
# Fill in the CONFIG dict (look at sample settings)

Upgrade:

Sometimes after creating your schema you'd want to add a column or two but django 1.4.5 doesn't support that. Luckily there is a solution for this (python-django-south) and this is how to use it..

#app_name can be pups/webchat/stats

./manage.py schemamigration app_name --init

./manage.py migrate app_name --fake

# Now you can add db columns

./manage.py schemamigration app_name --auto

./manage.py migrate app_name