Skip to content

Latest commit

 

History

History
122 lines (81 loc) · 3.96 KB

OpenQuake-engine-webui.md

File metadata and controls

122 lines (81 loc) · 3.96 KB

The OpenQuake WebUI

Starting the webui

From sources

$ cd /path/to/oq-engine/openquake/server
$ python manage.py runserver

From packages

$ cd /usr/lib/python2.7/dist-packages/openquake/server
$ python manage.py runserver

To stop the WebUI process press CTRL-C

Using the webui

Open Firefox or Chrome and load the http://localhost:8000/engine page WebUI main page

Start a calculation

Before starting a new calculation you need to prepare inputs. All the inputs file and the job.ini must be placed in a compressed zip file.

To start a calculation, having the input zip file, select the Run a Calculation button in the header menu. A dialog window will appear: select the zip file to be uploaded and press Open to confirm

WebUI start a calculation

Watch the console log

It is possible to watch the log from a running calculation

WebUI log

The log from a previous run can be also inspected.

Download outputs

If a calculation has run succesfully an Outputs button is provided. Click the Outputs button to see the list of outputs available for the specific calculation type. Output availability depends on the type of artifacts generated by the calculation. The possible formats are xml, csv, geojson, zip. Click on the desired output/format to download the corresponding file

WebUI outputs

Run a risk calculation on top of hazard

To run a risk-only calculation on top of a previous hazard run you have to click the Run Risk button on the corresponding hazard calculation and select the zip file containing the risk job.ini and the related inputs

WebUI outputs

Remove a calculation

To hide a calculation from the list press the Remove button

WebUI remove

The calculation is removed from the calculations list, but it is not actually removed from the database nor from the datastore.

Calculation status

A calculation can be in the following statuses: pre_executing, executing, complete, failed

WebUI calculations status

The reason behind a failed calculation can be inspected by using the Traceback button.

Advanced use

Authentication support

To local_settings.py add:

LOCKDOWN = True

Sessions and users DB bootstrap

DJANGO_SETTINGS_MODULE="openquake.server.settings" python manage.py syncdb --database=auth_db

Add a new local superuser

DJANGO_SETTINGS_MODULE="openquake.server.settings" python manage.py createsuperuser --database=auth_db

PAM

Authentication can rely on system users through PAM, the Pluggable Authentication Module. To use this feature the django-pam extension must be installed and activated

To local_settings.py add:

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'dpam.backends.PAMBackend',
)

The WebUI process owner must be member of the shadow group.

Running with supervisord

On a production system nginx + supervisord + gunicorn is the reccomended software stack to run the WebUI.

Supervisord

OpenQuake Engine WebUI supervisord configuration

Nginx

To local_settings.py add:

STATIC_ROOT = '/var/www/webui'

Collect static files:

DJANGO_SETTINGS_MODULE="openquake.server.settings" python manage.py collectstatic

OpenQuake Engine WebUI nginx configuration

Getting help

If you need help or have questions/comments/feedback for us, you can: