Deployment¶
Start Finch PyWPS service¶
After successful installation, you can start the service using the $ finch command in your console:
$ finch --help # show help
$ finch start # start service with default configuration
OR
$ finch start --daemon # start service as daemon
loading configuration
forked process id: 42
The deployed WPS service is available by default on port 5000:
http://localhost:5000/wps?service=WPS&version=1.0.0&request=GetCapabilities.
Once the service is running, a pywps.pid file is created in the current directory. This file contains the process ID of the running finch service.
Alternatively, you can find which process uses a given port using the following command (here for port 5000):
$ netstat -nlp | grep :5000
Check the log files for errors:
$ tail -f pywps.log
Stopping the finch daemon:
$ finch stop
Changing the default port¶
You can overwrite the default PyWPS configuration by using command-line options. See the finch help for which options are available:
$ finch start --help
--hostname HOSTNAME hostname in PyWPS configuration.
--port PORT port in PyWPS configuration.
Start service with different hostname and port:
$ finch start --hostname localhost --port 5001
Starting Finch WPS the lazy way (from sources)¶
If finch is running from a clone of the GitHub source code repository, you can alternatively simply use the Makefile to start and stop the service:
$ make start
$ make status
$ tail -f pywps.log
$ make stop
If you wish to always run finch from the Makefile, you can set the URL and port via environment variables:
$ export WPS_URL=http://localhost:9876 # to set a particular URL:port
Deploying Finch WPS from a Docker container¶
Running finch as a Docker service is very simple:
$ docker run -p 5000:5000 birdhouse/finch
This will start finch mapped to port 5000, allowing you to access finch at http://localhost:5000.
Using Ansible to deploy Finch WPS¶
Ansible can also be used to deploy finch on your system. See the Ansible playbook example for more information.