Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

UH-CI/slurm_manager

Repository files navigation

Things that need to be configured outside the scope of this application

  1. 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)

  2. 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'),
  1. 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',
    }
}
  1. Add to the settings.py
DATABASE_ROUTERS=['slurm_manager.slurmroute.SlurmRouter']

Allows us to route all slurm models to the correct database

  1. set the STATIC_ROOT to the following:
STATIC_ROOT = os.path.join(BASE_DIR, "HPC_Portal", "static")
  1. run manager.py collectstatic

  2. change the conf/httpd-app.conf to contain an alias for /static/ Alias /static/ "<path_to_project>/HPC_Portal/HPC_Portal/static/"

  3. add to settings.py the following CAS parameters:

CAS_SERVER_URL='<cas_server_url>/cas/'
CAS_LOGOUT_COMPLETELY = True
CAS_VERSION = '2'
  1. Need to grab tokenapi git clone https://github.com/UH-CI/django-tokenapi
  2. copy/move the tokenapi folder into the HPC_Portal folder
  3. 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',
     )
    
  1. Add the following to the top level urls.py
    url(r'', include('tokenapi.urls')),
    

About

django project to interact with the slurm manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published