This application provides a user interface to generate a REFL1D script and run it on a remote node.
Documentation is available at https://web-reflectivity.readthedocs.io/.
This application provides a web interface to perform modeling of reflectivity data. This Django application gives users forms to set up their model and submit fitting jobs. To do so, it generates a python script to be executed either locally or on a remote compute resource. The generated script launches REFL1D, which does the actual minimization.
Job management is done using a Django remote submission package. It manages remote jobs using the Celery distributed task queue and provides real-time monitoring of remote jobs and their associated logs. Celery uses message brokers to pass messages between the Django application and compute nodes. The Redis in-memory data structure store is used as the message broker. The script executed on the compute node sets up and executes the REFL1D fit, then gathers the output data.
The information below describes how one would deploy the application in production. For a simpler test deployment, see the instructions to run a test server. Those instructions will walk you through a basic installation process and will give you a list of dependencies you'll need.
A basic set of requirements for the application can be found in requirements.txt
.
This is only recommended if you are installing more than a test environment and will be deploying your
own database and adjusting your configuration yourself. It will not be sufficient for testing (see the test
installation section above). Depending on which database and authentication solution you choose, your
dependencies may change.
You will also need to install redis-server.
The Django application will need a database. It was developed using PostgreSQL, but can be used with any database.
You can enter your database details in the web_reflectivity/web_reflectivity/settings.py
file.
The application supports both users local to the application or users authenticated through LDAP.
To use LDAP, the authentication settings should be entered in web_reflectivity/web_reflectivity/settings.py
.
For that purpose, openssl
should be installed.
Once a user is logged in, the application will submit jobs to your compute resources on the user's behalf, through celery. An ssh key should be generated and placed in the apache user's .ssh directory. It should also be copied in the celery user's .ssh directory.
The application was developed using apache
and mod_wsgi
, although it could be served by other methods compatible with Django.
An example apache configuration is available in apache/apache_django_wsgi.conf
. This file can be modified with your SSL details
and put in /etc/httpd/cond.d
.
Redis can be run with default configuration.
On a production system, you will want to run celery as a service.
To do this, copy the web_reflectivity/web_reflectivity/celeryd
file into /etc/default/celeryd
The application installs in /var/www/web_reflectivity
.
sudo make install
sudo /sbin/service redis start
sudo /sbin/service celeryd start
sudo /sbin/service httpd restart
To report a problem, please create an issue using the "Issues" tab above. If you would like to suggest changes, please either create an issue or a pull request.
Please cite the following when using this software:
- P. A. Kienzle, K. V. O'Donovan, J. F. Ankner, N. F. Berk & C. F. Majkrzak, REFL1D.
- M. Doucet, R. M. Ferraz Leal, T. C. Hobson, Web interface for reflectivity fitting, SoftwareX 7 (2018) 287-293.