These are the instructions for upgrading Pootle from an older version to the current release.
You may want to stop your running Pootle while you upgrade to prevent updates to your data during the migration process. If you have RQ workers running you may want to stop those also.
Warning
Before upgrading we strongly recommend that you backup your current system.
If you are currently using SQLite for your database you will need to migrate to either MySQL (InnoDB) or PostgreSQL before you upgrade.
Before upgrading Pootle familiarize yourself with important changes since the version that you are upgrading from.
You should check that you have all of the necessary Pootle requirements and have installed all required system packages.
Warning
Pootle 2.7.0 or newer requires Python 2.7
If you are upgrading from a virtual environment using an earlier Python version, you must upgrade or rebuild your virtual environment first.
These instructions assume that you are using virtualenv
and you have
activated a virtual environment named env
.
If you are upgrading from a version older than 2.6 you will need to first upgrade to the latest 2.6.x version and then you will be able to upgrade to the latest version.
(env) $ pip install --upgrade "Pootle>=2.6,<2.7"
(env) $ pootle setup
Warning
The 2.6.x releases are meant only as a migration step.
You must upgrade immediately to the latest version once setup has completed.
You should remove any stale Python bytecode files before upgrading.
Assuming you are in the root of your virtualenv folder you can run:
(env) $ pyclean .
Upgrade to the latest Pootle version:
(env) $ pip install --upgrade Pootle
You should now update your custom Pootle settings to add, remove or adjust any settings that have changed. You may want to view the latest available settings.
You can check to see if there are any issues with your configuration settings that need to be resolved:
(env) $ pootle check
Note
If you are upgrading from a version of Pootle that uses
localsettings.py
then you may want to merge your old custom settings
with your settings conf file (default location
~/.pootle/pootle.conf
).
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.
Once you have updated your settings you can perform the database schema and data upgrade by running. This needs to be done in a few steps:
(env) $ pootle migrate accounts 0002 --fake
(env) $ pootle migrate pootle_translationproject 0002 --fake
(env) $ pootle migrate
You must now update the translation checks and populate the Redis cache with statistical data. You will need to have an RQ worker running to complete this.
(env) $ pootle calculate_checks
(env) $ pootle refresh_stats
This command will dispatch jobs to the RQ worker and may take some time.
If you wish to run calculate_checks
and refresh_stats
in
the foreground without using the RQ worker you can use the --no-rq
option.
Any accounts that do not have an email address registered will not be able to
log in. You can set the email for a user using the update_user_email
command.
For example to set the email for user admin
to admin@example.com
:
(env) $ pootle update_user_email admin admin@example.com
As of Pootle 2.7 users must now verify their email before they can log in.
You can use the verify_user
command to bypass email verification for
a specific user.
For example to automatically verify the admin user:
(env) $ pootle verify_user admin
If you wish to verify all of your existing users please see the
verify_user
command for further options.
Now that you have Pootle up and running you may want to consider some of the following in order to build a production environment.