VRE Backend API and Scheduler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Joshua Rubingh 4b56c91fce Update documentation 1 year ago
.vscode Delete '.vscode/settings.json' 2 years ago
VRE Update documentation 1 year ago
doc Update documentation 1 year ago
docker Update documentation 1 year ago
nginx Add NGINX CORS headers (2) 1 year ago
.dockerignore Split up code 2 years ago
.drone.yml Update tests 2 years ago
.gitignore Gitignore 1 year ago
.pep8 Python pep8 format 1 year ago
LICENSE Split up code 2 years ago
README.md Update documentation 1 year ago
clouds.yaml.example Split up code 2 years ago
docker-compose.yaml Upgrade security measurements 1 year ago
run_scheduler.sh Update documentation 1 year ago


VRE Broker

Build Status

Virtual Research Environment Broker is the hart of the Research Workspace system. This is an API that is handling all the actions and requests from either a web interface of direct API.

This API is part of the Research workspace system created by the Rijksuniversiteit Groningen.

This API is responsible for:

  • Backend for the web interface to the researchers
  • Inviting other researchers to your project
  • Handles the creation of virtual workspaces (VRW / Openstack)

More to come ...


The Broker is made with the Django Framework in combination with Django Rest Framework. The installation is pretty straight forward. After this the code is at location Broker and during the setup we assume that this is the root folder where you are in.

  • First we need a running version of Redis. For Debian/Ubuntu like OS:
sudo apt install redis-server
  • Checkout this repository:
git clone https://git.web.rug.nl/VRE/Broker.git
  • Create a Python3 virtual environment:
cd Broker
python3 -m venv venv
  • Activate the Python3 virtual environment:
source venv/bin/activate
  • Install all the required Python3 modules:
pip install -r VRE/requirements.txt
  • Create a .env config file and adjust the Environment settings. At least enable Debug in development :
cp VRE/VRE/env.example VRE/VRE/.env
  • Create the database structure and load some needed data
VRE/manage.py migrate
VRE/manage.py loaddata virtual_machine_initial_data
VRE/manage.py loaddata university_initial_data
  • Create a super user (admin) to login to the admin part of the API
VRE/manage.py createsuperuser
  • Start the Django application
VRE/manage.py runserver

Now you can enter the Django Admin at http://localhost:8000/admin/. If do not see any styles on the page, make sure you have enabled Debug or setup static files for Django

The API can be found at http://localhost:8000/api/swagger/ or http://localhost:8000/api/redoc/

Environment settings

In order to get the API running, you need to specify some settings. This is done by creating environment variables with values that are read out by Django during startup. For this you can use a .env file or by manually setting bash environment variables. And example env file can be found at VRE/VRE/env.example which can be used as a template.

The location of the env file should be VRE/VRE/.env

more information can be found here


All variables have a short explanation above them what they do or used for.

# A uniquely secret key
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key

# Disable debug in production
# https://docs.djangoproject.com/en/dev/ref/settings/#debug

# Allowed hosts that Django does server. Use comma separated list Take care when NGINX is proxying in front of Django
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts

# All internal IPS for Django. Use comma separated list
# https://docs.djangoproject.com/en/dev/ref/settings/#internal-ips

# Enter the database url connection. Enter all parts even the port numbers: https://github.com/jacobian/dj-database-url
# By default a local sqlite3 database is used.

# The location on disk where the static files will be placed during deployment. Setting is required
# https://docs.djangoproject.com/en/dev/ref/settings/#static-root

# Enter the default timezone for the visitors when it is not known.
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TIME_ZONE

# Email settings
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host

# Email user name
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user

# Email password
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password

# Email server port number to use. Default is 25
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port

# Does the email server supports TLS?
# https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls

DEFAULT_FROM_EMAIL=Do not reply<no-reply@rug.nl>

# The sender address. This needs to be one of the allowed domains due to SPF checks
# The code will use a reply-to header to make sure that replies goes to the researcher and not this address
EMAIL_FROM_ADDRESS=Do not reply<no-reply@rug.nl>

# The Redis server is used for background tasks. Enter the variables below. Leave password empty if authentication is not enabled.
# The hostname or IP where the Redis server is running. Default is localhost

# The Redis port number on which the server is running. Default is 6379

# The Redis password when authentication is enabled

# The amount of connections to be made inside a connection pool.  Default is 10

# Enter the full path to the Webbased file uploading without the Study ID part. The Study ID will be added to this url based on the visitor.

# Enter the full url to the NGINX service that is in front of the TUSD service. By default that is http://localhost:1090

# Which file extensions are **NOT** allowed to be uploaded. By default the extensions exe,com,bat,lnk,sh are not allowed

# Sentry settings
# Enter the full Sentry DSN string. This should contain a key and a project

Background scheduler

For some actions we need a background scheduler system. This system is relaying on Redis, so make sure you have Redis installed. The scheduler can be start with the command:


This will load the Python3 virtual environment and start the background scheduler. Keep the console open.


We use NGINX as a proxy in front of the API. This is not mandatory, but can be handy when you have a busy api.

VRW Integration


Openstack Integration