Skip to content

Commit

Permalink
documentation and refine Docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed May 29, 2016
1 parent 1e1591e commit 2c38ed6
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/postgis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:14.04
FROM kartoza/postgis:9.4-2.1

# TODO for now kartoza/postgis:9.4-2.1 fulfills all needs
# Configure timezone and locale
Expand Down
6 changes: 6 additions & 0 deletions docker/postgis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
#
# Build apache2 Docker image with options

sudo docker build -t geonovum/postgis .

12 changes: 12 additions & 0 deletions docs/platform/administration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This chapter describes the operation and maintenance aspects for the Smart Emiss
* how to start stop servers
* managing the ETL
* where to find logfiles
* troubleshooting

Data Management
===============
Expand All @@ -20,3 +21,14 @@ Web Services

TBS

Troubleshooting
===============

Various issues found and their solutions.

Docker won't start
------------------

In syslog ``"[graphdriver] prior storage driver \"aufs\" failed: driver not supported" ``.
Solution: https://github.com/docker/docker/issues/14026. Removed ``/var/lib/docker/aufs``.

19 changes: 15 additions & 4 deletions docs/platform/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Containers may be distributed over VM-instances. Another aspect in our Docker-ap
is that all data, logging, configuration and custom code/(web)content is maintained
*Local*, i.e. outside Docker Containers/images. This will make the Docker Containers
more reusable and will provide better control, backup, and monitoring facilities.
An *Administrative Docker Component* is also planned. Code, content and configuration
An *Administrative Docker Component* is also present. Code, content and configuration
is maintained/synced in/with GitHub (see below). Custom(ized) Docker Containers will
be published to the Docker Hub, to facilitate immediate reuse.

Expand All @@ -164,9 +164,20 @@ The list of Docker Containers, each with their related Docker Image:
* ``web`` - web and webapps, proxy to backend - image: ``geonovum/apache2``
* ``postgis`` - PostgreSQL w PostGIS - image: ``kartoza/postgis:9.4-2.1``
* ``stetl`` - All ETL tasks - image: ``geonovum/stetl``
* ``geoserver`` - GeoServer web app - image: ``kartoza/geoserver`` (TBD)
* ``sos52`` - 52North SOS web app: ``kartoza/geoserver`` (TBD)
* ``geoserver`` - GeoServer web app - image: ``geonovum/geoserver`` based on ``kartoza/geoserver``
* ``sos52`` - 52North SOS web app: (TBD)

See https://github.com/Geonovum/smartemission/blob/master/docker for the generic images
and https://github.com/Geonovum/smartemission/blob/master/etl and https://github.com/Geonovum/smartemission/blob/master/services
for their use in Docker Containers:
for their use in Docker Containers.

Test and Production
-------------------

In order to provide a continuous/uninterrupted service both a Test and Production deployment will be
setup within the FIWARE Lab environment. For local development on PC/Mac/Linux
a Vagrant environment with Docker can be setup.

The Test and Production environments will also have separate IP-adresses and domains:
``data.test.smartemission.nl`` and ``data.smartemission.nl`` respectively.

27 changes: 27 additions & 0 deletions docs/platform/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,30 @@ Debugging, start/stop Apache quickly within container: ::
# Start Apache from commandline
/bin/bash -c "source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND"

geoserver - GeoServer
~~~~~~~~~~~~~~~~~~~~~

GeoServer is run from a Docker image based on Kartoza's GeoServer Dockerfile:
https://github.com/kartoza/docker-geoserver/blob/master/Dockerfile.
This Dockerfile is very versatile, as it allows to tune Tomcat parameters
and add GeoServer plugins.

Some local modifications were required, thus a customized Docker image ``geonovum/geoserver``
has been developed. See https://github.com/Geonovum/smartemission/tree/master/docker/geoserver.

GeoServer can then be run with the bash-script:
https://github.com/Geonovum/smartemission/blob/master/services/geoserver/run-geoserver.sh

This script maps the local directory ``/var/smartem/data/geoserver`` as the GeoServer data-dir, thus
keeping it outside the Docker container. Also the mapping is provided to the PostGIS Docker container
``postgis``, thus PostGIS Stores within the GeoServer config can be accessed using the CNAME Host ``postgis``.

GeoServer is accessed via the ``web`` container via the AJP Apache2 proxy (port 8009).

sos - 52North SOS
~~~~~~~~~~~~~~~~~~

TBS, will be similar to GeoServer: Tomcat with .war file and keeping config outside Docker container
and mapping DB to ``postgis`` container.


4 changes: 4 additions & 0 deletions services/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This service configures and runs the generic Docker (Apache2) web services.
This is the front-end for the entire SE Data Platform.

## Running

Use the command ./run-web.sh

## Services

Several service endpoints are available:
Expand Down

0 comments on commit 2c38ed6

Please sign in to comment.