Giter Club home page Giter Club logo

ocscripttoolbox's Introduction

OCscriptToolbox

A Django-based framework that contains a series of scripts as web applications

At this moment it only contains one application, OC Scheduler, more tools will come later.

sample demo

Installation

Like any Django application is needed a Web Server Gateway Interface (WSGI) server to work. In my case I developed OCscriptToolboox using mod_wsgi.

If you only want to develop or try also is possible to run it using the runserver command (After installing the virtual environment)

Prerequisites

OCscriptToolbox was designed under Python 3.6, to work is required that the WSGI server supports Python 3.

For installation of mod_wsgi in Centos 7, please look the appendix.

Configure Webserver (Apache)

This instructions use the standard folders for apache in Centos 7, similar installation is for the other flavors of linux.

  1. Clone this repository in /var/www/
  2. move the file config_files/apache/oc-toolbox.conf to the folder /etc/httpd/conf.d/ or add the contents to the end of the apache config file.

Configure the Webapp

  1. In the root folder of the app (Ex: /var/www/OCscriptToolbox/) create a new virtual environment called "env"

    $ virualenv env --no-site-packages

  2. Activate the virtual environment.

    $ source env/bin/activate

  3. Now that the Venv is activated, install the dependencies with PIP.

    (env)$ pip install -r requirements.txt

  4. Collect the Static files

    (env)$ cd /var/www/OCscriptToolbox
    (env)$ python3 manage.py collectstatic
  5. Set the Allowed hosts in the app settings located in /var/www/OCscriptToolbox/OCscheduler/settings.py

  6. Deactivate the virtual environment.

    (env)$ deactivate

Configure credentials and capture agent dictionary

In the file OCscheduler/properties.py,

  • Add the credentials. The credentials has to be with a user able to access to the external API of opencast.

  • Set the Opencast server address

  • Set the capture agent dictionary, this parameter is very important because allows to map the room code from the KLIPS system with the list of names registered in Opencast.

The names of each option are the same that are set on the user options in the Workflows.

Configure webform

The webform is actually configured for a custom made options for the University of cologne. If you want to use with your own parameters, you need to modify the options names in:

The option names are in the start workflow to start a task in Opencast, also you have to change in the last file the name of the

Restart apache and enter to the application

Restart apache using $ sudo systemctl restart httpd. After restart enter to the webpage using <hostname>/oc-toolbox/scheduler

Troubleshooting

The site shows errors

  • Look the apache error log $ sudo tail /var/log/httpd/error_log if there is some configuration error

  • Enable the Django debug mode, with this you can found more easy the error.

Apendix

How to install mod WSGI for python 3.x in Centos 7

mod_wsgi, the WSGI server that uses apache, install from pip3 to have python 3.x compability.

$ pip3 install mod_wsgi
$ sudo rm /etc/httpd/conf.modules.d/10-wsgi.conf
$ sudo cp /usr/local/bin/mod_wsgi-express /usr/bin/
$ sudo mod_wsgi-express install-module > /etc/httpd/conf.modules.d/02-wsgi.conf

Please note: it can be installed directly from the Centos 7 repository, unfortunately, this version is only for Python 2.x and it will not work with applications made for Python 3.x

ocscripttoolbox's People

Contributors

dependabot[bot] avatar mliradelc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.