Verbatim:Deployment: Difference between revisions
Jump to navigation
Jump to search
Thardcastle (talk | contribs) (Extra RHEL dependencies) |
Friedelwolff (talk | contribs) (Instructions for stray readers, update to 2010 realities) |
||
Line 1: | Line 1: | ||
[[Verbatim]] » Deployment | [[Verbatim]] » Deployment | ||
NOTE: This page contains notes about Mozilla's installation of Pootle. If you wish to install Pootle, the best would be to consult the [http://translate.sourceforge.net/wiki/pootle/index documentation of the Pootle project]. | |||
== Pre-Deployment Checklist == | == Pre-Deployment Checklist == | ||
Line 14: | Line 16: | ||
** python-devel | ** python-devel | ||
([http://translate.sourceforge.net/wiki/pootle/ | ([http://translate.sourceforge.net/wiki/pootle/installation list of Pootle's dependencies]) | ||
== Setup == | == Setup == | ||
Line 28: | Line 30: | ||
** <code>wget .../requirements.txt</code> (from github) | ** <code>wget .../requirements.txt</code> (from github) | ||
** <code>pip -E pootle_env install -r requirements.txt</code> | ** <code>pip -E pootle_env install -r requirements.txt</code> | ||
* Download and extract Pootle itself (from the [http:// | * Download and extract Pootle itself (from the [http://sourceforge.net/projects/translate/files/Pootle/ SourceForge releases]) so that it lives under pootle_dir/Pootle | ||
Set up Apache and mod_python to properly run Pootle | Set up Apache and mod_python to properly run Pootle | ||
Line 63: | Line 65: | ||
* once it all works, switch <code>DEBUG</code> in <code>localconfig.py</code> to'' False'' | * once it all works, switch <code>DEBUG</code> in <code>localconfig.py</code> to'' False'' | ||
''todo: verification things are working, cron jobs, nagios checks, etc.'' | ''todo: verification things are working, cron jobs, nagios checks, etc.'' | ||
You might also want to look into tips for [http://translate.sourceforge.net/wiki/pootle/optimisation Pootle optimisation]]. |
Latest revision as of 08:36, 29 June 2010
Verbatim » Deployment
NOTE: This page contains notes about Mozilla's installation of Pootle. If you wish to install Pootle, the best would be to consult the documentation of the Pootle project.
Pre-Deployment Checklist
- Prerequisites
- Python >= 2.4
- pip
- python-sqlite2
- python-ldap
- MySQL-python
- At least gettext version 0.15. This seems to upgrade cleanly in Redhat with no dependency issues (bug 438706)
- At least SVN 1.5 (we make use of
--with-revprop
) - libxml2-devel
- libxslt-devel
- python-devel
(list of Pootle's dependencies)
Setup
I've added some scripts etc. to github.
As the apache user, pick a dir where you want to deploy Pootle (pootle_dir), then:
- Create and activate a virtualenv
cd pootle_dir
virtualenv pootle_env
. pootle_env/bin/activate
- Install all required packages using
pip
wget .../requirements.txt
(from github)pip -E pootle_env install -r requirements.txt
- Download and extract Pootle itself (from the SourceForge releases) so that it lives under pootle_dir/Pootle
Set up Apache and mod_python to properly run Pootle
cd pootle_env/bin
wget .../modpython_wrapper.py
(from github); chmod +x it- set up Apache config similarly to the
apache-host.conf
on github; important parts:PythonHandler modpython_wrapper
refers to the .py file we put intopootle_dir/pootle_env
above.- make sure to adjust pootle_dir appropriately in all places
- the config should in the end use HTTPS and forward HTTP->HTTPS, because we use LDAP auth
Configuration
- set up SVN user (more details on these steps but here's a summary):
- Create a Verbatim SSH account on the SVN server using an SSH key with no passphrase
- Copy the key to a .ssh directory in the home directory of the verbatim user on the verbatim server
- Add commit hooks to the SVN server for translate:author
- check out inital projects into
Pootle/po/(project-slug)
, for example:
cd pootle_dir/Pootle/po
svn co svn+ssh://svn.mozilla.org/addons/trunk/site/app/locale amo
- set up Pootle itself
- create a MySQL db and user
- set up a memcached instance for Pootle
- edit
Pootle/localconfig.py
, there: - change
DATABASE_*
- switch
AUTHENTICATION_BACKENDS
to use LDAP, and adjust the credentials/settings there - switch
CACHE_BACKEND
with the memcached option
- initialize Pootle
- in
pootle_dir/Pootle
, run the database initialization steps, including creation of a first admin user: ./manage.py syncdb
./manage.py initdb
./manage.py refresh_stats
Post-deployment Checklist
- make sure at the very least
/po
and/dbs
are owned and writeable by the apache user, probablypootle/settings.py
too. - once it all works, switch
DEBUG
inlocalconfig.py
to False
todo: verification things are working, cron jobs, nagios checks, etc.
You might also want to look into tips for Pootle optimisation].