Below are installation notes for GeoHealthCheck (GHC).
Easiest and quickest install/run for GHC is with Docker/Docker Compose using the GHC images hosted on Docker Hub.
See the GHC Docker Readme for a full guide.
GeoHealthCheck is built on the awesome Flask microframework and uses Flask-SQLAlchemy for database interaction and Flask-Login for authorization. Flask-Migrate with Alembic and Flask-Script support is used for database upgrades.
OWSLib is used to interact with OGC Web Services.
These dependencies are automatically installed (see below).
Paver is used
for installation and management.
Cron is used for scheduling the actual
it is strongly recommended to install in a Python
virtualenv is self-contained and provides the flexibility to install /
tear down / whatever packages without affecting system wide packages or
- Download a GeoHealthCheck release from https://github.com/geopython/GeoHealthCheck/releases, or clone manually from GitHub.
virtualenv ghc && cd ghc . bin/activate git clone https://github.com/geopython/GeoHealthCheck.git cd GeoHealthCheck # install paver dependency for admin tool pip install Paver # setup app paver setup # create secret key to use for auth paver create_secret_key # almost there! Customize config vi instance/config_site.py # edit: # - SQLALCHEMY_DATABASE_URI # - SECRET_KEY # from paver create_secret_key # - GHC_RETENTION_DAYS # - GHC_RUN_FREQUENCY # - GHC_SELF_REGISTER # - GHC_NOTIFICATIONS # - GHC_NOTIFICATIONS_VERBOSITY # - GHC_ADMIN_EMAIL # - GHC_NOTIFICATIONS_EMAIL # - GHC_SITE_TITLE # - GHC_SITE_URL # - GHC_SMTP # if GHC_NOTIFICATIONS is enabled # - GHC_MAP # or use default settings # init database python GeoHealthCheck/models.py create # start server python GeoHealthCheck/app.py # http://localhost:8000/
Schedule the cronjobs.
# edit local paths to scripts vi jobs.cron # enable cron crontab jobs.cron
An existing GHC database installation can be upgraded with:
# In the top directory (e.g. the topdir cloned from github) paver upgrade # Notice any output, in particular errors
- Always backup your database first!!
- make sure Flask-Migrate is installed (see requirements.txt), else: pip install Flask-Migrate==2.0.3, but best is to run paver setup also for other dependencies
- upgrading is “smart”: you can always run paver upgrade, it has no effect when DB already uptodate
- when upgrading from earlier versions without Plugin-support
- adapt your config_site.py to Plugin settings from config_main.py
- assign Probes and Checks to each Resource via the UI
Start using the built-in
python GeoHealthCheck/app.py # http://localhost:8000 python GeoHealthCheck/app.py 0.0.0.0:8881 # http://localhost:8881 python GeoHealthCheck/app.py 192.168.0.105:8957 # http://192.168.0.105:8957
To enable in Apache, use
GeoHealthCheck.wsgi and configure in Apache
as per the main Flask documentation.