Skip to content

Commit

Permalink
issue #36 update docu and realized https://hub.docker.com/r/justb4/st…
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Jun 17, 2016
1 parent 584241a commit d14ba27
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ installations below.
You may also want to download the complete .tar.gz distro from PyPi:
https://pypi.python.org/pypi/Stetl . This includes the examples and tests.

**Docker:** Since version 1.0.9 Stetl also can be installed and run via `Docker <http://docker.com>`_. See
:ref:`install_docker` below.

Dependencies
------------

Expand Down Expand Up @@ -126,6 +129,23 @@ Try running the examples when running with a downloaded distro. ::

Look for any error messages in your output.

.. _install_docker:

Install with Docker
-------------------

One of the cleanest ways to use Stetl is via Docker. Offcourse your environment needs to be
setup to use Docker and probably you need some tooling like Vagrant. The author uses
a combination of VirtualBox with Ubuntu and Vagrant on Mac OSX to run Docker, but this
is a bit out of the scope here.

Assuming you have a Docker environment, there are two ways to use Stetl with Docker:

* build a Docker image yourself using the Dockerfile in https://github.com/justb4/stetl/tree/master/docker
* use a prebuilt public Stetl Docker image: https://hub.docker.com/r/justb4/stetl






Expand Down
34 changes: 34 additions & 0 deletions docs/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,40 @@ whatever it gets as input from the previous Filter in the Chain. ::
output/gmlcities.shp
temp/gmlcities.gml

Using Docker
~~~~~~~~~~~~

A convenient way to run Stetl is via a Docker image. See the installation instructions at
:ref:`install_docker`. A full example can be viewed in the Smart Emission project:
https://github.com/Geonovum/smartemission/tree/master/etl.

In the simplest case you run a Stetl Docker container from your own built image or the Dockerhub-provided
one, `justb4/stetl:latest <https://hub.docker.com/r/justb4/stetl>`_ basically as follows: ::


sudo docker run -v <host dir>:<container dir> -w <work dir> justb4/stetl:latest <any Stetl arguments>

For example within the current directory you may have an ``etl.cfg`` Stetl file: ::

WORK_DIR=`pwd`
sudo docker run -v ${WORK_DIR}:${WORK_DIR} -w ${WORK_DIR} justb4/stetl:latest -c etl.cfg

A more advanced setup would be (network-)linking to a PostGIS Docker image
like `kartoza/postgis <https://hub.docker.com/r/kartoza/postgis/>`_: ::

# First run Postgis, remains running,
sudo docker run --name postgis -d -t kartoza/postgis:9.4-2.1

# Then later run Stetl
STETL_ARGS="-c etl.cfg -a local.args"
WORK_DIR="`pwd`"

sudo docker run --name stetl --link postgis:postgis -v ${WORK_DIR}:${WORK_DIR} -w ${WORK_DIR} justb4/stetl:latest ${STETL_ARGS}

The last example is used within the SmartEmission project. Also with more detail and keeping
all dynamic data (like PostGIS DB), your Stetl config and results, and logs within the host. For PostGIS see: https://github.com/Geonovum/smartemission/tree/master/services/postgis
and Stetl see: https://github.com/Geonovum/smartemission/tree/master/etl.

Stetl Integration
-----------------

Expand Down

0 comments on commit d14ba27

Please sign in to comment.