https://github.com/bird-house/ansible-wps-playbook

An Ansible playbook for automated deployment of full-stack PyWPS servers.

https://github.com/bird-house/ansible-wps-playbook

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 9 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

ansible playbook pywps wps
Last synced: 6 months ago · JSON representation

Repository

An Ansible playbook for automated deployment of full-stack PyWPS servers.

Basic Info
Statistics
  • Stars: 4
  • Watchers: 6
  • Forks: 4
  • Open Issues: 15
  • Releases: 11
Topics
ansible playbook pywps wps
Created almost 8 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License

README.md

PyWPS Ansible Playbook

GitHub license

Use Ansible to deploy a full-stack PyWPS service.

Warning

This playbook is under development and is currently only used to deploy PyWPS applications from Birdhouse like Emu.

Warning

The current version (>= v0.6.0) is a major update of the Ansible deployment. It includes a role to deploy Slurm. It can only be used for a single host deployment.

The deployment on a Slurm cluster is only support by the previous version v0.5.x.

Introduction

PyWPS Ansible Playbook can completely provision a server to run the full stack of PyWPS, including:

  • Conda to manage application dependencies.
  • Nginx as Web-Server.
  • Supervisor to start/stop and monitor services.
  • PostgreSQL optional database used for job logging.
  • Slurm optional workload manager for jobs.

It will install a PyWPS application on a single host. Nginx, Supervisor and miniconda are installed on the system. The PyWPS application is fetched from GitHub and dependencies are installed into a Conda environment.

Testing with Vagrant

Use Vagrant to test the installation:

sh vagrant up

Login in to VM:

sh vagrant ssh

Become root:

sh sudo -i

Install ansible:

sh dnf install epel-release dnf install ansible

Change to the /vagrant folder:

sh cd /vagrant

Configure the playbook:

sh cp etc/sample-vagrant.yml custom.yml vim custom.yml

Run the playbook:

sh make play

Check if WPS is running: sh supervisorctl status

Check WPS service by getting the capabilities:

http://192.168.128.100/wps?service=wps&version=1.0.0&request=GetCapabilities

Configuration

Edit custom.yml

You need to customize the Ansible deployment configuration to install your PyWPS service. Create a custom.yml configuration and overwrite any of the variables found in group_vars/all. There are some prepared sample configurations etc/sample-*.yml for specific deployments. Copy one of those to get started.

You can also add your custom configurations to the etc/ folder to stay away from Git control:

console $ cp etc/sample-emu.yml etc/custom-emu.yml $ vim etc/custom-emu.yml $ ln -s etc/custom-emu.yml custom.yml

Use Conda to build identical environments

You can use Conda specification files to build identical environments. The WPS service needs to have a specification file, spec-file.txt, in its top level folder. You can set the following option in your custom.yml:

conda_env_use_spec: true

See an example in etc/sample-emu-with-conda-spec.yml.

Warning

This is option is currently enabled for [all]{.title-ref} configured WPS services.

Use sqlite Database

You can use a SQLite database with the following settings:

db_install_postgresql: false
db_install_sqlite: true

See an example in etc/sample-sqlite.yml.

Use PostgreSQL Database installed by playbook

By default the playbook will install a PostgreSQL database. You can customize the installation. For example you can configure a database user:

db_user: dbuser
db_password: dbuser

See an example in etc/sample-postgres.yml.

Use external PostgreSQL Database

If you want to use an existing database you can skip the database installation by setting the variable:

db_install_postgresql: false

You need to configure then the database connection string to your external database:

wps_database: "postgresql+psycopg2://user:password@host:5432/pywps"

See an example in etc/sample-postgres.yml.

Install multiple PyWPS applications

You can install several PyWPS applications with a single Ansible run. See etc/sample-multiple.yml configuration as example.

You can also configure a shared file-server for outputs. See etc/sample-multiple-with-shared-fileserver.yml.

Use HTTPS with Nginx

You can enable HTTPS for the Nginx service by setting the variable:

wps_enable_https: true

See etc/sample-certs.yml configuration as example.

By default it generates a self-signed certificate automatically.

You can also provide your own certificate by setting the following variables:

ssl_certs_local_privkey_path: '/path/to/example.com.key'
ssl_certs_local_cert_path: '/path/to/example.com.pem'

Read the ssl-certs role documentation for details.

Extend PyWPS configuration

This Ansible playbook has its own template for a PyWPS configuration file. This template does not cover all options and you might want to extend it for additional configurations. You can extend the pywps.cfg configuration with the extra_config option. Here is an example:

``` yaml

servername: demowps wpsservices: - name: demo hostname: "{{ servername }}" port: 5000 extraconfig: | [data] cache_path = /tmp/cache ```

Owner

  • Name: bird-house
  • Login: bird-house
  • Kind: organization

Making Web Processing Services easy

GitHub Events

Total
  • Release event: 1
  • Delete event: 4
  • Push event: 8
  • Pull request event: 11
  • Create event: 5
Last Year
  • Release event: 1
  • Delete event: 4
  • Push event: 8
  • Pull request event: 11
  • Create event: 5

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 224
  • Total Committers: 9
  • Avg Commits per committer: 24.889
  • Development Distribution Score (DDS): 0.259
Past Year
  • Commits: 12
  • Committers: 3
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.417
Top Committers
Name Email Commits
Pingu Carsti e****t@d****e 166
root r****t@r****e 16
root r****t@r****e 15
root r****t@c****e 9
Ag Stephens a****s@s****k 6
root r****t@r****e 6
root r****t@c****e 4
root r****t@r****l 1
root r****t@r****l 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 34
  • Total pull requests: 81
  • Average time to close issues: 5 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 2
  • Total pull request authors: 2
  • Average comments per issue: 0.79
  • Average comments per pull request: 0.11
  • Merged pull requests: 79
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 15
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 minutes
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.07
  • Merged pull requests: 14
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cehbrecht (33)
  • plogerais (1)
Pull Request Authors
  • cehbrecht (83)
  • agstephens (8)
Top Labels
Issue Labels
enhancement (19) bug (15) wontfix (2) help wanted (1) question (1)
Pull Request Labels
enhancement (29) bug (13)