Toggle navigation

Pootle Image Guide

Version 2.8

Websoft9 Pootle is a pre-configured, ready to run image for running Pootle on Alibaba Cloud.

Pootle is an online translation and localization tool. It works to lower the barrier of entry, providing tools to enable teams to work towards higher quality while welcoming newcomers.Pootle is written in Python using the Django framework and therefore can be installed on any web server that supports serving WSGI applications.A number of translation projects for a number of languages can be hosted on Pootle. Teams can manage their files, permissions, projects, and translate on-line. Files can be downloaded for offline translation.

Application Software(Pootle2.8)
Pootle project directory: /data/wwwroot/pootle/env/lib/python2.7/site-packages/pootle
Pootle configuration file: /data/wwwrot/pootle/env/pootle.conf

Application Server(Python2.7,virtualenv 15.0.1,Apache2.4,Redis server 3.0.6 )
Pootle for python Virtualenv directory: /data/wwwroot/pootle/env
Apache for Pootle configuration file: /etc/apache2/sites-available/pootle.conf
wsgi file: /data/wwwrot/pootle/wsgi.py

Database(MYSQL5.7)
MySQL directory: /data/mysql
MySQL configuration file: /etc/mysql/mysql.conf.d
The default database name is “pootle”,and the password is randomly generated by OS,please use the Putty tools  to “cat” the /root/mysql_root_password.txt

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the Start Installation page of this Image
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Using Chrome or Firefox to visit: http://Internet IP Address/ to start using this application.Following is the steps:

  1. Visit http://Internet IP Address  to enter the Administrator page,then click the “Sign In” link
  2. Usename is “admin“,and the Password is ‘”admin” also.

  3. After the successful log in, you will see the interface below.You can mange your languages and project now

Three usernames and passwords are required for application installation, application using, and application maintenance:

1、Pootle:Username is admin and password is admin
2、MySQL Database:Default username is root and password is a random password generated OS
3、Linux Server:Username is root,Password is set by yourself when buying.You can reset the password through console and restart the Server if you have forgotten it.Please Using the Putty for Remote and WinSCP for SFTP

How to get the random password?Use Putty to log in the Linux,and run the commands below:

~# cat /root/mysql_root_password.txt   //get the password of MySQL

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup and manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

You can use Manual Backup as following steps:

  1. Download the entire software directory(/data/wwwroot/pootle) by SFTP or other tools
  2. Using the Putty to login MySQL, create a dump file using the mysqldump tool.
    MySQL [(none)]> mysqldump -u root -p pootle > backup.sql;              #create database backup
    MySQL [(none)]> exit;                             #quit mysql console,Notice the semicolon at the end
  3. Then download the SQL backup file from the directory /root

Before upgrade you should put the site down for maintenance and always Backup your code, data and config files.

It is highly recommended to temporarily disable application before upgrading. Don’t forget to empty your browser cache if you experience weird bugs right after upgrading.

Note that you should upgrade to the latest version available, installing intermediate releases sequentially is not needed.

Below are the main upgrade steps: http://docs.translatehouse.org/projects/pootle/en/latest/server/upgrading.html

If you want use Domain for this application,you should complete below steps:

  • Domain resolution if you want to use (Add an A record to the Internet IP Address of Server from your Domain Control Panel)
  • Modiy the Apache configuration file: /etc/apache2/sites-available/pootle.conf

    ServerName www.mydomain.com 
    ServerAlias mydomain.com
  • Modity the Pootle configuration file: /data/wwwrot/pootle/env/pootle.conf
    ALLOWED_HOSTS = [
        '127.0.0.1',
        'localhost',
        '118.178.131.132',
    ]
     //You should add your domain replace the localhost only
  • Restart the services

Login as Administrator, Admin->Settings,you can find the “Reset Password” button below:

 

You can use the command to manage the services for Server.Please choose the corresponding command mode according to different types of operating system

Ubuntu Linux

Nginx Restart

~# systemctl restart apache2

MySQL Restart

~# systemctl restart mysql

Activate Pootle for python Virtualenv

~# source /data/wwwroot/pootle/env/bin/activate

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644,folder 755 ,Permissions Users and groups www-data
If there is a file permissions problem, execute the following three commands:

chown -R www-data.www-data /data/wwwroot/pootle
find /data/wwwroot/default/pootle -type d -exec chmod 755 {} \;
find /data/wwwroot/default/pootle -type f -exec chmod 644 {} \;