Skip to content

Commit

Permalink
Installation: fix instructions and command references
Browse files Browse the repository at this point in the history
This is not working 100% due to missing assets, but it's close enough.
  • Loading branch information
julen committed Aug 15, 2017
1 parent c4f56f9 commit 6aed1b8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
78 changes: 39 additions & 39 deletions docs/server/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
Installation
============

These instructions will guide you through installing Pootle and its
These instructions will guide you through installing Zing and its
requirements in a virtual environment.

If you only want to have a sneak peek of Pootle then the default configuration
If you only want to have a sneak peek of Zing then the default configuration
and the built-in server will suffice.

For a production deployment we **strongly** recommend that you set up the following:
Expand All @@ -21,9 +21,9 @@ For a production deployment we **strongly** recommend that you set up the follow
:ref:`necessary requirements <requirements>`.


.. warning:: It is important to install Pootle into a virtual environment to ensure
the correct packages and permissions. It's even more important not to install Pootle
as the root user on your system. **Installing or running Pootle as the root user
.. warning:: It is important to install Zing into a virtual environment to ensure
the correct packages and permissions. It's even more important not to install Zing
as the root user on your system. **Installing or running Zing as the root user
will expose your system to many potential security vulnerabilities**


Expand All @@ -34,11 +34,11 @@ Setup assumptions

We've made some assumptions in these instructions, adjust as needed:

#. All of the :ref:`Pootle requirements <requirements#packages>` have been
#. All of the :ref:`Zing requirements <requirements#packages>` have been
installed.
#. We're installing into :file:`~/dev/pootle`.
#. We're installing into :file:`~/dev/zing`.
#. We're using SQLite as it's easy to setup.
#. We're setting up the essential parts of Pootle including Redis, and RQ
#. We're setting up the essential parts of Zing including Redis, and RQ
Workers.
#. This is a test installation on a single server, and not optimised for
production use.
Expand All @@ -50,7 +50,7 @@ We've made some assumptions in these instructions, adjust as needed:
Setting up the virtual environment
----------------------------------

In order to install Pootle first create a virtual environment. The virtual
In order to install Zing first create a virtual environment. The virtual
environment allows you to install dependencies independent of your system
packages.

Expand All @@ -73,7 +73,7 @@ Now create a virtual environment on your location of choice by issuing the

.. code-block:: console
$ cd ~/dev/pootle
$ cd ~/dev/zing
$ virtualenv env
.. note:: for versions of ``virtualenv`` prior to 1.10, you may need to call
Expand All @@ -96,48 +96,48 @@ Lastly, we want to make sure that we are using the latest version of
(env) $ pip install --upgrade pip
.. _installation#installing-pootle:
.. _installation#installing-zing:

Installing Pootle
-----------------
Installing Zing
---------------

Use :command:`pip` to install Pootle into the virtual environment:
Use :command:`pip` to install Zing into the virtual environment:

.. code-block:: console
(env) $ pip install --pre Pootle
(env) $ pip install https://github.com/evernote/zing/archive/master.zip
This will also fetch and install Pootle's dependencies.
This will also fetch and install Zing's dependencies.

To verify that everything installed correctly, you should be able to access the
:command:`pootle` command line tool within your environment.
:command:`zing` command line tool within your environment.


.. highlight:: console
.. parsed-literal::
(env) $ pootle --version
Pootle |release| (Django |django_ver|, Translate Toolkit |ttk_ver|)
(env) $ zing --version
Zing |release| (Django |django_ver|, Translate Toolkit |ttk_ver|)
.. _installation#initializing-the-configuration:

Initializing the Configuration
------------------------------

Once Pootle has been installed, you will need to initialize a configuration
Once Zing has been installed, you will need to initialize a configuration
file:

.. code-block:: console
(env) $ pootle init
(env) $ zing init
By default the configuration file is saved as :file:`~/.pootle/pootle.conf`. You can pass
By default the configuration file is saved as :file:`~/.zing/zing.conf`. You can pass
an alternative path as an argument if required - see the :djadmin:`init` command for all
of the options.

.. warning:: This default configuration is enough to experiment with Pootle.
.. warning:: This default configuration is enough to experiment with Zing.
**Don't use this configuration in a production environment**.

The initial configuration includes the settings that you're most likely to
Expand All @@ -161,20 +161,20 @@ You can start the worker in the background with the following command:

.. code-block:: console
(env) $ pootle rqworker &
(env) $ zing rqworker &
In a production environment you may want to :ref:`run RQ workers as services
<pootle#running_as_a_service>`.

See here for :ref:`further information about RQ jobs in Pootle <rq>`.
See here for :ref:`further information about RQ jobs in Zing <rq>`.


.. _installation#populating-the-database:

Populating the Database
-----------------------

Before you run Pootle for the first time, you need to create the schema for
Before you run Zing 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
:djadmin:`migrate` and :djadmin:`initdb` management commands:

Expand All @@ -184,8 +184,8 @@ the database and populate it with initial data. This is done by executing the

.. code-block:: console
(env) $ pootle migrate
(env) $ pootle initdb
(env) $ zing migrate
(env) $ zing initdb
Running :djadmin:`initdb` will take some time as it will create the default
projects and stores.
Expand All @@ -196,12 +196,12 @@ projects and stores.
Creating an admin user
----------------------

Pootle needs at least one user with superuser rights which we create with the
Zing needs at least one user with superuser rights which we create with the
:djadmin:`createsuperuser` command.

.. code-block:: console
(env) $ pootle createsuperuser
(env) $ zing createsuperuser
All users are required to verify their email before logging in. If you wish to
Expand All @@ -212,27 +212,27 @@ their email address:

.. code-block:: console
(env) $ pootle verify_user admin
(env) $ zing verify_user admin
.. _installation#running_pootle:

Running Pootle
--------------
Running Zing
------------

The Django default server will be enough for quickly testing the software. To
run it, just issue:

.. code-block:: console
(env) $ pootle runserver --insecure
(env) $ zing runserver --insecure
.. warning:: There are :ref:`serious drawbacks <django:staticfiles-runserver>`
to using :command:`runserver`. Never use it in production.


And the server will start listening on port 8000. Pootle can then be accessed
And the server will start listening on port 8000. Zing can then be accessed
from your web browser at `localhost:8000 <http://localhost:8000/>`_.


Expand All @@ -241,15 +241,15 @@ from your web browser at `localhost:8000 <http://localhost:8000/>`_.
Next steps
----------

Now that you have Pootle up and running you may want to consider some of the
Now that you have Zing up and running you may want to consider some of the
following in order to build a production environment.

- :doc:`Create your first localisation project <project_setup>`
- :ref:`Run Pootle and RQ workers as services <pootle#running_as_a_service>`
- :ref:`Run Zing and RQ workers as services <pootle#running_as_a_service>`
- :ref:`Set up a reverse-proxy web server for static files <apache#reverse_proxy>`
- :ref:`Use a wsgi server to serve dynamic content <apache#mod_wsgi>`
- :ref:`Check out the available settings <settings#available>`
- :ref:`Check out Pootle management commands <commands>`
- :ref:`Check out Zing management commands <commands>`
- :doc:`Optimize your setup <optimization>`
- :ref:`Set up a Translation Memory Server <translation_memory>`
- :ref:`Customize the Pootle UI <customization>`
- :ref:`Customize the Zing UI <customization>`
3 changes: 2 additions & 1 deletion pootle/apps/pootle_app/management/commands/initdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
# Copyright (C) Zing contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
Expand Down Expand Up @@ -35,5 +36,5 @@ def handle(self, **options):
self.stdout.write('Populating the database.')
InitDB().init_db(options["create_projects"])
self.stdout.write('Successfully populated the database.')
self.stdout.write("To create an admin user, use the `pootle "
self.stdout.write("To create an admin user, use the `zing "
"createsuperuser` command.")
7 changes: 3 additions & 4 deletions pootle/settings/90-local.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
"""Sample configuration file.

This file includes the settings that administrators will likely change.
You can find the defaults in the ``*.conf`` files for more advanced settings.

In order for this configuration changes to take effect, bear in mind that you
need to change the extension of this file from ``.conf.sample`` to ``.conf``.
Django and Zing settings apply. All Zing-specific settings can be found at
https://github.com/evernote/zing/blob/master/docs/server/settings.rst
"""


Expand All @@ -15,7 +14,7 @@ need to change the extension of this file from ``.conf.sample`` to ``.conf``.
#

# Site title
POOTLE_TITLE = 'Pootle Translation Server'
POOTLE_TITLE = 'Zing Translation Server'

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
Expand Down
4 changes: 2 additions & 2 deletions tests/commands/initdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_cmd_initdb_noprojects(capfd, no_permission_sets, no_permissions, no_use
call_command('initdb', '--no-projects')
out, err = capfd.readouterr()
assert "Successfully populated the database." in out
assert "pootle createsuperuser" in out
assert "createsuperuser" in out
# FIXME ideally we want to check for these but it seems that test oders and
# such means that these have already been added so we don't get any
# reports.
Expand All @@ -41,7 +41,7 @@ def test_cmd_initdb(capfd, po_directory, no_permission_sets, no_permissions,
call_command('initdb')
out, err = capfd.readouterr()
assert "Successfully populated the database." in out
assert "pootle createsuperuser" in out
assert "createsuperuser" in out
assert (
sorted(Project.objects.values_list("code", flat=True))
== ["terminology", "tutorial"]
Expand Down

0 comments on commit 6aed1b8

Please sign in to comment.