These instructions will guide you through installing Pootle and its requirements in a virtual environment.
If you only want to have a sneak peek of Pootle then the default configuration and the built-in server will suffice.
For a production deployment we strongly recommend that you set up the following:
Note
Before installing please ensure that you have all the necessary requirements.
We’ve made some assumptions in these instructions, adjust as needed:
~/dev/pootle
.In order to install Pootle first create a virtual environment. The virtual environment allows you to install dependencies independent of your system packages.
Please install virtualenv
from your system packages, e.g. on Debian:
$ sudo apt-get install python-virtualenv
Otherwise you can install virtualenv
using pip:
$ sudo pip install virtualenv
Now create a virtual environment on your location of choice by issuing the
virtualenv
command:
$ cd ~/dev/pootle
$ virtualenv env
To activate the virtual environment run the activate script:
$ source env/bin/activate
Once activated the virtual environment name will be prepended to the shell prompt.
Lastly, we want to make sure that we are using the latest version of pip:
(env) $ pip install --upgrade pip
Use pip to install Pootle into the virtual environment:
(env) $ pip install Pootle
This will also fetch and install Pootle’s dependencies.
To verify that everything installed correctly, you should be able to access the pootle command line tool within your environment.
(env) $ pootle --version
Pootle 2.7.6 (Django 1.7.11, Translate Toolkit 1.13.0)
Once Pootle has been installed, you will need to initialize a configuration file:
(env) $ pootle init
By default the configuration file is saved as ~/.pootle/pootle.conf
. You can pass
an alternative path as an argument if required - see the init
command for all
of the options.
Warning
This default configuration is enough to experiment with Pootle. Don’t use this configuration in a production environment.
The initial configuration includes the settings that you’re most likely to change. For further customization, see the full list of available settings.
Statistics tracking and various other background processes are managed by RQ. The rqworker
command needs to be run
continuously in order to process the jobs.
If you have not already done so you should install and start a Redis server.
You can start the worker in the background with the following command:
(env) $ pootle rqworker &
In a production environment you may want to run RQ workers as services.
See here for further information about RQ jobs in Pootle.
Before you run Pootle for the first time, you need to create the schema for
the database and populate it with initial data. This is done by executing the
migrate
and initdb
management commands:
Note
You will need to have an RQ worker running to complete this. Alternately, you can
use the --no-rq
.
(env) $ pootle migrate
(env) $ pootle initdb
Running initdb
will take some time as it will create the default
projects and stores.
Pootle needs at least one user with superuser rights which we create with the
createsuperuser
command.
(env) $ pootle createsuperuser
All users are required to verify their email before logging in. If you wish to
bypass this step you can use the verify_user
command.
For example to allow a user named admin
to log in without having to verify
their email address:
(env) $ pootle verify_user admin
By default Pootle provides a built-in CherryPy server that will be enough for quickly testing the software. To run it, just issue:
(env) $ pootle start
And the server will start listening on port 8000. This can be accessed from your web browser at localhost:8000.
Now that you have Pootle up and running you may want to consider some of the following in order to build a production environment.