Skip to main content

A Buildout recipe to install and configure PyWPS Web Processing Service with Anaconda.

Project description

Introduction

birdhousebuilder.recipe.pywps is a Buildout recipe to install and configure PyWPS with Anaconda. PyWPS is a Python implementation of a Web Processing Service (WPS). PyWPS will be deployed as a Supervisor service and is available on a Nginx web server. This recipe is used by the Birdhouse project.

Usage

The recipe requires that Anaconda is already installed. It assumes that the default Anaconda location is in your home directory ~/anaconda. Otherwise you need to set the ANACONDA_HOME environment variable or the Buildout option anaconda-home.

It installs the pywps package from a conda channel in a conda environment named birdhouse. The location of the birdhouse environment is .conda/envs/birdhouse. It setups a PyWPS output folder in ~/.conda/envs/birdhouse/var/lib/pywps. It deploys a Supervisor configuration for PyWPS in ~/.conda/envs/birdhouse/etc/supervisor/conf.d/pywps.conf. Supervisor can be started with ~/.conda/envs/birdhouse/etc/init.d/supervisor start.

The recipe will install the nginx package from a conda channel and deploy a Nginx site configuration for PyWPS. The configuration will be deployed in ~/.conda/envs/birdhouse/etc/nginx/conf.d/pywps.conf. Nginx can be started with ~/.conda/envs/birdhouse/etc/init.d/nginx start.

By default PyWPS will be available on http://localhost:8091/wps?service=WPS&version=1.0.0&request=GetCapabilities.

The recipe depends on birdhousebuilder.recipe.conda, birdhousebuilder.recipe.supervisor and birdhousebuilder.recipe.nginx.

Supported options

The recipe supports the following options:

anaconda-home

Buildout option with the root folder of the Anaconda installation. Default: $HOME/anaconda. The default location can also be set with the environment variable ANACONDA_HOME. Example:

export ANACONDA_HOME=/opt/anaconda

Search priority is:

  1. anaconda-home in buildout.cfg

  2. $ANACONDA_HOME

  3. $HOME/anaconda

hostname

The hostname of the PyWPS service (nginx). Default: localhost

http_port

The http port of the PyWPS service (nginx). Default: 8091

https_port

The https port of the PyWPS service (nginx). Default: 28091

output_port

The http port of the PyWPS output file service (nginx). Default: 8090

sites

The name of your WPS project (used for config names and folder path).

processesPath

Path the PyWPS processes.

title

Title used for your WPS service.

abstract

Description of your WPS service.

logLevel

Logging level for PyWPS. Default: WARN

Example usage

The following example buildout.cfg installs PyWPS with Anaconda:

[buildout]
parts = pywps

anaconda-home = /home/myself/anaconda

[pywps]
recipe = birdhousebuilder.recipe.pywps
sites = myproject
hostname = localhost
http-port = 8091
https-port = 28091

# pywps options
processesPath = ${buildout:directory}/myproject/processes
title = MyProject ...
abstract = MyProject does ...

After installing with Buildout start the PyWPS service with:

$ cd /home/myself/.conda/envs/birdhouse
$ etc/init.d/supervisord start  # start|stop|restart
$ etc/init.d/nginx start        # start|stop|restart
$ bin/supervisorctl status      # check that pycsw is running
$ less var/log/pywps/myproject.log  # check log file

Open your browser with the following URL:

http://localhost:8091/wps?service=WPS&version=1.0.0&request=GetCapabilities

Authors

Carsten Ehbrecht ehbrecht at dkrz.de

Change History

0.3.1 (2016-01-05)

  • using cache path var/lib/cache/.

0.3.0 (2015-12-01)

  • updated to latest pywps wsgi app.

0.2.6 (2015-06-25)

  • added user option for supervisor and nginx.

0.2.5 (2015-06-24)

  • enabled https access.

0.2.4 (2015-06-23)

  • removed unused proxyEnabled option.

  • cleaned up templates.

0.2.3 (2015-05-18)

  • updated supervisor config.

  • log pywps to stderr/supervisor.

0.2.2 (2015-04-21)

  • do not set HOME environment variable in gunicorn.

0.2.1 (2015-03-24)

  • added mako_cache to pywps config.

0.2.0 (2015-02-24)

  • installing in conda enviroment birdhouse.

  • using $ANACONDA_HOME environment variable.

  • separation of anaconda-home and installation prefix.

0.1.11 (2014-12-08)

  • changed default log level.

0.1.10 (2014-12-06)

  • Don’t update conda on buildout update.

  • Sets PYTHONPATH in gunicon.conf.py. Used in PyWPS async processes.

0.1.9 (2014-11-26)

  • Added cache section to pywps.cfg template.

0.1.8 (2014-11-03)

  • GDAL_DATA added to environment in gunicorn.conf.py template.

0.1.7 (2014-08-27)

  • phoenix option added for wpsoutputs.

0.1.6 (2014-08-26)

  • Fixed proxy config for wpsoutputs.

0.1.5 (2014-08-23)

added cache path to nginx configuration.

0.1.4 (2014-08-17)

added /usr/local/bin to gunicorn path (needed for brew on macosx)

0.1.3 (2014-08-01)

Updated documentation.

0.1.2 (2014-07-24)

Fixed hostname in nginx template.

0.1.1 (2014-07-11)

Fixed HOME env in gunicorn template.

0.1.0 (2014-07-10)

Initial Release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

birdhousebuilder.recipe.pywps-0.3.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file birdhousebuilder.recipe.pywps-0.3.1.tar.gz.

File metadata

File hashes

Hashes for birdhousebuilder.recipe.pywps-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bf034c71611b8be2bf4746d4c62a299ed8c7880955272519f30effebadb86513
MD5 1e5fd7bac76ce9183b3921ea7b3bb0cd
BLAKE2b-256 dd2b0aa5fff2d0dfd1c2c803b205ea45ece8ef7a7212905cbe916437b3ba02cf

See more details on using hashes here.

Provenance

File details

Details for the file birdhousebuilder.recipe.pywps-0.3.1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for birdhousebuilder.recipe.pywps-0.3.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 f315883414dc2945797c7a31a212d01ec0f79d44c6958896448e2c56e4402fc1
MD5 33c6eafad103bcc4b5d868db1238af2f
BLAKE2b-256 a3b9368fd7406bb6a1748ca6c2f3128ff8184091ecaa03e8f70ff0ca19631d6e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page