OpenMalaria Portal
OpenMalaria portal is a user-friendly web interface for OpenMalaria model. User can create
simulation, define environment and explore effect of interventions (drugs, spraying, bednets) on
malaria transmission levels. Model can be executed from the web interface using our
high-performance cluster.
Model output can be easily visualized or downloaded for further processing.
https://github.com/vecnet/om/assets/1641196/1965c836-0290-4f06-98a7-3414bf2a80fb
This Django project has been tested on Windows 8 x64, RedHat 7 and CentOS 7
Create database structures
./manage.py migrate
Create an admin user./manage.py createsuperuser
Run the server.
python manage.py runserver
docker-compose up
Create Virtualbox VM vagrant up
. It may take a while when starting VM for the first time
Login to VM using vagrant ssh
command or your favorite ssh client. Login: vagrant, password vagrant
Switch to /vagrant directory cd /vagrant
Start django server python manage.py runserver 0.0.0.0:8000
Note you have to use 0.0.0.0 as server address, otherwise port forwarding may not work
You can edit files in your project directory, and changes will be visible to the virtual machine
(in /vagrant directory)
Credentials
SSH Login: vagrant, password vagrant
PostgreSQL Database: om, Login: om, Password: om
Note: To utilize the PostgreSQL database, create a settings_local.py
file containing the following:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'om',
'USER': 'om',
'PASSWORD': 'om',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
By default, website.settings.dev is used for manage.py and website.settings.production is used in wsgi.py
It is typically required to change default settings file used in manage.py in production and qa environments
Create config_local.py in the root folder (next to wsgi.py and manage.py)
Note if DJANGO_SETTINGS_MODULE is defined, it takes precedence over settings_module in config_local.py
Example:
settings_module = "website.settings.qa"
Check wsgi.py and manage.py to see how it works - they are different from default versions generated by Django.
DEBUG = False
SECRET_KEY = 'z5azf=qbb%lmzd^xf9#g5bqtv30e%12P!t(&!0hkpzp0jc8q5$'
DATABASES = {
'default': {
'ENGINE': "django.db.backends.postgresql_psycopg2",
'NAME': "om",
'USER': "om",
'PASSWORD': "om",
'HOST': "127.0.0.1",
'PORT': "5432",
}
}
ADMINS = [
('Alex', 'avyushko@nd.edu'),
]
ALLOWED_HOSTS = [
'om.vecnet.org',
]
python manage.py crontab add
Install django-auth-pubtkt packagepip install django-auth-pubtkt
Copy public key for validating pubtkt tickets to /etc/httpd/conf/sso/tkt_pubkey_dsa.pem
/root/.acme.sh/acme.sh --issue -d om.vecnet.org -w /opt/portal/om.vecnet.org/apache/ --log
/root/.acme.sh/acme.sh --installcert -d om.vecnet.org --certpath /etc/httpd/ssl/om.vecnet.org.cer --keypath /etc/httpd/ssl/om.vecnet.org.key --fullchainpath /etc/httpd/ssl/om.vecnet.org.int.cer --reloadcmd "service httpd restart"