Things that need to be configured outside the scope of this application
-
Download the django-cas project into the HPC_Portal directory (hg clone https://bitbucket.org/cpcc/django-cas ). Move the django_cas directory out of the repo directory and place it inside the HPC_Portal directory (HPC_Portal/django_cas)
-
uncomment in the top-level urls.py the admin line, and add two lines:
url(r'^accounts/login/$', 'django_cas.views.login'),
url(r'^accounts/logout/$', 'django_cas.views.logout'),
- Move the slurm database off the default and create a new default database (create database , grant all on db user, and syncdb).
Make sure to use your username when asked about the super user, or we will be locked out of the admin pages with CAS enabled.
DATABASES = {
'default': {
'NAME': 'portal',
},
'slurm': {
'NAME': 'slurm',
}
}
- Add to the settings.py
DATABASE_ROUTERS=['slurm_manager.slurmroute.SlurmRouter']
Allows us to route all slurm models to the correct database
- set the STATIC_ROOT to the following:
STATIC_ROOT = os.path.join(BASE_DIR, "HPC_Portal", "static")
-
run manager.py collectstatic
-
change the conf/httpd-app.conf to contain an alias for /static/ Alias /static/ "<path_to_project>/HPC_Portal/HPC_Portal/static/"
-
add to settings.py the following CAS parameters:
CAS_SERVER_URL='<cas_server_url>/cas/'
CAS_LOGOUT_COMPLETELY = True
CAS_VERSION = '2'
- Need to grab tokenapi git clone https://github.com/UH-CI/django-tokenapi
- copy/move the tokenapi folder into the HPC_Portal folder
- add the following to the settings.py
- tokenapi to INSTALLED_APPS
-
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'tokenapi.backends.TokenBackend', 'django_cas.backends.CASBackend', )
- Add the following to the top level urls.py
url(r'', include('tokenapi.urls')),