-
Notifications
You must be signed in to change notification settings - Fork 6
pgview
This is a Python Flask application that renders provenance graphs for Datalog queries using the PUG (Provenance Unification through Graphs) extension of GProM. The code can be found under clients/pythonweb
in the git repository. Before using the application you need to build and install gprom and edit the settings in clients/ptyhonweb/provgraph_web/connsettings.py
to point the application to an Oracle database instance to be used to run queries. Alternatively, you can use a docker image that we provide.
The docker image you want to use is:
docker pull iitdbgroup/pug-web-explorer
The Web explorer requires a backend database that contains the user data and is used to run provenance queries. In the docker image the configuration file is located at /web/provgraph_web/
. Simply copy this file from the container to your machine, modify the settings as described below, and then mount the file when running the image as a docker container.
Modify the connection settings in connsettings.py
in clients/ptyhonweb/provgraph_web/
:
# Please change host, user, and password
GPROM_HOST=None
GPROM_DB='orcl'
GPROM_USER=None
GPROM_PASSWD=None
GPROM_PORT=1521
GPROM_BACKEND='oracle'
Note that GPROM_DB
is the SID
of an Oracle instance. You can also change to a different backend such as SQLite, but GProM support for other backends is less complete. For SQLite, just set GPROM_DB
to the path of the .db
file you want to use. Note that the other options are ignored but have to be set to a valid string.
# Please change host, user, and password
GPROM_HOST=''
GPROM_DB='/home/myuser/example.db'
GPROM_USER=''
GPROM_PASSWD=''
GPROM_PORT=1521
GPROM_BACKEND='sqlite'
As another example consider connecting to an Oracle instance that runs on example.host
with a user peter
and password test
and SID orcl
# Please change host, user, and password
GPROM_HOST='example.host'
GPROM_DB='orcl'
GPROM_USER='peter'
GPROM_PASSWD='test'
GPROM_PORT=1521
GPROM_BACKEND='oracle'
docker run -d -p 5000:5000 -v "$(pwd)"/connsettings.py:/web/provgraph_web/connsettings.py iitdbgroup/pug-web-explorer
Open a webbrowser of your choice and open 127.0.0.1:5000
.
Alternatively, you can build and install gprom and the webviewer from source.
You need to install the required python packages, e.g., create a python virtual environment and run:
cd clients/pythonweb/provgraph_web
pip install -r requirements.txt
Modify the connection settings in connsettings.py
in clients/ptyhonweb/provgraph_web/
as explained above for running the docker container.
# Please change host, user, and password
GPROM_HOST=None
GPROM_DB='orcl'
GPROM_USER=None
GPROM_PASSWD=None
GPROM_PORT=1521
GPROM_BACKEND='oracle'
use manage.py
in clients/pythonweb
:
./manage.py runserver
you can then access the app by pointing your browser to 127.0.0.1:5000
.
If you want to build a docker image yourself, then copy your connsettings.py
into Docker/ProvenanceGraph-Web/
and build the image:
cd Docker/ProvenanceGraph-Web
docker build -t myprovweb .
Then to run the app:
docker run -d -p 5000:5000 myprovweb
The app is then available at 127.0.0.1:5000
. Note that the image does currently not support SQLite as a backend (the installed SQLite version is incompatible with GProM as of now).