DigOps is a Django App designed to keep track of time spent in different workflow steps involved in digitization of items. DigOps also supports generation of reports that can be used to track the rate at which items are being digitized. It also supports plotting of data in graphs using Google chart API. It uses Django authentication to identify users of the system.It drastically reduces tedious labor and endless headaches in keeping track of hours spent on a digital operation.
This software should be runnable on any kind of operating system. However, these installation instructions are tailored to a Linux server, and have only been tested on ubuntu 10.04 LTS.
Part I - Basic server requirements
-
Install the Apache Django and other dependencies using the following command:
sudo apt-get install apache2 python-dev python-setuptools libapache2-mod-wsgi
-
Install Postgresql
sudo apt-get install postgresql postgresql-contrib libpq-dev
Install the dependencies you need to compile psycopg2 in virtualenv
sudo apt-get build-dep python-psycopg2
-
Set up Postgresql
Create a user for Django
sudo -u postgres createuser --createdb --no-superuser --no-createrole --pwprompt django
Create a database for the digops application
sudo -u postgres createdb -O django digops
-
Install git
sudo apt-get install git-core
Part II - Setting up the project environment
-
Install virtualenv
sudo apt-get install python-setuptools sudo easy_install virtualenv
-
Create directory for your projects (replace DIGOPS-HOME with your root directory)
mkdir /DIGOPS-HOME cd /DISOPS-HOME
-
Clone the git repository using one of the following commands
(GW staff only) git clone [email protected]:gwu-libraries/DigOp.git (everyone else) git clone https://github.com/gwu-libraries/DigOp.git
-
cd into digop directory
cd /DIGOPS-HOME/DigOp
-
Create virtual python environment using following command
virtualenv --no-site-packages ENV
-
Activate the virtual environemnt using the following command
source ENV/bin/activate
-
Install the additional required packages
pip install -r requirements.txt
Part III - Configuring installation
-
Configure database and other settings in a local_settings file
cd DigOp cp local_settings.py.template local_settings.py vim local_settings.py
-
Fill in the values for Database in local_settings.py for the database, NAME, USER, and PASSWORD to the database you created above, and set ENGINE to 'postgresql_psycopg2'
-
Fill in the values for the following fields required for making API calls to Inventory service in local_settings.py:
INV_API_KEY = "" INV_USER = "" INV_URL = ""
-
Fill in the values for the test user required for running tests:
TEST_USER = "" TEST_USER_PWD = ""
-
Fill in the values for Django LDAP Authentication
AUTH_LDAP_SERVER_URI = "" AUTH_LDAP_BIND_DN = "" AUTH_LDAP_BIND_PASSWORD = "" AUTH_LDAP_USER_SEARCH = LDAPSearchUnion( LDAPSearch("", ldap.SCOPE_SUBTREE, "(sAMAccountName=%(user)s)"), )
-
Edit wsgi file
cp DigOp/wsgi.py.template DigOp/wsgi.py vim DigOp/wsgi.py
-
Use the following command in shell to set the loacale
sudo dpkg-reconfigure locales export LC_ALL=en_GB.UTF-8 export LANG=en_GB.UTF-8
-
Go into the DIGOPS-HOME directory where manage.py is stored and type in the following command. DO NOT create a superuser when prompted!
python manage.py syncdb
-
Migrate the database to the latest updates
python manage.py migrate
-
Create the database super user
python manage.py createsuperuser
-
At this point, you should be able to run the app and view it working, even without apache configured. This might be sufficient for dev/test.
python manage.py runserver 0.0.0.0:8080 (visit http://your-server:8080 to test)
-
If you want to use apache, add apache config file to sites-enabled and edit it
sudo cp ../apache/DigOp /etc/apache2/sites-available/DigOp vim /etc/apache2/sites-available/DigOp
-
Enable the app in apache and bounce apache2 to start it up
sudo a2ensite DigOp sudo /etc/init.d/apache2 restart
-
open a web browser and type in the url of the server running DigOps app. Type in the admin user and password created in step 13 to login.
-
If you get the Access Forbidden error, Make sure that the folder containing DIGOPS-HOME allows read and execute permissions to everyone. Typically, this might require giving 755 with chmod to your home directory if DIGOPS-HOME resides in your home directory.