Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Docker docs #6846

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 34 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,45 @@ Pootle. Teams can manage their files, permissions, projects, and translate
on-line. Files can be downloaded for offline translation.


Installation
Getting started
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this might be confusing. Can it be renamed to something like "Trying Pootle" or something in that way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, are we no longer pointing to install instructions for users that want to got directly to install instead of test run?

Copy link
Member Author

@phlax phlax Apr 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think basically the following

  • abbreviated "getting started" in README
  • longer getting started in docs
  • page/s with discussion on using dev images (running tests, building assets etc)
  • page/s with discussion on running in production

its gonna take some time to get all this done tho

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, as long as the README has some links to those expanded use cases at the bottom of its "Getting started" section.

---------------

The easiest way to get started is by using the docker demo. You will need docker
installed on your system, and to be running as a user with permissions to manage
docker.

As the docker compose configuration is stored in the pootle directory, you will
need ``git`` installed and ``pip`` for some minimal python dependencies to get
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are command so please highlight them using :command:`git` .

set up.


Virtualenv
----------

You can optionally use a virtualenv to install the python requirements. This
will make it easier to install and run as a user other than ``root``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Missing trailing dot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean a full stop ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.



Demo install
------------

First install the requirements

::

git clone https://github.com/translate/pootle
cd pootle
pip install -r requirements/host.txt

You can now run the demo, using the ``makey`` command runner

::

pip install --pre Pootle
makey demo

Don't forget to read the `installation guide
<http://docs.translatehouse.org/projects/pootle/en/latest/server/installation.html>`_
for important details.
This will take a few moments to pull the required docker images, and
once up you should be able to browse to your pootle server on
http://localhost:8000


Copying
Expand Down
5 changes: 5 additions & 0 deletions docs/contents.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All you need to know
The following pages cover the documentation of Pootle from a wide variety of
perspectives, server administrator's, and developer's view.

.. toctree::
:maxdepth: 2

getting-started/index

.. toctree::
:maxdepth: 2

Expand Down
82 changes: 82 additions & 0 deletions docs/developers/docker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
.. _docker:

Docker
======

You can install a development and test environment using docker.


.. _docker#assumptions:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Only one blank line between anchor and the related title.


Assumptions
-----------

- You have docker installed and working on your system
- The user you are using has permissions to use docker


.. _docker#virtualenv:

Create a virtualenv (optional)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO I wouldn't make it optional. When giving instructions it is better to reduce the number of optional things so when someone has to provide support it has less paths to explore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think i agree - just that many seem to ignore this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then whoever is providing support can tell them "We can't help you unless you follow the instructions which are well-tested and work."

------------------------------

Installing with virtualenv keeps your host environment clean, and separates
your development environment from the host.

For example:

.. code-block:: console

$ mkvirtualenv pootle
$ cd ~/virtualenvs/pootle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Trailing slash.



.. _docker#clone:

Clone the pootle repository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Pootle, starting with uppercase.

---------------------------

You most likely want to clone *your* fork of the pootle repository, so you
can easily create Pull Requests for your changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rephrase to enforce developers using their fork. But for people doing a test run having a fork in place is not mandatory.


.. code-block:: console

(pootle): git clone [email protected]:$USER/pootle
(pootle): cd pootle/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the console examples I think that the lines should start with (pootle) $ .



.. _docker#requirements:

Install host requirements
-------------------------

.. code-block:: console

(pootle): pip install -r requirements/host.txt


.. _docker#install:

Install the pootle database
---------------------------

The default installer will create a postgresql database with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostgreSQL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also missing trailing colon.


.. code-block:: console

(pootle): makey install-dev

This will take some time as it loads the default projects
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing trailing dot.



.. _docker#server:

Run the development server
--------------------------

Once Pootle is installed you can run the development server with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing trailing colon.


.. code-block:: console

(pootle): makey runserver
1 change: 1 addition & 0 deletions docs/developers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ other way, make sure to read through this part.
deprecation
releasing
plugins
docker
23 changes: 23 additions & 0 deletions docs/getting-started/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _getting_started:

Getting started
===============

.. _getting_started-docker:

Setting up the docker environment
---------------------------------


.. _getting_started-demo:

Running the demo
----------------



.. _getting_started-dev:


Setting up a development environment
------------------------------------