Changes between Version 28 and Version 29 of org/operations/Infrastructure/support.torproject.org


Ignore:
Timestamp:
Aug 6, 2019, 4:18:15 PM (7 weeks ago)
Author:
anarcat
Comment:

i think this entire page is irrelevant, now that support.tpo was rebuilt with lektor. no idea why support.tpo talked about prosody anyways, but it seems wrong.

Legend:

Unmodified
Added
Removed
Modified
  • org/operations/Infrastructure/support.torproject.org

    v28 v29  
    1 [[TOC(noheading)]]
    2 = support.torproject.org =
    3 This is the deployment documentation for support.torproject.org.
    4 
    5 == Requirements ==
    6 * Apache2 (apache2)
    7 * Prosody (prosody) with [https://modules.prosody.im/mod_auto_accept_subscriptions.html]
    8 * Passenger (libapache2-mod-passenger)
    9 * Django (python-django)
    10 * [https://packages.debian.org/wheezy/python-django-south python-django-south]
    11 * [https://gitweb.torproject.org/pups.git pups]
    12 
    13 == Configs ==
    14 === Apache2 ===
    15 '''Config location:''' /etc/apache2/sites-available/support.torproject.org
    16 
    17 ''' Example config:''' https://gist.githubusercontent.com/anonymous/441a27107b58b77b8a23/raw/57b26ba77913a13d1f199b9683dc9b75cae76ed0/Apache2
    18 
    19 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.
    20 
    21 === Prosody ===
    22 '''Config location:''' /etc/prosody/prosody.cfg.lua
    23 
    24 '''Mod location:''' /usr/lib/prosody/modules/
    25 
    26 ''' Example config:''' https://gist.githubusercontent.com/Phoul/e8438e9169dacbf43f34/raw/e1ddb3cde25bae4da0cb919010b1eddc3c70b763/prosody.cfg.lua
    27 
    28 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.
    29 
    30 === Tor Pups ===
    31 
    32 '''Installation:'''
    33 
    34 {{{
    35 git clone https://gitweb.torproject.org/pups.git
    36 
    37 cp pups/pups/settings.py.sample pups/pups/settings.py
    38 
    39 python manage.py syncdb
    40 […]
    41 Would you like to create one now? (yes/no): no
    42 […]
    43 
    44 chown -R www-data:www-data pups/pups/databases/
    45 
    46 chmod -R 770 pups/pups/databases/
    47 
    48 python manage.py createuser USERNAME PASSWORD
    49 
    50 vim pups/pups/settings.py
    51 # Fill in the CONFIG dict (look at sample settings)
    52 }}}
    53 
    54 ''' Upgrade: '''
    55 
    56 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..
    57 
    58 {{{
    59 
    60 #app_name can be pups/webchat/stats
    61 
    62 ./manage.py schemamigration app_name --init
    63 
    64 ./manage.py migrate app_name --fake
    65 
    66 # Now you can add db columns
    67 
    68 ./manage.py schemamigration app_name --auto
    69 
    70 ./manage.py migrate app_name
    71 }}}
    72 
    73 === support.tpo & support-test.tpo deployment ===
    74 '''Production'''
    75 * Merge changes from 'master' into 'production'.
    76 {{{
    77 git checkout production
    78 git merge master
    79 }}}
    80 * Tag the new 'production' HEAD.
    81 {{{
    82 git tag vX.X.X
    83 }}}
    84 * Pull changes from the 'production' branch into the production directory (/srv/support.torproject.org/pups)
    85 {{{
    86 cd /srv/support.torproject.org/pups
    87 git checkout production
    88 git pull origin production
    89 }}}
    90 * Checkout the newly created tag.
    91 {{{
    92 git checkout tags/vX.X.X
    93 }}}
    94 * (Depending on change) restart the Apache2 vhost or Passenger.
    95 
    96 '''Staging'''
    97 * Merge changes into 'master'.
    98 {{{
    99 git checkout master
    100 git merge $REMOTE
    101 }}}
    102 * Pull changes from 'master' into staging directory (/srv/support.torproject.org/pups-staging).
    103 {{{
    104 cd /srv/support.torproject.org/pups-staging
    105 git pull origin master
    106 }}}
    107 * (Depending on change) restart Apache vhost or Passenger.
     1See [[org/operations/services/support]].